phetsims / kite

A library for creating, manipulating and displaying 2D shapes in JavaScript.
http://scenerystack.org/
MIT License
15 stars 6 forks source link

Consider mutability options in APIs #29

Closed jonathanolson closed 8 years ago

jonathanolson commented 11 years ago

Consider allowing updates directly to Vector2 instances, since they would be shared by the before/after segments? Consider keeping the call history so it can be modified? Are there other ways to provide hooks into the path to only modify part of it?

Also many times when we want a modified Shape, it is common for the entire Shape to change. An 'input vectors dirty' flag may do really well until we validate the entire shape.

jonathanolson commented 11 years ago

Note that vectors isn't enough, think about changing an arc radius.

Easiest way to support mutability would be to do it at the Segment (low) level, and being able to invalidate segments.

jonathanolson commented 8 years ago

General support for this was added.