Skip to content

Instantly share code, notes, and snippets.

@mrienstra
Created February 10, 2012 23:27
Show Gist options
  • Save mrienstra/1793969 to your computer and use it in GitHub Desktop.
Save mrienstra/1793969 to your computer and use it in GitHub Desktop.
First attempt at writing a .rst for three.js, in particular docs/api/renderers/CanvasRenderer.rst
CanvasRenderer - Renderer for Canvas
----------------------
.. ...............................................................................
.. rubric:: Constructor
.. ...............................................................................
.. class:: CanvasRenderer( parameters )
Renderer for Canvas
:param Object parameters: An object with the following property: canvas.
.. ...............................................................................
.. rubric:: Attributes
.. ...............................................................................
.. attribute:: CanvasRenderer.domElement
Canvas element object to render to
.. attribute:: CanvasRenderer.autoClear
//todo:description: boolean, defaults to ``true``
.. attribute:: CanvasRenderer.sortObjects
//todo:description: boolean, defaults to ``true``
.. attribute:: CanvasRenderer.sortElements
//todo:description: boolean, defaults to ``true``
.. attribute:: CanvasRenderer.info
//todo:description: object
.. ...............................................................................
.. rubric:: Methods
.. ...............................................................................
.. function:: CanvasRenderer.setSize()
Set Canvas size
.. function:: CanvasRenderer.setClearColor( color, opacity )
Set clear color from a THREE.Color
Clear color is used by CanvasRenderer.clear() method
Default clear color is rgba(0, 0, 0, 0)
.. function:: CanvasRenderer.setClearColorHex( hex, opacity )
Set clear color from a hex value
Clear color is used by CanvasRenderer.clear() method
Default clear color is rgba(0, 0, 0, 0)
.. function:: CanvasRenderer.clear()
//todo:description
.. function:: CanvasRenderer.render( scene, camera )
//todo:description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment