Throb
If you prefer a more technical reference, visit the NextText Javadoc.
|
Name |
Throb | |
|
Description |
behave(TextObject to) A DForm which throbs the TextObject. Think of throb as a multiplication of the size of the object, which changes over time. In order to improve interoperability with other DForms, the period of the throb is tracked as a frame count specific to each TextObjectGlyph. This way, each time the behaviour is called it modifies the control points of the Glyph by multiplying them by the appropriate factor, thus preserving any other modifications. The following calculation defines throb with a period p and scale of s. Given a vector c from the center of the glyph to one of its control points, it's throbbed value for frame f is p * ( ( s - 1 ) * ( ( cos( f / p * 2PI - PI ) ) + 1 ) + 1 ) XXXBUG: If the period or scale is changed after the behaviour has been started, then it will mess up any objects that are already throbbing. The way to correct this problem is to cache the period and scale along with the frame count, and only update them when a throb is completed. |
|
|
Usage |
TEST |
|
|
Constructor |
new Throb(float scale, int period) |
|
|
Parameters |
scale : period : |
|
|
Methods |
behave(TextObjectGlyph to) |
|
|
Related |
TEST | |

