nunuStudio
nunuStudio copied to clipboard
When i Import 3D model, I get a error
Hi! I am trying to import some 3D models in glb format but I am getting an error. How can I make it work?
- [*] Web Version
Cannot read properties of null (reding 'frame')
Looking forward to your answer :)
Hello
Does the error occur right after you import the file or when running the app?
Thanks a lot!
When I press F5 to run the application
My browser is Google Chrome version 111.0.5563.64
I hope this information will be useful to you
This might be a problem caused by serialization can you provide a sample file?
https://assets.metaio.cc/assets/model/female.glb
Sure, you can use this model to test.
Hi, I found a new error today when running locally. When I open the page, the following error occurs:
Uncaught TypeError: _data.slice is not a function at parseFile (js.blend.js:273:1)
I hope this helps to solve the problem :)
Owner
In the process of trying to solve this problem, I found that the reason for the issue was because the imported model with a skeleton had a null skeleton attribute, which caused the problem. In line 25673 of three.module.js, there is code that checks if the object's skeleton frame is not equal to the render frame, and because object.skeleton is null, it throws an error.
I tried to store the skeleton before this line of code and then assign it to object.skeleton during runtime, so that the program could run without errors. Here is my code:
// file start var skeletons = {};
// line 25672 if (!skeletons[object.uuid] && object.skeleton) { skeletons[object.uuid] = object.skeleton; } // Hack to get around the fact that the skeleton is not updated in the render loop if (!object.skeleton && skeletons[object.uuid]) { object.skeleton = skeletons[object.uuid]; }
However, a new problem occurred after running the code: the model did not load the texture correctly and became a completely black model.
Great you could solve the gltf runtime issue. Can you share the updated three.module.js file . I also face the issue and want to resolve.
hi could you share the updated file thanks
I have the same issue, is there a found fix?