When the uvs or indices props changes on the SimpleMesh component the underlying buffers are not being updated as expected. Here's what's happening:
I'm changing all 3 of these props at the same time, uvs, vertices, and indices.
When inspecting the underlying buffers via a ref, only the vertex buffer is being updated.
The 'aTextureCoord' attribute buffer still contains the values from the first render of the component.
Same for the index buffer
Expected Behavior
I expect that when any of the props related to geometry change, the underlying buffers should be updated and the mesh should render using these new values.
Steps to Reproduce
I have included below a basic example that demonstrates the issue:
I just wanted to take the time to congratulate you all on making such an amazing library! My productivity has been insane while using it (and all of Pixi.js in general). Seriously, incredible work!
Current Behavior
When the uvs or indices props changes on the SimpleMesh component the underlying buffers are not being updated as expected. Here's what's happening:
Expected Behavior
I expect that when any of the props related to geometry change, the underlying buffers should be updated and the mesh should render using these new values.
Steps to Reproduce
I have included below a basic example that demonstrates the issue:
Environment
@pixi/react
version: 7.0.1pixi.js
version: 7.1.2React
version: 18.2.0ReactDOM
version: 18.2.0Possible Solution
For anyone else experiencing this issue, I have worked around the issue for now using the following code:
Additional Information
I just wanted to take the time to congratulate you all on making such an amazing library! My productivity has been insane while using it (and all of Pixi.js in general). Seriously, incredible work!