Created
November 14, 2012 07:33
-
-
Save poezn/4070839 to your computer and use it in GitHub Desktop.
Another Inlet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"Another Inlet","endpoint":"","display":"webgl","public":true,"require":[],"tab":"edit","display_percent":0.5906250000000002,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var particles = new THREE.Geometry(), | |
pMaterial = | |
new THREE.ParticleBasicMaterial({ | |
color: 0xFFFFFF, | |
size: 20 | |
}); | |
// now create the individual particles | |
for(var p = 0; p < 1800; p++) { | |
// position values, -250 -> 250 | |
var pX = Math.random() * 219 - 250, | |
pY = Math.random() * 500 - 250, | |
pZ = Math.random() * 500 - 250, | |
particle = new THREE.Vector3(pX, pY, pZ); | |
// add it to the geometry | |
particles.vertices.push(particle); | |
// create a particle with random | |
} | |
// create the particle system | |
var particleSystem = | |
new THREE.ParticleSystem( | |
particles, | |
pMaterial); | |
// add it to the scene | |
tb.scene.add(particleSystem); | |
/*var cube = new THREE.Mesh( | |
new THREE.CubeGeometry( 5, 5, 5 ), | |
new THREE.MeshLambertMaterial( { color: 0xFF0000 } ) | |
); | |
tb.scene.add( cube ); | |
tb.camera.position.set( 14, 12.6, 33 ); | |
var light = new THREE.PointLight( 0xFFFF00 ); | |
light.position.set( 10, 0, 10 ); | |
tb.scene.add( light ); | |
*/ | |
tb.renderer.render( tb.scene, tb.camera ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment