PropertyMixer.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. Buffered scene graph property that allows weighted accumulation; used
  13. internally.
  14. </p>
  15. <h2>Constructor</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>Properties</h2>
  23. <h3>[property:PropertyBinding binding]</h3>
  24. <h3>[property:TypedArray buffer]</h3>
  25. <p>
  26. Buffer with size [page:PropertyMixer valueSize] * 4. <br /><br />
  27. This has the layout: [ incoming | accu0 | accu1 | orig ]<br /><br />
  28. Interpolators can use .buffer as their .result and the data then goes to
  29. 'incoming'. 'accu0' and 'accu1' are used frame-interleaved for the
  30. cumulative result and are compared to detect changes. 'orig' stores the
  31. original state of the property.
  32. </p>
  33. <h3>[property:Number cumulativeWeight]</h3>
  34. <p>Default is `0`.</p>
  35. <h3>[property:Number cumulativeWeightAdditive]</h3>
  36. <p>Default is `0`.</p>
  37. <h3>[property:Number valueSize]</h3>
  38. <h3>[property:Number referenceCount]</h3>
  39. <p>Default is `0`.</p>
  40. <h3>[property:Number useCount]</h3>
  41. <p>Default is `0`.</p>
  42. <h2>Methods</h2>
  43. <h3>
  44. [method:undefined accumulate]( [param:Number accuIndex], [param:Number weight] )
  45. </h3>
  46. <p>
  47. Accumulate data in [page:PropertyMixer.buffer buffer][accuIndex]
  48. 'incoming' region into 'accu[i]'.<br />
  49. If weight is `0` this does nothing.
  50. </p>
  51. <h3>[method:undefined accumulateAdditive]( [param:Number weight] )</h3>
  52. <p>
  53. Accumulate data in the 'incoming' region into 'add'.<br />
  54. If weight is `0` this does nothing.
  55. </p>
  56. <h3>[method:undefined apply]( [param:Number accuIndex] )</h3>
  57. <p>
  58. Apply the state of [page:PropertyMixer.buffer buffer] 'accu[i]' to the
  59. binding when accus differ.
  60. </p>
  61. <h3>[method:undefined saveOriginalState]( )</h3>
  62. <p>Remember the state of the bound property and copy it to both accus.</p>
  63. <h3>[method:undefined restoreOriginalState]( )</h3>
  64. <p>
  65. Apply the state previously taken via 'saveOriginalState' to the binding.
  66. </p>
  67. <h2>Source</h2>
  68. <p>
  69. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  70. </p>
  71. </body>
  72. </html>