Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
112
rated 0 times [  115] [ 3]  / answers: 1 / hits: 24223  / 12 Years ago, wed, february 6, 2013, 12:00:00

I have a scene that I'd like to reuse, rendering the scene in two divs with a different camera angle for each div.



This link says a scene cannot be shared between multiple renderers, and suggests using multiple viewports with a single renderer. How can I assign multiple cameras to a renderer, and then get the DOM element that each is displayed in?



Thanks


More From » three.js

 Answers
11

You want to do it exactly as in this three.js example:


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


This uses multiple viewports, not multiple divs. It really is the best way.


[#80380] Tuesday, February 5, 2013, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
manuel

Total Points: 747
Total Questions: 96
Total Answers: 95

Location: Argentina
Member since Thu, Mar 18, 2021
3 Years ago
;