Patches

Momentum Scrolling

Momentum Scrolling

For advanced use only — use the Scroll patch instead.

Simulate the momentum physics that powers the Scroll patch. Use in a feedback loop that integrates the velocity of an interaction.

Momentum Scrolling

  • Sample Value
  • Value
  • Scrolling Friction
  • Rubber Band Tension
  • Rubber Band Friction
  •  

Sample Value

A boolean that is true when the patch is sampling the input value. Usually connected to an Interaction patch’s down output.

Value

A number that represents the value to add momentum physics to. Usually connected to an Interaction patch’s position X or Y.

Scrolling Friction

A number between 1-100 that represents the friction that slows down the value when its velocity increases sharply and sampling stops (ex: a scroll flick).

Rubber Band Tension

A number between 10-1000 that represents the speed the value returns to the boundaries after sampling stops if it exceeds the boundaries.

Rubber Band Friction

A number between 10-1000 that represents the friction that slows down the value returning to the boundaries after sampling stops if it exceeds the boundaries.

Output

The value with momentum added. Feed back into the Value input and add velocity with a + patch.