Revision 246d021c
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/library/main/DistortedTexture.java | ||
---|---|---|
148 | 148 |
* |
149 | 149 |
* @param argb The color to paint the Texture with. |
150 | 150 |
*/ |
151 |
public void setColor(int argb) |
|
151 |
public void setColorARGB(int argb)
|
|
152 | 152 |
{ |
153 | 153 |
Paint paint = new Paint(); |
154 | 154 |
paint.setColor(argb); |
src/main/java/org/distorted/library/type/Dynamic.java | ||
---|---|---|
158 | 158 |
private static final int NUM_NOISE = 5; // used iff mNoise>0.0. Number of intermediary points between each pair of adjacent vectors |
159 | 159 |
// where we randomize noise factors to make the way between the two vectors not so smooth. |
160 | 160 |
private long mStartTime; |
161 |
private long mCorrectedTime; |
|
161 | 162 |
private static long mPausedTime; |
162 | 163 |
|
163 | 164 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
185 | 186 |
mAccessType= ACCESS_TYPE_RANDOM; |
186 | 187 |
mConvexity = 1.0f; |
187 | 188 |
mStartTime = 0; |
189 |
mCorrectedTime = 0; |
|
188 | 190 |
|
189 | 191 |
baseV = new float[mDimension][mDimension]; |
190 | 192 |
buf = new float[mDimension]; |
... | ... | |
693 | 695 |
|
694 | 696 |
long diff = time-mPausedTime; |
695 | 697 |
|
696 |
if( mStartTime<mPausedTime && diff>=0 && diff<=step ) |
|
698 |
if( mStartTime<mPausedTime && mCorrectedTime<mPausedTime && diff>=0 && diff<=step )
|
|
697 | 699 |
{ |
700 |
mCorrectedTime = mPausedTime; |
|
698 | 701 |
mStartTime += diff; |
699 | 702 |
step -= diff; |
700 | 703 |
} |
Also available in: Unified diff
1) rename DistortedTexture's setColor to setColorARGB
2) fix the Wiind app to take into account paused time
3) fix the Dynamic so that if a single Dynamic is used more than once (in more than one effect) than it doesn't get adjusted for paused time multiple times.