mrdoob/three.js — Issue #634: Rendering scene on top of an existing canvas
Author: jaycrossler
Created: 2011-10-09 18:13:52+00:00
State: open

I have a canvas already created that has background content on it. I'd like to render objects on top of that canvas. Is this doable with the existing API?

Alternately, I guess I could create a plane or box and pull it in as a texture (if so, how do you pull in canvas.getContext('2d').toDataURL content as a texture?).

I tried setting the transparent option to true:
``` scene = new THREE.Scene();
var diceBoardCanvas = document.getElementById('diceBoard');
renderer = new THREE.CanvasRenderer({transparent:true});
renderer.setSize(diceBoardCanvas.width, diceBoardCanvas.height );
diceBoardCanvas.appendChild(renderer.domElement)
render()
```

as well as a few other ways...