Transform
pykraken.Transform Transform represents a 2D transformation with position, rotation, and scale.
More about Transform
Attributes
- pos (
Vec2) — Position component. - angle (
float) — Rotation component in radians. - scale (
Vec2) — Scale component.
At a glance
4 membersReference
PYTHON APIOverloaded function.
Transform(pos: Vec2 = Vec2(0.000000, 0.000000), angle: float = 0.0, scale: Vec2 = Vec2(1.000000, 1.000000))
Initialize a Transform with optional keyword arguments.
Args
- pos (
Vec2) — Position component. Defaults to (0, 0). - angle (
float) — Rotation in radians. Defaults to 0. - scale (
Vec2) — Scale component. Defaults to (1, 1).
Transform(pos: Vec2 = Vec2(0.000000, 0.000000), angle: float = 0.0, scale: float = 1.0)
Initialize a Transform with optional keyword arguments.
Args
- pos (
Vec2) — Position component. Defaults to (0, 0). - angle (
float) — Rotation in radians. Defaults to 0. - scale (
float) — Uniform scale multiplier. Defaults to 1.
angle
propertyangle: floatThe rotation component in radians.
pos
propertypos: Vec2The position component as a Vec2.
scale
propertyscale: Vec2The scale component as a Vec2.