Project

General

Profile

« Previous | Next » 

Revision 7bf107f7

Added by Leszek Koltunski almost 8 years ago

Some more progress with porting apps to new VERTEX API.

View differences:

src/main/java/org/distorted/examples/check/CheckRenderer.java
30 30
import org.distorted.library.Distorted;
31 31
import org.distorted.library.DistortedBitmap;
32 32
import org.distorted.library.EffectTypes;
33
import org.distorted.library.type.Dynamic3D;
33 34
import org.distorted.library.type.Static1D;
34 35
import org.distorted.library.type.Static2D;
35 36
import org.distorted.library.type.Static3D;
......
132 133
      //
133 134
      // Even if adding some of the Effects fails, the App will still start - you just won't see
134 135
      // the effects that failed to add.
135
      Static2D pDown   = new Static2D(bmpWidth/2,   0);
136
      Static3D vDown   = new Static3D( 0,-bmpHeight,0);
137
      Static4D mRegion = new Static4D( 0, 0, 40 ,40 );
138

  
139
      Dynamic2D mPoint = new Dynamic2D();
140
      mPoint.setCount(0.0f);
141
      mPoint.setDuration(2000);
142
      mPoint.add(new Static2D(        0, bmpHeight/2));
143
      mPoint.add(new Static2D( bmpWidth, bmpHeight/2));
144

  
145
      mSuccess.swirl( 30, mRegion, mPoint );
146
      mSuccess.deform(vDown, pDown, 2000, 0.0f);
136

  
137
      Dynamic2D dSwirl = new Dynamic2D();
138
      dSwirl.setCount(0.0f);
139
      dSwirl.setDuration(2000);
140
      dSwirl.add(new Static2D(        0, bmpHeight/2));
141
      dSwirl.add(new Static2D( bmpWidth, bmpHeight/2));
142

  
143
      mSuccess.swirl( new Static1D(30), dSwirl, new Static4D( 0,0,40,40) );
144

  
145
      Dynamic3D dDeform = new Dynamic3D();
146
      dDeform.setCount(0.0f);
147
      dDeform.setDuration(2000);
148
      dDeform.add(new Static3D( 0,         0,0));
149
      dDeform.add(new Static3D( 0,-bmpHeight,0));
150

  
151
      mSuccess.deform(dDeform, new Static2D(bmpWidth/2,0) );
147 152

  
148 153
      // Now try adding 1 Fragment Effect. Likewise, will fail if maxFragmentEffects is <1.
149 154
      Static3D color = new Static3D(1,0,0);

Also available in: Unified diff