Working example of WebGLRenderer using existing canvas/div

Hi guys.
Congrats on the wicked library.

Is there an existing working example of #157 “use existing canvas element” fixed by #192 “existing canvas element” ?

There’s already a lot of examples but none showing the issue at hand (or i missed it?)
I just started working with this library last week and barely made it possible to show a random object (cube or sphere) which was exported from 3ds max (still some issues with bmw 7 example). But i’d really want to see a working example of the canvas being part of an existing webpage like an online shop.

Would it be possible to have one such example ?

Thank you. Keep up the good work

ps: how can i paste html code here so that is look a bit formatted ?

Author: Fantashit

1 thought on “Working example of WebGLRenderer using existing canvas/div

  1. This should work:

    var renderer = new THREE.WebGLRenderer( { canvas: my_canvas } );

    ps: how can i paste html code here so that is look a bit formatted ?

    On the top right of the comment input box you’ll find a link that says GitHub Flavored Markdown. Click on it 😉

Comments are closed.