Difference between revisions of "Tween (LogiX node)"
BigRedWolfy (talk | contribs) |
(Marked this version for translation) |
||
Line 21: | Line 21: | ||
When an impulse is received at <code>Tween</code> a [Tween (Component)|Tween]] component is created which [[Drive|drives]] the referenced <code>Target</code> value over the duration. | When an impulse is received at <code>Tween</code> a [Tween (Component)|Tween]] component is created which [[Drive|drives]] the referenced <code>Target</code> value over the duration. | ||
+ | <!--T:12--> | ||
The <code>To</code> value determines the final value reached at the end of the <code>Duration</code>. | The <code>To</code> value determines the final value reached at the end of the <code>Duration</code>. | ||
+ | <!--T:13--> | ||
The <code>From</code> value determines the initial value at the start of the <code>Duration</code>. | The <code>From</code> value determines the initial value at the start of the <code>Duration</code>. | ||
+ | <!--T:14--> | ||
The <code>Duration</code> input determines how long the transition from <code>From</code> to <code>To</code> takes in seconds. Default is 1. | The <code>Duration</code> input determines how long the transition from <code>From</code> to <code>To</code> takes in seconds. Default is 1. | ||
+ | <!--T:15--> | ||
The <code>CurvePreset</code> determines the shape of the interpolated values. Default is Smooth. | The <code>CurvePreset</code> determines the shape of the interpolated values. Default is Smooth. | ||
+ | <!--T:16--> | ||
The <code>OnStarted</code> output fires an impulse when tweening of the <code>Target</code> begins as a result of an impulse received at <code>Tween</code>. An impulse will not be fired if there is no valid <code>Target</code>. This impulse continues the impulse chain which arrived at <code>Tween</code>. | The <code>OnStarted</code> output fires an impulse when tweening of the <code>Target</code> begins as a result of an impulse received at <code>Tween</code>. An impulse will not be fired if there is no valid <code>Target</code>. This impulse continues the impulse chain which arrived at <code>Tween</code>. | ||
+ | <!--T:17--> | ||
The <code>OnDone</code> output fires an impulse when tweening of the <code>Target</code> has finished. This does not continue the impulse chain which arrived at <code>Tween</code>. | The <code>OnDone</code> output fires an impulse when tweening of the <code>Target</code> has finished. This does not continue the impulse chain which arrived at <code>Tween</code>. | ||
+ | <!--T:18--> | ||
Note that only one tween operation for the <code>Target</code> can be active at any time. Currently target value changes work via sequential writes to the value which may not appear smooth depending on framerates and network latency. Similar, potentially smoother, effects can be achieved with e.g. the various Lerp nodes under [[:Category:LogiX:Math]] | Note that only one tween operation for the <code>Target</code> can be active at any time. Currently target value changes work via sequential writes to the value which may not appear smooth depending on framerates and network latency. Similar, potentially smoother, effects can be achieved with e.g. the various Lerp nodes under [[:Category:LogiX:Math]] | ||
Line 44: | Line 51: | ||
[[File:LogiX.Actions.Tween.example.jpg|900px|Tween example]] | [[File:LogiX.Actions.Tween.example.jpg|900px|Tween example]] | ||
+ | <!--T:19--> | ||
[[File:Tween_Logix_Example_Number_2.jpeg|900px|Tween example]] | [[File:Tween_Logix_Example_Number_2.jpeg|900px|Tween example]] | ||
Latest revision as of 21:20, 6 February 2022
Tween | ||
---|---|---|
Inputs | ||
Impulse | Tween | |
Object | To | |
Object | From | |
Float | Duration | |
CurvePreset | CurvePreset | |
Outputs | ||
IField`1 | Target | |
Impulse | OnStarted | |
Impulse | OnDone |
The Tween node is used to interpolate the value of Target
starting at From
, and ending at To
over Duration
seconds when an impulse is received at Tween
.
Usage
When an impulse is received at Tween
a [Tween (Component)|Tween]] component is created which drives the referenced Target
value over the duration.
The To
value determines the final value reached at the end of the Duration
.
The From
value determines the initial value at the start of the Duration
.
The Duration
input determines how long the transition from From
to To
takes in seconds. Default is 1.
The CurvePreset
determines the shape of the interpolated values. Default is Smooth.
The OnStarted
output fires an impulse when tweening of the Target
begins as a result of an impulse received at Tween
. An impulse will not be fired if there is no valid Target
. This impulse continues the impulse chain which arrived at Tween
.
The OnDone
output fires an impulse when tweening of the Target
has finished. This does not continue the impulse chain which arrived at Tween
.
Note that only one tween operation for the Target
can be active at any time. Currently target value changes work via sequential writes to the value which may not appear smooth depending on framerates and network latency. Similar, potentially smoother, effects can be achieved with e.g. the various Lerp nodes under Category:LogiX:Math
Examples
Node Menu
Actions | ||||||
---|---|---|---|---|---|---|
Back | -- | ++ | Drive | Drive Playback | Tween | Write |
Write Latch | Write Ref | Write Ref Latch |