jeromeetienne / threex

Game Extensions for three.js
http://www.threejsgames.com/extensions/
MIT License
334 stars 59 forks source link

Three.js r49 #22

Open Tobiasartz opened 12 years ago

Tobiasartz commented 12 years ago

You are aware that your demo no longer works with R49 of Three.js? The values of boundingbox are now somewhere else for example...

jeromeetienne commented 12 years ago

Can youngive a ref to this

renegademaster88 commented 12 years ago

Vertices have been removed from r49 // you need to change vertices.push var position = new THREE.Vector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY); vertices.push(position);

//then change these two functions var onParticleCreated = function(particle) { var vertexIdx = particle.target.vertexIdx; // copy particle position into three.js geometry vertices[vertexIdx] = particle.position;
};

var onParticleDead = function(particle) {
    var vertexIdx   = particle.target.vertexIdx;

    // Hide the particle
    valuesColor[vertexIdx].setHex( 0x000000 );
    vertices[vertexIdx].set(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);

    // Mark particle system as available by returning to pool
    vertexIndexPool.add( vertexIdx );
};