WebGLRenderer
Properties
domElement
domElement
是你所渲染輸出的畫布,在物件建構時就會自動產生,你僅需要將它加進頁面即可。
Method
setSize ( width, height, updateStyle )
setSize()
用來改變畫布的大小,並且重新設定檢視區域以符合大小,而updateStyle在我看到的例子通常都省略掉了,原文是說"Setting updateStyle to true adds explicit pixel units to the output canvas style."
render ( scene, camera, renderTarget, forceClear )
render()
可以藉由攝影機將場景展現出來。
The render is done to the renderTarget (if specified) or to the canvas as usual.
If forceClear is true, the depth, stencil and color buffers will be cleared before rendering even if the renderer's autoClear property is false.
Even with forceClear set to true you can prevent certain buffers being cleared by setting either the .autoClearColor, .autoClearStencil or .autoClearDepth properties to false.
官方
http://threejs.org/docs/index.html#Reference/Renderers/WebGLRenderer