Components Reference

Components are plain Julia structs that attach data to entities. All components subtype Component.

# TransformComponent

Position, rotation, and scale with Observable reactivity. Uses Float64 for CPU-side precision. Parent-child transform inheritance is handled automatically by the scene graph.

transform.jl

# MeshComponent

Vertex geometry data. Use the built-in primitives or supply custom positions, normals, UVs, and indices. Supports bone weights and bone indices for skeletal animation.

mesh.jl

# MaterialComponent

PBR material with full texture support. Includes advanced features: clear coat for lacquered surfaces, parallax occlusion mapping for depth, and subsurface scattering for translucent materials.

material.jl

# CameraComponent

Perspective camera with configurable field of view, clipping planes, and aspect ratio.

camera.jl

# Light Components

Three light types: DirectionalLight for sun-like illumination, PointLight for local light sources, and IBL for image-based environment lighting.

lights.jl

# ColliderComponent

Collision shape attached to an entity. Supports AABB, Sphere, Capsule, OBB, ConvexHull, Compound, and Heightmap shapes. Set is_trigger=true for non-physical event volumes.

collider.jl

# RigidBodyComponent

Physics body with mass, damping, restitution, and friction. Three body types: STATIC (immovable), KINEMATIC (script-driven), DYNAMIC (physics-driven). Float64 precision for stable long simulations.

rigidbody.jl

# AnimationComponent

Keyframe animation with clips and channels. Each channel targets an entity property (position, rotation, or scale) with step, linear, or cubic spline interpolation.

animation.jl

# Audio Components

OpenAL-based 3D positional audio. AudioListenerComponent follows the camera; AudioSourceComponent emits sound from entity positions with configurable attenuation.

audio.jl

# Skeleton Components

BoneComponent represents a joint in the skeleton hierarchy. SkinnedMeshComponent links a mesh to its bones. Bone matrices are updated each frame during the skinning system pass.

skeleton.jl

# ParticleSystemComponent

CPU-simulated billboard particles with emission rate, lifetime, velocity ranges, gravity, damping, and color/size interpolation over lifetime.

particle.jl

# PlayerComponent

FPS-style player controller. When present in the scene, the render loop automatically enables WASD movement, mouse look, sprinting, and cursor capture.

player.jl