Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Tween

Tween

A class for animating values over time using easing functions.

Constructor

  • Tween(ease_func: Callable[[float], float], duration: float) → TweenTween(ease_func: Callable[[float], float], duration: float) → Tween

A class for animating values over time using easing functions.

Properties


NameDescriptionType
current_posGet the current interpolated position snapshot.Vec2
end_posThe ending position of the animation.Vec2
is_doneCheck whether the animation has finished.bool
start_posThe starting position of the animation.Vec2

Methods


Pause

pause() → Nonepause() → None

Pause the animation's progression.

Restart

restart() → Nonerestart() → None

Restart the animation from the beginning.

Resume

resume() → Noneresume() → None

Resume the animation from its current state.

Reverse

reverse() → Nonereverse() → None

Reverse the direction of the animation.

PreviousTransform
NextVec2

On this page

ConstructorPropertiesMethodsPauseRestartResumeReverse