所以我开始学习 Three.js 并且我正在一步一步地遵循教程,但是我收到了上面的错误。
这是有问题的代码: const Geometry = new THREE.BufferGeometry()
const vertex1 = new THREE.Vector3(0, 0, 0) Geometry.vertices.push(vertex1)
const vertex2 = new THREE.Vector3(0, 1, 0) Geometry.vertices.push('vertex2')
const vertex3 = new THREE.Vector3(1, 0, 0) Geometry.vertices.push('vertex3')
有人可以解释一下为什么推送不起作用吗?即使我定义了一个空数组。
另外,本教程使用 const Geometry = new THREE.Geometry(),但我收到一条错误消息,指出 Geometry 不是构造函数。有任何想法吗?
three.js ×1