3d code

set the variable xrot to mouse x and yrot to mouse y

not rotate

Previous z indexing algorithm is slow because it renders dots.We can render triangles instead (A triangle is 900 dots)


It renders triangles (in process z index) now.
It looks buggy but only because the triangles are semi-transparent.
image
Green is yellow plus blue (when you draw)
image


Someone translate this into Snap?Probably me :slight_smile:
(Cheater:Easy!just use the processing js framework!)