[name]
The Canvas renderer displays your beautifully crafted scenes
not using WebGL,
but draws it using the (slower)
Canvas 2D Context API.
This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:
if (window.WebGLRenderingContext)
renderer = new THREE.WebGLRenderer();
else
renderer = new THREE.CanvasRenderer();
Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 <canvas> tag.
The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.
Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array.
Constructor
[name]([page:todo parameters])
parameters -- todo
todo
Properties
.[page:object info]
todo
.[page:object domElement]
todo
.[page:number devicePixelRatio]
todo
.[page:boolean autoClear]
todo
.[page:boolean sortObjects]
todo
.[page:boolean sortElements]
todo
Methods
.getMaxAnisotropy() [page:todo]
todo
.render([page:todo scene], [page:todo camera]) [page:todo]
scene -- todo
camera -- todo
todo
.clear() [page:todo]
todo
.setClearColor([page:todo color], [page:todo alpha]) [page:todo]
color -- todo
alpha -- todo
todo
.setFaceCulling() [page:todo]
todo
.supportsVertexTextures() [page:todo]
todo
.setSize([page:todo width], [page:todo height], [page:todo updateStyle]) [page:todo]
width -- todo
height -- todo
updateStyle -- todo
todo
.setClearColorHex([page:todo hex], [page:todo alpha]) [page:todo]
hex -- todo
alpha -- todo
todo
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]