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, scaleTransform: 3D local-space position, rotation, scaleGlobalTransform2D: 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
AudioSource: Audio playback componentAudioChannel: Audio channel for mixingAttenuationModel: Distance-based volume falloff
§Physics
RigidBody: Physics body (dynamic, kinematic, static)RigidBodyType: Type of rigid bodyCollider: Collision shapeColliderShape: Geometric shapes for colliders
§Hierarchy
§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§
- Animation
Clip - Defines the frame sequence and timing for a sprite animation.
- Animation
Controller - ECS component that manages animation state machine logic.
- Animation
State - An animation state containing a clip to play.
- Animation
Transition - Defines a transition between two animation states.
- Audio
Source - AudioSource component for spatial audio playback.
- Bone2D
- A single bone in a
Skeleton2D. - Bone
Keyframe - A single keyframe storing a bone transform at a specific time.
- Bone
Track - Timeline of keyframes for one bone.
- Bone
Transform - Affine transform for a single bone: position, rotation (radians), scale.
- Bone
Weight - Influence of a single bone on a vertex.
- Children
- Component containing a list of child entities.
- Collider
- Collider component for physics collision detection.
- Global
Transform - A world-space transformation component.
- Global
Transform2D - 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.
- Rigid
Body - A physics body component for 2D physics simulation.
- Skeletal
Animation - A complete skeletal animation clip.
- Skeletal
Animator - Controls playback of a
SkeletalAnimationon an entity. - Skeletal
Mesh2D - Deformable 2D mesh driven by a
Skeleton2D. - Skeletal
Vertex - 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.
- Sprite
Animator - ECS component that drives sprite sheet animation.
- Transform
- A 3D spatial transformation component.
- Transform2D
- A 2D spatial transformation component.
Enums§
- Anim
Param - A parameter value used to drive animation transitions.
- Attenuation
Model - Audio attenuation model for distance-based volume falloff.
- Audio
Channel - Audio channel enumeration for audio mixing and grouping.
- Collider
Shape - The geometric shape of a collider.
- Playback
Mode - Controls how an animation behaves when it reaches the last frame.
- Rigid
Body Type - Defines the physics behavior of a rigid body.
- Transition
Condition - 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
dtseconds. - update_
skeletal_ animations - Advances skeletal animations and propagates bone transforms.
- update_
sprite_ animations - Advances all sprite animations by
dtseconds.