Project

General

Profile

« Previous | Next » 

Revision dae661e9

Added by Leszek Koltunski about 5 years ago

Invert the order of Matrix Effects. Now, just as in the other queues, the first matrix effect is actually the first to act on the object - not the other way around!

View differences:

src/main/java/org/distorted/examples/movingglow/MovingGlowRenderer.java
92 92
      for(int j=0; j<NUM_LEAVES; j++)
93 93
        {
94 94
        mLeafEffects[j] = new DistortedEffects();
95
        mLeafEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) );
96 95
        mLeafEffects[j].apply(leafMove);
96
        mLeafEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) );
97 97
        mLeafEffects[j].apply( new FragmentEffectChroma(chromaLevel, new Static3D(colors[3*j],colors[3*j+1], colors[3*j+2])) );
98 98
        DistortedNode node = new DistortedNode( mLeaf, mLeafEffects[j], mesh);
99 99
        root.attach(node);
......
108 108
      rot.add(new Static1D(360));
109 109

  
110 110
      DistortedEffects effects = root.getEffects();
111
      effects.apply(new MatrixEffectMove(mMove));
112
      effects.apply(new MatrixEffectScale(mScale));
113 111
      effects.apply( new MatrixEffectRotate(rot, axis, center) );
112
      effects.apply(new MatrixEffectScale(mScale));
113
      effects.apply(new MatrixEffectMove(mMove));
114 114

  
115 115
      Dynamic1D radiusDyn = new Dynamic1D(FLASH_TIME,1.0f);
116 116
      radiusDyn.add(new Static1D( 0));

Also available in: Unified diff