CanvasRenderer.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <h1>[name]</h1>
  11. <div class="desc">The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL,
  12. but draws it using the (slower) <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">Canvas 2D Context</a> API.</div>
  13. <div class="desc">This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:</div>
  14. <code>
  15. if (window.WebGLRenderingContext)
  16. renderer = new THREE.WebGLRenderer();
  17. else
  18. renderer = new THREE.CanvasRenderer();
  19. </code>
  20. <div class="desc">
  21. Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 &lt;canvas&gt; tag.
  22. The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br />
  23. Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array.
  24. </div>
  25. <h2>Constructor</h2>
  26. <h3>[name]([page:todo parameters])</h3>
  27. <div>
  28. parameters -- todo
  29. </div>
  30. <div>
  31. todo
  32. </div>
  33. <h2>Properties</h2>
  34. <h3>.[page:object info]</h3>
  35. <div>
  36. todo
  37. </div>
  38. <h3>.[page:object domElement]</h3>
  39. <div>
  40. todo
  41. </div>
  42. <h3>.[page:number devicePixelRatio]</h3>
  43. <div>
  44. todo
  45. </div>
  46. <h3>.[page:boolean autoClear]</h3>
  47. <div>
  48. todo
  49. </div>
  50. <h3>.[page:boolean sortObjects]</h3>
  51. <div>
  52. todo
  53. </div>
  54. <h3>.[page:boolean sortElements]</h3>
  55. <div>
  56. todo
  57. </div>
  58. <h2>Methods</h2>
  59. <h3>.getMaxAnisotropy() [page:todo]</h3>
  60. <div>
  61. todo
  62. </div>
  63. <h3>.render([page:todo scene], [page:todo camera]) [page:todo]</h3>
  64. <div>
  65. scene -- todo <br />
  66. camera -- todo
  67. </div>
  68. <div>
  69. todo
  70. </div>
  71. <h3>.clear() [page:todo]</h3>
  72. <div>
  73. todo
  74. </div>
  75. <h3>.setClearColor([page:todo color], [page:todo alpha]) [page:todo]</h3>
  76. <div>
  77. color -- todo <br />
  78. alpha -- todo
  79. </div>
  80. <div>
  81. todo
  82. </div>
  83. <h3>.setFaceCulling() [page:todo]</h3>
  84. <div>
  85. todo
  86. </div>
  87. <h3>.supportsVertexTextures() [page:todo]</h3>
  88. <div>
  89. todo
  90. </div>
  91. <h3>.setSize([page:todo width], [page:todo height], [page:todo updateStyle]) [page:todo]</h3>
  92. <div>
  93. width -- todo <br />
  94. height -- todo <br />
  95. updateStyle -- todo
  96. </div>
  97. <div>
  98. todo
  99. </div>
  100. <h3>.setClearColorHex([page:todo hex], [page:todo alpha]) [page:todo]</h3>
  101. <div>
  102. hex -- todo <br />
  103. alpha -- todo
  104. </div>
  105. <div>
  106. todo
  107. </div>
  108. <h2>Source</h2>
  109. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  110. </body>
  111. </html>