OpenGL State Control
Rather simple but powerful PR.
This PR adds constant time subroutines for updating the state of existing shapes. Note that even if all the shapes have to be updated, the subroutines in this PR are still several orders of magnitude faster than recomputing the entire tree.
Subroutines:
setHidden(id: number, hide: boolean): void
setLineColor(id: number, color: number[]): void
setColor(id: number, color: number[]): void
To take full advantage of this PR several things in the current code base would have to be changed so we might not end up being able to get the highest performance out this that's possible. But the option being available means that for example the color utils could become really efficient and not have to redraw the entire tree. We could also render subtrees by just hiding all the other nodes.
fixes #144 (closed)
Edit: the ID of a shape is returned by the draw calls now. See the documentation.