playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.69k stars 1.36k forks source link

TypeError: e is not a constructor on loading glb model from ceisium #6389

Closed MAG-AdrianMeredith closed 5 months ago

MAG-AdrianMeredith commented 5 months ago

Description

The attached model throws an error when loaded into playcanvas. It loads in other gltf renders (e.g. babylonjs). It appears the code is doing something baffling trying to instanciate the string "Entity" not the Entity object itself. I can't tell what specifically is unique about this model but thats likely not important.

actual: image

expected: image

Steps to Reproduce

yotei.glb.zip

MAG-AdrianMeredith commented 5 months ago

Thanks guys as always, I must admit the fix did give me a chuckle. Someone was coding late at night when they wrote that ;)

slimbuck commented 5 months ago

Thanks so much for reporting the issue and adding a simple with repro - makes all the difference <3 <3