我试图在我自己的项目中使用 stemkoski 的粒子引擎(他使用粒子引擎的例子可以在这里找到)。我收到了一个错误three.min.js:474 THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead。追根溯源,发现是他在他的库中使用的threejs版本和我的不一样。而我使用http://threejs.org/build/three.min.js,他使用了不同的版本(查看文件,我相信它是版本 60 )
到目前为止我已经尝试过:
使用了
three.min.js来自threejs.org/build,但在ParticleEngine.jsthis.particleGeometry = new THREE.Geometry();至
this.particleGeometry = new THREE.BufferGeometry();
这几乎给了我同样的错误
- 改用他的three.js版本,说
renderer.setPixelRatio它们geometry.scale不是函数(因为我在自己的项目中使用了这两个函数)