Attempting to showcase the cube using this example: Add a 3D model.
The example functions fine up to version 117 on three.js. However, starting from version 118, the cube disappears immediately after refreshing the page. After reviewing the changelog, it seems that the major change in version 118 is the switch to WebGL2 as the default rendering engine. Despite modifying the code to utilize WebGL1, the cube still vanishes.
this.renderer = new THREE.WebGL1Renderer({
canvas: map.getCanvas(),
context: gl,
antialias: true
});
For those interested, the issue can be replicated through this codepen. (refresh the page to briefly see the cube)