Project

General

Profile

« Previous | Next » 

Revision ff065f8f

Added by Leszek Koltunski over 5 years ago

Adjust UnscrambleEffectSpin.

View differences:

src/main/java/org/distorted/effect/SizeChangeEffectMove.java
37 37
    mNodeEffectPosition[0] = new int[] {1};
38 38
    mNodeEffects[0]        = new Effect[mNodeEffectPosition[0].length];
39 39

  
40
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
40
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
41 41
    d0.add(new Static3D(    0,0,0));
42 42
    d0.add(new Static3D(xmove,0,0));
43 43
    mNodeEffects[0][0] = new MatrixEffectMove(d0);
......
56 56
    mNodeEffectPosition[1] = new int[] {1};
57 57
    mNodeEffects[1]        = new Effect[mNodeEffectPosition[1].length];
58 58

  
59
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
59
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
60 60
    d0.add(new Static3D(-xmove,0,0));
61 61
    d0.add(new Static3D(     0,0,0));
62 62
    mNodeEffects[1][0] = new MatrixEffectMove(d0);
src/main/java/org/distorted/effect/SizeChangeEffectRound.java
39 39
    mCubeEffectPosition[0] = new int[] {6,7};
40 40
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
41 41

  
42
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
42
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
43 43
    d0.add(new Static3D( 1.00f, 1.00f, 1.00f));
44 44
    d0.add(new Static3D( 0.01f, 0.01f, 0.01f));
45 45
    mCubeEffects[0][0] = new MatrixEffectScale(d0);
46 46

  
47
    Dynamic3D d1 = new Dynamic3D(duration, 0.5f);
47
    Dynamic3D d1 = new Dynamic3D(duration/2, 0.5f);
48 48
    d1.setMode(Dynamic.MODE_PATH);
49 49
    d1.add(new Static3D( 0, 0, 0));
50 50
    d1.add(new Static3D(+X, 0, 0));
......
63 63
    mCubeEffectPosition[1] = new int[] {6,7};
64 64
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
65 65

  
66
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
66
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
67 67
    d0.add(new Static3D( 0.01f, 0.01f, 0.01f));
68 68
    d0.add(new Static3D( 1.00f, 1.00f, 1.00f));
69 69
    mCubeEffects[1][0] = new MatrixEffectScale(d0);
70 70

  
71
    Dynamic3D d1 = new Dynamic3D(duration, 0.5f);
71
    Dynamic3D d1 = new Dynamic3D(duration/2, 0.5f);
72 72
    d1.setMode(Dynamic.MODE_PATH);
73 73
    d1.add(new Static3D( 0, 0, 0));
74 74
    d1.add(new Static3D(-X, 0, 0));
src/main/java/org/distorted/effect/SizeChangeEffectScale.java
33 33
    mCubeEffectPosition[0] = new int[] {6};
34 34
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
35 35

  
36
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
36
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
37 37
    d0.add(new Static3D(1.00f, 1.00f, 1.00f));
38 38
    d0.add(new Static3D(0.01f, 0.01f, 0.01f));
39 39
    mCubeEffects[0][0] = new MatrixEffectScale(d0);
......
48 48
    mCubeEffectPosition[1] = new int[] {6};
49 49
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
50 50

  
51
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
51
    Dynamic3D d0 = new Dynamic3D(duration/2, 0.5f);
52 52
    d0.add(new Static3D(0.01f, 0.01f, 0.01f));
53 53
    d0.add(new Static3D(1.00f, 1.00f, 1.00f));
54 54
    mCubeEffects[1][0] = new MatrixEffectScale(d0);
src/main/java/org/distorted/effect/SizeChangeEffectTransparency.java
37 37
    mCubeEffectPosition[0] = new int[] {-1};
38 38
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
39 39

  
40
    Dynamic1D d0 = new Dynamic1D(duration, 0.5f);
40
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
41 41
    d0.add(new Static1D(1.0f));
42 42
    d0.add(new Static1D(0.0f));
43 43
    mCubeEffects[0][0] = new FragmentEffectAlpha(d0);
......
57 57
    float alpha          = 30.0f;
58 58
    float beta           = 90.0f;
59 59

  
60
    Dynamic5D d1 = new Dynamic5D(duration, 0.5f);
60
    Dynamic5D d1 = new Dynamic5D(duration/2, 0.5f);
61 61
    d1.add(new Static5D( init_amplitude, length, init_phase, alpha, beta) );
