PHP Classes

File: javascript/object_creation/v3/particleSystem.js

Recommend this page to a friend!
  Classes of Kabir Hossain   PHP CodeIgniter Tips Tricks   javascript/object_creation/v3/particleSystem.js   Download  
File: javascript/object_creation/v3/particleSystem.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP CodeIgniter Tips Tricks
Collection of tips and examples to use CodeIgniter
Author: By
Last change:
Date: 16 days ago
Size: 614 bytes
 

Contents

Class file image Download
var adc = adc || {}; adc.particleSystem = { particles: [], extend: function(props) { obj = Object.create(this); for(prop in props) { if(props.hasOwnProperty(prop)) { obj[prop] = props[prop]; } } return obj; }, addParticle: function(particle) { this.particles.push(particle); }, update: function() { var i, numParticles = this.particles.length; for(i = 0; i < numParticles; i += 1) { this.particles[i].update(); } }, render: function() { var i, numParticles = this.particles.length; for(i = 0; i < numParticles; i += 1) { this.particles[i].render(); } } };