THREE.BufferGeometry error with stemkoski Particle Engine

256 views Asked by At

I was trying to use stemkoski's particle engine in my own project (his example of using the particle engine can be found here ). I have received an error of three.min.js:474 THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead. After tracking down the source, I noticed that it is the version of threejs he used in his library that is different from mine. Whereas I used http://threejs.org/build/three.min.js, he used a different version (looking into the file, I believe it's version 60 )

What I have tried so far:

  1. Used the three.min.js from threejs.org/build but change the following in the ParticleEngine.js

    this.particleGeometry = new THREE.Geometry();
    

    to

    this.particleGeometry = new THREE.BufferGeometry();
    

This pretty much gives me the same errors

  1. Used his version of three.js instead, says renderer.setPixelRatio and geometry.scale they are not functions (Because I used these two functions in my own project)
1

There are 1 answers

0
user2758635 On

I solved this by using the squarefeet/ShaderParticleEngine instead of the stemkoski and it works well. I gave anoter piece of information in a previous answer but it was deleted by Brad as considered as not helpful. I believe it was as it says that updating three.js to r79 was not a solution.