maplibre-gl-js
maplibre-gl-js copied to clipboard
3d model and extrusion draw order incorrect in babylonjs example
maplibre-gl-js version: Replicated with maplibre 3.0.1 and 3.1.0, BabylonJS 6.7.0 and 5.42.2.
browser: Chrome 114
Steps to Trigger Behavior
Create a custom 3d layer implementing the BabylonJS example, and add some 3d rendered stuff into it.
Link to Demonstration
https://jsfiddle.net/Lg8r5jck/
Expected Behavior
This is using the ThreeJS example which seems to work correctly:
https://jsfiddle.net/dot0bLnr/2/
Actual Behavior
https://jsfiddle.net/Lg8r5jck/
I have no clue what can cause this, but it's probably related to the difference between how these libraries work. You'll have to dig into it it I guess...
I'm also having this issue where they don't occlude properly
Maybe try adding autoClearDepthAndStencil
scene.autoClear = false;
scene.autoClearDepthAndStencil = false;
let me know if it worked.