256 |
} |
} |
257 |
|
|
258 |
static public class LinearCalculator implements FractCalculator { |
static public class LinearCalculator implements FractCalculator { |
259 |
|
float switchFract; |
260 |
|
public LinearCalculator(float switchFract) { |
261 |
|
this.switchFract = switchFract; |
262 |
|
} |
263 |
|
public LinearCalculator() { |
264 |
|
switchFract = .5f; |
265 |
|
} |
266 |
int millis = 0; // see defaultAnimationTime |
int millis = 0; // see defaultAnimationTime |
267 |
protected long startTime = 0; |
protected long startTime = 0; |
268 |
public void eventAt(long time) { |
public void eventAt(long time) { |
281 |
|
|
282 |
public void callRender(long time, Window w) { |
public void callRender(long time, Window w) { |
283 |
float f = fract(time); |
float f = fract(time); |
284 |
w.renderAnim(f, 1, f >= 0.50); |
w.renderAnim(f, 1, f >= switchFract); |
285 |
} |
} |
286 |
} |
} |
287 |
static public class SimpleCalculator implements FractCalculator { |
static public class SimpleCalculator implements FractCalculator { |