Revision 6e3cb7dd
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/effect/UnscrambleEffectSpin.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
Dynamic1D d0 = new Dynamic1D(duration/2, 1.0f); |
42 | 42 |
d0.setMode(Dynamic.MODE_JUMP); |
43 |
d0.setConvexity(0.0f); // otherwise speed of the rotation would be strangely uneven |
|
43 | 44 |
d0.add(new Static1D( 0*36)); |
44 |
|
|
45 | 45 |
d0.add(new Static1D( 1*36)); |
46 | 46 |
d0.add(new Static1D( 3*36)); |
47 | 47 |
d0.add(new Static1D( 6*36)); |
48 |
|
|
49 | 48 |
d0.add(new Static1D(10*36)); |
50 | 49 |
mCubeEffects[0][0] = new MatrixEffectRotate(d0,axis,center); |
51 | 50 |
} |
... | ... | |
62 | 61 |
|
63 | 62 |
Dynamic1D d1 = new Dynamic1D(duration/2, 1.0f); |
64 | 63 |
d1.setMode(Dynamic.MODE_JUMP); |
64 |
d1.setConvexity(0.0f); |
|
65 | 65 |
d1.add(new Static1D( 0*36)); |
66 |
|
|
67 | 66 |
d1.add(new Static1D( 4*36)); |
68 | 67 |
d1.add(new Static1D( 7*36)); |
69 | 68 |
d1.add(new Static1D( 9*36)); |
70 |
|
|
71 | 69 |
d1.add(new Static1D(10*36)); |
72 | 70 |
mCubeEffects[1][0] = new MatrixEffectRotate(d1,axis,center); |
73 | 71 |
} |
Also available in: Unified diff
Modify the 'convexity' param in Dynamics.
This finally satisfies the requirements of the 'Spin' effect in MagicCube: achieving constant speed ( by setting a 1D Dynamic's convexity to 0)