Project

General

Profile

« Previous | Next » 

Revision b6a71581

Added by Leszek Koltunski over 2 years ago

Improve 'off-center' objects: move the node, not the object!
This simplifies the Effects and makes them more correct (glow!)

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
208 208

  
209 209
    MatrixEffectScale nodeScaleEffect = new MatrixEffectScale(mNodeScale);
210 210
    nodeEffects.apply(nodeScaleEffect);
211
    nodeEffects.apply(moveEffect);
211 212

  
212 213
    mNumTexCols = NUM_STICKERS_IN_ROW;
213 214
    mNumTexRows = (NUM_TEXTURES+1)/NUM_STICKERS_IN_ROW;
......
233 234
    mEffects.apply(mRotateEffect);
234 235
    mEffects.apply(quatEffect);
235 236
    mEffects.apply(scaleEffect);
236
    mEffects.apply(moveEffect);
237 237

  
238 238
    // Now postprocessed effects (the glow when you solve an object) require component centers. In
239 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