Revision f988589e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java | ||
---|---|---|
32 | 32 |
import org.distorted.library.type.Dynamic1D; |
33 | 33 |
import org.distorted.library.type.Dynamic3D; |
34 | 34 |
import org.distorted.library.type.Static1D; |
35 |
import org.distorted.library.type.Static2D; |
|
36 | 35 |
import org.distorted.library.type.Static3D; |
37 | 36 |
import org.distorted.library.type.Static4D; |
38 | 37 |
|
... | ... | |
95 | 94 |
|
96 | 95 |
macroblock = new DistortedBitmap(bitmap, 30); |
97 | 96 |
|
98 |
Dynamic1D macroblockDyn = new Dynamic1D(); |
|
99 |
macroblockDyn.setDuration(3000); |
|
100 |
macroblockDyn.setCount(0); |
|
97 |
Dynamic1D macroblockDyn = new Dynamic1D(3000,0.0f); |
|
101 | 98 |
macroblockDyn.add(new Static1D( 1)); |
102 | 99 |
macroblockDyn.add(new Static1D(30)); |
103 | 100 |
|
104 | 101 |
macroblock.macroblock(macroblockDyn, macRegion); |
105 | 102 |
|
106 |
Dynamic1D alphaDyn = new Dynamic1D(); |
|
107 |
alphaDyn.setDuration(3000); |
|
108 |
alphaDyn.setCount(0); |
|
103 |
Dynamic1D alphaDyn = new Dynamic1D(3000,0.0f); |
|
109 | 104 |
alphaDyn.add(new Static1D(1)); |
110 | 105 |
alphaDyn.add(new Static1D(0)); |
111 | 106 |
|
... | ... | |
127 | 122 |
{ |
128 | 123 |
int duration = 10000; |
129 | 124 |
|
130 |
Dynamic3D diMove = new Dynamic3D(); |
|
131 |
diMove.setCount(0.0f); |
|
132 |
diMove.setDuration(duration); |
|
125 |
Dynamic3D diMove = new Dynamic3D(duration,0.0f); |
|
133 | 126 |
diMove.add(new Static3D(width-bmpWidth,height-bmpHeight,0)); |
134 | 127 |
diMove.add(new Static3D(0,0,0)); |
135 | 128 |
|
136 |
Dynamic3D diScale = new Dynamic3D(); |
|
137 |
diScale.setCount(0.0f); |
|
138 |
diScale.setDuration(duration); |
|
129 |
Dynamic3D diScale = new Dynamic3D(duration,0.0f); |
|
139 | 130 |
diScale.add(new Static3D(1,1,1)); |
140 | 131 |
diScale.add(new Static3D(0.33f,0.33f,1)); |
141 | 132 |
|
142 |
Dynamic1D diRotate = new Dynamic1D(); |
|
143 |
diRotate.setCount(0.0f); |
|
144 |
diRotate.setDuration(duration); |
|
133 |
Dynamic1D diRotate = new Dynamic1D(duration,0.0f); |
|
145 | 134 |
diRotate.add(new Static1D( 0)); |
146 | 135 |
diRotate.add(new Static1D(360)); |
147 | 136 |
|
Also available in: Unified diff
Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.