SpriteCanvasMaterial.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. [page:Material] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]( [page:Object parameters] )</h3>
  15. <div>
  16. parameters is an object that can be used to set up the default properties
  17. </div>
  18. <div>
  19. color - the color of the sprite<br/>
  20. program - the program used to draw the sprite
  21. </div>
  22. <h2>Properties</h2>
  23. <h3>[property:Color color]</h3>
  24. <div>
  25. The color of the sprite. The material will set up the color for the context before calling the material's program.
  26. </div>
  27. <h2>Methods</h2>
  28. <h3>[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])</h3>
  29. <div>
  30. context -- The canvas context <br />
  31. color -- The color of the sprite
  32. </div>
  33. <div>
  34. Define a program that will use the context to draw the sprite.
  35. </div>
  36. <h2>Source</h2>
  37. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  38. </body>
  39. </html>