Revision f988589e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
72 | 72 |
int pointy = mRnd.nextInt( (int)(0.8f*bmpHeight))+ (int)(0.1f*bmpHeight); // |
73 | 73 |
int duration = 1000 + mRnd.nextInt(3000); // for anytime from 3 to 4 seconds |
74 | 74 |
|
75 |
Dynamic3D dDistort = new Dynamic3D(); |
|
76 |
dDistort.setCount(1); |
|
77 |
dDistort.setDuration(duration); |
|
75 |
Dynamic3D dDistort = new Dynamic3D(duration,1.0f); |
|
78 | 76 |
dDistort.add(new Static3D(0,0, 0)); |
79 | 77 |
dDistort.add(new Static3D(0,0,height)); |
80 | 78 |
|
... | ... | |
115 | 113 |
float factor = (float)height/bmpHeight; |
116 | 114 |
|
117 | 115 |
water.move( new Static3D((width-w)/2,0,0) ); |
118 |
water.scale( new Static3D(factor,factor,factor) );
|
|
116 |
water.scale(factor);
|
|
119 | 117 |
} |
120 | 118 |
else |
121 | 119 |
{ |
... | ... | |
123 | 121 |
float factor = (float)width/bmpWidth; |
124 | 122 |
|
125 | 123 |
water.move( new Static3D(0,(height-h)/2,0) ); |
126 |
water.scale( new Static3D(factor,factor,factor) );
|
|
124 |
water.scale(factor);
|
|
127 | 125 |
} |
128 | 126 |
|
129 | 127 |
Distorted.onSurfaceChanged(width, height); |
Also available in: Unified diff
Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.