Project

General

Profile

« Previous | Next » 

Revision f988589e

Added by Leszek Koltunski almost 8 years ago

Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.

View differences:

src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
32 32
import org.distorted.library.type.Dynamic3D;
33 33
import org.distorted.library.DistortedNode;
34 34
import org.distorted.library.type.Static1D;
35
import org.distorted.library.type.Static2D;
36 35
import org.distorted.library.type.Static3D;
37 36
import org.distorted.library.type.Static4D;
38 37
import org.distorted.library.message.EffectListener;
......
179 178
      mStars[i].scale( new Static3D(randomS,randomS,randomS) );
180 179
      mStars[i].rotate( center, new Static1D(randomA), axis);
181 180
      
182
      Dynamic1D di = new Dynamic1D();
183
      di.setDuration(randomTime);
184
      di.setCount(0.0f);
181
      Dynamic1D di = new Dynamic1D(randomTime,0.0f);
185 182
      di.setNoise(0.5f);
186 183
      di.add(new Static1D(randomAlpha1));
187 184
      di.add(new Static1D(randomAlpha2));
......
193 190
      
194 191
    float scale = (0.5f*w/mGFFA.getWidth());
195 192
    
196
    Dynamic1D di = new Dynamic1D();
197
    di.setDuration(6000);
198
    di.setCount(0.5f);
193
    Dynamic1D di = new Dynamic1D(6000,0.5f);
199 194
    di.add(new Static1D(1.0f));
200 195
    di.add(new Static1D(1.0f));
201 196
    di.add(new Static1D(0.0f));
......
349 344
        int initSize= (int)(3.0f*screenW/logoW);
350 345
        int finaSize= (int)(0.1f*screenW/logoW);
351 346
      
352
        Dynamic3D di = new Dynamic3D();
353
      
347
        Dynamic3D di = new Dynamic3D(10000,0.5f);
354 348
        di.add(new Static3D(initSize,initSize,1));
355 349
        di.add(new Static3D(finaSize,finaSize,1));
356
        di.setCount(0.5f);
357
        di.setDuration(10000);
358
      
350

  
359 351
        mLogo.move( new Static3D(screenW/2,screenH/2,0) );
360 352
        mLogo.scale(di);
361 353
        mLogo.move( new Static3D(-logoW/2,-logoH/2,0) );
......
375 367
        int backH  = mCrawlBackground.getHeight();
376 368
        float scale= (float)screenW/crawlW;
377 369
      
378
        Dynamic3D di = new Dynamic3D();
379
        di.setCount(0.5f);
380
        di.setDuration(60000);
370
        Dynamic3D di = new Dynamic3D(60000,0.5f);
381 371
        di.add(new Static3D(screenW/2,+backH       , 0));
382 372
        di.add(new Static3D(screenW/2,-scale*crawlH, 0));
383 373
        

Also available in: Unified diff