RedTween:
Filter:
Classes (extension) | Red > redScore

RedTween : Object
ExtensionExtension

tweening for sclang and scserver
Source: RedTween.sc

Description

A class for mapping values between different ranges using different curvatures. It works best in combination with the Ease quark, but is also fine to use on its own. Basically it maps a value from a certain range to another range with an optional curvature.

Class Methods

RedTween.new(source: 0.0, target: 1.0, curve, inMin: 0.0, inMax: 1.0)

Arguments:

source

The beginning.

target

The destination.

curve

The curvature.

inMin

Lowest input value.

inMax

Highest input value.

Discussion:

If the curve argument is nil then a linear mapping will be used. If it is a SimpleNumber then internally a lincurve method will be applied (so the curvature will work in the same was as for the Env class). Though the real benefit of this class is to set the curve argument to an Ease object or write a custom mapping function. This allows to do proper tweening/easing.

Inherited class methods

Undocumented class methods

RedTween.ar(t ... args)

RedTween.kr(t ... args)

RedTween.value(t ... args)

Instance Methods

Inherited instance methods

Undocumented instance methods

.curve

.func

.inMax

.inMax = value

.inMin

.inMin = value

.source

.source = value

.target

.target = value

.value(t)

Examples