Package com.simsilica.lemur.anim
Class SpatialTweens
java.lang.Object
com.simsilica.lemur.anim.SpatialTweens
Static utility methods for creating common Spatial-related Tween objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tween
Creates a Tween that will attach the specified spatial to the specified parent when executed with any value of t greater than or equal to 0.static Tween
Creates a Tween that will detach the specified spatial when executed with any value of t greater than or equal to 0.static Tween
Sets the focus to the specified spatial.static Tween
Creates a tween that will interpolate the location of the specified target from one location to another.static Tween
Creates a tween that will interpolate the location of the specified target from one location to another.static Tween
rotate
(Spatial target, Quaternion from, Quaternion to, double length) Creates a tween that will interpolate the rotation of the specified target from one rotation to another.static Tween
Creates a tween that will interpolate the overall scale of the specified target from one scale to another.static Tween
Creates a tween that will interpolate the scale of the specified target from one scale to another.
-
Constructor Details
-
SpatialTweens
public SpatialTweens()
-
-
Method Details
-
move
Creates a tween that will interpolate the location of the specified target from one location to another. If either location is null then they will be substituted with the Spatial's current local translation AT THE TIME OF THIS CALL. This method will use the distance between the two locations as the tween length. This makes it easier to create a sequence of movements that all move at the same speed. The overall sequence can always be rescaled to fit whatever outer time constraints required. -
move
Creates a tween that will interpolate the location of the specified target from one location to another. If either location is null then they will be substituted with the Spatial's current local translation AT THE TIME OF THIS CALL. -
rotate
Creates a tween that will interpolate the rotation of the specified target from one rotation to another. If either rotation is null then they will be substituted with the Spatial's current local rotation AT THE TIME OF THIS CALL. -
scale
Creates a tween that will interpolate the overall scale of the specified target from one scale to another. -
scale
Creates a tween that will interpolate the scale of the specified target from one scale to another. If either scale is null then they will be substituted with the Spatial's current local scale AT THE TIME OF THIS CALL. -
detach
Creates a Tween that will detach the specified spatial when executed with any value of t greater than or equal to 0. (Note: internally this just calls Tweens.callMethod().) -
attach
Creates a Tween that will attach the specified spatial to the specified parent when executed with any value of t greater than or equal to 0. (Note: internally this just calls Tweens.callMethod().) -
focusOn
Sets the focus to the specified spatial.
-