hayao 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -24
- package/bin/create-hayao.mjs +380 -0
- package/bin/hayao-mcp-cli.mjs +11 -0
- package/dist/app/browser.d.ts +65 -4
- package/dist/app/game.d.ts +59 -10
- package/dist/app/tuning.d.ts +68 -0
- package/dist/art/palette.d.ts +41 -0
- package/dist/audio/adaptive.d.ts +58 -0
- package/dist/audio/album.d.ts +16 -0
- package/dist/audio/analysis.d.ts +59 -0
- package/dist/audio/audio.d.ts +39 -1
- package/dist/audio/chord.d.ts +17 -0
- package/dist/audio/genres.d.ts +11 -0
- package/dist/audio/lint.d.ts +29 -0
- package/dist/audio/match.d.ts +38 -0
- package/dist/audio/music.d.ts +88 -0
- package/dist/audio/pcm.d.ts +54 -0
- package/dist/audio/quality.d.ts +28 -0
- package/dist/audio/reverb.d.ts +15 -0
- package/dist/audio/synth.d.ts +63 -0
- package/dist/audio/theory.d.ts +64 -0
- package/dist/audio/zzfx.d.ts +14 -0
- package/dist/content/campaign.d.ts +69 -0
- package/dist/content/generate.d.ts +78 -0
- package/dist/content/level.d.ts +93 -0
- package/dist/content/worldgraph.d.ts +73 -0
- package/dist/core/clock.d.ts +1 -1
- package/dist/core/dmath.d.ts +2 -0
- package/dist/core/projection.d.ts +36 -0
- package/dist/core/rng.d.ts +9 -0
- package/dist/hayao.global.js +200 -0
- package/dist/index.d.ts +39 -1
- package/dist/index.js +6558 -686
- package/dist/index.js.map +4 -4
- package/dist/index.min.js +200 -0
- package/dist/input/actions.d.ts +60 -6
- package/dist/input/gamepad.d.ts +101 -0
- package/dist/input/source.d.ts +133 -1
- package/dist/logic/coroutine.d.ts +68 -0
- package/dist/mcp.js +31225 -0
- package/dist/rasterize-worker-lite.mjs +13 -0
- package/dist/render/canvas.d.ts +6 -5
- package/dist/render/canvas2d-core.d.ts +9 -0
- package/dist/render/commands.d.ts +82 -2
- package/dist/render/paint.d.ts +41 -0
- package/dist/render/renderer.d.ts +47 -0
- package/dist/render/svg.d.ts +5 -1
- package/dist/render/svgString.d.ts +6 -2
- package/dist/render/webgl.d.ts +176 -0
- package/dist/scene/cameraController.d.ts +42 -0
- package/dist/scene/iso.d.ts +73 -0
- package/dist/scene/node.d.ts +98 -6
- package/dist/scene/nodes.d.ts +48 -0
- package/dist/scene/parallax.d.ts +15 -0
- package/dist/scene/particles.d.ts +19 -0
- package/dist/scene/verletChain.d.ts +76 -0
- package/dist/studio/mcpMain.d.ts +1 -0
- package/dist/studio/mcpServer.d.ts +2 -0
- package/dist/studio/record.d.ts +54 -0
- package/dist/studio/run.d.ts +78 -0
- package/dist/studio/session.d.ts +80 -0
- package/dist/studio/timeline.d.ts +35 -0
- package/dist/studio/vitePlugin.d.ts +6 -0
- package/dist/studio-plugin.js +228 -0
- package/dist/ui/overlay.d.ts +6 -0
- package/dist/ui/touch.d.ts +51 -0
- package/dist/verify/audioFilmstrip.d.ts +39 -0
- package/dist/verify/dom.d.ts +26 -0
- package/dist/verify/ethnography.d.ts +67 -0
- package/dist/verify/gates.d.ts +160 -0
- package/dist/verify/layout.d.ts +30 -3
- package/dist/verify/ramp.d.ts +40 -0
- package/dist/world.d.ts +109 -8
- package/dist-studio/assets/index-C7tty_Wo.js +109 -0
- package/dist-studio/assets/index-CM3tjRQo.css +1 -0
- package/dist-studio/index.html +18 -0
- package/docs/API.md +300 -23
- package/docs/CONVENTIONS.md +511 -0
- package/docs/EMBED.md +90 -0
- package/docs/QUICKSTART.md +141 -0
- package/docs/STUDIO.md +97 -0
- package/docs/VERIFICATION.md +256 -0
- package/package.json +40 -6
package/docs/API.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
> Auto-generated by `npm run api`. Everything importable from `@hayao`.
|
|
4
4
|
> Grep here for the real surface — never guess an API from memory.
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**717 exports.**
|
|
7
7
|
|
|
8
|
-
## classs (
|
|
8
|
+
## classs (59)
|
|
9
9
|
|
|
10
10
|
- `AmbientField`
|
|
11
11
|
- `AnimationPlayer`
|
|
@@ -13,16 +13,21 @@
|
|
|
13
13
|
- `BitmapText`
|
|
14
14
|
- `BroadcastChannelTransport`
|
|
15
15
|
- `Camera2D`
|
|
16
|
+
- `CameraController`
|
|
16
17
|
- `Canvas2DRenderer`
|
|
17
18
|
- `CinematicPlayer`
|
|
18
19
|
- `Clock`
|
|
20
|
+
- `Coroutines`
|
|
21
|
+
- `DepthSort`
|
|
19
22
|
- `EventBus`
|
|
20
23
|
- `FloatingText`
|
|
21
24
|
- `Fsm`
|
|
25
|
+
- `GamepadSource`
|
|
22
26
|
- `HeadlessRenderer`
|
|
23
27
|
- `InputBuffer`
|
|
24
28
|
- `InputRecorder`
|
|
25
29
|
- `InputState`
|
|
30
|
+
- `IsoPrism`
|
|
26
31
|
- `KeyboardSource`
|
|
27
32
|
- `LocalStorageAdapter`
|
|
28
33
|
- `LockstepSession`
|
|
@@ -33,38 +38,52 @@
|
|
|
33
38
|
- `Node`
|
|
34
39
|
- `NodePool`
|
|
35
40
|
- `NullStorage`
|
|
41
|
+
- `ParallaxLayer`
|
|
36
42
|
- `Particles`
|
|
37
43
|
- `PhaseClock`
|
|
38
44
|
- `PixelBuffer`
|
|
39
45
|
- `PlayerInput`
|
|
46
|
+
- `PointerSource`
|
|
40
47
|
- `RingBuffer`
|
|
41
48
|
- `Rng`
|
|
42
49
|
- `RollbackSession`
|
|
43
50
|
- `RoomHost`
|
|
44
51
|
- `SaveManager`
|
|
45
52
|
- `ScreenTransition`
|
|
53
|
+
- `SessionRecorder`
|
|
46
54
|
- `Shaker`
|
|
47
55
|
- `Shell`
|
|
48
56
|
- `Signal`
|
|
57
|
+
- `SnapshotRing`
|
|
49
58
|
- `SpatialHash`
|
|
50
59
|
- `Sprite`
|
|
51
60
|
- `SvgRenderer`
|
|
52
61
|
- `Text`
|
|
53
62
|
- `TextureSprite`
|
|
54
63
|
- `Timer`
|
|
64
|
+
- `TouchControls`
|
|
55
65
|
- `UndoStack`
|
|
66
|
+
- `VerletChain`
|
|
67
|
+
- `WebGL2Renderer`
|
|
56
68
|
- `World`
|
|
57
69
|
|
|
58
|
-
## functions (
|
|
70
|
+
## functions (310)
|
|
59
71
|
|
|
72
|
+
- `abilitiesOf`: (world: WorldGraphDef, taken: readonly string[]) => Set<string>
|
|
60
73
|
- `addBody`: (rw: RigidWorld, def: RigidBodyDef) => number
|
|
61
74
|
- `addDistanceJoint`: (rw: RigidWorld, def: DistanceJointDef) => number
|
|
62
75
|
- `addRevoluteJoint`: (rw: RigidWorld, def: RevoluteJointDef) => number
|
|
63
76
|
- `addTransition`: (parent: Node, config?: TransitionConfig) => ScreenTransition
|
|
77
|
+
- `albumTrack`: (id: string) => AlbumTrack | undefined
|
|
78
|
+
- `all`: (...waits: Wait[]) => Wait
|
|
79
|
+
- `analyzePlaytest`: (def: GameDefinition<Record<string, unknown>>, session: PlaytestSession, opts?: AnalyzeOptions) => PlaytestReport
|
|
64
80
|
- `applyImpulse`: (rw: RigidWorld, id: number, ix: number, iy: number, px?: number | undefined, py?: number | undefined) => void
|
|
81
|
+
- `applyReverb`: (buf: StereoBuffer, opts?: ReverbOptions) => void
|
|
65
82
|
- `applyTransform`: (m: Transform, p: Vec2) => Vec2
|
|
66
83
|
- `asciiEntities`: (rowsAscii: string[], tileSize?: number, chars?: Record<string, TileId>) => { char: string; tx: number; ty: number; x: number; y: number; }[]
|
|
84
|
+
- `assertAudio`: (buf: StereoBuffer, exp: AudioExpectation) => AudioAssertion
|
|
67
85
|
- `assertDeterministic`: (makeWorld: WorldFactory, log: InputLog) => DeterminismReport
|
|
86
|
+
- `assertRamp`: (difficulty: readonly number[], opts?: RampOptions) => void
|
|
68
87
|
- `assertSnapshotStable`: (makeWorld: WorldFactory, log: InputLog, warmup: number) => { ok: boolean; hashA: string; hashB: string; }
|
|
69
88
|
- `assertSolvable`: <State, Move>(puzzle: Puzzle<State, Move>, options?: SolveOptions) => SolveResult<Move>
|
|
70
89
|
- `astar`: <N>(start: N, isGoal: (n: N) => boolean, neighbours: WeightedNeighbours<N>, key: NodeKey<N>, opts?: { heuristic?: ((n: N) => number) | undefined; maxNodes?: …
|
|
@@ -72,59 +91,99 @@
|
|
|
72
91
|
- `autotile4`: (grid: BoolGrid) => (WangTile | null)[][]
|
|
73
92
|
- `autotileToCommands`: (grid: BoolGrid, options?: AutotileDrawOptions) => (RectCommand | PolyCommand)[]
|
|
74
93
|
- `availableUpgrades`: (defs: readonly UpgradeDef[], owned: readonly string[]) => UpgradeDef[]
|
|
94
|
+
- `bandBalance`: (sig: Samples, sampleRate?: number) => BandBalance
|
|
75
95
|
- `bfs`: <N>(start: N, neighbours: Neighbours<N>, key: NodeKey<N>, opts?: { goal?: ((n: N) => boolean) | undefined; maxNodes?: number | undefined; }) => BfsResult<N>
|
|
76
96
|
- `blobPath`: (rng: Rng, radius: number, wobble?: number, lobes?: number) => string
|
|
77
97
|
- `bodyAABB`: (b: RigidBody) => Rect
|
|
78
98
|
- `bodyContains`: (b: RigidBody, x: number, y: number) => boolean
|
|
99
|
+
- `bootDom`: (def: GameDefinition<Record<string, unknown>>, mount?: HTMLElement | undefined) => DomHarness
|
|
100
|
+
- `cadenceResolves`: (romans: string[]) => boolean
|
|
101
|
+
- `cameraIssues`: (samples: readonly Vec2[], opts?: CameraOptions) => string[]
|
|
102
|
+
- `canvasGradient`: (ctx: { createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; createRadialGradient(x0: number, y0: number, r0: number, x1: nu…
|
|
79
103
|
- `cellFloat`: (x: number, y: number, seed?: number) => number
|
|
80
104
|
- `cellHash`: (x: number, y: number, seed?: number) => number
|
|
81
105
|
- `cellInt`: (x: number, y: number, n: number, seed?: number) => number
|
|
82
106
|
- `changeFrames`: (timeline: ProbeFrame[], key: string) => number[]
|
|
83
107
|
- `checkDeterministic`: (makeWorld: WorldFactory, log: InputLog) => DeterminismReport
|
|
108
|
+
- `chordChanges`: (symbols: string[], octave?: number) => number[][]
|
|
109
|
+
- `chordNotes`: (symbol: string, octave?: number) => number[]
|
|
110
|
+
- `clientToDesign`: (rect: { left: number; top: number; width: number; height: number; }, width: number, height: number, clientX: number, clientY: number) => Vec2
|
|
84
111
|
- `collide`: (a: RigidBody, b: RigidBody) => Manifold | null
|
|
85
|
-
- `commandsToSVGInner`: (commands: DrawCommand[]) => string
|
|
112
|
+
- `commandsToSVGInner`: (commands: DrawCommand[], idPrefix?: string) => string
|
|
113
|
+
- `composeCampaign`: <State, Move>(spec: CampaignSpec<State, Move>) => Campaign<State, Move>
|
|
86
114
|
- `composeTransform`: (m: Transform, n: Transform) => Transform
|
|
87
115
|
- `connectedComponents`: (cols: number, rows: number, passable: Passable, diagonal?: boolean) => Components
|
|
88
116
|
- `connectWebSocket`: (url: string) => Promise<Transport>
|
|
89
117
|
- `contourToCommands`: (grid: BoolGrid, options?: AutotileDrawOptions) => PolyCommand[]
|
|
118
|
+
- `contrastRatio`: (a: string, b: string) => number
|
|
90
119
|
- `createPlanBot`: <Step extends { kind: string; }, Probe>(plan: Step[], execs: Record<string, StepExec<Step, Probe>>) => PlanBot<Probe>
|
|
91
120
|
- `createPlatformerState`: (x: number, y: number) => PlatformerState
|
|
92
121
|
- `createRigidWorld`: (opts?: RigidWorldOpts) => RigidWorld
|
|
93
|
-
- `
|
|
122
|
+
- `createStereo`: (durationSec: number, sampleRate?: number) => StereoBuffer
|
|
123
|
+
- `createWorld`: <TState extends Record<string, unknown> = Record<string, unknown>>(def: GameDefinition<TState>, opts?: number | CreateWorldOptions | undefined) => World<...>
|
|
124
|
+
- `crestFactorDb`: (sig: Samples) => number
|
|
94
125
|
- `dashJumpDistance`: (cfg?: PlatformerConfig) => number
|
|
95
126
|
- `datan`: (x: number) => number
|
|
96
127
|
- `datan2`: (y: number, x: number) => number
|
|
128
|
+
- `dbfs`: (amp: number) => number
|
|
97
129
|
- `dcos`: (x: number) => number
|
|
98
130
|
- `decode2bit`: (source: string | bigint, width: number, height: number) => PixelBuffer
|
|
99
131
|
- `decodeBits`: (source: string | bigint, width: number, height: number) => PixelBuffer
|
|
100
132
|
- `decodeMessage`: (data: string) => NetMessage | null
|
|
101
133
|
- `decodeRLE`: (runs: readonly number[], width: number, height: number) => PixelBuffer
|
|
102
134
|
- `defaultStorage`: (prefix?: string | undefined) => StorageAdapter
|
|
103
|
-
- `defineGame`: (def: GameDefinition) => Required<Pick<GameDefinition
|
|
135
|
+
- `defineGame`: <TState extends Record<string, unknown> = Record<string, unknown>>(def: GameDefinition<TState>) => Required<Pick<GameDefinition<TState>, "seed" | "width" | "…
|
|
136
|
+
- `defineLevel`: (spec: LevelSpec) => LevelData
|
|
104
137
|
- `deserializeNode`: (data: SerializedNode) => Node
|
|
105
138
|
- `dexp`: (x: number) => number
|
|
106
139
|
- `dexp2`: (x: number) => number
|
|
107
140
|
- `dhypot`: (x: number, y: number) => number
|
|
141
|
+
- `diamondPoints`: (w: number, h: number) => number[]
|
|
142
|
+
- `diatonicChord`: (tonic: number, mode: "major" | "minor" | "harmonicMinor" | "melodicMinor" | "dorian" | "phrygian" | "lydian" | "mixolydian" | "locrian" | "majorPentatonic" …
|
|
143
|
+
- `diffLevels`: (a: LevelData, b: LevelData) => LevelChange[]
|
|
144
|
+
- `distanceGain`: (model: DistanceModel, distance: number, refDistance?: number, maxDistance?: number, rolloff?: number) => number
|
|
108
145
|
- `dlog`: (x: number) => number
|
|
109
|
-
- `
|
|
146
|
+
- `dpow`: (base: number, exp: number) => number
|
|
147
|
+
- `drive`: (world: World<Record<string, unknown>>, script: InputScript, until?: ((probe: Record<string, unknown>) => boolean) | undefined) => DriveResult
|
|
148
|
+
- `dropShadow`: (color: string, blur: number, dx?: number, dy?: number) => Shadow
|
|
110
149
|
- `dsin`: (x: number) => number
|
|
150
|
+
- `duckGain`: (active: boolean, amountDb?: number) => number
|
|
111
151
|
- `encodeMessage`: (msg: NetMessage) => string
|
|
112
152
|
- `encodeRLE`: (buf: PixelBuffer) => number[]
|
|
153
|
+
- `encodeWav`: (buf: StereoBuffer) => Uint8Array<ArrayBufferLike>
|
|
154
|
+
- `estimateTempo`: (sig: Samples, sampleRate?: number) => number
|
|
155
|
+
- `evalCurve`: (curve: Breakpoint[], x: number) => number
|
|
156
|
+
- `featureDistance`: (reference: AudioFeatures, candidate: AudioFeatures, weights?: Partial<FeatureWeights>) => MatchResult
|
|
157
|
+
- `features`: (sig: Samples, sampleRate?: number) => AudioFeatures
|
|
158
|
+
- `feedbackIssues`: (contract: FeedbackContract, requiredEvents: readonly string[], opts?: FeedbackOptions) => string[]
|
|
159
|
+
- `fft`: (re: Float32Array<ArrayBufferLike>, im: Float32Array<ArrayBufferLike>) => void
|
|
160
|
+
- `findSoftlocks`: (world: WorldGraphDef, mode?: CompletionMode) => SoftlockReport
|
|
113
161
|
- `firstFrame`: (timeline: ProbeFrame[], pred: (p: ProbeFrame) => boolean) => number
|
|
162
|
+
- `fitViewport`: (rect: { width: number; height: number; }, width: number, height: number) => Viewport
|
|
114
163
|
- `floodFill`: (start: Cell, passable: Passable, opts: { cols: number; rows: number; diagonal?: boolean | undefined; }) => Cell[]
|
|
164
|
+
- `fluxEnvelope`: (sig: Samples, frameSize?: number, hop?: number) => Float32Array<ArrayBufferLike>
|
|
165
|
+
- `forgivenessIssues`: (spec: ForgivenessSpec, opts?: ForgivenessOptions) => string[]
|
|
115
166
|
- `fractalNoise`: (x: number, y: number, seed?: number, opts?: FractalOptions) => number
|
|
116
167
|
- `frameActions`: (log: InputLog, i: number) => string[]
|
|
117
|
-
- `
|
|
168
|
+
- `frameAxes`: (log: InputLog, i: number) => AxisFrame | undefined
|
|
169
|
+
- `gameInputMap`: (def: GameDefinition<Record<string, unknown>>) => Readonly<Record<string, readonly string[]>>
|
|
118
170
|
- `generateCave`: (rng: Rng, opts: CaveOptions) => Grid
|
|
119
171
|
- `generateDungeon`: (rng: Rng, opts: DungeonOptions) => Dungeon
|
|
172
|
+
- `generateLevels`: <State, Move>(factory: (rng: Rng) => Puzzle<State, Move>, opts: GenerateOptions<State, Move>) => GeneratedLevel<State, Move>[]
|
|
173
|
+
- `generateLevelsReport`: <State, Move>(factory: (rng: Rng) => Puzzle<State, Move>, opts: GenerateOptions<State, Move>) => GenerateReport<State, Move>
|
|
174
|
+
- `genre`: (id: string) => GenreTrack | undefined
|
|
120
175
|
- `getBody`: (rw: RigidWorld, id: number) => RigidBody | undefined
|
|
121
176
|
- `getJoint`: (rw: RigidWorld, id: number) => Joint | undefined
|
|
177
|
+
- `glow`: (color: string, blur: number) => Shadow
|
|
178
|
+
- `graceWindowIssues`: (label: string, windowFrames: number, accepts: (delayFrames: number) => boolean) => string[]
|
|
122
179
|
- `gradient`: (stops: readonly string[], n: number) => string[]
|
|
180
|
+
- `gradientDef`: (g: Gradient, id: string) => string
|
|
123
181
|
- `gridAt`: (g: Grid, x: number, y: number) => number
|
|
124
182
|
- `gridFromRows`: (rows: readonly string[], solid?: string) => boolean[][]
|
|
125
183
|
- `gridSet`: (g: Grid, x: number, y: number, v: number) => void
|
|
126
184
|
- `gridToTilemap`: (g: Grid, tileSize?: number) => TilemapData
|
|
127
185
|
- `groundAt`: (map: TilemapData, x: number, y: number, w: number, h: number, solids?: SolidRect[], dropThrough?: boolean) => { grounded: boolean; solid: number; }
|
|
186
|
+
- `hashNoise`: (...values: number[]) => number
|
|
128
187
|
- `hashString`: (str: string) => number
|
|
129
188
|
- `hashValue`: (value: unknown) => string
|
|
130
189
|
- `hexToHsl`: (hex: string) => HSL
|
|
@@ -136,21 +195,32 @@
|
|
|
136
195
|
- `initDirector`: (waves: readonly WaveDef[]) => DirectorState
|
|
137
196
|
- `inputDensity`: (frames: string[][]) => number
|
|
138
197
|
- `installCapture`: (target: CaptureTarget) => HayaoCapture
|
|
198
|
+
- `invalidCommandReason`: (c: DrawCommand) => string | null
|
|
139
199
|
- `invertTransform`: (m: Transform) => Transform
|
|
140
200
|
- `inVisionCone`: (map: TilemapData, ex: number, ey: number, faceX: number, faceY: number, fov: number, range: number, tx: number, ty: number) => boolean
|
|
141
201
|
- `isCaptureMode`: () => boolean
|
|
142
202
|
- `isGround`: (col: number, row: number, opts: TerrainOptions) => boolean
|
|
143
203
|
- `isMonotonic`: (values: number[], dir: "up" | "down", slack?: number) => boolean
|
|
204
|
+
- `iso`: (cfg: IsoConfig) => IsoProjection
|
|
144
205
|
- `joinRoom`: (opts: RoomClientOptions) => Promise<NetGame>
|
|
145
206
|
- `jumpAirtime`: (cfg?: PlatformerConfig) => number
|
|
146
207
|
- `jumpDistance`: (cfg?: PlatformerConfig) => number
|
|
147
208
|
- `jumpHeight`: (cfg?: PlatformerConfig) => number
|
|
148
209
|
- `keyMentions`: (code: string) => string[]
|
|
149
|
-
- `keysToActions`: (map:
|
|
210
|
+
- `keysToActions`: (map: Readonly<Record<string, readonly string[]>>, keysDown: Set<string>) => string[]
|
|
211
|
+
- `layerGains`: (layers: MusicLayer[], intensity: number) => Record<string, number>
|
|
150
212
|
- `layoutIssues`: (commands: DrawCommand[], opts?: LayoutOptions) => string[]
|
|
151
213
|
- `layoutText`: (font: BitmapFont, input: string | readonly RichChar[], options?: TextLayoutOptions) => TextLayout
|
|
214
|
+
- `levelFromSeed`: <State, Move>(factory: (rng: Rng) => Puzzle<State, Move>, seed: number) => Puzzle<State, Move>
|
|
215
|
+
- `levelIssues`: (data: LevelData) => string[]
|
|
216
|
+
- `levelReachable`: (data: LevelData, opts?: { passable?: Passable | undefined; diagonal?: boolean | undefined; }) => ReachReport
|
|
217
|
+
- `levelToTilemap`: (data: LevelData) => TilemapData
|
|
218
|
+
- `linearGradient`: (stops: readonly StopInput[], angleDeg?: number) => LinearGradient
|
|
152
219
|
- `lineOfSight`: (map: TilemapData, ax: number, ay: number, bx: number, by: number) => boolean
|
|
220
|
+
- `lintSong`: (song: Song, opts?: LintOptions) => MusicLintResult
|
|
153
221
|
- `longestLull`: (eventFrames: number[], totalFrames: number) => number
|
|
222
|
+
- `lookAheadIssues`: (cameraSamples: readonly Vec2[], targetSamples: readonly Vec2[], minLead?: number) => string[]
|
|
223
|
+
- `magnitudeSpectrum`: (frame: Samples) => Float32Array<ArrayBufferLike>
|
|
154
224
|
- `makeGrid`: (cols: number, rows: number, fill?: number) => Grid
|
|
155
225
|
- `makeReach`: (start?: number, settle?: number) => (target: number, dt: number) => number
|
|
156
226
|
- `makeTransform`: (pos: Vec2, rotation: number, scale: Vec2) => Transform
|
|
@@ -158,69 +228,130 @@
|
|
|
158
228
|
- `marchingSquaresContours`: (grid: BoolGrid, options?: ContourOptions) => ContourSegment[]
|
|
159
229
|
- `mask4`: (grid: BoolGrid, x: number, y: number) => number
|
|
160
230
|
- `mask8`: (grid: BoolGrid, x: number, y: number) => number
|
|
231
|
+
- `matchReport`: (reference: AudioFeatures, candidate: AudioFeatures) => string
|
|
161
232
|
- `measureLine`: (font: BitmapFont, chars: readonly RichChar[]) => number
|
|
162
233
|
- `measureText`: (font: BitmapFont, text: string) => number
|
|
163
234
|
- `mergePlayerFrames`: (players: readonly string[], inputs: ReadonlyMap<string, readonly string[]>) => string[]
|
|
164
|
-
- `
|
|
235
|
+
- `midiToFreq`: (midi: number, a4?: number) => number
|
|
236
|
+
- `midiToName`: (midi: number) => string
|
|
237
|
+
- `missingControlHints`: (world: World<Record<string, unknown>>, inputMap: Readonly<Record<string, readonly string[]>>) => string[]
|
|
165
238
|
- `mix`: (a: string, b: string, t: number) => string
|
|
166
239
|
- `mixLinear`: (a: string, b: string, t: number) => string
|
|
240
|
+
- `mixMono`: (bus: StereoBuffer, sig: Samples, startSample: number, gain?: number, pan?: number) => void
|
|
167
241
|
- `moveRect`: (map: TilemapData, rect: Rect, dx: number, dy: number, opts?: MoveOpts) => MoveResult
|
|
168
242
|
- `mutateColor`: (rng: Rng, hex: string, amounts?: DriftAmounts) => string
|
|
169
243
|
- `netMessage`: <T extends Omit<NetMessage, "v">>(msg: T) => T & { v: number; }
|
|
244
|
+
- `nextStep`: () => Wait
|
|
170
245
|
- `nineSlice`: (rect: Rect, style: NineSliceStyle, z?: number, transform?: Transform) => DrawCommand[]
|
|
246
|
+
- `normalize`: (buf: StereoBuffer, target?: number) => void
|
|
247
|
+
- `noteToMidi`: (name: string) => number
|
|
248
|
+
- `onsetDensity`: (sig: Samples, sampleRate?: number) => number
|
|
249
|
+
- `openVoicing`: (chord: number[]) => number[]
|
|
171
250
|
- `packVarints`: (nums: readonly number[]) => string
|
|
251
|
+
- `panFromOffset`: (dx: number, spread?: number) => number
|
|
252
|
+
- `panGains`: (pan: number) => { l: number; r: number; }
|
|
172
253
|
- `parseRich`: (markup: string, colorMap?: Record<string, string>) => RichChar[]
|
|
173
254
|
- `parseSnapshot`: (text: string | null) => WorldSnapshot | null
|
|
174
255
|
- `passableFromTilemap`: (map: TilemapData) => Passable
|
|
256
|
+
- `peak`: (buf: StereoBuffer) => number
|
|
257
|
+
- `peakAmp`: (sig: Samples) => number
|
|
175
258
|
- `pickEntry`: <T>(rng: Rng, entries: readonly WeightedEntry<T>[]) => T
|
|
259
|
+
- `pitchToFreq`: (pitch: string | number, a4?: number) => number
|
|
176
260
|
- `pixelsToCommands`: (buf: PixelBuffer, palette: readonly Swatch[], options?: PixelDrawOptions) => RectCommand[]
|
|
261
|
+
- `platformerReachable`: (data: LevelData, opts: PlatformerReachOptions) => ReachReport
|
|
177
262
|
- `playerIds`: (count: number) => string[]
|
|
178
263
|
- `pointQuery`: (rw: RigidWorld, x: number, y: number, mask?: number) => RigidBody | undefined
|
|
179
264
|
- `pollDirector`: (waves: readonly WaveDef[], state: DirectorState, time: number, rng?: Rng | undefined) => SpawnEvent[]
|
|
180
265
|
- `polygonBox`: (w: number, h: number) => RigidShape
|
|
181
|
-
- `
|
|
266
|
+
- `progression`: (tonic: number, mode: "major" | "minor" | "harmonicMinor" | "melodicMinor" | "dorian" | "phrygian" | "lydian" | "mixolydian" | "locrian" | "majorPentatonic" …
|
|
267
|
+
- `progressionPuzzle`: (world: WorldGraphDef, mode?: CompletionMode) => Puzzle<ProgressState, ProgressMove>
|
|
268
|
+
- `proveCompletable`: (world: WorldGraphDef) => SolveResult<ProgressMove>
|
|
269
|
+
- `proveFullCompletion`: (world: WorldGraphDef) => SolveResult<ProgressMove>
|
|
270
|
+
- `pump`: (world: World<Record<string, unknown>>, frames: number, actions?: string[]) => void
|
|
271
|
+
- `quantizeAngle`: (radians: number, buckets: number) => number
|
|
272
|
+
- `race`: (...waits: Wait[]) => Wait
|
|
273
|
+
- `radialGradient`: (stops: readonly StopInput[], opts?: { cx?: number | undefined; cy?: number | undefined; r?: number | undefined; }) => RadialGradient
|
|
274
|
+
- `rampIssues`: (difficulty: readonly number[], opts?: RampOptions) => string[]
|
|
275
|
+
- `rampStats`: (difficulty: readonly number[]) => RampStats
|
|
182
276
|
- `rayCastRigid`: (rw: RigidWorld, x0: number, y0: number, x1: number, y1: number, mask?: number) => RigidRayHit | null
|
|
183
277
|
- `raycastTiles`: (map: TilemapData, x0: number, y0: number, x1: number, y1: number) => RayHit
|
|
278
|
+
- `reachableRegions`: (world: WorldGraphDef, abilities: Iterable<string>) => string[]
|
|
184
279
|
- `reconstructPath`: <N>(cameFrom: Map<string, N>, key: NodeKey<N>, start: N, goal: N) => N[]
|
|
185
|
-
- `recordTimeline`: (world: World, frames: string[][]) => ProbeFrame[]
|
|
280
|
+
- `recordTimeline`: (world: World<Record<string, unknown>>, frames: string[][]) => ProbeFrame[]
|
|
186
281
|
- `rectBlocked`: (map: TilemapData, x: number, y: number, w: number, h: number, solids?: SolidRect[]) => boolean
|
|
187
282
|
- `rectContains`: (r: Rect, p: Vec2) => boolean
|
|
188
283
|
- `rectsOverlap`: (a: Rect, b: Rect) => boolean
|
|
189
284
|
- `registerNode`: (type: string, factory: NodeFactory) => void
|
|
190
285
|
- `regularPolygon`: (sides: number, radius: number, rotation?: number) => number[]
|
|
286
|
+
- `regularPolyPoints`: (sides: number, r: number, rotation?: number) => number[]
|
|
287
|
+
- `relLuminance`: (hex: string) => number
|
|
191
288
|
- `removeBody`: (rw: RigidWorld, id: number) => void
|
|
192
289
|
- `removeJoint`: (rw: RigidWorld, id: number) => void
|
|
193
|
-
- `
|
|
290
|
+
- `renderAudioFilmstrip`: (buf: StereoBuffer, opts?: AudioFilmstripOptions) => string
|
|
291
|
+
- `renderFilmstrip`: (world: World<Record<string, unknown>>, frames: string[][], opts: FilmstripOptions) => string
|
|
292
|
+
- `renderSong`: (song: Song, opts?: { sampleRate?: number | undefined; normalizePeak?: number | undefined; }) => StereoBuffer
|
|
293
|
+
- `renderSound`: (spec: SoundSpec, opts?: { rng?: Rng | undefined; sampleRate?: number | undefined; }) => Samples
|
|
194
294
|
- `renderToSVGString`: (commands: DrawCommand[], width: number, height: number, background?: string) => string
|
|
195
295
|
- `replay`: (makeWorld: WorldFactory, log: InputLog) => { finalHash: string; hashes: string[]; }
|
|
296
|
+
- `replaySession`: (def: GameDefinition<Record<string, unknown>>, session: PlaytestSession, opts?: number | ReplayOptions | undefined) => World<...>
|
|
196
297
|
- `resetNodeIds`: (start?: number) => void
|
|
298
|
+
- `resetZzfxWarnings`: () => void
|
|
299
|
+
- `resolveTuning`: (spec: TuningSpec | undefined, overrides?: TuningValues | undefined) => TuningValues
|
|
197
300
|
- `rigidStep`: (rw: RigidWorld, dt: number) => ContactEvent[]
|
|
198
301
|
- `rleDecode`: (input: string) => string
|
|
199
302
|
- `rleEncode`: (input: string) => string
|
|
303
|
+
- `rms`: (sig: Samples) => number
|
|
200
304
|
- `roomCenter`: (r: Room) => { x: number; y: number; }
|
|
201
|
-
- `
|
|
202
|
-
- `
|
|
203
|
-
- `
|
|
305
|
+
- `rootless`: (chord: number[], targetMidi?: number | undefined) => number[]
|
|
306
|
+
- `runBrowser`: (def: GameDefinition<Record<string, unknown>>, mount: HTMLElement, opts?: RunOptions) => GameHandle
|
|
307
|
+
- `runBrowserNet`: (def: GameDefinition<Record<string, unknown>>, mount: HTMLElement, opts: NetRunOptions) => NetGameHandle
|
|
308
|
+
- `runFeelGates`: (spec: FeelSpec, ctx?: FeelContext) => FeelReport
|
|
309
|
+
- `runHeadless`: <TState extends Record<string, unknown> = Record<string, unknown>>(def: GameDefinition<TState>, inputLog?: InputLog | undefined) => HeadlessResult<TState>
|
|
310
|
+
- `runStudio`: (baseDef: GameDefinition<Record<string, unknown>>, mount: HTMLElement, opts?: StudioOptions) => StudioHandle
|
|
311
|
+
- `salienceIssues`: (commands: DrawCommand[], avatarFill: string, background: string, opts?: SalienceOptions) => string[]
|
|
204
312
|
- `sampleGradient`: (stops: readonly string[], t: number) => string
|
|
313
|
+
- `scaleMidis`: (tonic: number, mode?: "major" | "minor" | "harmonicMinor" | "melodicMinor" | "dorian" | "phrygian" | "lydian" | "mixolydian" | "locrian" | "majorPentatonic"…
|
|
314
|
+
- `scalePitchClasses`: (tonic: number, mode?: "major" | "minor" | "harmonicMinor" | "melodicMinor" | "dorian" | "phrygian" | "lydian" | "mixolydian" | "locrian" | "majorPentatonic"…
|
|
205
315
|
- `scatter`: (x: number, y: number, probability: number, seed?: number) => boolean
|
|
206
316
|
- `scatterCells`: (x0: number, y0: number, cols: number, rows: number, probability: number, seed?: number) => { x: number; y: number; }[]
|
|
207
|
-
- `
|
|
317
|
+
- `scoreTrack`: (buf: StereoBuffer, profile: GenreProfile) => QualityScore
|
|
318
|
+
- `scriptedPlaythrough`: (world: World<Record<string, unknown>>, script: Segment[]) => PlaythroughResult
|
|
208
319
|
- `scriptToFrames`: (script: InputScript) => string[][]
|
|
320
|
+
- `scrubTo`: (world: World<Record<string, unknown>>, def: GameDefinition<Record<string, unknown>>, ring: SnapshotRing, inputFrames: readonly string[][], axesLog: readonly…
|
|
209
321
|
- `serializeSnapshot`: (snap: WorldSnapshot) => string
|
|
210
322
|
- `series`: (timeline: ProbeFrame[], key: string) => unknown[]
|
|
211
323
|
- `setOverlayHost`: (el: HTMLElement) => void
|
|
324
|
+
- `setScreenObserver`: (cb: ((kind: "show" | "hide", title?: string | undefined) => void) | null) => void
|
|
325
|
+
- `shadeHex`: (hex: string, f: number) => string
|
|
326
|
+
- `shadowDef`: (s: Shadow, id: string) => string
|
|
327
|
+
- `shapeBBox`: (c: DrawCommand) => BBox | null
|
|
212
328
|
- `shapeBox`: (cmd: DrawCommand) => { x: number; y: number; w: number; h: number; } | null
|
|
213
329
|
- `showScreen`: (spec: ScreenSpec) => ScreenHandle
|
|
330
|
+
- `signalHash`: (sig: Samples) => number
|
|
331
|
+
- `sleep`: (seconds: number) => Wait
|
|
214
332
|
- `smoothClosedPath`: (points: Vec2[], tension?: number) => string
|
|
215
333
|
- `smoothOpenPath`: (points: Vec2[], tension?: number) => string
|
|
334
|
+
- `snapAxis`: (value: number, buckets: number, min?: number, max?: number) => number
|
|
335
|
+
- `softClip`: (x: number) => number
|
|
336
|
+
- `softClipInPlace`: (buf: StereoBuffer) => void
|
|
216
337
|
- `solidNeighbours`: (g: Grid, x: number, y: number) => number
|
|
217
338
|
- `solve`: <State, Move>(puzzle: Puzzle<State, Move>, options?: SolveOptions) => SolveResult<Move>
|
|
218
339
|
- `solveJoint`: (j: Joint, A: RigidBody, B: RigidBody, dt: number, scratch: JointScratch) => void
|
|
340
|
+
- `songBeats`: (song: Song) => number
|
|
341
|
+
- `songDuration`: (song: Song) => number
|
|
219
342
|
- `sortCommands`: (cmds: DrawCommand[]) => DrawCommand[]
|
|
343
|
+
- `spatialMix`: (dx: number, dy: number, hearing?: number, rolloff?: number) => SpatialMix
|
|
344
|
+
- `specFromZzfx`: (p: readonly (number | undefined)[]) => SoundSpec
|
|
345
|
+
- `spectralCentroid`: (sig: Samples, sampleRate?: number) => number
|
|
220
346
|
- `springStep`: (s: SpringState, target: number, omega: number, dt: number) => SpringState
|
|
221
347
|
- `star`: (points: number, outer: number, inner: number, rotation?: number) => number[]
|
|
222
348
|
- `steer2D`: (px: number, py: number, tx: number, ty: number, out: string[], dead?: number) => void
|
|
223
349
|
- `stepPlatformer`: (s: PlatformerState, input: PadInput, dt: number, map: TilemapData, cfg?: PlatformerConfig, platforms?: Platform[]) => PlatformerEvents
|
|
350
|
+
- `stereoDuration`: (buf: StereoBuffer) => number
|
|
351
|
+
- `stereoFrames`: (buf: StereoBuffer) => number
|
|
352
|
+
- `stereoWidth`: (buf: StereoBuffer) => number
|
|
353
|
+
- `subSeed`: (seed: number, i: number) => number
|
|
354
|
+
- `telegraphIssues`: (timeline: readonly TelegraphFrame[], minFrames: number, label?: string) => string[]
|
|
224
355
|
- `terrainHeight`: (col: number, opts: TerrainOptions) => number
|
|
225
356
|
- `terrainSlice`: (startCol: number, count: number, opts: TerrainOptions) => number[]
|
|
226
357
|
- `textBox`: (cmd: TextCommand) => TextBox
|
|
@@ -229,30 +360,57 @@
|
|
|
229
360
|
- `tileAtPoint`: (map: TilemapData, x: number, y: number) => number
|
|
230
361
|
- `tilemapFromAscii`: (rowsAscii: string[], tileSize?: number, chars?: Record<string, TileId>) => TilemapData
|
|
231
362
|
- `toggleFullscreen`: () => void
|
|
363
|
+
- `transpose`: (notes: number[], semitones: number) => number[]
|
|
232
364
|
- `typewriterCount`: (total: number, elapsedSec: number, charsPerSec: number) => number
|
|
233
365
|
- `unpackVarints`: (input: string) => number[]
|
|
366
|
+
- `validateWorld`: (world: WorldGraphDef) => string[]
|
|
234
367
|
- `valueNoise`: (x: number, y: number, seed?: number) => number
|
|
235
368
|
- `vnorm`: (a: Vec2) => Vec2
|
|
369
|
+
- `voiceLead`: (chords: number[][]) => number[][]
|
|
236
370
|
- `wait`: (frames: number) => Segment
|
|
371
|
+
- `waitFor`: (cond: () => boolean) => Wait
|
|
237
372
|
- `wakeBody`: (b: RigidBody) => void
|
|
238
373
|
- `wangTile`: (mask: number) => WangTile
|
|
374
|
+
- `warnCommandOnce`: (kind: string, reason: string, detail?: unknown) => void
|
|
239
375
|
- `weatherEnvelope`: (t: number, keys: readonly WeatherKey[]) => number
|
|
240
376
|
- `weightedIndex`: (rng: Rng, weights: readonly number[]) => number
|
|
241
377
|
- `weightedPick`: <T>(rng: Rng, items: readonly T[], weights: readonly number[]) => T
|
|
242
378
|
- `wipeStep`: (transition: ScreenTransition, opts?: WipeOptions & { name?: string | undefined; }) => CinematicStep
|
|
243
379
|
- `withAlpha`: (hex: string, alpha: number) => string
|
|
244
380
|
- `worldPoints`: (b: RigidBody) => number[]
|
|
381
|
+
- `zcr`: (sig: Samples, sampleRate?: number) => number
|
|
245
382
|
|
|
246
|
-
## interfaces (
|
|
383
|
+
## interfaces (240)
|
|
247
384
|
|
|
385
|
+
- `AcceptedProof`
|
|
386
|
+
- `ActBounds`
|
|
387
|
+
- `ActSpec`
|
|
388
|
+
- `AlbumTrack`
|
|
248
389
|
- `AmbientStyle`
|
|
390
|
+
- `AnalyzeOptions`
|
|
391
|
+
- `Annotation`
|
|
392
|
+
- `AnnotationContext`
|
|
393
|
+
- `ArcCommand`
|
|
394
|
+
- `AudioAssertion`
|
|
395
|
+
- `AudioExpectation`
|
|
396
|
+
- `AudioFeatures`
|
|
397
|
+
- `AudioFilmstripOptions`
|
|
249
398
|
- `AutotileDrawOptions`
|
|
399
|
+
- `BandBalance`
|
|
400
|
+
- `BBox`
|
|
250
401
|
- `Behavior`
|
|
251
402
|
- `BfsResult`
|
|
252
403
|
- `BitmapFont`
|
|
253
404
|
- `BitmapTextConfig`
|
|
254
405
|
- `BotCtx`
|
|
406
|
+
- `Breakpoint`
|
|
407
|
+
- `CameraBounds`
|
|
255
408
|
- `CameraConfig`
|
|
409
|
+
- `CameraControllerConfig`
|
|
410
|
+
- `CameraOptions`
|
|
411
|
+
- `Campaign`
|
|
412
|
+
- `CampaignLevel`
|
|
413
|
+
- `CampaignSpec`
|
|
256
414
|
- `CaptureTarget`
|
|
257
415
|
- `CaveOptions`
|
|
258
416
|
- `Cell`
|
|
@@ -265,43 +423,84 @@
|
|
|
265
423
|
- `ContourOptions`
|
|
266
424
|
- `ContourSegment`
|
|
267
425
|
- `CoreEvents`
|
|
426
|
+
- `CoroutineHandle`
|
|
427
|
+
- `CreateWorldOptions`
|
|
428
|
+
- `DeathCluster`
|
|
429
|
+
- `DepthSortConfig`
|
|
268
430
|
- `DesyncInfo`
|
|
269
431
|
- `DeterminismReport`
|
|
432
|
+
- `DifficultyBand`
|
|
270
433
|
- `DirectorState`
|
|
271
434
|
- `DistanceJoint`
|
|
272
435
|
- `DistanceJointDef`
|
|
436
|
+
- `DomHarness`
|
|
273
437
|
- `DriftAmounts`
|
|
274
438
|
- `DriveResult`
|
|
275
439
|
- `Dungeon`
|
|
276
440
|
- `DungeonOptions`
|
|
441
|
+
- `EllipseCommand`
|
|
442
|
+
- `FeatureDelta`
|
|
443
|
+
- `FeedbackOptions`
|
|
444
|
+
- `FeedbackResponse`
|
|
445
|
+
- `FeelContext`
|
|
446
|
+
- `FeelReport`
|
|
447
|
+
- `FeelSpec`
|
|
277
448
|
- `FilmstripOptions`
|
|
278
449
|
- `FloatStyle`
|
|
450
|
+
- `ForgivenessOptions`
|
|
451
|
+
- `ForgivenessSpec`
|
|
279
452
|
- `FractalOptions`
|
|
453
|
+
- `FutileVerb`
|
|
280
454
|
- `GameDefinition`
|
|
281
455
|
- `GameHandle`
|
|
456
|
+
- `GamepadSourceOptions`
|
|
457
|
+
- `GeneratedLevel`
|
|
458
|
+
- `GenerateOptions`
|
|
459
|
+
- `GenerateReport`
|
|
460
|
+
- `GenreProfile`
|
|
461
|
+
- `GenreTrack`
|
|
462
|
+
- `GradientStop`
|
|
282
463
|
- `Grid`
|
|
283
464
|
- `HayaoCapture`
|
|
284
465
|
- `HeadlessResult`
|
|
466
|
+
- `HesitationSpan`
|
|
467
|
+
- `HotContext`
|
|
285
468
|
- `HSL`
|
|
286
469
|
- `ImageCommand`
|
|
287
470
|
- `InputLog`
|
|
471
|
+
- `InputSource`
|
|
472
|
+
- `IsoConfig`
|
|
473
|
+
- `IsoPrismConfig`
|
|
474
|
+
- `IsoProjection`
|
|
288
475
|
- `JointScratch`
|
|
476
|
+
- `KnobEvent`
|
|
289
477
|
- `LayoutOptions`
|
|
478
|
+
- `LevelChange`
|
|
479
|
+
- `LevelData`
|
|
480
|
+
- `LevelEntity`
|
|
481
|
+
- `LevelSpec`
|
|
482
|
+
- `LinearGradient`
|
|
483
|
+
- `LintOptions`
|
|
290
484
|
- `LockstepOptions`
|
|
291
485
|
- `LoopbackOptions`
|
|
292
486
|
- `Manifold`
|
|
487
|
+
- `MatchResult`
|
|
293
488
|
- `MenuAction`
|
|
294
489
|
- `MoveOpts`
|
|
295
490
|
- `MoveResult`
|
|
491
|
+
- `MusicLayer`
|
|
492
|
+
- `MusicLintResult`
|
|
296
493
|
- `NetGame`
|
|
297
494
|
- `NetGameHandle`
|
|
298
495
|
- `NetRunOptions`
|
|
299
496
|
- `NetSessionConfig`
|
|
300
497
|
- `NineSliceStyle`
|
|
301
498
|
- `NodeConfig`
|
|
499
|
+
- `Note`
|
|
302
500
|
- `PadInput`
|
|
303
501
|
- `Paint`
|
|
304
502
|
- `Palette`
|
|
503
|
+
- `ParallaxLayerConfig`
|
|
305
504
|
- `ParticleStyle`
|
|
306
505
|
- `PathCommand`
|
|
307
506
|
- `PhaseDef`
|
|
@@ -311,15 +510,32 @@
|
|
|
311
510
|
- `Platform`
|
|
312
511
|
- `PlatformerConfig`
|
|
313
512
|
- `PlatformerEvents`
|
|
513
|
+
- `PlatformerReachOptions`
|
|
314
514
|
- `PlatformerState`
|
|
515
|
+
- `PlaytestReport`
|
|
516
|
+
- `PlaytestSession`
|
|
315
517
|
- `PlaythroughResult`
|
|
518
|
+
- `PointerReadout`
|
|
519
|
+
- `PointerSourceOptions`
|
|
520
|
+
- `PointerTarget`
|
|
316
521
|
- `PolyCommand`
|
|
522
|
+
- `PostProcessPass`
|
|
523
|
+
- `ProgressState`
|
|
317
524
|
- `Puzzle`
|
|
525
|
+
- `QualityScore`
|
|
526
|
+
- `QuitContext`
|
|
527
|
+
- `RadialGradient`
|
|
528
|
+
- `RampOptions`
|
|
529
|
+
- `RampStats`
|
|
318
530
|
- `RayHit`
|
|
531
|
+
- `ReachReport`
|
|
532
|
+
- `RecorderInit`
|
|
319
533
|
- `Rect`
|
|
320
534
|
- `RectCommand`
|
|
321
535
|
- `Renderer`
|
|
322
536
|
- `RendererConfig`
|
|
537
|
+
- `ReplayOptions`
|
|
538
|
+
- `ReverbOptions`
|
|
323
539
|
- `RevoluteJoint`
|
|
324
540
|
- `RevoluteJointDef`
|
|
325
541
|
- `RichChar`
|
|
@@ -335,21 +551,33 @@
|
|
|
335
551
|
- `RoomClientOptions`
|
|
336
552
|
- `RoomHostOptions`
|
|
337
553
|
- `RunOptions`
|
|
554
|
+
- `SalienceOptions`
|
|
555
|
+
- `ScreenEvent`
|
|
338
556
|
- `ScreenHandle`
|
|
339
557
|
- `ScreenSpec`
|
|
340
558
|
- `ScriptSegment`
|
|
341
559
|
- `Segment`
|
|
342
560
|
- `SerializedNode`
|
|
343
561
|
- `Settings`
|
|
562
|
+
- `Shadow`
|
|
344
563
|
- `ShellOptions`
|
|
564
|
+
- `SoftlockReport`
|
|
345
565
|
- `SolidRect`
|
|
346
566
|
- `SolveOptions`
|
|
347
567
|
- `SolveResult`
|
|
568
|
+
- `Song`
|
|
569
|
+
- `SoundSpec`
|
|
570
|
+
- `SpatialMix`
|
|
348
571
|
- `SpawnEvent`
|
|
572
|
+
- `SplashConfig`
|
|
349
573
|
- `SpringState`
|
|
350
574
|
- `SpriteConfig`
|
|
351
575
|
- `StateHandlers`
|
|
576
|
+
- `StereoBuffer`
|
|
352
577
|
- `StorageAdapter`
|
|
578
|
+
- `StudioHandle`
|
|
579
|
+
- `StudioOptions`
|
|
580
|
+
- `TelegraphFrame`
|
|
353
581
|
- `TerrainOptions`
|
|
354
582
|
- `TextBox`
|
|
355
583
|
- `TextCommand`
|
|
@@ -359,35 +587,61 @@
|
|
|
359
587
|
- `TextLayoutOptions`
|
|
360
588
|
- `TextureSpriteConfig`
|
|
361
589
|
- `TilemapData`
|
|
590
|
+
- `TimelineEntry`
|
|
362
591
|
- `TimerConfig`
|
|
363
592
|
- `Tone`
|
|
593
|
+
- `TouchButton`
|
|
594
|
+
- `TouchControlsLayout`
|
|
595
|
+
- `TouchStick`
|
|
596
|
+
- `Track`
|
|
364
597
|
- `Transform`
|
|
365
598
|
- `Transition`
|
|
366
599
|
- `TransitionConfig`
|
|
367
600
|
- `Transport`
|
|
601
|
+
- `TuningKnob`
|
|
602
|
+
- `TuningSpec`
|
|
368
603
|
- `UpgradeDef`
|
|
604
|
+
- `Variant`
|
|
605
|
+
- `VariantRef`
|
|
369
606
|
- `Vec2`
|
|
607
|
+
- `VerletChainConfig`
|
|
608
|
+
- `Viewport`
|
|
370
609
|
- `Volumes`
|
|
610
|
+
- `WallClockMark`
|
|
371
611
|
- `WangTile`
|
|
372
612
|
- `WaveDef`
|
|
373
613
|
- `WeatherKey`
|
|
614
|
+
- `WebGLRendererConfig`
|
|
374
615
|
- `WeightedEdge`
|
|
375
616
|
- `WeightedEntry`
|
|
376
617
|
- `WipeOptions`
|
|
377
618
|
- `WorldConfig`
|
|
378
619
|
- `WorldContext`
|
|
620
|
+
- `WorldEdge`
|
|
621
|
+
- `WorldGraphDef`
|
|
622
|
+
- `WorldPickup`
|
|
623
|
+
- `WorldRegion`
|
|
379
624
|
- `WorldSnapshot`
|
|
380
625
|
|
|
381
|
-
## types (
|
|
626
|
+
## types (46)
|
|
382
627
|
|
|
628
|
+
- `AxisFrame`
|
|
383
629
|
- `BodyKind`
|
|
384
630
|
- `BoolGrid`
|
|
631
|
+
- `CompletionMode`
|
|
632
|
+
- `DistanceModel`
|
|
385
633
|
- `DrawCommand`
|
|
386
634
|
- `Ease`
|
|
387
635
|
- `Easing`
|
|
388
636
|
- `Edge`
|
|
637
|
+
- `EndReason`
|
|
638
|
+
- `FeedbackChannel`
|
|
639
|
+
- `FeedbackContract`
|
|
640
|
+
- `GamepadMap`
|
|
641
|
+
- `Gradient`
|
|
389
642
|
- `InputMap`
|
|
390
643
|
- `InputScript`
|
|
644
|
+
- `Instrument`
|
|
391
645
|
- `Joint`
|
|
392
646
|
- `Listener`
|
|
393
647
|
- `Neighbours`
|
|
@@ -395,25 +649,38 @@
|
|
|
395
649
|
- `NodeFactory`
|
|
396
650
|
- `NodeKey`
|
|
397
651
|
- `Passable`
|
|
652
|
+
- `PauseMode`
|
|
653
|
+
- `Pitch`
|
|
398
654
|
- `PlayerId`
|
|
399
655
|
- `ProbeFrame`
|
|
656
|
+
- `ProgressMove`
|
|
400
657
|
- `RigidShape`
|
|
658
|
+
- `Samples`
|
|
659
|
+
- `ScaleName`
|
|
401
660
|
- `Shape`
|
|
402
661
|
- `StepExec`
|
|
403
662
|
- `Swatch`
|
|
404
663
|
- `TextAlign`
|
|
405
664
|
- `TileId`
|
|
665
|
+
- `TuningValue`
|
|
666
|
+
- `TuningValues`
|
|
667
|
+
- `UniformValue`
|
|
668
|
+
- `Wait`
|
|
406
669
|
- `WangFrame`
|
|
670
|
+
- `Wave`
|
|
407
671
|
- `WeightedNeighbours`
|
|
408
672
|
- `WipeKind`
|
|
409
673
|
- `WorldFactory`
|
|
410
674
|
|
|
411
|
-
## consts (
|
|
675
|
+
## consts (61)
|
|
412
676
|
|
|
677
|
+
- `ALBUM`: { title: string; subtitle: string; concept: string; tracks: AlbumTrack[]; }
|
|
413
678
|
- `AMBIENT_PRESETS`: { readonly snow: (colors?: string[]) => AmbientStyle; readonly rain: (colors?: string[]) => AmbientStyle; readonly ash: (colors?: string[]) => AmbientStyle; }
|
|
414
679
|
- `audio`: AudioBus
|
|
680
|
+
- `BLOOM_PIPELINE`: PostProcessPass[]
|
|
415
681
|
- `clamp`: (v: number, lo: number, hi: number) => number
|
|
416
|
-
- `
|
|
682
|
+
- `DEFAULT_GAMEPAD_MAP`: GamepadMap
|
|
683
|
+
- `DEFAULT_INPUT_MAP`: Readonly<Record<string, readonly string[]>>
|
|
417
684
|
- `DEFAULT_PLATFORMER`: PlatformerConfig
|
|
418
685
|
- `DEFAULT_SESSION_CONFIG`: NetSessionConfig
|
|
419
686
|
- `DEFAULT_TILE_CHARS`: Record<string, TileId>
|
|
@@ -424,13 +691,19 @@
|
|
|
424
691
|
- `EASINGS`: Record<string, Easing>
|
|
425
692
|
- `FLOAT_PRESETS`: { readonly damage: (color?: string) => FloatStyle; readonly crit: (color?: string) => FloatStyle; readonly heal: (color?: string) => FloatStyle; readonly lab…
|
|
426
693
|
- `FONT_5`: BitmapFont
|
|
694
|
+
- `GENRE_PROFILES`: Record<string, GenreProfile>
|
|
695
|
+
- `GENRES`: GenreTrack[]
|
|
427
696
|
- `IDENTITY`: Transform
|
|
697
|
+
- `INSTRUMENTS`: Record<string, Instrument>
|
|
428
698
|
- `invLerp`: (a: number, b: number, v: number) => number
|
|
699
|
+
- `KENTO`: { readonly gofun: "#f7f1e2"; readonly washi: "#efe7d3"; readonly kinu: "#e4d8bd"; readonly line: "#d8cbac"; readonly kinako: "#b9a882"; readonly stone: "#6c6…
|
|
700
|
+
- `knob`: { num(key: string, opts: { default: number; min?: number | undefined; max?: number | undefined; step?: number | undefined; label?: string | undefined; group?…
|
|
429
701
|
- `lerp`: (a: number, b: number, t: number) => number
|
|
430
702
|
- `lerpDamp`: (current: number, target: number, lambda: number, dt: number) => number
|
|
431
703
|
- `mapHeight`: (map: TilemapData) => number
|
|
432
704
|
- `mapWidth`: (map: TilemapData) => number
|
|
433
705
|
- `MEADOW`: Palette
|
|
706
|
+
- `MOUSE_ACTIONS`: readonly ["mouse.left", "mouse.right", "mouse.middle"]
|
|
434
707
|
- `NEIGHBORS_4`: readonly Cell[]
|
|
435
708
|
- `NEIGHBORS_8`: readonly Cell[]
|
|
436
709
|
- `NET_PROTOCOL_VERSION`: 1
|
|
@@ -440,24 +713,28 @@
|
|
|
440
713
|
- `PAPER`: Palette
|
|
441
714
|
- `PARTICLE_PRESETS`: { readonly dust: (colors?: string[]) => ParticleStyle; readonly burst: (colors?: string[]) => ParticleStyle; readonly hit: (colors?: string[]) => ParticleSty…
|
|
442
715
|
- `playerAction`: (player: string, action: string) => string
|
|
443
|
-
- `playerInput`: (world: World, player: string) => PlayerInput
|
|
716
|
+
- `playerInput`: (world: World<Record<string, unknown>>, player: string) => PlayerInput
|
|
444
717
|
- `rad2deg`: (r: number) => number
|
|
445
718
|
- `remap`: (v: number, a0: number, a1: number, b0: number, b1: number) => number
|
|
719
|
+
- `SAMPLE_RATE`: 44100
|
|
446
720
|
- `SAVE_FORMAT_VERSION`: 1
|
|
721
|
+
- `SCALES`: { readonly major: readonly [0, 2, 4, 5, 7, 9, 11]; readonly minor: readonly [0, 2, 3, 5, 7, 8, 10]; readonly harmonicMinor: readonly [0, 2, 3, 5, 7, 8, 11]; …
|
|
447
722
|
- `screenRect`: (w: number, h: number) => Rect
|
|
448
723
|
- `settings`: SettingsStore
|
|
449
724
|
- `smoothstep`: (edge0: number, edge1: number, v: number) => number
|
|
450
725
|
- `spring`: (value?: number) => SpringState
|
|
451
726
|
- `TAU`: number
|
|
452
727
|
- `TILE`: { readonly EMPTY: 0; readonly SOLID: 1; readonly ONEWAY: 2; readonly HAZARD: 3; }
|
|
728
|
+
- `tileCenter`: (tx: number, ty: number, tileSize: number) => { x: number; y: number; }
|
|
453
729
|
- `vadd`: (a: Vec2, b: Vec2) => Vec2
|
|
454
730
|
- `vdist`: (a: Vec2, b: Vec2) => number
|
|
455
731
|
- `vdot`: (a: Vec2, b: Vec2) => number
|
|
456
732
|
- `vec2`: (x?: number, y?: number) => Vec2
|
|
457
|
-
- `VERSION`: "0.
|
|
733
|
+
- `VERSION`: "0.4.0"
|
|
458
734
|
- `vlen`: (a: Vec2) => number
|
|
459
735
|
- `vscale`: (a: Vec2, s: number) => Vec2
|
|
460
736
|
- `vsub`: (a: Vec2, b: Vec2) => Vec2
|
|
737
|
+
- `WEBGL_EFFECTS`: { readonly passthrough: "#version 300 es\nprecision mediump float;\nin vec2 v_uv;\nuniform sampler2D u_scene;\nuniform sampler2D u_prev;\nout vec4 fragColor;…
|
|
461
738
|
|
|
462
739
|
## exports (1)
|
|
463
740
|
|