isomer icon indicating copy to clipboard operation
isomer copied to clipboard

Diamond as native shape

Open dnkmdg opened this issue 9 years ago • 6 comments

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

dnkmdg avatar Mar 27 '15 14:03 dnkmdg

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?

jdan avatar Mar 27 '15 17:03 jdan

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?

whoeverest avatar Mar 28 '15 10:03 whoeverest

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 avatar May 16 '15 11:05 jbovenschen

@jbovenschen happy to review if you ever want to merge it :) of course you don't need my approval

jdan avatar May 16 '15 14:05 jdan

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.

derhuerst avatar Jun 24 '15 18:06 derhuerst

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.

derhuerst avatar Jun 24 '15 18:06 derhuerst