vector, point, rectangle
Closed this issue · 3 comments
Rectangle outputs an object ({rectangle: [x,y,w,h]}
) so that fill and stroke know what to do with it. But that's different than drawImage's rectangle inputs. We can't really accept both kinds of rectangle there, since it has to be either array or object to parse manual input from the node inspector.
What's currently Vector could be Point, since it is specific to x and y. Point could follow Circle and Rectangle, and output {point: [x, y]}
.
Vector could be a simple array in/out, for any number of numbers. Then it would be easy to plug Vector into Point, Circle, Rectangle, and have those modules do the conversion.
What do you think @automata?
I think that's OK for these primitives that should directly become context function arguments.
For Stroke, Fill, LineWidth, etc., I think it might be a little saner to make an object:
{
type: 'stroke',
strokables: []
}