【发布时间】:2018-07-07 06:28:06
【问题描述】:
https://threejs.org/examples/#webgl_buffergeometry_instancing_dynamic 和https://threejs.org/docs/#manual/introduction/How-to-update-things
示例旋转立方体。
我希望能够改变那里的位置。文件说要这样做 mesh.geometry.attributes.position.needsUpdate = true;并更新位置数据。但是当我这样做时,什么都没有发生
有什么想法吗?
【问题讨论】:
-
已解决。仅将其添加到动画将通过更改偏移量来更新位置 mesh.geometry.attributes.offset.array[0] += .25; mesh.geometry.attributes.offset.needsUpdate = true;
标签: three.js