SkinnedMesh.clone doesn't work properly, results in undefined skeleton property
See original GitHub issueWhen cloning SkinnedMesh
, the resulting SkinnedMesh
instance doesn’t have skeleton
property defined.
I’m not sure if this is also a bug, but having a SkinnedMesh
with undefined skeleton
crashes the renderer with:
Uncaught TypeError: Cannot read property 'frame' of undefined
at
Example
https://jsfiddle.net/pwonz6gd/
Three.js version
- dev
- r115
Browser
- All of them
OS
- All of them
Solution?
EDIT: (removed my horrible solution)
As mentioned, one is supposed to use SkeletonUtils.clone. I’d still expect some kind of warning about this, instead of the whole renderer crashing.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Cloning a skinned mesh - Questions - three.js forum
It doesn't work currently, but I found this function which worked well ... tried it but seems to be throwing Skeleton is not...
Read more >Three.js export SkinnedMesh with position - Stack Overflow
and I can see all the meshes in the exported file, but the SkinnedMeshes are in the origin with wrong position and orientation....
Read more >Cloned skinned mesh picking gets broken on original mesh ...
Cloned dude on the other hand is not selected properly after that. I'm aware of how GPU skinning works so I added the...
Read more >Unreal Engine 5.1 Release Notes
The framework works in the editor and at runtime, as well as provides scripting support using Blueprint and Python. Interchange framework options. This...
Read more >three.js - Apple Open Source
'undefined' ? factory(exports) : typeof define === 'function' ... the result is fully empty, not slightly empty with non-inf/+inf values that will cause ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s a good point! Let me update the docs.
You have to use SkeletonUtils.clone() when cloning skinned meshes. Can you please give it a try?