Project

General

Profile

« Previous | Next » 

Revision 4b676b3f

Added by Leszek Koltunski about 7 years ago

Minor bugfix.

View differences:

src/main/java/org/distorted/examples/fbo/FBORenderer.java
168 168

  
169 169
      mEffects.abortAllEffects();
170 170

  
171
      final int GRID = 10;
172

  
171 173
      if( mMeshFlat==null ) mMeshFlat = new MeshFlat(1,1);
172
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(10,10,false);
174
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(GRID,GRID,false);
173 175

  
174 176
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshFlat);
175 177
      mRoot.attach(mGridTexture,gridEffects,mMeshCubes);
......
181 183

  
182 184
      float factor = lisaWidth/(2.0f*gridWidth);
183 185

  
184
      gridEffects.move( new Static3D( (lisaWidth-factor*gridWidth)/2,(lisaHeight-factor*gridHeight)/2,0) );
186
      gridEffects.move( new Static3D( (lisaWidth-factor*gridWidth)/2,(lisaHeight-factor*gridHeight)/2, gridWidth/(2*GRID)) );
185 187
      gridEffects.scale(factor);
186 188

  
187 189
      Dynamic1D rotDyn = new Dynamic1D(12000,0.0f);
......
189 191
      rotDyn.add(new Static1D(360));
190 192
      rotDyn.setMode(Dynamic.MODE_JUMP);
191 193

  
192
      gridEffects.rotate(rotDyn, new Static3D(1,0,0), new Static3D(gridWidth/2,gridHeight/2,gridHeight/10) );
194
      gridEffects.rotate(rotDyn, new Static3D(1,0,0), new Static3D(gridWidth/2,gridHeight/2,gridWidth/(2*GRID)) );
193 195

  
194 196
      Dynamic1D sinkDyn = new Dynamic1D(3000,0.0f);
195 197
      sinkDyn.add(new Static1D(1.0f));

Also available in: Unified diff