Revision f988589e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/fbo/FBORenderer.java | ||
---|---|---|
80 | 80 |
float factor = (float)height/lisaHeight; |
81 | 81 |
|
82 | 82 |
mLisa.move( new Static3D((width-w)/2,0,0) ); |
83 |
mLisa.scale( new Static3D(factor,factor,factor));
|
|
83 |
mLisa.scale(factor);
|
|
84 | 84 |
} |
85 | 85 |
else |
86 | 86 |
{ |
87 | 87 |
int h = (width*lisaHeight)/lisaWidth; |
88 | 88 |
float factor = (float)width/lisaWidth; |
89 | 89 |
|
90 |
mLisa.move( new Static3D(0,(height-h)/2,0) );
|
|
91 |
mLisa.scale( new Static3D(factor,factor,factor) );
|
|
90 |
mLisa.move( new Static3D(0,(height-h)/2,0) ); |
|
91 |
mLisa.scale(factor);
|
|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
Distorted.onSurfaceChanged(width, height); |
... | ... | |
133 | 133 |
float factor = lisaWidth/(1.5f*textWidth); |
134 | 134 |
|
135 | 135 |
mText.move( new Static3D(lisaWidth/6,lisaHeight/3,0) ); |
136 |
mText.scale( new Static3D(factor,factor,factor) );
|
|
136 |
mText.scale(factor);
|
|
137 | 137 |
|
138 |
Dynamic1D sinkDyn = new Dynamic1D(); |
|
139 |
sinkDyn.setDuration(5000); |
|
140 |
sinkDyn.setCount(0); |
|
138 |
Dynamic1D sinkDyn = new Dynamic1D(5000,0.0f); |
|
141 | 139 |
sinkDyn.add(new Static1D(1.0f)); |
142 | 140 |
sinkDyn.add(new Static1D(0.5f)); |
143 | 141 |
|
144 | 142 |
mText.sink(sinkDyn, new Static2D(textWidth/2,textHeight/2)); |
145 | 143 |
|
146 |
Dynamic1D macroblockDyn = new Dynamic1D(); |
|
147 |
macroblockDyn.setDuration(10000); |
|
148 |
macroblockDyn.setCount(0); |
|
144 |
Dynamic1D macroblockDyn = new Dynamic1D(10000,0.0f); |
|
149 | 145 |
macroblockDyn.add(new Static1D(1)); |
150 | 146 |
macroblockDyn.add(new Static1D(5)); |
151 | 147 |
|
Also available in: Unified diff
Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.