In threejs, is there a property on a scene or mesh that refers the renderer?

28 Views Asked by At

I want to pass a threejs mesh to another frameowork. From that mesh, I want to access the threejs canvas. This is available on the threejs renderer as the domElement property. So my question is - can I get access to the threejs renderer from the mesh? I can get any parents and find out if the parent is the scene. So another way to ask is, is there access from a threejs scene to the renderer? If not... it would nice to have that added. This is to avoid passing two parameters, as ideally, I would like it to be just done with a single property.

1

There are 1 best solutions below

0
Dan Zen On

Okay - so the answer is that a scene does not know its renderer. Looking at the threejs code, I see now, that the renderer is not passed in to the scene it just operates on it in the update loop.