isomer
isomer copied to clipboard
Diamond as native shape
I'd love to have the diamond-shape as a native shape like, preferably with the ability to set sides (much like cylinder objects).
Oh, and love your work <3
I usually encourage folks to just go forth and make those shapes, instead of adding them to the standard library. For instance, I can imagine something like
var diamond = require("isomer-diamond");
iso.add(diamond(8));
This should be doable now, but I hope to make it easier - by making the Shape API better. Thoughts?
I agree with @jdan it's better to keep special shapes separate. Maybe we should create an isomer-shapes
repository, so we can keep track of them there?
I agree to with @jdan. But i think it is better to just create separate builds for isomer. So we can keep the utils / shapes in the some repository.
In my own fork i added a method to add custom Shapes / Paths to the Shape and Path constructors.
@jbovenschen happy to review if you ever want to merge it :) of course you don't need my approval
I had the same problem with velo, my minimalistic 2D canvas library. I wanted to keep the footprint very small but introduce some flexibility for developers to use third-party "modules".
I ended up with a build system that reads the list of modules do be bundled from package.json
. And I am quite happy with it. Read more about how to customize velo with your own modules.
Because modules in velo are just directories containing JavaScript files, developers can use Git submodules to add their third-party stuff and still keep the main repo clean.
Things rather unrelated to the core like #8 could be done like this.
In fact, in velo, I added a few things that are in the main repo, but not in the default build.