Project

General

Profile

« Previous | Next » 

Revision 849e0034

Added by Leszek Koltunski about 4 years ago

Moving the Vertex and Fragment centers of effect to the center of the Mesh.

View differences:

src/main/java/org/distorted/examples/listener/ListenerRenderer.java
75 75

  
76 76
   private boolean addNewBubble()
77 77
      {
78
      int radius   = (int)(( 0.10f + 0.70f*mRnd.nextFloat())*bmpWidth);           // pop up a bubble of size (radius,height)
79
      int height   = (int)((-0.10f + 0.20f*mRnd.nextFloat())*bmpWidth);           // 
80
      int pointx   = mRnd.nextInt( (int)(0.8f*bmpWidth ))+ (int)(0.1f*bmpWidth ); // at a random place on the bitmap (but not near the edge)
81
      int pointy   = mRnd.nextInt( (int)(0.8f*bmpHeight))+ (int)(0.1f*bmpHeight); // 
82
      int duration = 1000 + mRnd.nextInt(3000);                                   // for anytime from 1 to 4 seconds
78
      int radius   = (int)(( 0.10f + 0.70f*mRnd.nextFloat())*bmpWidth); // pop up a bubble of size (radius,height)
79
      int height   = (int)((-0.10f + 0.20f*mRnd.nextFloat())*bmpWidth); //
80
      int pointx   = (int)(0.8f * bmpWidth * (mRnd.nextFloat()-0.5f));  // at a random place on the bitmap (but not near the edge)
81
      int pointy   = (int)(0.8f * bmpHeight* (mRnd.nextFloat()-0.5f));  //
82
      int duration = 1000 + mRnd.nextInt(3000);                         // for anytime from 1 to 4 seconds
83 83

  
84 84
      Dynamic3D dDistort = new Dynamic3D(duration,1.0f);
85 85
      dDistort.add(new Static3D(0,0,     0));

Also available in: Unified diff