Is there a way to make one CSS2DObject appear on top of another CSS2DObject? Or make it appear on top of all objects in the scene?

Viewed 43

I want to make one CSS2DObject be on top of another, or on top of all CSS2DObjects in the scene. Is there a way to do this?

1 Answers

Like with all other renderers, you can override the default z-order by defining Object3D.renderOrder. If you set the value to Infinity, the instance of CSS2DObject should be rendered on top of all others. Use this code:

label.renderOrder = Infinity;
Related