-
Notifications
You must be signed in to change notification settings - Fork 19
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
panic: index out of range #18
Comments
A fix could be something like: if int(texture.Index) > len(doc.Images) {
return nil, fmt.Errorf("texture index %d is beyond length of images (%d)", texture.Index, len(doc.Images))
} |
Hello! I'm not certain I understand - are you generating a GLTF file and setting the texture's index to be a value that doesn't exist? |
Hi @SolarLune and @khaelou, |
seems:
is missing sanity checks and making assumptions, I'm using something similar to https://github.com/qmuntal/gltf/blob/80d3922a76d3e24371f8c99e0d213ecc8dae3ffe/modeler/example_test.go#L35 to generate a gltf and it is cutting corners on some steps, and causing tetra3d to panic non-gracefully
The text was updated successfully, but these errors were encountered: