Project

General

Profile

« Previous | Next » 

Revision e4db5995

Added by Leszek Koltunski over 4 years ago

Correct scramble speed.

View differences:

src/main/java/org/distorted/effect/scramble/ScrambleEffectRotations.java
54 54

  
55 55
///////////////////////////////////////////////////////////////////////////////////////////////////
56 56

  
57
  public void createEffects(int duration)
57
  public void createEffects(int duration, int numScrambles)
58 58
    {
59 59
    mCubeEffectNumber   = 2;
60 60
    mNodeEffectNumber   = 0;
......
63 63

  
64 64
    mRnd.setSeed(System.currentTimeMillis());
65 65

  
66
    int numRandomPoints = (int)(Math.pow(numScrambles,0.7f));
67

  
66 68
    DynamicQuat dq = new DynamicQuat(duration, 0.5f);
67 69
    dq.setMode(Dynamic.MODE_PATH);
68 70
    dq.add(new Static4D(0,0,0,1));
69
    dq.add(generateNewRandomPoint());
70
    dq.add(generateNewRandomPoint());
71
    dq.add(generateNewRandomPoint());
71

  
72
    for(int point=0; point<numRandomPoints; point++)
73
      {
74
      dq.add(generateNewRandomPoint());
75
      }
76

  
72 77
    dq.add(new Static4D(0,0,0,1));
73 78

  
74 79
    mCubeEffects[0] = new MatrixEffectQuaternion(dq, new Static3D(0,0,0));

Also available in: Unified diff