Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When i Import 3D model, I get a error #543

Open
17600164659 opened this issue Mar 29, 2023 · 10 comments
Open

When i Import 3D model, I get a error #543

17600164659 opened this issue Mar 29, 2023 · 10 comments
Labels
Bug Broken features in the platform.

Comments

@17600164659
Copy link

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

@tentone
Copy link
Owner

tentone commented Mar 29, 2023

Hello

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

Thanks a lot!

@tentone tentone added the Bug Broken features in the platform. label Mar 29, 2023
@17600164659
Copy link
Author

When I press F5 to run the application

@17600164659
Copy link
Author

My browser is Google Chrome version 111.0.5563.64

I hope this information will be useful to you

@tentone
Copy link
Owner

tentone commented Apr 2, 2023

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

@17600164659
Copy link
Author

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

Sure, you can use this model to test.

@17600164659
Copy link
Author

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
Copy link
Author

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.

@MaxTechCodes
Copy link

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
Copy link

hi could you share the updated file thanks

@caplayz
Copy link

caplayz commented Feb 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken features in the platform.
Projects
None yet
Development

No branches or pull requests

4 participants