docs/examples/js/ParticleExample.js
function(){

			// Update the next frame
			updateId = requestAnimationFrame(update);

			var now = Date.now();
			if (emitter)
				emitter.update((now - elapsed) * 0.001);

			framerate.innerHTML = (1000 / (now - elapsed)).toFixed(2);

			elapsed = now;

			if(emitter && particleCount)
				particleCount.innerHTML = emitter.particleCount;

			// render the stage
			renderer.render(stage);
		}
function(){

			// Update the next frame
			updateId = requestAnimationFrame(update);

			var now = Date.now();
			if (emitter)
				emitter.update((now - elapsed) * 0.001);

			framerate.innerHTML = (1000 / (now - elapsed)).toFixed(2);

			elapsed = now;

			if(emitter && particleCount)
				particleCount.innerHTML = emitter.particleCount;

			// render the stage
			renderer.render(stage);
		}
function ( ) { // Update the next frame updateId = requestAnimationFrame ( update ) ; var now = Date . now ( ) ; if ( emitter ) emitter . update ( ( now - elapsed ) * 0.001 ) ; framerate . innerHTML = ( 1000 / ( now - elapsed ) ) . toFixed ( 2 ) ; elapsed = now ; if ( emitter && particleCount ) particleCount . innerHTML = emitter . particleCount ; // render the stage renderer . render ( stage ) ; }
Update function every frame
Update function every frame