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

GLTFSceneModelLoader - backfaces option throw undefined if material in primitive.material is missing #1458

Closed
vsigno opened this issue Apr 22, 2024 · 1 comment
Milestone

Comments

@vsigno
Copy link

vsigno commented Apr 22, 2024

Describe the bug
In #1449 if GLTF material is undefined in line 523, const backfaces in line 537 throw an undefined TypeError when it tries to access doubleSided.

To Reproduce
It’s possible that the GLTF model I’m using has a missing material, however, it was loaded correctly using 2.6.0-beta13

Current fix
Setting param.backfaces explicitly to true when loading the GLTF model in GLTFLoader.load avoids the error. Even if true should be the default value for ctx.backfaces.

@xeolabs xeolabs added this to the 2.6.0 milestone Apr 22, 2024
xeolabs added a commit that referenced this issue Apr 22, 2024
[FIX] Fix `undefined` TypeError for missing glTF material #1458
@xeolabs
Copy link
Member

xeolabs commented Apr 22, 2024

Fixed now in https://github.com/xeokit/xeokit-sdk/releases/tag/v2.6.2

@xeolabs xeolabs closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants