nunuStudio icon indicating copy to clipboard operation
nunuStudio copied to clipboard

When i Import 3D model, I get a error

Open 17600164659 opened this issue 1 year ago • 10 comments

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 :)

17600164659 avatar Mar 29 '23 10:03 17600164659

Hello

Does the error occur right after you import the file or when running the app?

Thanks a lot!

tentone avatar Mar 29 '23 21:03 tentone

When I press F5 to run the application

17600164659 avatar Mar 30 '23 03:03 17600164659

My browser is Google Chrome version 111.0.5563.64

I hope this information will be useful to you

17600164659 avatar Mar 30 '23 03:03 17600164659

This might be a problem caused by serialization can you provide a sample file?

tentone avatar Apr 02 '23 10:04 tentone

https://assets.metaio.cc/assets/model/female.glb

Sure, you can use this model to test.

17600164659 avatar Apr 03 '23 12:04 17600164659

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 :)

17600164659 avatar Apr 06 '23 06:04 17600164659

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.

17600164659 avatar Apr 11 '23 05:04 17600164659

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.

MaxTechCodes avatar Jul 04 '23 20:07 MaxTechCodes

hi could you share the updated file thanks

MaxTechCodes avatar Jul 12 '23 17:07 MaxTechCodes

I have the same issue, is there a found fix?

caplayz avatar Feb 14 '24 18:02 caplayz