PropertyMixer.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. 允许加权累加的缓冲场景图属性,内部使用
  14. </p>
  15. <h2>构造器</h2>
  16. <h3>[name]( [param:PropertyBinding binding], [param:String typeName], [param:Number valueSize] )</h3>
  17. <p>
  18. -- binding <br />
  19. -- typeName <br />
  20. -- valueSize <br />
  21. </p>
  22. <h2>属性</h2>
  23. <h3>[property:PropertyBinding binding]</h3>
  24. <p>
  25. </p>
  26. <h3>[property:TypedArray buffer]</h3>
  27. <p>
  28. 大小为 4 * [page:PropertyMixer valueSize] 的缓冲区 <br /><br />
  29. 布局为: [ incoming | accu0 | accu1 | orig ]<br /><br />
  30. 插值器可使用 .buffer 作为 .result 且数据会进入'incoming'区.
  31. 'accu0'和'accu1'用于按帧交错累加‘incoming’中的数据并进行比较以侦测变化。'orig'存储着属性的原始状态。
  32. </p>
  33. <h3>[property:Number cumulativeWeight]</h3>
  34. <p>
  35. 默认值是0
  36. </p>
  37. <h3>[property:Number valueSize]</h3>
  38. <p>
  39. </p>
  40. <h3>[property:Number referenceCount]</h3>
  41. <p>
  42. 默认值是0
  43. </p>
  44. <h3>[property:Number useCount]</h3>
  45. <p>
  46. 默认值是0
  47. </p>
  48. <h2>方法</h2>
  49. <h3>[method:null accumulate]( [param:Number accuIndex], [param:Number weight] )</h3>
  50. <p>
  51. 将[page:PropertyMixer.buffer buffer][accuIndex]中'incoming'区的数据累加到'accu[i]'区中。<br />
  52. 如果权值为0,则什么都不做。
  53. </p>
  54. <h3>[method:null apply]( [param:Number accuIndex] )</h3>
  55. <p>
  56. 当累加值不同时,将[page:PropertyMixer.buffer buffer] 'accu[i]区的状态应用于绑定.
  57. </p>
  58. <h3>[method:null saveOriginalState]( )</h3>
  59. <p>
  60. 记住绑定属性的状态并复制到两个'accu'区中.
  61. </p>
  62. <h3>[method:null restoreOriginalState]( )</h3>
  63. <p>
  64. 将预先通过'saveOriginalState'方法取得的状态应用于绑定。
  65. </p>
  66. <h2>方法</h2>
  67. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  68. </body>
  69. </html>