Lines Matching refs:velocity
77 // Minimum velocity that will be absorbed
253 * Call when the effect absorbs an impact at the given velocity.
260 * @param velocity Velocity at impact in pixels per second.
262 public void onAbsorb(int velocity) {
264 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity));
267 mDuration = 0.1f + (velocity * 0.03f);
270 // of velocity.
273 // The glow depends more on the velocity, and therefore starts out
278 // Factor the velocity by 8. Testing on device shows this works best to
280 mEdgeAlphaFinish = Math.max(0, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1));
283 HELD_EDGE_SCALE_Y, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1.f));
289 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f), 1.75f);
292 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA));