InterleavedBuffer.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. "Interleaved" means that multiple attributes, possibly of different types, (e.g., position, normal, uv, color) are packed into a single array buffer.
  14. <br/><br/>
  15. An introduction into interleaved arrays can be found here: [link:https://blog.tojicode.com/2011/05/interleaved-array-basics.html Interleaved array basics]
  16. </p>
  17. <h2>Example</h2>
  18. <p>[example:webgl_buffergeometry_points_interleaved webgl / buffergeometry / points / interleaved]</p>
  19. <h2>Constructor</h2>
  20. <h3>[name]( [param:TypedArray array], [param:Integer stride] )</h3>
  21. <p>
  22. [page:TypedArray array] -- A typed array with a shared buffer. Stores the geometry data.<br/>
  23. [page:Integer stride] -- The number of typed-array elements per vertex.
  24. </p>
  25. <h2>Properties</h2>
  26. <h3>[property:Array array]</h3>
  27. <p>
  28. A typed array with a shared buffer. Stores the geometry data.
  29. </p>
  30. <h3>[property:Integer stride]</h3>
  31. <p>
  32. The number of typed-array elements per vertex.
  33. </p>
  34. <h3>[property:Integer count]</h3>
  35. <p>
  36. Gives the total number of elements in the array.
  37. </p>
  38. <h3>[property:Boolean dynamic]</h3>
  39. <p>
  40. Default is *false*.
  41. </p>
  42. <h3>[property:Object updateRange]</h3>
  43. <p>
  44. Object containing offset and count.
  45. </p>
  46. <h3>[property:Number updateRange.offset]</h3>
  47. <p>
  48. Default is *0*.
  49. </p>
  50. <h3>[property:Number updateRange.count]</h3>
  51. <p>
  52. Default is *-1*.
  53. </p>
  54. <h3>[property:Integer version]</h3>
  55. <p>
  56. A version number, incremented every time the needsUpdate property is set to true.
  57. </p>
  58. <h3>[property:Integer isInterleavedBuffer]</h3>
  59. <p>
  60. Default is *true*.
  61. </p>
  62. <h3>[property:Integer needsUpdate]</h3>
  63. <p>
  64. Default is *false*. Setting this to true increments [page:InterleavedBuffer.version version].
  65. </p>
  66. <h2>Methods</h2>
  67. <h3>[method:InterleavedBuffer setArray] ( [param:TypedArray array] ) </h3>
  68. <p>
  69. array - must be a Typed Array.
  70. </p>
  71. <h3>[method:InterleavedBuffer setDynamic] ( [param:Boolean value] ) </h3>
  72. <p>
  73. Set [page:InterleavedBuffer.dynamic dynamic] to value.
  74. </p>
  75. <h3>[method:InterleavedBuffer copy]( [param:InterleavedBuffer source] ) </h3>
  76. <p>
  77. Copies another [name] to this [name].
  78. </p>
  79. <h3>[method:InterleavedBuffer copyAt]( [param:Integer index1], [param:InterleavedBuffer attribute], [param:Integer index2] ) </h3>
  80. <p>Copies data from attribute[index2] to [page:InterleavedBuffer.array array][index1].</p>
  81. <h3>[method:InterleavedBuffer set]( [param:TypedArray value], [param:Integer offset] ) </h3>
  82. <p>
  83. value - The source (typed) array.<br/>
  84. offset - The offset into the target array at which to begin writing values from the source array. Default is *0*.<br/><br />
  85. Stores multiple values in the buffer, reading input values from a specified array.
  86. </p>
  87. <h3>[method:InterleavedBuffer clone]() </h3>
  88. <p>
  89. Creates a clone of this [name].
  90. </p>
  91. <h2>Source</h2>
  92. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  93. </body>
  94. </html>