I have a scene that is built around the WebGLRenderer
. I’d like to mix in a particular element that is rendered by a CSS2DRenderer. Is this possible?
For example, suppose I wanted to add the moon/earth example code found in the CSS2D_label.html
sample in the examples directory. I imported that code into my project and nothing broke. However, if I attach the CSS2DRenderer
to the document.body element, my WebGLRenderer
rendered canvas no longer appears:
document.body.appendChild( labelRenderer.domElement );
If I comment out that statement above my WebGLRenderer
rendered canvas displays again, but I don’t see the CSS2DRenderer
content of course.
Do I just need to attach the CSS2DRenderer
to some other element in my CSS2DRenderer
scene? If so, how? If not, how can I do this?
Also, I am having trouble finding the animate loop or any update() methods being called in the css2d_label.html
sample. Do CSS2DRenderer
rendered scenes and objects not require them? If they do, what code in the sample is doing that?