InterleavedBuffer.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. "交叉存储" 表明多个类型的 attributes (例如,顶点位置、法向量、UV 和颜色值)被存储到一个队列中。
  14. <br/><br/>
  15. 如下链接有对交叉存储更详细的介绍: [link:https://blog.tojicode.com/2011/05/interleaved-array-basics.html Interleaved array basics]
  16. </p>
  17. <h2>示例</h2>
  18. <p>[example:webgl_buffergeometry_points_interleaved webgl / buffergeometry / points / interleaved]</p>
  19. <h2>构造函数</h2>
  20. <h3>[name]( [param:TypedArray array], [param:Integer stride] )</h3>
  21. <p>
  22. [page:TypedArray array] -- 一个基于共享缓存的类型化队列。该队列存储几何体相关数据。<br/>
  23. [page:Integer stride] -- 每个顶点占用类型化队列的多少个元素。
  24. </p>
  25. <h2>属性</h2>
  26. <h3>[property:Array array]</h3>
  27. <p>
  28. 一个基于共享缓存的类型化队列。该队列存储几何体相关数据。
  29. </p>
  30. <h3>[property:Integer stride]</h3>
  31. <p>
  32. 每个顶点占用类型化队列的多少个元素。
  33. </p>
  34. <h3>[property:Integer count]</h3>
  35. <p>
  36. 类型化队列中,所有元素的数目。
  37. </p>
  38. <h3>[property:Boolean dynamic]</h3>
  39. <p>
  40. 默认值为 *false*。
  41. </p>
  42. <h3>[property:Object updateRange]</h3>
  43. <p>
  44. 对象存储着需要更新的数据的偏移量和数量。
  45. </p>
  46. <h3>[property:Number updateRange.offset]</h3>
  47. <p>
  48. 默认值为 *0*。
  49. </p>
  50. <h3>[property:Number updateRange.count]</h3>
  51. <p>
  52. 默认值为 *-1*。
  53. </p>
  54. <h3>[property:Integer version]</h3>
  55. <p>
  56. 版本号,每次 needsUpdate 属性设置为 true 时,版本号增加。
  57. </p>
  58. <h3>[property:Integer isInterleavedBuffer]</h3>
  59. <p>
  60. 默认值为 *true*。
  61. </p>
  62. <h3>[property:Integer needsUpdate]</h3>
  63. <p>
  64. 默认值为 *false*。该值被设置为 true 时,会导致 [page:InterleavedBuffer.version version] 增加。
  65. </p>
  66. <h2>方法</h2>
  67. <h3>[method:InterleavedBuffer setArray] ( [param:TypedArray array] ) </h3>
  68. <p>
  69. array - 必须是一个类型化的队列。
  70. </p>
  71. <h3>[method:InterleavedBuffer setDynamic] ( [param:Boolean value] ) </h3>
  72. <p>
  73. 根据输入参数设置 [page:InterleavedBuffer.dynamic dynamic] 的值。
  74. </p>
  75. <h3>[method:InterleavedBuffer copy]( [param:InterleavedBuffer source] ) </h3>
  76. <p>
  77. 将参数指定的 [name] 拷贝到当前 [name]。
  78. </p>
  79. <h3>[method:InterleavedBuffer copyAt]( [param:Integer index1], [param:InterleavedBuffer attribute], [param:Integer index2] ) </h3>
  80. <p> 将数据从 attribute[index2] 拷贝到 [page:InterleavedBuffer.array array][index1]。</p>
  81. <h3>[method:InterleavedBuffer set]( [param:TypedArray value], [param:Integer offset] ) </h3>
  82. <p>
  83. value - 被拷贝的源(类型化)队列。<br/>
  84. offset - 源队列中,数据开始拷贝的偏移量。默认值是 *0*.<br/><br />
  85. 将源队列数据拷贝到目标队列缓存中。
  86. </p>
  87. <h3>[method:InterleavedBuffer clone]() </h3>
  88. <p>
  89. 克隆当前 [name]。
  90. </p>
  91. <h2>源代码</h2>
  92. <p>
  93. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  94. </p>
  95. </body>
  96. </html>