# Atmosphere
One-paragraph description of what this component does and what it
attaches to. Mention any required sibling components (e.g. Model,
Transform).
## Public fields
- `exampleNumber: number` — what it controls, units, valid range.
- `exampleString: string` — what it controls.
- `exampleBool: boolean` — what it controls.
## Methods
- `:methodName(arg)` — what it does and when to call it.
## Lifecycle
- `awake()` — same-frame attach hook. What initial state this component
sets up.
- `start()` — first-frame-after-awake hook. Cross-component setup that
needs the other components on the entity to have finished `awake`.
- `update(dt)` — per-frame while the gameplay clock runs. What this
component does each tick.
- `onDestroy()` — cleanup performed on detach / entity despawn.
See `man components` for the full hook list (`onEnable`, `fixedUpdate`,
`onPropertyChanged`, etc.) and the timing details.
## Usage
```luau
entity(id).component.add("Atmosphere", { exampleNumber = 1.0 })
entity(id).component.get("Atmosphere"):methodName("foo")
```
# SurfAudio
SURF VOID's sound, driven entirely by `game.rules` events and `Rules.state`. Lives on the scene's `game` entity; the AudioListener is on the player camera. In play it spawns one temporary child root `SurfAudio_root` with a non-spatial `Audio` source per voice (despawned on destroy, never saved).
## Voices (clips under /zero/source/game/audio/)
- `music_title` (music_title.soundClip, 45 s calm synthwave) — audible while `phase == "title"`.
- `music_run` (music_run.soundClip, 60 s driving synthwave) — audible in ready/running/finished; ducked under the finish fanfare.
- `wind` (wind_loop.soundClip) — air-rush loop; volume and pitch rise with `Rules.state.speedU` (full at `windFullSpeed`).
- `hiss` (surf_hiss.soundClip) — surf-slide loop, plays while `Rules.state.surfing`, stops when it clears.
- One-shots: `jump`, `land` (volume/pitch scaled by `land(impactU)`), `checkpoint` (pitch steps up per CP), `respawn` (also on `restart`), `finish`, `click` (on `begin` = Enter on the title, softer on `start`).
## Public fields
- `masterMusic`, `titleMusic` — music deck levels (0..1).
- `windMax`, `windFullSpeed` — wind level at full speed and the u/s that reaches it.
- `hissLevel`, `sfxLevel` — surf hiss and one-shot levels.
- Readouts: `windVolume`, `windPitch`, `hissVolume`, `lastEvent`.
## Methods
- `:voice(name)` — the Audio component behind a voice.
- `:report()` — `{ [voice] = { playing, mixer, volume, pitch, why } }`.
Mixer channels: `music`, `ambient`, `sfx` (turn groups down with `audio.setChannelVolume`).
# course
One-paragraph description of what this module provides and who consumes
it.
## Exports
- `M.exampleFn(arg) -> result` — what it does and when to call it.
- `M.exampleValue: type` — what value it carries.
## Usage
Replace `<identity>` with the string `asset.create` returned — this
module's source path with `/` written as `.` and each segment's type
suffix dropped, the way a module at `/source/lib/thing.module` is
`lib.thing` and one at `/source/kit.package/thing.module` is
`kit.thing`.
```luau
local M = require("<identity>")
M.exampleFn("foo")
```
## Notes
- Anything callers need to know about THIS module: required runtime
ordering, state ownership, side effects.
# courseVisuals
One paragraph describing what this module builds and where it belongs in a
scene.
## Inputs
- `count: number` (default 3) — what it controls, units, sensible range.
- `spacing: number` (default 1.5) — what it controls, units, sensible range.
## Placement
```lua
local placed = entity.spawn("courseVisuals_0")
placed.component.add("SceneModule", {
source = asset.resolve("courseVisuals", "sceneModule"),
params = { count = 5 },
})
placed.localPosition = { 0, 0, 0 }
```
# rules
One-paragraph description of what this module provides and who consumes
it.
## Exports
- `M.exampleFn(arg) -> result` — what it does and when to call it.
- `M.exampleValue: type` — what value it carries.
## Usage
Replace `<identity>` with the string `asset.create` returned — this
module's source path with `/` written as `.` and each segment's type
suffix dropped, the way a module at `/source/lib/thing.module` is
`lib.thing` and one at `/source/kit.package/thing.module` is
`kit.thing`.
```luau
local M = require("<identity>")
M.exampleFn("foo")
```
## Notes
- Anything callers need to know about THIS module: required runtime
ordering, state ownership, side effects.
# SurfController
One-paragraph description of what this component does and what it
attaches to. Mention any required sibling components (e.g. Model,
Transform).
## Public fields
- `exampleNumber: number` — what it controls, units, valid range.
- `exampleString: string` — what it controls.
- `exampleBool: boolean` — what it controls.
## Methods
- `:methodName(arg)` — what it does and when to call it.
## Lifecycle
- `awake()` — same-frame attach hook. What initial state this component
sets up.
- `start()` — first-frame-after-awake hook. Cross-component setup that
needs the other components on the entity to have finished `awake`.
- `update(dt)` — per-frame while the gameplay clock runs. What this
component does each tick.
- `onDestroy()` — cleanup performed on detach / entity despawn.
See `man components` for the full hook list (`onEnable`, `fixedUpdate`,
`onPropertyChanged`, etc.) and the timing details.
## Usage
```luau
entity(id).component.add("SurfController", { exampleNumber = 1.0 })
entity(id).component.get("SurfController"):methodName("foo")
```
# Hud
One-paragraph description of what this component does and what it
attaches to. Mention any required sibling components (e.g. Model,
Transform).
## Public fields
- `exampleNumber: number` — what it controls, units, valid range.
- `exampleString: string` — what it controls.
- `exampleBool: boolean` — what it controls.
## Methods
- `:methodName(arg)` — what it does and when to call it.
## Lifecycle
- `awake()` — same-frame attach hook. What initial state this component
sets up.
- `start()` — first-frame-after-awake hook. Cross-component setup that
needs the other components on the entity to have finished `awake`.
- `update(dt)` — per-frame while the gameplay clock runs. What this
component does each tick.
- `onDestroy()` — cleanup performed on detach / entity despawn.
See `man components` for the full hook list (`onEnable`, `fixedUpdate`,
`onPropertyChanged`, etc.) and the timing details.
## Usage
```luau
entity(id).component.add("Hud", { exampleNumber = 1.0 })
entity(id).component.get("Hud"):methodName("foo")
```
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.
# Mesh
Mesh asset. `data.zmsh` is the engine-native geometry payload (`renderer.mesh.encode`); consumers reference the asset's guid.