Repository navigation
API Function defineBuffer
github-actions[bot] edited this page Nov 27, 2026
·
2 revisions
function defineBuffer<T>(id): BufferDef<T>;Defined in: src/engine/core/data.ts:217
Declare a per-frame buffer.
export const DamageEvents = defineBuffer<{ target: GameObject; amount: number }>("game.Damage");
DamageEvents.push({ target, amount: 5 });
for (const e of DamageEvents.read()) { ... }T
string
BufferDef<T>
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