Hi!
Found a small bug when exporting the HTML of a skinned mesh (I assume this also affects other exports).
After the first play, the following loops are static and nothing moves. Here is a reproduction
import numpy as np
import viser
server = viser.ViserServer(port=0)
mesh = server.scene.add_mesh_skinned(
"/body",
vertices=np.array([[-0.5, 0, 0], [0.5, 0, 0], [0, 1, 0]], np.float32),
faces=np.array([[0, 1, 2]], np.uint32),
bone_wxyzs=np.array([[1, 0, 0, 0]], np.float32),
bone_positions=np.array([[0, 0, 0]], np.float32),
skin_weights=np.ones((3, 1), np.float32),
)
rec = server.get_scene_serializer()
for _ in range(40):
mesh.bones[0].wxyz = (0.9239, 0, 0, 0.3827)
rec.insert_sleep(0.05)
mesh.bones[0].wxyz = (0.9239, 0, 0, -0.3827)
rec.insert_sleep(0.05)
server.stop()
open("skinned-loop-repro.html", "w").write(rec.as_html())
I opened a PR with a minimal fix I found for this ( #729 )
Thanks a lot for looking into this!
Hi!
Found a small bug when exporting the HTML of a skinned mesh (I assume this also affects other exports).
After the first play, the following loops are static and nothing moves. Here is a reproduction
I opened a PR with a minimal fix I found for this ( #729 )
Thanks a lot for looking into this!