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