[feature request] switch canvas of renderer

Description of the problem

Currently, each renderer bind with a special canvas. Even if I do settings like renderer.domElement = another canvas, there is nothing works.
I have a page with hundreds of canvases, they are render with three.js and almostly never change. I want to use a single renderer to render all canvases.
So I wish feature that allow user to switch canvas of renderer.

Three.js version
  • Dev
  • r99
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “[feature request] switch canvas of renderer

  1. Even if I do settings like renderer.domElement = another canvas, there is nothing works.

    The renderer’s internal WebGL context is directly connected to a specific canvas element. That’s the reason why assigning an other canvas element to WebGLRenderer.domElement does not work.

    If you have to render to multiple canvas elements, you might want to use an approach presented in the following example:

    https://threejs.org/examples/webgl_multiple_canvases_grid.html

Comments are closed.