I chose to alter the rendering group IDs. It works great but there are few more steps needed if you are using more complex scenes with skybox:
- Use rendering group IDs like this:
embeddedHtmlElement = 0 // Plane mesh
skybox = 1 // Box mesh
environment = 2 // 3D objects, avatars, etc.
- When creating scene
// Needs to be transparent for underlaying htms/css content (iframe) to be seen
scene.clearColor = new Color4(0, 0, 0, 0)
// Skybox (its rendering group) must NOT clear buffers,
// otherwise rendering groups with higher id (3D environment) won't be visible
scene.setRenderingAutoClearDepthStencil(RenderingGroup.skybox, false, false, false)