Revision f988589e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/check/CheckRenderer.java | ||
---|---|---|
89 | 89 |
float factor = (float)height/bmpHeight; |
90 | 90 |
|
91 | 91 |
mSuccess.move( new Static3D((width-w)/2,0,0) ); |
92 |
mSuccess.scale( new Static3D(factor,factor,factor) );
|
|
92 |
mSuccess.scale(factor);
|
|
93 | 93 |
} |
94 | 94 |
else |
95 | 95 |
{ |
... | ... | |
97 | 97 |
float factor = (float)width/bmpWidth; |
98 | 98 |
|
99 | 99 |
mSuccess.move( new Static3D(0,(height-h)/2,0) ); |
100 |
mSuccess.scale( new Static3D(factor,factor,factor) );
|
|
100 |
mSuccess.scale(factor);
|
|
101 | 101 |
} |
102 | 102 |
|
103 | 103 |
Distorted.onSurfaceChanged(width, height); |
... | ... | |
134 | 134 |
// Even if adding some of the Effects fails, the App will still start - you just won't see |
135 | 135 |
// the effects that failed to add. |
136 | 136 |
|
137 |
Dynamic2D dSwirl = new Dynamic2D(); |
|
138 |
dSwirl.setCount(0.0f); |
|
139 |
dSwirl.setDuration(2000); |
|
137 |
Dynamic2D dSwirl = new Dynamic2D(2000,0.0f); |
|
140 | 138 |
dSwirl.add(new Static2D( 0, bmpHeight/2)); |
141 | 139 |
dSwirl.add(new Static2D( bmpWidth, bmpHeight/2)); |
142 | 140 |
|
143 | 141 |
mSuccess.swirl( new Static1D(30), dSwirl, new Static4D( 0,0,40,40) ); |
144 | 142 |
|
145 |
Dynamic3D dDeform = new Dynamic3D(); |
|
146 |
dDeform.setCount(0.0f); |
|
147 |
dDeform.setDuration(2000); |
|
143 |
Dynamic3D dDeform = new Dynamic3D(2000,0.0f); |
|
148 | 144 |
dDeform.add(new Static3D( 0, 0,0)); |
149 | 145 |
dDeform.add(new Static3D( 0,-bmpHeight,0)); |
150 | 146 |
|
... | ... | |
152 | 148 |
|
153 | 149 |
// Now try adding 1 Fragment Effect. Likewise, will fail if maxFragmentEffects is <1. |
154 | 150 |
Static3D color = new Static3D(1,0,0); |
155 |
Dynamic1D inter = new Dynamic1D(); |
|
156 |
inter.setCount(0.0f); |
|
157 |
inter.setDuration(2000); |
|
151 |
Dynamic1D inter = new Dynamic1D(2000,0.0f); |
|
158 | 152 |
inter.add(new Static1D(0)); |
159 | 153 |
inter.add(new Static1D(1)); |
160 | 154 |
|
Also available in: Unified diff
Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.