Revision b6a71581
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/effects/win/WinEffectGlow.java | ||
---|---|---|
67 | 67 |
degreeDyn.add(new Static1D(1.5f)); |
68 | 68 |
degreeDyn.add(new Static1D(1.0f)); |
69 | 69 |
|
70 |
float moveX = mPre.getMoveX(); |
|
71 |
float moveY = mPre.getMoveY(); |
|
72 |
int width = mScreen.getWidth(); |
|
73 |
int height = mScreen.getHeight(); |
|
74 |
Static3D center = new Static3D(moveX/width, moveY/height, 0); |
|
70 |
Static3D center = new Static3D(0,0,0); |
|
75 | 71 |
float ratio = 0.5f*mObject.getRatio(); |
76 | 72 |
|
77 | 73 |
mNodeEffects[1] = new VertexEffectSink(degreeDyn, center, new Static4D(0,0,0,ratio) ); |
Also available in: Unified diff
Improve 'off-center' objects: move the node, not the object!
This simplifies the Effects and makes them more correct (glow!)