Example of startupTHREE.js . fork it and start doing three.js immediatly :)
repository https://github.com/jeromeetienne/startupthree.js
A Pen by Jerome Etienne on CodePen.
| <script src='https://cdn.rawgit.com/jeromeetienne/startupthree.js/0.6.0/startupThree.js'></script> |
| startUpTHREEjs({ | |
| stats: true | |
| }, function(demo){ | |
| // create a 3d object | |
| var geometry = new THREE.TorusGeometry(1, 0.5) | |
| var material = new THREE.MeshNormalMaterial() | |
| var mesh = new THREE.Mesh(geometry, material) | |
| // add the 3d object to the scene | |
| demo.scene.add(mesh) | |
| // make the object move | |
| demo.onRenderFcts.push(function(delta){ | |
| mesh.rotation.x += Math.PI*2 * delta * 0.1 | |
| mesh.rotation.y += Math.PI*2 * delta * 0.1 | |
| }) | |
| }) |
Example of startupTHREE.js . fork it and start doing three.js immediatly :)
repository https://github.com/jeromeetienne/startupthree.js
A Pen by Jerome Etienne on CodePen.