This is not a feature request!
It would be nice to have a vector editor for Snap! , and I was thinking of making one myself. I have a few questions:
How hard would it be?
If I implemented one and made a PR, would it be accepted?
Does anyone have any ideas how I could do this?
Honestly, I forgot there was a vector editor already. But I was thinking something more like Scratch's than what we have now.
bh
September 4, 2024, 7:26pm
4
Okay, read their code, too!
The source code for the scratch paint editor (includes both vector and bitmap) can be found on github here.
Paint editor for Scratch 3.0
Oh, heh, woops. Anyway, I'm pretty sure this is it.
/*
paint.js
a paint editor for Snap!
inspired by the Scratch paint editor.
written by Kartik Chandra
Copyright (C) 2019 by Kartik Chandra
This file is part of Snap!.
Snap! is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This file has been truncated. show original
I tried looking in there but didn't find anything. Would you perhaps know where the definition for SVG_Costume
is?
Oh, actually sketch.js
contains the vector editor.
/*
sketch.js
a vector paint editor for Snap!
inspired by the Snap bitmap paint editor and the Scratch vector editor.
written by Carles Paredes and Bernat Romagosa
Copyright (C) 2017 by Carles Paredes and Bernat Romagosa
This file is part of Snap!.
Snap! is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This file has been truncated. show original
As for the SVG_Costume
class definition, it's defined in objects.js
.