davidedc / livecodelab

a web based livecoding environment
http://livecodelab.net/
MIT License
327 stars 63 forks source link

axes #257

Open davidedc opened 9 years ago

davidedc commented 9 years ago

I'll create a separate branch for this, as it's complex enough.

Creating three lines of different colors is easy. ...but we probably also want to transparent-fade the rest of the world while we are showing axes, because otherwise the axes are very likely to be occluded by some other geometry. Also we probably want to add the X,Y,Z writing (and multiple ones since they would be invisible "sideways") and add a nice arrow at the top of the lines (we don't have such shape yet) and we should make the axes scalable and since lines don't scale in thickness that means that the lines are really boxes.

Since we are implementing thick-lines, then thick lines can be minimally made with 2 rectangles and 2 triangles, and they should be flat-filled (no lights should apply), so we should do that.

Also ideally we'd like to back-scale the lines of the axes so they are always the same size no matter what the current scale of the world is - there are a couple of ways to do that (keeping the scale vector around or extracting it from the world matrix) but either method needs implementation.

davidedc commented 9 years ago

(in theory instead of writing multiple "X" "Y" "Z" near the axes we could present the "X,Y,Z" always front-facing by extracting the Euler angles (any of the standard 12 common orders) from the world matrix as well. If someone has a better idea let me know.

davidedc commented 9 years ago

draft version of front-facing text is tracked here: https://github.com/davidedc/livecodelab/issues/259