InstancedBufferAttribute.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>InstancedBufferAttribute - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="BufferAttribute.html">BufferAttribute</a> → </p>
  13. <h1 translate="no">InstancedBufferAttribute</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>An instanced version of a buffer attribute.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="InstancedBufferAttribute" translate="no">new <a href="#InstancedBufferAttribute">InstancedBufferAttribute</a><span class="signature">( array : <span class="param-type">TypedArray</span>, itemSize : <span class="param-type">number</span>, normalized : <span class="param-type">boolean</span>, meshPerAttribute : <span class="param-type">number</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new instanced buffer attribute.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>array</strong>
  31. </td>
  32. <td class="description last">
  33. <p>The array holding the attribute data.</p>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="name">
  38. <strong>itemSize</strong>
  39. </td>
  40. <td class="description last">
  41. <p>The item size.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="name">
  46. <strong>normalized</strong>
  47. </td>
  48. <td class="description last">
  49. <p>Whether the data are normalized or not.</p>
  50. <p>Default is <code>false</code>.</p>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="name">
  55. <strong>meshPerAttribute</strong>
  56. </td>
  57. <td class="description last">
  58. <p>How often a value of this buffer attribute should be repeated.</p>
  59. <p>Default is <code>1</code>.</p>
  60. </td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. </div>
  65. </div>
  66. <h2 class="subsection-title">Properties</h2>
  67. <div class="member">
  68. <h3 class="name" id="isInstancedBufferAttribute" translate="no">.<a href="#isInstancedBufferAttribute">isInstancedBufferAttribute</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  69. <div class="description">
  70. <p>This flag can be used for type testing.</p>
  71. <p>Default is <code>true</code>.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="meshPerAttribute" translate="no">.<a href="#meshPerAttribute">meshPerAttribute</a><span class="type-signature"> : number</span> </h3>
  76. <div class="description">
  77. <p>Defines how often a value of this buffer attribute should be repeated. A
  78. value of one means that each value of the instanced attribute is used for
  79. a single instance. A value of two means that each value is used for two
  80. consecutive instances (and so on).</p>
  81. <p>Default is <code>1</code>.</p>
  82. </div>
  83. </div>
  84. <h2 class="subsection-title">Source</h2>
  85. <p>
  86. <a href="https://github.com/mrdoob/three.js/blob/master/src/core/InstancedBufferAttribute.js" translate="no" target="_blank" rel="noopener">src/core/InstancedBufferAttribute.js</a>
  87. </p>
  88. </article>
  89. </section>
  90. <script src="../scripts/linenumber.js"></script>
  91. <script src="../scripts/page.js"></script>
  92. </body>
  93. </html>
粤ICP备19079148号