Revision 0de83d97
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/examples/wind/WindEffectsManager.java | ||
---|---|---|
105 | 105 |
|
106 | 106 |
void apply(DistortedEffects effects) |
107 | 107 |
{ |
108 |
Static3D midLeft = new Static3D(0,mHeight/2,0);
|
|
109 |
Static3D midRight = new Static3D(mWidth,mHeight/2,0);
|
|
110 |
Static3D tadRight = new Static3D(3*mWidth/4,mHeight/2,0);
|
|
111 |
Static4D windRegion = new Static4D(0,0,0,mHeight);
|
|
108 |
Static3D midLeftMatrix= new Static3D(-mWidth/2,0,0); // matrix effects have their origin in the center!
|
|
109 |
Static3D midRight = new Static3D(mWidth,mHeight/2,0); //
|
|
110 |
Static3D tadRight = new Static3D(3*mWidth/4,mHeight/2,0); // whereas vertex effects - in the bottom-left corner
|
|
111 |
Static4D windRegion = new Static4D(0,0,0,mHeight); //
|
|
112 | 112 |
|
113 | 113 |
setWind(0); |
114 | 114 |
|
115 |
effects.apply( new MatrixEffectShear(shearFactor,midLeft) ); |
|
115 |
effects.apply( new MatrixEffectShear(shearFactor,midLeftMatrix) );
|
|
116 | 116 |
effects.apply( new MatrixEffectScale(scaleFactor) ); |
117 | 117 |
effects.apply( new VertexEffectDeform(deformForce,midRight) ); |
118 | 118 |
effects.apply( new VertexEffectWave(windDynamic1, midRight, windRegion) ); |
Also available in: Unified diff
Fix several more apps for the 'center-of-matrix-effects-in-screen-center' change.