Project

General

Profile

« Previous | Next » 

Revision 63f8c96e

Added by Leszek Koltunski over 5 years ago

Correct the Appear/disappear effects.

View differences:

src/main/java/org/distorted/effect/AppearEffectRound.java
22 22
import org.distorted.library.effect.Effect;
23 23
import org.distorted.library.effect.MatrixEffectMove;
24 24
import org.distorted.library.effect.MatrixEffectScale;
25
import org.distorted.library.type.Dynamic;
25 26
import org.distorted.library.type.Dynamic3D;
26 27
import org.distorted.library.type.Static3D;
27 28

  
......
33 34
  {
34 35
  public int createEffects(int duration)
35 36
    {
36
    float X = TEXTURE_SIZE;
37
    float X = TEXTURE_SIZE/3;
37 38

  
38
    mCubeEffectPosition = new int[] {6};
39
    mCubeEffectPosition = new int[] {6,7};
39 40
    mCubeEffects        = new Effect[mCubeEffectPosition.length];
40
/*
41

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

  
46 47
    Dynamic3D d1 = new Dynamic3D(duration, 0.5f);
48
    d1.setMode(Dynamic.MODE_PATH);
47 49
    d1.add(new Static3D( 0, 0, 0));
48 50
    d1.add(new Static3D(-X, 0, 0));
49 51
    d1.add(new Static3D( 0, 0, 0));
50
    mCubeEffects[0] = new MatrixEffectMove(d1);
52
    mCubeEffects[1] = new MatrixEffectMove(d1);
51 53

  
52
    return 1;
54
    return 2;
53 55
    }
54 56

  
55 57
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/effect/DisappearEffectRound.java
22 22
import org.distorted.library.effect.Effect;
23 23
import org.distorted.library.effect.MatrixEffectMove;
24 24
import org.distorted.library.effect.MatrixEffectScale;
25
import org.distorted.library.type.Dynamic;
25 26
import org.distorted.library.type.Dynamic3D;
26 27
import org.distorted.library.type.Static3D;
27 28

  
......
33 34
  {
34 35
  public int createEffects(int duration)
35 36
    {
36
    float X = TEXTURE_SIZE;
37
    float X = TEXTURE_SIZE/3;
37 38

  
38
    mCubeEffectPosition = new int[] {6};
39
    mCubeEffectPosition = new int[] {6,7};
39 40
    mCubeEffects        = new Effect[mCubeEffectPosition.length];
40
/*
41

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

  
46 47
    Dynamic3D d1 = new Dynamic3D(duration, 0.5f);
48
    d1.setMode(Dynamic.MODE_PATH);
47 49
    d1.add(new Static3D( 0, 0, 0));
48 50
    d1.add(new Static3D(+X, 0, 0));
49 51
    d1.add(new Static3D( 0, 0, 0));
50
    mCubeEffects[0] = new MatrixEffectMove(d1);
52
    mCubeEffects[1] = new MatrixEffectMove(d1);
51 53

  
52
    return 1;
54
    return 2;
53 55
    }
54 56

  
55 57
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff