Sound banks & previews
Resolve state-specific sounds and local auditions.
Public exports
Import from @scape-wtf/sdk.
GizmoPreview, gizmoPreviewError, resolveGizmoSounds.
Type declarations
Import the public exports listed above from the package entry point.
ts
import { type ObjectDefinition } from './api.js';
import { type GizmoSounds, type GizmoSound } from './audio.js';
/** Local preview result played without submitting an authoritative action. */
export interface GizmoPreview {
sound: GizmoSound;
gain: number;
}
export declare function gizmoPreviewError(value: unknown): string | null;
/** State-dependent recipes are prepared/cached by the host; synthesis never runs in a definition callback. */
export declare function resolveGizmoSounds(definition: ObjectDefinition, state: unknown): GizmoSounds;1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and Scape behavior.
