I stumbled upon the below, and would like to implement this in my puzzles-enabled application. What code would I need to add to my app to enable this function to work?
http://stemkoski.github.io/Three.js/Particle-Engine.html
Below is the specific snippet I’d need to call:
//Examples.smoke
Examples =
{
smoke :
{
positionStyle : Type.CUBE,
positionBase : new THREE.Vector3( 0, 0, 0 ),
positionSpread : new THREE.Vector3( 10, 0, 10 ),
velocityStyle : Type.CUBE,
velocityBase : new THREE.Vector3( 0, 150, 0 ),
velocitySpread : new THREE.Vector3( 80, 50, 80 ),
accelerationBase : new THREE.Vector3( 0,-10,0 ),
particleTexture : THREE.ImageUtils.loadTexture( ‘images/smokeparticle.png’),
angleBase : 0,
angleSpread : 720,
angleVelocityBase : 0,
angleVelocitySpread : 720,
sizeTween : new Tween( [0, 1], [32, 128] ),
opacityTween : new Tween( [0.8, 2], [0.5, 0] ),
colorTween : new Tween( [0.4, 1], [ new THREE.Vector3(0,0,0.2), new THREE.Vector3(0, 0, 0.5) ] ),
particlesPerSecond : 200,
particleDeathAge : 2.0,
emitterDeathAge : 60
}
}
Attachments:
You must be
logged in to view attached files.