ImmediateRenderObject.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. This experimental class provides a fast code path for rendering meshes with frequently updated
  14. geometry data. When the renderer encounters an instance of [name], it only takes care about
  15. the most primitive rendering operations (e.g. binding vertex attributes, determining correct shader
  16. program or perfoming the actual draw call). Features like view frustum culling, wireframe rendering
  17. or using multiple materials are not supported. Besides [name] can only be used to render triangles.
  18. </p>
  19. <p class="desc">
  20. [name] does not work with instances of [page:BufferGeometry]. The
  21. raw geometry data have to be maintained as properties of the [name].
  22. </p>
  23. <p class="desc">
  24. Using [name] makes only sense if you are updating your geometry data per frame. You can then
  25. benefit of a faster code path compared to the default mesh redering logic.
  26. </p>
  27. <h2>Examples</h2>
  28. <p>
  29. [example:webgl_marchingcubes Marching Cubes]
  30. </p>
  31. <h2>Constructor</h2>
  32. <h3>[name]( [param:Material material] )</h3>
  33. <p>
  34. [page:Material material] — The material of the [name].
  35. </p>
  36. <h2>Properties</h2>
  37. <p>See the base [page:Object3D] class for common properties.</p>
  38. <h3>[property:Boolean material]</h3>
  39. <p>
  40. The material of the [name]. Assigning multiple materials is not supported.
  41. </p>
  42. <h3>[property:Boolean hasPositions]</h3>
  43. <p>
  44. Whether position data are defined or not. Default is *false*.
  45. </p>
  46. <h3>[property:Boolean hasNormals]</h3>
  47. <p>
  48. Whether normal data are defined or not. Default is *false*.
  49. </p>
  50. <h3>[property:Boolean hasColors]</h3>
  51. <p>
  52. Whether color data are defined or not. Default is *false*.
  53. </p>
  54. <h3>[property:Boolean hasUvs]</h3>
  55. <p>
  56. Whether texture coordinates are defined or not. Default is *false*.
  57. </p>
  58. <h3>[property:Float32Array positionArray]</h3>
  59. <p>
  60. The buffer holding position data. Default is *null*.
  61. </p>
  62. <h3>[property:Float32Array normalArray]</h3>
  63. <p>
  64. The buffer holding normal data. Default is *null*.
  65. </p>
  66. <h3>[property:Float32Array colorArray]</h3>
  67. <p>
  68. The buffer holding color data. Default is *null*.
  69. </p>
  70. <h3>[property:Float32Array uvArray]</h3>
  71. <p>
  72. The buffer holding texture coordinates. Default is *null*.
  73. </p>
  74. <h3>[property:Integer count]</h3>
  75. <p>
  76. The number of primitives to be rendered. Default is *0*.
  77. This property will be set to *0* after each rendering so you usually
  78. set it in the implementatio of [page:.render]().
  79. </p>
  80. <h2>Methods</h2>
  81. <p>See the base [page:Object3D] class for common methods.</p>
  82. <h3>[method:null render]([param:Function renderCallback])</h3>
  83. <p>
  84. renderCallback -- A function to render the generated geometry data.
  85. </p>
  86. <p>
  87. This method needs to be implemented by the deriving class of [name]. You normally want to implement the
  88. vertex buffer update logic and execute *renderCallback* at the end of your implementation.
  89. </p>
  90. <h2>Source</h2>
  91. <p>
  92. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  93. </p>
  94. </body>
  95. </html>