Project

General

Profile

« Previous | Next » 

Revision 02d80fe6

Added by Leszek Koltunski over 2 years ago

progress with off-center objects.

View differences:

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
    mNodeEffects[1] = new VertexEffectSink(degreeDyn,new Static3D(0,0,0), new Static4D(0,0,0,0.5f) );
70
    Static3D move = mPre.getMove();
71
    float moveX = move.get0();
72
    float moveY = move.get1();
73
    int width = mScreen.getWidth();
74
    int height= mScreen.getHeight();
75
    Static3D center = new Static3D(moveX/width, moveY/height, 0);
76
    float ratio = 0.5f*mObject.getRatio();
77

  
78
    mNodeEffects[1] = new VertexEffectSink(degreeDyn, center, new Static4D(0,0,0,ratio) );
71 79
    }
72 80

  
73 81
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff