Step feedback
Produce temporary cosmetic feedback for observed arrivals.
Generated from the reviewed SDK 0.1.0 contract snapshot. Unreviewed workspace changes are not included.
Public exports
Import from @scape/sdk.
GizmoStepEffects, GizmoStepEvent, gizmoStepError, resolveGizmoStep, validateGizmoSteps.
Type declarations
These declarations preserve source comments and related types. Import only the public exports listed above; module-relative paths below describe how the package is organized.
ts
import { type GizmoSpriteAnimation } from './sprite.js';
import { type ObjectDefinition } from './api.js';
import { type GizmoAudioCommand, type GizmoSounds } from './audio.js';
import { type GizmoLightingState } from './lighting.js';
/** Host-observed arrival, not authority to change saved state. IDs are local to a viewer. */
export interface GizmoStepEvent {
id: string;
at: number;
movement: 'walk' | 'push';
}
/** Temporary feedback. The host restores state-driven lighting when durationMs expires. */
export interface GizmoStepEffects {
durationMs: number;
lighting?: GizmoLightingState;
audio?: GizmoAudioCommand[];
animation?: GizmoSpriteAnimation;
}
export declare function gizmoStepError(value: unknown, sounds: GizmoSounds): string | null;
export declare function resolveGizmoStep(definition: ObjectDefinition, state: unknown, event: GizmoStepEvent): GizmoStepEffects | null;
/** Probe both movement types at catalog/state validation; every live result is checked too. */
export declare function validateGizmoSteps(definition: ObjectDefinition, state: unknown): void;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and host behavior.
