Skip to content
tracend edited this page Jan 22, 2013 · 2 revisions

jQuery Three tries to be lightweight and not controlling over the other dependencies in the application.

There are mainly two events that are necessary for every

init callback

This is triggered right after the lib is initialized. A callback method is passed with the initial code, that's processed right after the "init" method:

$("#main").three( options, function( $3d ){

// do stuff with the $3d object

});

update loop

The rendering engine loops through steady intervals, using requestAnimFrame. On every loop an "update" event is triggered that you can use to modify the 3D environment:

$("#main").on("update", function( $3d ){

// do stuff with the $3d object

});		

Clone this wiki locally