Revision f988589e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/bean/BeanRenderer.java | ||
---|---|---|
28 | 28 |
import org.distorted.examples.R; |
29 | 29 |
|
30 | 30 |
import org.distorted.library.EffectTypes; |
31 |
import org.distorted.library.type.Dynamic2D; |
|
32 | 31 |
import org.distorted.library.Distorted; |
33 | 32 |
import org.distorted.library.DistortedBitmap; |
34 | 33 |
import org.distorted.library.type.Dynamic3D; |
... | ... | |
64 | 63 |
rLeft = new Static4D(-9,-31,35,35); |
65 | 64 |
rRight= new Static4D(-9,-31,35,35); |
66 | 65 |
|
67 |
dLeft = new Dynamic3D(); |
|
68 |
dRight= new Dynamic3D(); |
|
69 |
|
|
70 |
dLeft.setCount(0.0f); |
|
71 |
dRight.setCount(0.0f); |
|
72 |
dLeft.setDuration(1500); |
|
73 |
dRight.setDuration(1500); |
|
74 |
|
|
66 |
dLeft = new Dynamic3D(1500,0.0f); |
|
67 |
dRight= new Dynamic3D(1500,0.0f); |
|
68 |
|
|
75 | 69 |
Static3D p1 = new Static3D( 0, 0, 0); |
76 | 70 |
Static3D p2 = new Static3D(-10,-34, 0); |
77 | 71 |
|
... | ... | |
112 | 106 |
float factor = (float)height/bmpHeight; |
113 | 107 |
|
114 | 108 |
mBean.move( new Static3D((width-w)/2,0,0) ); |
115 |
mBean.scale( new Static3D(factor,factor,factor) );
|
|
109 |
mBean.scale(factor);
|
|
116 | 110 |
} |
117 | 111 |
else |
118 | 112 |
{ |
... | ... | |
120 | 114 |
float factor = (float)width/bmpWidth; |
121 | 115 |
|
122 | 116 |
mBean.move( new Static3D(0,(height-h)/2,0) ); |
123 |
mBean.scale( new Static3D(factor,factor,factor) );
|
|
117 |
mBean.scale(factor);
|
|
124 | 118 |
} |
125 | 119 |
|
126 | 120 |
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.