Revision d8056149
Added by Leszek Koltunski almost 9 years ago
| src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldEffectsManager.java | ||
|---|---|---|
| 38 | 38 |
private float mBlackness, mAsianness; |
| 39 | 39 |
|
| 40 | 40 |
private Static4D regionPinchSwirl, regionNose, regionLips, regionSkin, regionLEye, regionREye; |
| 41 |
private Static3D centerLEye, centerREye, centerNose, centerLips;
|
|
| 41 |
private Static3D centerLEyeSwirl, centerREyeSwirl, centerLEyePinch, centerREyePinch, centerNose, centerLips;
|
|
| 42 | 42 |
|
| 43 | 43 |
private Dynamic2D pinchDyn; |
| 44 | 44 |
private Dynamic1D swirlDyn1, swirlDyn2, sinkDyn; |
| ... | ... | |
| 56 | 56 |
mBlackness = 0; |
| 57 | 57 |
mAsianness = 0; |
| 58 | 58 |
|
| 59 |
centerLEye = new Static3D(175,235,0); |
|
| 60 |
centerREye = new Static3D(418,235,0); |
|
| 61 |
centerNose = new Static3D(300,328,0); |
|
| 62 |
centerLips = new Static3D(300,494,0); |
|
| 59 |
centerLEyePinch = new Static3D(140,235,0); |
|
| 60 |
centerREyePinch = new Static3D(453,235,0); |
|
| 61 |
centerLEyeSwirl = new Static3D(175,235,0); |
|
| 62 |
centerREyeSwirl = new Static3D(418,235,0); |
|
| 63 |
centerNose = new Static3D(300,328,0); |
|
| 64 |
centerLips = new Static3D(300,494,0); |
|
| 63 | 65 |
|
| 64 | 66 |
regionPinchSwirl = new Static4D(0,0,65,65); |
| 65 | 67 |
regionNose = new Static4D(0,0,89,89); |
| 66 | 68 |
regionLips = new Static4D(0,0,95,95); |
| 67 | 69 |
regionSkin = new Static4D(300,300,600,600); |
| 68 |
regionLEye = new Static4D(175,232,32,20);
|
|
| 69 |
regionREye = new Static4D(422,232,32,20);
|
|
| 70 |
regionLEye = new Static4D(175,232,31,20);
|
|
| 71 |
regionREye = new Static4D(420,232,31,20);
|
|
| 70 | 72 |
|
| 71 | 73 |
pinchFactor = new Static2D(1.0f, 0.0f); |
| 72 | 74 |
swirlFactor1 = new Static1D(1.0f); |
| ... | ... | |
| 99 | 101 |
{
|
| 100 | 102 |
setRace(mBlackness, mAsianness); |
| 101 | 103 |
|
| 102 |
obj.pinch(pinchDyn, centerLEye, regionPinchSwirl); |
|
| 103 |
obj.pinch(pinchDyn, centerREye, regionPinchSwirl); |
|
| 104 |
obj.swirl(swirlDyn1,centerLEye, regionPinchSwirl); |
|
| 105 |
obj.swirl(swirlDyn2,centerREye, regionPinchSwirl); |
|
| 104 |
obj.pinch(pinchDyn, centerLEyePinch, regionPinchSwirl);
|
|
| 105 |
obj.pinch(pinchDyn, centerREyePinch, regionPinchSwirl);
|
|
| 106 |
obj.swirl(swirlDyn1,centerLEyeSwirl, regionPinchSwirl);
|
|
| 107 |
obj.swirl(swirlDyn2,centerREyeSwirl, regionPinchSwirl);
|
|
| 106 | 108 |
obj.sink(sinkDyn, centerNose, regionNose); |
| 107 | 109 |
obj.sink(sinkDyn, centerLips, regionLips); |
| 108 | 110 |
|
| ... | ... | |
| 120 | 122 |
|
| 121 | 123 |
//android.util.Log.e("manager", "blackness="+blackness+" asianness="+asianness);
|
| 122 | 124 |
|
| 123 |
pinchFactor.set1(1-0.2f*asianness);
|
|
| 124 |
swirlFactor1.set( 10.0f*asianness);
|
|
| 125 |
swirlFactor2.set(-10.0f*asianness);
|
|
| 125 |
pinchFactor.set1(1-0.3f*asianness);
|
|
| 126 |
swirlFactor1.set( 20.0f*asianness);
|
|
| 127 |
swirlFactor2.set(-20.0f*asianness);
|
|
| 126 | 128 |
sinkFactor.set(1-0.4f*asianness); |
| 127 |
chromaSkinFactor.set(0.28f*asianness);
|
|
| 129 |
chromaSkinFactor.set(0.25f*asianness);
|
|
| 128 | 130 |
chromaEyesFactor.set(0.78f*asianness); |
| 129 | 131 |
} |
| 130 | 132 |
} |
Also available in: Unified diff
Improve Around The World