I saw in older posts (2017~2020) that you do it from entity.model , but in my case, this was undefined so I can’t access meshInstances.
I think now we need to access from entity.render._meshInstances
Thanks to some old examples from this forum I’m able to modify the vertices themselves, but not the UVs. A quick example bellow:
instance2Meshes = (instance) => (instance.render._meshInstances)
mesh = instance2Meshes(pc.app.root.findByName('Monkey'))[0]
n = mesh.mesh.vertexBuffer.storage.length || mesh.mesh.vertexBuffer.storage.byteLength / 4
buffer = mesh._mesh.vertexBuffer;
iterator = new pc.VertexIterator(buffer)
posSem = iterator.element[pc.SEMANTIC_POSITION];
original = [...new Float32Array(buffer.storage)]
goUp = new Float32Array([...new Array(n)].map((e,i) => i%11 == 1 ? posSem.array[i] + 1 : original[i]))
mesh.mesh.vertexBuffer.setData(goUp)
Thanks