ProtoFlux:TweenValue: Difference between revisions

From Resonite Wiki
create Tween ProtoFlux Node page
 
add a description for ProportionalDuration
 
(5 intermediate revisions by 3 users not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name":"*", "Type":"AsyncImpulse"},
{"Name":"*", "Type":"AsyncCall"},
{"Name":"To", "Type":"Dummy"},
{"Name":"To", "Type":"Dummy"},
{"Name":"From", "Type":"Dummy"},
{"Name":"From", "Type":"Dummy"},
Line 10: Line 10:
{"Name":"Curve", "Type":"CurvePreset"},
{"Name":"Curve", "Type":"CurvePreset"},
{"Name":"ProportionalDuration", "Type":"bool"},
{"Name":"ProportionalDuration", "Type":"bool"},
{"Name":"Target", "Type":"IField"}
{"Name":"Target", "Type":"IField`1"}
]
]
|Outputs=
|Outputs=
[
[
{"Name":"OnStarted", "Type":"AsyncImpulse"},
{"Name":"OnStarted", "Type":"SyncResumption"},
{"Name":"OnDone", "Type":"Continuation"}
{"Name":"OnDone", "Type":"Continuation"}
]
]
Line 23: Line 23:
== Inputs ==
== Inputs ==


=== * ([[Impulses#Async|Async Call]]) ===
=== * ([[Impulses#Async|AsyncCall]]) ===


Tells the node to start tweening Target ([[Type:IField`1|Numeric or Enum IField`1]]).
Tells the node to start tweening Target ([[Type:IField`1|Numeric or Enum IField`1]]).


=== To (Sudo-Generic (Any Numeric or Enum value)) ===
=== To (Pseudo-generic (Any Numeric or Enum value)) ===


The value to tween towards over Duration ([[Type:Float|float]])
The value to tween towards over Duration ([[Type:Float|float]])
Line 33: Line 33:
Examples: [[Type:Key|Key Enum]], [[Type:Float|Float]], [[Type:Int|Int]], etc
Examples: [[Type:Key|Key Enum]], [[Type:Float|Float]], [[Type:Int|Int]], etc


=== From (Sudo-Generic (Any Numeric or Enum value)) ===
=== From (Pseudo-generic (Any Numeric or Enum value)) ===


The value to tween away from over Duration ([[Type:Float|float]])
The value to tween away from over Duration ([[Type:Float|float]])
Line 49: Line 49:
=== ProportionalDuration ([[Type:Bool|Boolean]]) ===
=== ProportionalDuration ([[Type:Bool|Boolean]]) ===


{{Stub}}
If true, multiplies the duration of the tween by the distance between the two endpoints, making the average speed over the whole tween equal to 1.
TODO: What does this do?


=== Target ([[Type:IField`1|Numeric or Enum IField`1]]) ===
=== Target ([[Type:IField`1|Numeric or Enum IField`1]]) ===
Line 57: Line 56:
== Outputs ==
== Outputs ==


=== OnStarted ([[Impulses#Async|Async Impulse]]) ===  
=== OnStarted ([[Impulses#Async|SyncResumption]] (Async)) ===  


sends an [[Impulses#Async|Async Impulse]] once the node starts tweening the Target ([[Type:IField`1|Numeric or Enum IField`1]]).
Sends an [[Impulses#Async|Async Impulse]] once the node starts tweening the Target ([[Type:IField`1|Numeric or Enum IField`1]]).


=== OnDone ([[Impulses|Impulse]]) ===
=== OnDone ([[Impulses|Continuation]]) ===


Sends an [[Impulses|Impulse]] once the node is done tweening Target ([[Type:IField`1|Numeric or Enum IField`1]]).
Sends an [[Impulses|Impulse]] once the node is done tweening Target ([[Type:IField`1|Numeric or Enum IField`1]]).


== Examples ==
== Examples ==
{{Stub}}
<gallery widths=480px heights=480px>
 
File:Protoflux_example_tween_value.gif|A short animation of a tween value moving something over time, with nodes beside it.
</gallery>
[[Category:ProtoFlux:Actions]]
[[Category:ProtoFlux:Actions]]

Latest revision as of 04:29, 20 September 2025

Tween
*
OnStarted
To
OnDone
From
Duration
Curve
ProportionalDuration
Target
Actions

Tween Value is a node that allows you to change a Target (Numeric or Enum IField`1) over a Duration (float) from a starting point to an ending point. The different curve presets determine the interpolation used, and when applicable will smoothly change using non whole numbers.

Inputs

* (AsyncCall)

Tells the node to start tweening Target (Numeric or Enum IField`1).

To (Pseudo-generic (Any Numeric or Enum value))

The value to tween towards over Duration (float)

Examples: Key Enum, Float, Int, etc

From (Pseudo-generic (Any Numeric or Enum value))

The value to tween away from over Duration (float)

Examples: Key Enum, Float, Int, etc

Duration (float)

The duration in seconds that the value should tween for.

Curve (CurvePreset)

The interpolation type to use while tweening.

ProportionalDuration (Boolean)

If true, multiplies the duration of the tween by the distance between the two endpoints, making the average speed over the whole tween equal to 1.

Target (Numeric or Enum IField`1)

The value this node should Tween.

Outputs

OnStarted (SyncResumption (Async))

Sends an Async Impulse once the node starts tweening the Target (Numeric or Enum IField`1).

OnDone (Continuation)

Sends an Impulse once the node is done tweening Target (Numeric or Enum IField`1).

Examples