Skip to content

Instantly share code, notes, and snippets.

@poezn
Created November 14, 2012 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poezn/4070839 to your computer and use it in GitHub Desktop.
Save poezn/4070839 to your computer and use it in GitHub Desktop.
Another Inlet
{"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}
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