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§

AudioSource
AudioSource component for spatial audio playback.
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.
Sprite
A 2D sprite component for rendering textured quads.
Transform
A 3D spatial transformation component.
Transform2D
A 2D spatial transformation component.

Enums§

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.
RigidBodyType
Defines the physics behavior of a rigid body.

Functions§

propagate_transforms
Propagates transforms through the entity hierarchy (3D).
propagate_transforms_2d
Propagates 2D transforms through the entity hierarchy.