Skip to main content

Module components

Module components 

Source
Expand description

§SDK Component Re-exports

This module provides convenient re-exports of all ECS components for use in Rust-native game development.

§Available Components

§Spatial Transformations

  • Transform2D: 2D local-space position, rotation, scale
  • Transform: 3D local-space position, rotation, scale
  • GlobalTransform2D: 2D world-space transformation (computed from hierarchy)
  • GlobalTransform: 3D world-space transformation (computed from hierarchy)
  • Mat3x3: 3x3 transformation matrix for 2D transforms

§Rendering

  • Sprite: 2D sprite component for textured quads

§Audio

§Physics

§Hierarchy

  • Parent: Parent entity reference
  • Children: Child entity list
  • Name: Human-readable entity name

§Example

use goud_engine::sdk::components::{Transform2D, Sprite, RigidBody, RigidBodyType};
use goud_engine::core::math::Vec2;

// Create components for a game entity
let transform = Transform2D::from_position(Vec2::new(100.0, 200.0));
let rigidbody = RigidBody::new(RigidBodyType::Dynamic);

Structs§

AnimationClip
Defines the frame sequence and timing for a sprite animation.
AnimationController
ECS component that manages animation state machine logic.
AnimationState
An animation state containing a clip to play.
AnimationTransition
Defines a transition between two animation states.
AudioSource
AudioSource component for spatial audio playback.
Bone2D
A single bone in a Skeleton2D.
BoneKeyframe
A single keyframe storing a bone transform at a specific time.
BoneTrack
Timeline of keyframes for one bone.
BoneTransform
Affine transform for a single bone: position, rotation (radians), scale.
BoneWeight
Influence of a single bone on a vertex.
Children
Component containing a list of child entities.
Collider
Collider component for physics collision detection.
GlobalTransform
A world-space transformation component.
GlobalTransform2D
A 2D world-space transformation component.
Mat3x3
A 3x3 transformation matrix for 2D transforms.
Name
Component providing a human-readable name for an entity.
Parent
Component indicating the parent entity of this entity.
RigidBody
A physics body component for 2D physics simulation.
SkeletalAnimation
A complete skeletal animation clip.
SkeletalAnimator
Controls playback of a SkeletalAnimation on an entity.
SkeletalMesh2D
Deformable 2D mesh driven by a Skeleton2D.
SkeletalVertex
A vertex in a skeletal mesh with bone weight assignments.
Skeleton2D
Hierarchical bone skeleton attached as an ECS component.
Sprite
A 2D sprite component for rendering textured quads.
SpriteAnimator
ECS component that drives sprite sheet animation.
Transform
A 3D spatial transformation component.
Transform2D
A 2D spatial transformation component.

Enums§

AnimParam
A parameter value used to drive animation transitions.
AttenuationModel
Audio attenuation model for distance-based volume falloff.
AudioChannel
Audio channel enumeration for audio mixing and grouping.
ColliderShape
The geometric shape of a collider.
PlaybackMode
Controls how an animation behaves when it reaches the last frame.
RigidBodyType
Defines the physics behavior of a rigid body.
TransitionCondition
A condition that must be satisfied for a transition to fire.

Functions§

deform_skeletal_meshes
Deforms skeletal meshes using linear blend skinning.
propagate_transforms
Propagates transforms through the entity hierarchy (3D).
propagate_transforms_2d
Propagates 2D transforms through the entity hierarchy.
update_animation_controllers
Advances all animation controllers by dt seconds.
update_skeletal_animations
Advances skeletal animations and propagates bone transforms.
update_sprite_animations
Advances all sprite animations by dt seconds.