【发布时间】:2020-07-03 22:36:53
【问题描述】:
我正在尝试按照推荐的步骤更新本文档中概述的 BufferGeometry:https://threejs.org/docs/#manual/en/introduction/How-to-update-things
但是我使用的是打字稿,当我尝试更改 line.geometry.attributes.position.array 上的值时,就像在示例中所做的那样
positions[ index ++ ] = x;
positions[ index ++ ] = y;
positions[ index ++ ] = z;
它会抛出一个错误TS2542: Index signature in type 'ArrayLike<number>' only permits reading.
还有其他方法可以在运行时更新 BufferGeometry 吗?
【问题讨论】:
标签: typescript three.js