Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript: How to draw a simple line on canvas (in 3d) and make it rotatable (in 3d)?

So I want to draw a line on canvas (in 3d) and make it rotatable (in 3d) on mouse dragging that line (dragging some of its points) (better with out use of anything like a specialized lib - pure no libs JS...)?

like image 984
Rella Avatar asked Dec 30 '10 02:12

Rella


2 Answers

A good choice is the "Three.js" library; the README has a simple example of how to create a simple canvas-rendered scene. The "Voxels" example has mouse rotation; for fun, see the "spikeball" demo.

like image 138
Phrogz Avatar answered Nov 11 '22 21:11

Phrogz


I think c3dl (documentation) will help you.

like image 1
Wazy Avatar answered Nov 11 '22 20:11

Wazy