Project

General

Profile

« Previous | Next » 

Revision 17a7c91a

Added by Leszek Koltunski over 4 years ago

Correct the Rubik app for the recent changes to the library's Node.

View differences:

src/main/java/org/distorted/effect/sizechange/SizeChangeEffectTransparency.java
34 34
  {
35 35
  public int createEffectsPhase0(int duration)
36 36
    {
37
    mCubeEffectPosition[0] = new int[] {-1};
38
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
39

  
40
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
41
    d0.add(new Static1D(1.0f));
42
    d0.add(new Static1D(0.0f));
43
    mCubeEffects[0][0] = new FragmentEffectAlpha(d0);
44

  
45
    mNodeEffectPosition[0] = new int[] {-1};
37
    mNodeEffectPosition[0] = new int[] {-1,-1};
46 38
    mNodeEffects[0]        = new Effect[mNodeEffectPosition[0].length];
47 39

  
48 40
    float init_amplitude = 0.0f;
49
    float end_amplitude  = 1/15.0f;
50
    float length         = 1/15.0f;
41
    float end_amplitude  = 1/8.0f;
42
    float length         = 1/8.0f;
51 43
    float init_phase     = 360.0f;
52 44
    float end_phase      = 0.0f;
53 45
    float alpha          = 30.0f;
......
59 51
    Static3D center = new Static3D(0,0,0);
60 52
    mNodeEffects[0][0] = new VertexEffectWave(d1, center, null);
61 53

  
54
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
55
    d0.add(new Static1D(1.0f));
56
    d0.add(new Static1D(0.0f));
57
    mNodeEffects[0][1] = new FragmentEffectAlpha(d0);
58

  
62 59
    return 2;
63 60
    }
64 61

  
......
66 63

  
67 64
  public int createEffectsPhase1(int duration)
68 65
    {
69
    mCubeEffectPosition[1] = new int[] {-1};
70
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
71

  
72
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
73
    d0.add(new Static1D(0.0f));
74
    d0.add(new Static1D(1.0f));
75
    mCubeEffects[1][0] = new FragmentEffectAlpha(d0);
76

  
77
    mNodeEffectPosition[1] = new int[] {-1};
66
    mNodeEffectPosition[1] = new int[] {-1,-1};
78 67
    mNodeEffects[1]        = new Effect[mNodeEffectPosition[1].length];
79 68

  
80
    float init_amplitude = 1/15.0f;
69
    float init_amplitude = 1/8.0f;
81 70
    float end_amplitude  = 0.0f;
82
    float length         = 1/15.0f;
71
    float length         = 1/8.0f;
83 72
    float init_phase     = 0.0f;
84 73
    float end_phase      = 360.0f;
85 74
    float alpha          = 30.0f;
......
91 80
    Static3D center = new Static3D(0,0,0);
92 81
    mNodeEffects[1][0] = new VertexEffectWave(d1, center, null);
93 82

  
83
    Dynamic1D d0 = new Dynamic1D(duration/2, 0.5f);
84
    d0.add(new Static1D(0.0f));
85
    d0.add(new Static1D(1.0f));
86
    mNodeEffects[1][1] = new FragmentEffectAlpha(d0);
87

  
94 88
    return 2;
95 89
    }
96 90

  

Also available in: Unified diff