12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Material] →
- <h1>[name]</h1>
- <p class="desc">Create a material that can draw custom sprites using a 2d canvas.</p>
- <h2>Constructor</h2>
- <h3>[name]( [param:Object parameters] )</h3>
- <p>
- parameters is an object that can be used to set up the default properties
- </p>
- <p>
- rotation - the rotation of the sprite<br/>
- color - the color of the sprite<br/>
- program - the program used to draw the sprite
- </p>
- <h2>Properties</h2>
- <h3>[property:Radians rotation]</h3>
- <p>
- The rotation of the sprite in radians. Default is 0.
- </p>
- <h3>[property:Color color]</h3>
- <p>
- The color of the sprite. The material will set up the color for the context before calling the material's program.
- </p>
- <h2>Methods</h2>
- <h3>[method:null program]([param:CanvasRenderingContext2D context], [param:Color color])</h3>
- <p>
- context -- The canvas context <br />
- color -- The color of the sprite
- </p>
- <p>
- Define a program that will use the context to draw the sprite.
- </p>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js examples/js/renderers/CanvasRenderer.js]
- </body>
- </html>
|