Open dmillard opened 4 years ago
Really, I'm not sure that this is even a supported use-case, but I'm trying to update a LineSegment object once per frame, and can't think of a better way to do it than setobject!
inside the atframe
.
Thanks for meshcat, it's a pleasure to use.
Hey, sorry for the late reply. Yes, you're right this doesn't work, but we should give a more helpful error message.
The problem is that, as far as I know, there's no way to cause Three.js to spawn an object as part of an animation. Instead, I think you should be able to get this to work by adding the object ahead of time and then setting the visible
property at the relevant frame.
Thanks for the feedback! For my use case, that seems like quite a lot of hidden objects sitting around, but I'll keep it in mind.
The animation demo notebook now more explicitly talks about using setvisible!
to create objects that appear to pop in and out of existence in an animation: https://github.com/rdeits/MeshCat.jl/blob/master/notebooks/animation.ipynb#Making-Objects-Appear-and-Disappear
@rdeits is this workaround also suitable for large datasets like visualizing huge LIDAR datasets? I come to the same error message with "> type DataType has no field body" and want to test it by changing my code with setvisible!...
MWE:
Output: