Repository navigation
API Function defineWorldService
github-actions[bot] edited this page Nov 24, 2026
·
7 revisions
function defineWorldService<T>(id): WorldServiceKey<T>;Defined in: src/engine/core/worldServices.ts:382
A typed key for the World service id, for code that uses another plugin's service when it's there:
const Physics3D = defineWorldService<Physics3DService>("myco.physics3d");
const physics = worldService(Physics3D); // null when the current World isn't running itT
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