123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <!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>
- <div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div>
- <h2>Constructor</h2>
- <h3>[name]( [page:Object parameters] )</h3>
- <div>
- parameters is an object that can be used to set up the default properties
- </div>
- <div>
- color - the color of the sprite<br/>
- program - the program used to draw the sprite
- </div>
- <h2>Properties</h2>
- <h3>[property:Color color]</h3>
- <div>
- The color of the sprite. The material will set up the color for the context before calling the material's program.
- </div>
- <h2>Methods</h2>
- <h3>[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])</h3>
- <div>
- context -- The canvas context <br />
- color -- The color of the sprite
- </div>
- <div>
- Define a program that will use the context to draw the sprite.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js examples/js/renderers/CanvasRenderer.js]
- </body>
- </html>
|