Repository navigation
API Function defineComponent
github-actions[bot] edited this page Nov 24, 2026
·
1 revision
function defineComponent<S>(
id,
schema,
options?
): DataComponentDef<S>;Defined in: src/engine/core/data.ts:52
Declare a data component.
export const Velocity = defineComponent("game.Velocity", { x: f32, y: f32, z: f32 });S extends Schema
string
S
string
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference