Revision b24e4719
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/effect/VertexEffectPinch.java | ||
---|---|---|
43 | 43 |
*/ |
44 | 44 |
public boolean compute(float[] uniforms, int index, long currentDuration, long step ) |
45 | 45 |
{ |
46 |
mCenter.get(uniforms,index+5,currentDuration,step);
|
|
47 |
mRegion.get(uniforms,index+8,currentDuration,step);
|
|
46 |
mCenter.get(uniforms,index+CENTER_OFFSET,currentDuration,step);
|
|
47 |
mRegion.get(uniforms,index+REGION_OFFSET,currentDuration,step);
|
|
48 | 48 |
boolean ret = mPinch.get(uniforms,index,currentDuration,step); |
49 | 49 |
|
50 | 50 |
uniforms[index+1] = (float)(Math.PI*uniforms[index+1]/180); |
51 |
uniforms[index+9] =-uniforms[index+9];
|
|
51 |
uniforms[index+REGION_OFFSET+1] =-uniforms[index+REGION_OFFSET+1]; // region's y
|
|
52 | 52 |
|
53 | 53 |
return ret; |
54 | 54 |
} |
Also available in: Unified diff
Make the Fragment effects truly 3D: change their 4D 'region' into a 3D 'center' (a point in 3D) and 3D 'region' (which is now a set of 3 radii defining an ellipsoid around the center)
Also corresponding changes to the applications.