Revision b80e6524
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 |
Static3D center = new Static3D(0,0,0); |
|
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); |
|
71 | 75 |
float ratio = 0.5f*mObject.getRatio(); |
72 | 76 |
|
73 | 77 |
mNodeEffects[1] = new VertexEffectSink(degreeDyn, center, new Static4D(0,0,0,ratio) ); |
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
204 | 204 |
mObjectScale = new Static3D(scale,scale,scale); |
205 | 205 |
MatrixEffectScale scaleEffect = new MatrixEffectScale(mObjectScale); |
206 | 206 |
MatrixEffectQuaternion quatEffect = new MatrixEffectQuaternion(quat, CENTER); |
207 |
MatrixEffectMove moveEffect = new MatrixEffectMove(move); |
|
207 | 208 |
|
208 | 209 |
MatrixEffectScale nodeScaleEffect = new MatrixEffectScale(mNodeScale); |
209 |
MatrixEffectMove nodeMoveEffect = new MatrixEffectMove(move); |
|
210 |
|
|
211 | 210 |
nodeEffects.apply(nodeScaleEffect); |
212 |
nodeEffects.apply(nodeMoveEffect); |
|
213 | 211 |
|
214 | 212 |
mNumTexCols = NUM_STICKERS_IN_ROW; |
215 | 213 |
mNumTexRows = (NUM_TEXTURES+1)/NUM_STICKERS_IN_ROW; |
... | ... | |
235 | 233 |
mEffects.apply(mRotateEffect); |
236 | 234 |
mEffects.apply(quatEffect); |
237 | 235 |
mEffects.apply(scaleEffect); |
236 |
mEffects.apply(moveEffect); |
|
238 | 237 |
|
239 | 238 |
// Now postprocessed effects (the glow when you solve an object) require component centers. In |
240 | 239 |
// order for the effect to be in front of the object, we need to set the center to be behind it. |
Also available in: Unified diff
No, move the object afterall. Why? See in Tutorials - a moved node has the right side missing.