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/olimpic/OlimpicRenderer.java
65 65
      
66 66
      mScreen = new DistortedNode(new DistortedBitmap(9*LEAF_SIZE,9*LEAF_SIZE,1));
67 67
     
68
      mRot = new Dynamic1D();
68
      mRot = new Dynamic1D(5000,0.0f);
69 69
      mRot.setMode(Dynamic1D.MODE_JUMP);
70
      mRot.setCount(0.0f);
71
      mRot.setDuration(5000);
72 70
      mRot.add(new Static1D(  0));
73 71
      mRot.add(new Static1D(360));
74 72
      
......
105 103
        tmp = (DistortedBitmap)mCircleNode[i].getObject();
106 104
        tmp.move( new Static3D(positions[2*i], positions[2*i+1], 0) );
107 105
        tmp.rotate( center, mRot, axis );
108
        tmp.chroma( new Static4D(0.8f, colors[3*i],colors[3*i+1], colors[3*i+2]) );
106
        tmp.chroma( new Static1D(0.8f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2]) );
109 107
        }
110 108
      }
111 109

  
......
135 133
        float factor = (float)height/bmpHeight;
136 134

  
137 135
        bmp.move( new Static3D((width-w)/2 ,0, 0) );
138
        bmp.scale( new Static3D(factor,factor,factor) );
136
        bmp.scale( factor );
139 137
        }
140 138
      else
141 139
        {
......
143 141
        float factor = (float)width/bmpWidth;
144 142

  
145 143
        bmp.move( new Static3D(0,(height-h)/2,0) );
146
        bmp.scale( new Static3D(factor,factor,factor) );
144
        bmp.scale( factor );
147 145
        }
148 146
      
149 147
      Distorted.onSurfaceChanged(width, height); 

Also available in: Unified diff