InterleavedBufferAttribute.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>InterleavedBufferAttribute - 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. <h1 translate="no">InterleavedBufferAttribute</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>An alternative version of a buffer attribute with interleaved data. Interleaved
  16. attributes share a common interleaved data storage (<a href="InterleavedBuffer.html">InterleavedBuffer</a>) and refer with
  17. different offsets into the buffer.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="InterleavedBufferAttribute" translate="no">new <a href="#InterleavedBufferAttribute">InterleavedBufferAttribute</a><span class="signature">( interleavedBuffer : <span class="param-type"><a href="InterleavedBuffer.html">InterleavedBuffer</a></span>, itemSize : <span class="param-type">number</span>, offset : <span class="param-type">number</span>, normalized : <span class="param-type">boolean</span> )</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new interleaved buffer attribute.</p>
  26. </div>
  27. <table class="params">
  28. <tbody>
  29. <tr>
  30. <td class="name">
  31. <strong>interleavedBuffer</strong>
  32. </td>
  33. <td class="description last">
  34. <p>The buffer holding the interleaved data.</p>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td class="name">
  39. <strong>itemSize</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The item size.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong>offset</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The attribute offset into the buffer.</p>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="name">
  55. <strong>normalized</strong>
  56. </td>
  57. <td class="description last">
  58. <p>Whether the data are normalized or not.</p>
  59. <p>Default is <code>false</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="array" translate="no">.<a href="#array">array</a><span class="type-signature"> : TypedArray</span> </h3>
  69. <div class="description">
  70. <p>The array holding the interleaved buffer attribute data.</p>
  71. </div>
  72. </div>
  73. <div class="member">
  74. <h3 class="name" id="count" translate="no">.<a href="#count">count</a><span class="type-signature"> : number</span> <span class="type-signature">(readonly) </span></h3>
  75. <div class="description">
  76. <p>The item count of this buffer attribute.</p>
  77. </div>
  78. </div>
  79. <div class="member">
  80. <h3 class="name" id="data" translate="no">.<a href="#data">data</a><span class="type-signature"> : <a href="InterleavedBuffer.html">InterleavedBuffer</a></span> </h3>
  81. <div class="description">
  82. <p>The buffer holding the interleaved data.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <h3 class="name" id="isInterleavedBufferAttribute" translate="no">.<a href="#isInterleavedBufferAttribute">isInterleavedBufferAttribute</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  87. <div class="description">
  88. <p>This flag can be used for type testing.</p>
  89. <p>Default is <code>true</code>.</p>
  90. </div>
  91. </div>
  92. <div class="member">
  93. <h3 class="name" id="itemSize" translate="no">.<a href="#itemSize">itemSize</a><span class="type-signature"> : number</span> </h3>
  94. <div class="description">
  95. <p>The item size, see <a href="BufferAttribute.html#itemSize">BufferAttribute#itemSize</a>.</p>
  96. </div>
  97. </div>
  98. <div class="member">
  99. <h3 class="name" id="name" translate="no">.<a href="#name">name</a><span class="type-signature"> : string</span> </h3>
  100. <div class="description">
  101. <p>The name of the buffer attribute.</p>
  102. </div>
  103. </div>
  104. <div class="member">
  105. <h3 class="name" id="needsUpdate" translate="no">.<a href="#needsUpdate">needsUpdate</a><span class="type-signature"> : number</span> </h3>
  106. <div class="description">
  107. <p>Flag to indicate that this attribute has changed and should be re-sent to
  108. the GPU. Set this to <code>true</code> when you modify the value of the array.</p>
  109. <p>Default is <code>false</code>.</p>
  110. </div>
  111. </div>
  112. <div class="member">
  113. <h3 class="name" id="normalized" translate="no">.<a href="#normalized">normalized</a><span class="type-signature"> : <a href="InterleavedBuffer.html">InterleavedBuffer</a></span> </h3>
  114. <div class="description">
  115. <p>Whether the data are normalized or not, see <a href="BufferAttribute.html#normalized">BufferAttribute#normalized</a></p>
  116. </div>
  117. </div>
  118. <div class="member">
  119. <h3 class="name" id="offset" translate="no">.<a href="#offset">offset</a><span class="type-signature"> : number</span> </h3>
  120. <div class="description">
  121. <p>The attribute offset into the buffer.</p>
  122. </div>
  123. </div>
  124. <h2 class="subsection-title">Methods</h2>
  125. <h3 class="name name-method" id="applyMatrix4" translate="no">.<a href="#applyMatrix4">applyMatrix4</a><span class="signature">( m : <span class="param-type"><a href="Matrix4.html">Matrix4</a></span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  126. <div class="method">
  127. <div class="description">
  128. <p>Applies the given 4x4 matrix to the given attribute. Only works with
  129. item size <code>3</code>.</p>
  130. </div>
  131. <table class="params">
  132. <tbody>
  133. <tr>
  134. <td class="name">
  135. <strong>m</strong>
  136. </td>
  137. <td class="description last">
  138. <p>The matrix to apply.</p>
  139. </td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <dl class="details">
  144. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  145. </dl>
  146. </div>
  147. <h3 class="name name-method" id="applyNormalMatrix" translate="no">.<a href="#applyNormalMatrix">applyNormalMatrix</a><span class="signature">( m : <span class="param-type"><a href="Matrix3.html">Matrix3</a></span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  148. <div class="method">
  149. <div class="description">
  150. <p>Applies the given 3x3 normal matrix to the given attribute. Only works with
  151. item size <code>3</code>.</p>
  152. </div>
  153. <table class="params">
  154. <tbody>
  155. <tr>
  156. <td class="name">
  157. <strong>m</strong>
  158. </td>
  159. <td class="description last">
  160. <p>The normal matrix to apply.</p>
  161. </td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. <dl class="details">
  166. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  167. </dl>
  168. </div>
  169. <h3 class="name name-method" id="clone" translate="no">.<a href="#clone">clone</a><span class="signature">( data : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="BufferAttribute.html">BufferAttribute</a> | <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  170. <div class="method">
  171. <div class="description">
  172. <p>Returns a new buffer attribute with copied values from this instance.</p>
  173. <p>If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data.</p>
  174. </div>
  175. <table class="params">
  176. <tbody>
  177. <tr>
  178. <td class="name">
  179. <strong>data</strong>
  180. </td>
  181. <td class="description last">
  182. <p>An object with interleaved buffers that allows to retain the interleaved property.</p>
  183. </td>
  184. </tr>
  185. </tbody>
  186. </table>
  187. <dl class="details">
  188. <dt class="tag-returns"><strong>Returns:</strong> A clone of this instance.</dt>
  189. </dl>
  190. </div>
  191. <h3 class="name name-method" id="getComponent" translate="no">.<a href="#getComponent">getComponent</a><span class="signature">( index : <span class="param-type">number</span>, component : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  192. <div class="method">
  193. <div class="description">
  194. <p>Returns the given component of the vector at the given index.</p>
  195. </div>
  196. <table class="params">
  197. <tbody>
  198. <tr>
  199. <td class="name">
  200. <strong>index</strong>
  201. </td>
  202. <td class="description last">
  203. <p>The index into the buffer attribute.</p>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td class="name">
  208. <strong>component</strong>
  209. </td>
  210. <td class="description last">
  211. <p>The component index.</p>
  212. </td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <dl class="details">
  217. <dt class="tag-returns"><strong>Returns:</strong> The returned value.</dt>
  218. </dl>
  219. </div>
  220. <h3 class="name name-method" id="getW" translate="no">.<a href="#getW">getW</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  221. <div class="method">
  222. <div class="description">
  223. <p>Returns the w component of the vector at the given index.</p>
  224. </div>
  225. <table class="params">
  226. <tbody>
  227. <tr>
  228. <td class="name">
  229. <strong>index</strong>
  230. </td>
  231. <td class="description last">
  232. <p>The index into the buffer attribute.</p>
  233. </td>
  234. </tr>
  235. </tbody>
  236. </table>
  237. <dl class="details">
  238. <dt class="tag-returns"><strong>Returns:</strong> The w component.</dt>
  239. </dl>
  240. </div>
  241. <h3 class="name name-method" id="getX" translate="no">.<a href="#getX">getX</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  242. <div class="method">
  243. <div class="description">
  244. <p>Returns the x component of the vector at the given index.</p>
  245. </div>
  246. <table class="params">
  247. <tbody>
  248. <tr>
  249. <td class="name">
  250. <strong>index</strong>
  251. </td>
  252. <td class="description last">
  253. <p>The index into the buffer attribute.</p>
  254. </td>
  255. </tr>
  256. </tbody>
  257. </table>
  258. <dl class="details">
  259. <dt class="tag-returns"><strong>Returns:</strong> The x component.</dt>
  260. </dl>
  261. </div>
  262. <h3 class="name name-method" id="getY" translate="no">.<a href="#getY">getY</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  263. <div class="method">
  264. <div class="description">
  265. <p>Returns the y component of the vector at the given index.</p>
  266. </div>
  267. <table class="params">
  268. <tbody>
  269. <tr>
  270. <td class="name">
  271. <strong>index</strong>
  272. </td>
  273. <td class="description last">
  274. <p>The index into the buffer attribute.</p>
  275. </td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. <dl class="details">
  280. <dt class="tag-returns"><strong>Returns:</strong> The y component.</dt>
  281. </dl>
  282. </div>
  283. <h3 class="name name-method" id="getZ" translate="no">.<a href="#getZ">getZ</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  284. <div class="method">
  285. <div class="description">
  286. <p>Returns the z component of the vector at the given index.</p>
  287. </div>
  288. <table class="params">
  289. <tbody>
  290. <tr>
  291. <td class="name">
  292. <strong>index</strong>
  293. </td>
  294. <td class="description last">
  295. <p>The index into the buffer attribute.</p>
  296. </td>
  297. </tr>
  298. </tbody>
  299. </table>
  300. <dl class="details">
  301. <dt class="tag-returns"><strong>Returns:</strong> The z component.</dt>
  302. </dl>
  303. </div>
  304. <h3 class="name name-method" id="setComponent" translate="no">.<a href="#setComponent">setComponent</a><span class="signature">( index : <span class="param-type">number</span>, component : <span class="param-type">number</span>, value : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  305. <div class="method">
  306. <div class="description">
  307. <p>Sets the given value to the given component of the vector at the given index.</p>
  308. </div>
  309. <table class="params">
  310. <tbody>
  311. <tr>
  312. <td class="name">
  313. <strong>index</strong>
  314. </td>
  315. <td class="description last">
  316. <p>The index into the buffer attribute.</p>
  317. </td>
  318. </tr>
  319. <tr>
  320. <td class="name">
  321. <strong>component</strong>
  322. </td>
  323. <td class="description last">
  324. <p>The component index.</p>
  325. </td>
  326. </tr>
  327. <tr>
  328. <td class="name">
  329. <strong>value</strong>
  330. </td>
  331. <td class="description last">
  332. <p>The value to set.</p>
  333. </td>
  334. </tr>
  335. </tbody>
  336. </table>
  337. <dl class="details">
  338. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  339. </dl>
  340. </div>
  341. <h3 class="name name-method" id="setW" translate="no">.<a href="#setW">setW</a><span class="signature">( index : <span class="param-type">number</span>, w : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  342. <div class="method">
  343. <div class="description">
  344. <p>Sets the w component of the vector at the given index.</p>
  345. </div>
  346. <table class="params">
  347. <tbody>
  348. <tr>
  349. <td class="name">
  350. <strong>index</strong>
  351. </td>
  352. <td class="description last">
  353. <p>The index into the buffer attribute.</p>
  354. </td>
  355. </tr>
  356. <tr>
  357. <td class="name">
  358. <strong>w</strong>
  359. </td>
  360. <td class="description last">
  361. <p>The value to set.</p>
  362. </td>
  363. </tr>
  364. </tbody>
  365. </table>
  366. <dl class="details">
  367. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  368. </dl>
  369. </div>
  370. <h3 class="name name-method" id="setX" translate="no">.<a href="#setX">setX</a><span class="signature">( index : <span class="param-type">number</span>, x : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  371. <div class="method">
  372. <div class="description">
  373. <p>Sets the x component of the vector at the given index.</p>
  374. </div>
  375. <table class="params">
  376. <tbody>
  377. <tr>
  378. <td class="name">
  379. <strong>index</strong>
  380. </td>
  381. <td class="description last">
  382. <p>The index into the buffer attribute.</p>
  383. </td>
  384. </tr>
  385. <tr>
  386. <td class="name">
  387. <strong>x</strong>
  388. </td>
  389. <td class="description last">
  390. <p>The value to set.</p>
  391. </td>
  392. </tr>
  393. </tbody>
  394. </table>
  395. <dl class="details">
  396. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  397. </dl>
  398. </div>
  399. <h3 class="name name-method" id="setXY" translate="no">.<a href="#setXY">setXY</a><span class="signature">( index : <span class="param-type">number</span>, x : <span class="param-type">number</span>, y : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  400. <div class="method">
  401. <div class="description">
  402. <p>Sets the x and y component of the vector at the given index.</p>
  403. </div>
  404. <table class="params">
  405. <tbody>
  406. <tr>
  407. <td class="name">
  408. <strong>index</strong>
  409. </td>
  410. <td class="description last">
  411. <p>The index into the buffer attribute.</p>
  412. </td>
  413. </tr>
  414. <tr>
  415. <td class="name">
  416. <strong>x</strong>
  417. </td>
  418. <td class="description last">
  419. <p>The value for the x component to set.</p>
  420. </td>
  421. </tr>
  422. <tr>
  423. <td class="name">
  424. <strong>y</strong>
  425. </td>
  426. <td class="description last">
  427. <p>The value for the y component to set.</p>
  428. </td>
  429. </tr>
  430. </tbody>
  431. </table>
  432. <dl class="details">
  433. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  434. </dl>
  435. </div>
  436. <h3 class="name name-method" id="setXYZ" translate="no">.<a href="#setXYZ">setXYZ</a><span class="signature">( index : <span class="param-type">number</span>, x : <span class="param-type">number</span>, y : <span class="param-type">number</span>, z : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  437. <div class="method">
  438. <div class="description">
  439. <p>Sets the x, y and z component of the vector at the given index.</p>
  440. </div>
  441. <table class="params">
  442. <tbody>
  443. <tr>
  444. <td class="name">
  445. <strong>index</strong>
  446. </td>
  447. <td class="description last">
  448. <p>The index into the buffer attribute.</p>
  449. </td>
  450. </tr>
  451. <tr>
  452. <td class="name">
  453. <strong>x</strong>
  454. </td>
  455. <td class="description last">
  456. <p>The value for the x component to set.</p>
  457. </td>
  458. </tr>
  459. <tr>
  460. <td class="name">
  461. <strong>y</strong>
  462. </td>
  463. <td class="description last">
  464. <p>The value for the y component to set.</p>
  465. </td>
  466. </tr>
  467. <tr>
  468. <td class="name">
  469. <strong>z</strong>
  470. </td>
  471. <td class="description last">
  472. <p>The value for the z component to set.</p>
  473. </td>
  474. </tr>
  475. </tbody>
  476. </table>
  477. <dl class="details">
  478. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  479. </dl>
  480. </div>
  481. <h3 class="name name-method" id="setXYZW" translate="no">.<a href="#setXYZW">setXYZW</a><span class="signature">( index : <span class="param-type">number</span>, x : <span class="param-type">number</span>, y : <span class="param-type">number</span>, z : <span class="param-type">number</span>, w : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  482. <div class="method">
  483. <div class="description">
  484. <p>Sets the x, y, z and w component of the vector at the given index.</p>
  485. </div>
  486. <table class="params">
  487. <tbody>
  488. <tr>
  489. <td class="name">
  490. <strong>index</strong>
  491. </td>
  492. <td class="description last">
  493. <p>The index into the buffer attribute.</p>
  494. </td>
  495. </tr>
  496. <tr>
  497. <td class="name">
  498. <strong>x</strong>
  499. </td>
  500. <td class="description last">
  501. <p>The value for the x component to set.</p>
  502. </td>
  503. </tr>
  504. <tr>
  505. <td class="name">
  506. <strong>y</strong>
  507. </td>
  508. <td class="description last">
  509. <p>The value for the y component to set.</p>
  510. </td>
  511. </tr>
  512. <tr>
  513. <td class="name">
  514. <strong>z</strong>
  515. </td>
  516. <td class="description last">
  517. <p>The value for the z component to set.</p>
  518. </td>
  519. </tr>
  520. <tr>
  521. <td class="name">
  522. <strong>w</strong>
  523. </td>
  524. <td class="description last">
  525. <p>The value for the w component to set.</p>
  526. </td>
  527. </tr>
  528. </tbody>
  529. </table>
  530. <dl class="details">
  531. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  532. </dl>
  533. </div>
  534. <h3 class="name name-method" id="setY" translate="no">.<a href="#setY">setY</a><span class="signature">( index : <span class="param-type">number</span>, y : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  535. <div class="method">
  536. <div class="description">
  537. <p>Sets the y component of the vector at the given index.</p>
  538. </div>
  539. <table class="params">
  540. <tbody>
  541. <tr>
  542. <td class="name">
  543. <strong>index</strong>
  544. </td>
  545. <td class="description last">
  546. <p>The index into the buffer attribute.</p>
  547. </td>
  548. </tr>
  549. <tr>
  550. <td class="name">
  551. <strong>y</strong>
  552. </td>
  553. <td class="description last">
  554. <p>The value to set.</p>
  555. </td>
  556. </tr>
  557. </tbody>
  558. </table>
  559. <dl class="details">
  560. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  561. </dl>
  562. </div>
  563. <h3 class="name name-method" id="setZ" translate="no">.<a href="#setZ">setZ</a><span class="signature">( index : <span class="param-type">number</span>, z : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  564. <div class="method">
  565. <div class="description">
  566. <p>Sets the z component of the vector at the given index.</p>
  567. </div>
  568. <table class="params">
  569. <tbody>
  570. <tr>
  571. <td class="name">
  572. <strong>index</strong>
  573. </td>
  574. <td class="description last">
  575. <p>The index into the buffer attribute.</p>
  576. </td>
  577. </tr>
  578. <tr>
  579. <td class="name">
  580. <strong>z</strong>
  581. </td>
  582. <td class="description last">
  583. <p>The value to set.</p>
  584. </td>
  585. </tr>
  586. </tbody>
  587. </table>
  588. <dl class="details">
  589. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  590. </dl>
  591. </div>
  592. <h3 class="name name-method" id="toJSON" translate="no">.<a href="#toJSON">toJSON</a><span class="signature">( data : <span class="param-type">Object</span> )</span><span class="type-signature"> : Object</span> </h3>
  593. <div class="method">
  594. <div class="description">
  595. <p>Serializes the buffer attribute into JSON.</p>
  596. <p>If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data.</p>
  597. </div>
  598. <table class="params">
  599. <tbody>
  600. <tr>
  601. <td class="name">
  602. <strong>data</strong>
  603. </td>
  604. <td class="description last">
  605. <p>An optional value holding meta information about the serialization.</p>
  606. </td>
  607. </tr>
  608. </tbody>
  609. </table>
  610. <dl class="details">
  611. <dt class="tag-returns"><strong>Returns:</strong> A JSON object representing the serialized buffer attribute.</dt>
  612. </dl>
  613. </div>
  614. <h3 class="name name-method" id="transformDirection" translate="no">.<a href="#transformDirection">transformDirection</a><span class="signature">( m : <span class="param-type"><a href="Matrix4.html">Matrix4</a></span> )</span><span class="type-signature"> : <a href="InterleavedBufferAttribute.html">InterleavedBufferAttribute</a></span> </h3>
  615. <div class="method">
  616. <div class="description">
  617. <p>Applies the given 4x4 matrix to the given attribute. Only works with
  618. item size <code>3</code> and with direction vectors.</p>
  619. </div>
  620. <table class="params">
  621. <tbody>
  622. <tr>
  623. <td class="name">
  624. <strong>m</strong>
  625. </td>
  626. <td class="description last">
  627. <p>The matrix to apply.</p>
  628. </td>
  629. </tr>
  630. </tbody>
  631. </table>
  632. <dl class="details">
  633. <dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
  634. </dl>
  635. </div>
  636. <h2 class="subsection-title">Source</h2>
  637. <p>
  638. <a href="https://github.com/mrdoob/three.js/blob/master/src/core/InterleavedBufferAttribute.js" translate="no" target="_blank" rel="noopener">src/core/InterleavedBufferAttribute.js</a>
  639. </p>
  640. </article>
  641. </section>
  642. <script src="../scripts/linenumber.js"></script>
  643. <script src="../scripts/page.js"></script>
  644. </body>
  645. </html>
粤ICP备19079148号