RedSpring:
Filter:
redUniverse/Classes (extension) | Red > redUniverse

RedSpring
ExtensionExtension

helper class for RedObject:spring

Description

A simple class that keeps track of connections and spring parameters.

Class Methods

.new

Create a new spring object.

Arguments:

object

A RedObject that will be connected to target.

target

A RedObject acting as target.

stiffness

A Float. The default is 0.1.

damping

A Float. The default is 0.9.

length

A Float. The default is 0.

Instance Methods

.update

Calls the method spring on the object. See RedObject.

.update2

Calls the method spring on both the object and the target. Note that this is just a convenience method for interconnecting two objects with one spring.

Examples