Project

General

Profile

« Previous | Next » 

Revision b1178f5f

Added by Leszek Koltunski over 1 year ago

Move the control of object scaling out the objectlib.
Thee xact way the object is scaled needs to be decided in the app, as only the app knows that e.g. in the Rubik main screen, if it is a square, then obejct needs to be a bit smaller than in case of Config screen (if that one happens to be a square)

View differences:

src/main/java/org/distorted/overlays/OverlayStars.java
218 218
      MeshJoined wholeMesh = new MeshJoined(mesh);
219 219

  
220 220
      DistortedEffects effects = new DistortedEffects();
221
      VertexEffectScale scaleE = new VertexEffectScale(mWidth*0.15f);
221
      VertexEffectScale scaleE = new VertexEffectScale(mHeight*0.10f);
222 222
      scaleE.setMeshAssociation(1,-1);
223 223
      effects.apply(scaleE);
224 224

  
......
249 249
      MeshQuad mesh = new MeshQuad();
250 250

  
251 251
      DistortedEffects effects = new DistortedEffects();
252
      float scaleM  = mWidth*0.40f;
252
      float scaleM  = mHeight*0.24f;
253 253
      Static3D moveM= new Static3D(0,0,1);
254 254
      MatrixEffectMove move  = new MatrixEffectMove(moveM);
255 255
      MatrixEffectScale scale= new MatrixEffectScale(scaleM);

Also available in: Unified diff