xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
728 stars 287 forks source link

Fix transparency bug revealed by IfcOpenShell simple_wall.ifc model #641

Closed Amoki closed 3 years ago

Amoki commented 3 years ago

Describe the bug This single object file fails to render correctly (glTF and xkt). The object is transparent instead of white. Object is xeokit: Capture d’écran de 2021-05-03 18-13-44 Selected object in xeokit: Capture d’écran de 2021-05-03 18-15-40 Object in threeJS: Capture d’écran de 2021-05-03 18-13-48

simple_wall.gltf.txt simple_wall.ifc.txt

It worked with xeokit 1.4.9 (and maybe later), but not anymore.

Expected behavior A white colored object

xeolabs commented 3 years ago

Fixed - objects were getting wrongly flagged as transparent as they were loaded.

This issue even gets the delux treatment, with it's own visual regression test page: https://xeokit.github.io/xeokit-sdk/tests/loading_XKT_SimpleWall.html

xeolabs commented 3 years ago

Thanks to the minimal attached model files, and snapshots, this bug was super easy to fix and translated directly into a regression test - the ideal issue ticket IMO.