I'm trying to render the cube using this example: Add a 3D model.
Example work up to 117 version on three.js. Since 118 version example doesn't work: cube disappears immediately after page refresh. I studied changelog and most noticeable change is that since v118 three.js uses WebGL2 as default render engine. So I changed code to use WebGL1, but still cube disappears.
this.renderer = new THREE.WebGL1Renderer({
canvas: map.getCanvas(),
context: gl,
antialias: true
});
Here is codepen to reproduce the problem. (reload page to see the cube for a moment)