Revision 0de83d97
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/examples/wind/WindRenderer.java | ||
---|---|---|
80 | 80 |
|
81 | 81 |
Static1D angle = new Static1D(-45); |
82 | 82 |
Static3D axis = new Static3D(0,0,1); |
83 |
Static3D center= new Static3D(0,mObjHeight/2,0);
|
|
83 |
Static3D center= new Static3D(-mObjWidth*0.5f,0,0);
|
|
84 | 84 |
|
85 | 85 |
effects.apply( new MatrixEffectRotate(angle, axis, center) ); |
86 | 86 |
mManager.apply(effects); |
... | ... | |
112 | 112 |
int min = width<height? width:height; |
113 | 113 |
|
114 | 114 |
float factor = ((float)min)/(mObjHeight + 1.4f*mObjWidth); |
115 |
mMove.set( factor*mObjHeight*0.58f +(width-min)/2, height - factor*mObjHeight*1.08f -(height-min)/2, 0 );
|
|
115 |
mMove.set( factor*mObjHeight*1.28f -min*0.5f, min*0.5f - factor*mObjHeight*0.58f, 0 );
|
|
116 | 116 |
mScale.set(factor,factor,factor); |
117 | 117 |
mScreen.resize(width, height); |
118 | 118 |
} |
Also available in: Unified diff
Fix several more apps for the 'center-of-matrix-effects-in-screen-center' change.