【问题标题】:buffergeometry instancing dynamic How to Update positionbuffergeometry 实例化动态如何更新位置
【发布时间】:2018-07-07 06:28:06
【问题描述】:

https://threejs.org/examples/#webgl_buffergeometry_instancing_dynamichttps://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


【解决方案1】:

解决了。仅将其添加到动画将通过更改偏移量来更新位置 mesh.geometry.attributes.offset.array[0] += .25; mesh.geometry.attributes.offset.needsUpdate = true;

【讨论】:

    猜你喜欢
    • 2020-07-03
    • 2018-01-31
    • 2011-01-26
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    • 2016-06-24
    • 2013-12-16
    相关资源
    最近更新 更多