Revision b5cc7760
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java | ||
---|---|---|
46 | 46 |
private static Static2D point; |
47 | 47 |
|
48 | 48 |
private static Static4D mRegion; |
49 |
private static Dynamic1D mInterA, mInterM, mInterB; |
|
49 |
private static Dynamic1D mInterA, mInterM, mInterB, mInterS;
|
|
50 | 50 |
|
51 | 51 |
private static Dynamic3D mInterD; |
52 | 52 |
private static Static3D v0, v1, v2, v3; |
... | ... | |
83 | 83 |
mInterA.add(new Static1D(1)); |
84 | 84 |
mInterA.add(new Static1D(0)); |
85 | 85 |
|
86 |
mInterS = new Dynamic1D(); |
|
87 |
mInterS.setDuration(mDuration); |
|
88 |
mInterS.setCount(mCount); |
|
89 |
mInterS.add(new Static1D(1.0f)); |
|
90 |
mInterS.add(new Static1D(0.3f)); |
|
91 |
|
|
86 | 92 |
mInterB = new Dynamic1D(); |
87 | 93 |
mInterB.setDuration(mDuration); |
88 | 94 |
mInterB.setCount(mCount); |
... | ... | |
149 | 155 |
mInterA.setDuration(duration); |
150 | 156 |
mInterB.setDuration(duration); |
151 | 157 |
mInterM.setDuration(duration); |
158 |
mInterS.setDuration(duration); |
|
152 | 159 |
} |
153 | 160 |
|
154 | 161 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
160 | 167 |
mInterA.setCount(count); |
161 | 168 |
mInterB.setCount(count); |
162 | 169 |
mInterM.setCount(count); |
170 |
mInterS.setCount(count); |
|
163 | 171 |
} |
164 | 172 |
|
165 | 173 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
178 | 186 |
|
179 | 187 |
switch(mCurrentEffect) |
180 | 188 |
{ |
181 |
case 0: ScratchpadRenderer.mBackground.distort(mInterD, region, point);
|
|
189 |
case 0: ScratchpadRenderer.mBackground.distort(mInterD, point, region);
|
|
182 | 190 |
break; |
183 |
case 1: ScratchpadRenderer.mBackground.sink(0.3f, region, point, mDuration, mCount);
|
|
191 |
case 1: ScratchpadRenderer.mBackground.sink(mInterS, point, region);
|
|
184 | 192 |
break; |
185 | 193 |
case 2: ScratchpadRenderer.mBackground.alpha(mInterA, mRegion, false); |
186 | 194 |
break; |
Also available in: Unified diff
New API fully ported; not tested yet but stuff compiles.