Class OperationsKt
-
- All Implemented Interfaces:
public final class OperationsKt
-
-
Method Summary
Modifier and Type Method Description final static UnitanimateBy(Drawable $self, Vec2 at, Vec2 size, Double rotation, Float scaleX, Float scaleY, Double skewX, Double skewY, PolyColor color, Animation animation)Bulk add method for all the builtin drawable operations in PolyUI. final static UnitanimateTo(Drawable $self, Vec2 at, Vec2 size, Double rotation, Double skewX, Double skewY, Float scaleX, Float scaleY, PolyColor color, Animation animation)Bulk add method for all the builtin drawable operations in PolyUI. final static <S extends ComponentOp, T extends Any> TgetOperationValueOrElse(Component $self, T orElse, Function1<S, T> getter)Attempts to get a value using getter from the operation of type S which is currently applied to this component. final static Vec2getTargetScale(Drawable $self)Return the scale that this drawable is currently scaling to, or its current scale if it is not scaling. final static Vec2getTargetPosition(Component $self)Return the position that this component is currently moving to, or its current position if it is not moving. final static Vec2getTargetSize(Component $self)Return the size that this component is currently resizing to, or its current size if it is not resizing. -
-
Method Detail
-
animateBy
final static Unit animateBy(Drawable $self, Vec2 at, Vec2 size, Double rotation, Float scaleX, Float scaleY, Double skewX, Double skewY, PolyColor color, Animation animation)
Bulk add method for all the builtin drawable operations in PolyUI.
The default values of this method are all zeroes, meaning that nothing is done.
This is the "by" version of this method, meaning that each value is added to the current one of this drawable. See the animateTo method for the "to" equivalent, which sets each value to the provided one.
-
animateTo
final static Unit animateTo(Drawable $self, Vec2 at, Vec2 size, Double rotation, Double skewX, Double skewY, Float scaleX, Float scaleY, PolyColor color, Animation animation)
Bulk add method for all the builtin drawable operations in PolyUI.
The default values of this method are all the current ones of this drawable, meaning that nothing is done.
This is the "to" version of this method, meaning that each value is set to the provided one. See the animateBy method for the "by" equivalent, which adds each value to the current one of this drawable.
-
getOperationValueOrElse
final static <S extends ComponentOp, T extends Any> T getOperationValueOrElse(Component $self, T orElse, Function1<S, T> getter)
Attempts to get a value using getter from the operation of type S which is currently applied to this component. If no such operation is found, it returns the provided orElse value.
This is useful for getting for example, the current target rotation of a Rotate operation, or the current target position of a Move operation so that when they are chained together, it doesn't move to the incorrect value, and the final position/rotation etc. is the one you expect.
- Since:
1.9.5
-
getTargetScale
final static Vec2 getTargetScale(Drawable $self)
Return the scale that this drawable is currently scaling to, or its current scale if it is not scaling.
- Since:
1.9.5
-
getTargetPosition
final static Vec2 getTargetPosition(Component $self)
Return the position that this component is currently moving to, or its current position if it is not moving.
- Since:
1.6.02
-
getTargetSize
final static Vec2 getTargetSize(Component $self)
Return the size that this component is currently resizing to, or its current size if it is not resizing.
- Since:
1.6.02
-
-
-
-