62 62
    d1.add(new Static5D( end_amplitude , length, end_phase , alpha, beta) );
63 63
    Static3D center = new Static3D(min*0.5f,min*0.5f,0);
......
73 73
    mCubeEffectPosition[1] = new int[] {-1};
74 74
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
75 75

  
76
    Dynamic1D d0 = new Dynamic1D(duration, 0.5f);
76
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
77 77
    d0.add(new Static1D(0.0f));
78 78
    d0.add(new Static1D(1.0f));
79 79
    mCubeEffects[1][0] = new FragmentEffectAlpha(d0);
......
93 93
    float alpha          = 30.0f;
94 94
    float beta           = 90.0f;
95 95

  
96
    Dynamic5D d1 = new Dynamic5D(duration, 0.5f);
96
    Dynamic5D d1 = new Dynamic5D(duration/2, 0.5f);
97 97
    d1.add(new Static5D( init_amplitude, length, init_phase, alpha, beta) );
98 98
    d1.add(new Static5D( end_amplitude , length, end_phase , alpha, beta) );
99 99
    Static3D center = new Static3D(min*0.5f,min*0.5f,0);
src/main/java/org/distorted/effect/UnscrambleEffectSpin.java
22 22
///////////////////////////////////////////////////////////////////////////////////////////////////
23 23

  
24 24
import org.distorted.library.effect.Effect;
25
import org.distorted.library.effect.MatrixEffectScale;
26
import org.distorted.library.type.Dynamic3D;
25
import org.distorted.library.effect.MatrixEffectRotate;
26
import org.distorted.library.type.Dynamic;
27
import org.distorted.library.type.Dynamic1D;
28
import org.distorted.library.type.Static1D;
27 29
import org.distorted.library.type.Static3D;
28 30

  
29 31
public class UnscrambleEffectSpin extends UnscrambleEffect
30 32
  {
31 33
  public void createEffectsPhase0(int duration)
32 34
    {
33
    mCubeEffectPosition[0] = new int[] {6};
35
    mCubeEffectPosition[0] = new int[] {3};
34 36
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
35 37

  
36
    Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
37
    d0.add(new Static3D(1.00f, 1.00f, 1.00f));
38
    d0.add(new Static3D(0.01f, 0.01f, 0.01f));
39
    mCubeEffects[0][0] = new MatrixEffectScale(d0);
38
    Static3D axis  = new Static3D(1,0,0);
39
    Static3D center= new Static3D(0,0,0);
40

  
41
    Dynamic1D d0 = new Dynamic1D(duration/2, 1.0f);
42
    d0.setMode(Dynamic.MODE_JUMP);
43
    d0.add(new Static1D( 0*36));
44
    /*
45
    d0.add(new Static1D( 1*36));
46
    d0.add(new Static1D( 3*36));
47
    d0.add(new Static1D( 6*36));
48
    */
49
    d0.add(new Static1D(10*36));
50
    mCubeEffects[0][0] = new MatrixEffectRotate(d0,axis,center);
40 51
    }
41 52

  
42 53
///////////////////////////////////////////////////////////////////////////////////////////////////
43 54

  
44 55
  public void createEffectsPhase1(int duration)
45 56
    {
46
    mCubeEffectPosition[1] = new int[] {6};
57
    mCubeEffectPosition[1] = new int[] {3};
47 58
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
48 59

  
49
    Dynamic3D d1 = new Dynamic3D(duration, 0.5f);
50
    d1.add(new Static3D(0.01f, 0.01f, 0.01f));
51
    d1.add(new Static3D(1.00f, 1.00f, 1.00f));
52
    mCubeEffects[1][0] = new MatrixEffectScale(d1);
60
    Static3D axis  = new Static3D(1,0,0);
61
    Static3D center= new Static3D(0,0,0);
62

  
63
    Dynamic1D d1 = new Dynamic1D(duration/2, 1.0f);
64
    d1.setMode(Dynamic.MODE_JUMP);
65
    d1.add(new Static1D( 0*36));
66
    /*
67
    d1.add(new Static1D( 4*36));
68
    d1.add(new Static1D( 7*36));
69
    d1.add(new Static1D( 9*36));
70
    */
71
    d1.add(new Static1D(10*36));
72
    mCubeEffects[1][0] = new MatrixEffectRotate(d1,axis,center);
53 73
    }
54 74

  
55 75
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff