三.Geometry 不是构造函数

Nav*_*dav 1 javascript three.js

因为我一直在开发一个three.js 开放世界游戏,所以我需要在那里应用下雨效果。我遵循了一些 github 存储库的教程和源代码。不知道我缺少什么?

目前我是three.jscdn

三.min.js

三.module.js

和所有其他口味,但似乎缺少一些东西。

Nav*_*dav 5

我发现 Three.js r125 删除了对几何的支持。我们现在必须使用自定义 BufferGeometry 了。 https://threejsfundamentals.org/threejs/lessons/threejs-custom-buffergeometry.html

提示:如果有人仍然想使用Geometry则在使用cdn 时在版本声明中使用r122

  • 将 package.json 中的三个 js 版本更改为 0.124.0 是有效的,因为 THREE.Geometry 在版本 125 中被删除。顺便说一下,我正在使用 npm。[来源链接](https://github.com/tengbao/vanta/issues/101)。 (2认同)