Project

General

Profile

« Previous | Next » 

Revision 90f78d6b

Added by Leszek Koltunski over 1 year ago

Star visible now, but the background of it is opaque (dark gray, same as the glClearColor of the main Screen)

View differences:

src/main/java/org/distorted/overlays/OverlayStars.java
13 13
import android.graphics.Bitmap;
14 14
import android.graphics.BitmapFactory;
15 15

  
16
import org.distorted.library.effect.MatrixEffectMove;
16 17
import org.distorted.library.effect.MatrixEffectRotate;
17 18
import org.distorted.library.effect.MatrixEffectScale;
18 19
import org.distorted.library.main.DistortedEffects;
......
42 43
      DistortedTexture texture = new DistortedTexture();
43 44
      texture.setTexture(bmp);
44 45

  
45
      float scale = 10;
46
      float scale = mScreen.getWidth()*0.3f;
46 47

  
48
      Static3D move     = new Static3D(0,0,1);
47 49
      Static1D point0   = new Static1D(0);
48 50
      Static1D point360 = new Static1D(360);
49 51
      Dynamic1D angle   = new Dynamic1D();
50 52
      angle.add(point0);
51 53
      angle.add(point360);
52
      angle.setCount(1.0f);
54
      angle.setCount(0.5f);
53 55
      angle.setDuration(5000);
54 56
      Static3D axis = new Static3D(0,0,1);
55 57
      Static3D center = new Static3D(0,0,0);
56 58

  
57 59
      DistortedEffects effects = new DistortedEffects();
60
      MatrixEffectMove moveEffect = new MatrixEffectMove(move);
58 61
      MatrixEffectScale scaleEffect = new MatrixEffectScale(scale);
59 62
      MatrixEffectRotate rotateEffect = new MatrixEffectRotate(angle,axis,center);
63
      effects.apply(moveEffect);
60 64
      effects.apply(scaleEffect);
61 65
      effects.apply(rotateEffect);
62 66

  

Also available in: Unified diff