SDK API reference
Use @scape/sdk for authoring. @scape/sdk/runtime contains local host and test helpers. This is the experimental 0.1.0 contract; see availability.
Generated from the reviewed SDK 0.1.0 contract snapshot. Unreviewed workspace changes are not included.
Modules
| Module | Responsibility |
|---|---|
| Definitions, state & actions | Define projects, gizmos, validated state, actions and standard controls. |
| Directional push | Request bounded directional movement while a cell is occupied. |
| View validation | Validate standard fields, controls and choice bounds. |
| Accepted-action reactions | Declare shared feedback and permission-checked removal requests. |
| Models & animation | Describe bounded GLB presentation and timelines without accessing the renderer. |
| World text | Declare plain text and the host text editor. |
| Audio & ambience | Declare sounds, playback timelines and ambient output. |
| Glow | Declare a bounded screen-space glow. |
| Synthesis | Build procedural sounds from oscillators, envelopes and effects. |
| Sequences | Compose timed, procedural ambient events. |
| Noise sounds | Layer filtered noise, grains and modulation. |
| World light | Describe illumination in world cells. |
| State-driven lighting | Resolve complete light and glow recipes from state and topology. |
| Step feedback | Produce temporary cosmetic feedback for observed arrivals. |
| Partial synthesis | Build and render bounded partial-based sound recipes. |
| Portable configuration | Copy declared editor settings without copying live instance identity. |
| Sound banks & previews | Resolve state-specific sounds and local auditions. |
| Layered sprites | Compose validated sprite layers without DOM or renderer access. |
| Linking & travel | Declare same-floor linked or offset travel; the host retains movement authority. |
| World picking & navigation | Choose world destinations and request host-controlled admission with optional departure feedback. |
| Host & test runtime | Register definitions and validate local instances and actions. This entry is for hosts and tests. |
Export index
| Symbol | Import | Reference |
|---|---|---|
actorId | @scape/sdk | Definitions, state & actions |
axisQuaternion | @scape/sdk | Models & animation |
defineObject | @scape/sdk | Definitions, state & actions |
defineProject | @scape/sdk | Definitions, state & actions |
encodeGizmoWav | @scape/sdk | Audio & ambience |
exactKeys | @scape/sdk | Definitions, state & actions |
GIZMO_AUDIO_MAX_BYTES | @scape/sdk | Audio & ambience |
GIZMO_SOUND_RATE | @scape/sdk | Synthesis |
GizmoAmbience | @scape/sdk | Audio & ambience |
gizmoAmbienceError | @scape/sdk | Audio & ambience |
GizmoAmplitude | @scape/sdk | Partial synthesis |
GizmoAudioBus | @scape/sdk | Sequences |
GizmoAudioCommand | @scape/sdk | Audio & ambience |
gizmoAudioError | @scape/sdk | Audio & ambience |
GizmoAudioTimeline | @scape/sdk | Audio & ambience |
gizmoBusError | @scape/sdk | Sequences |
GizmoConfiguration | @scape/sdk | Portable configuration |
GizmoEnvironment | @scape/sdk | Linking & travel |
GizmoFeedback | @scape/sdk | Accepted-action reactions |
gizmoFeedbackError | @scape/sdk | Accepted-action reactions |
GizmoFrame | @scape/sdk | Models & animation |
GizmoGlow | @scape/sdk | Glow |
gizmoGlowError | @scape/sdk | Glow |
gizmoGlowFrame | @scape/sdk | Glow |
GizmoInteraction | @scape/sdk | Accepted-action reactions |
GizmoLabelFrame | @scape/sdk | Models & animation |
GizmoLight | @scape/sdk | World light |
GizmoLightColor | @scape/sdk | World light |
gizmoLightError | @scape/sdk | World light |
gizmoLightingError | @scape/sdk | State-driven lighting |
GizmoLightingState | @scape/sdk | State-driven lighting |
GizmoLightPattern | @scape/sdk | World light |
GizmoLink | @scape/sdk | Linking & travel |
GizmoNavigation | @scape/sdk | World picking & navigation |
gizmoNavigationError | @scape/sdk | World picking & navigation |
GizmoNoiseSound | @scape/sdk | Noise sounds |
gizmoNoiseSoundError | @scape/sdk | Noise sounds |
GizmoPartialLayer | @scape/sdk | Partial synthesis |
gizmoPartialsError | @scape/sdk | Partial synthesis |
GizmoPartialsSound | @scape/sdk | Partial synthesis |
GizmoPlaylistAmbience | @scape/sdk | Audio & ambience |
GizmoPresentation | @scape/sdk | Models & animation |
GizmoPreview | @scape/sdk | Sound banks & previews |
gizmoPreviewError | @scape/sdk | Sound banks & previews |
GizmoPush | @scape/sdk | Directional push |
gizmoPushError | @scape/sdk | Directional push |
GizmoReaction | @scape/sdk | Accepted-action reactions |
GizmoReactionContext | @scape/sdk | Accepted-action reactions |
GizmoSequence | @scape/sdk | Sequences |
GizmoSequenceAmbience | @scape/sdk | Audio & ambience |
GizmoSequenceContext | @scape/sdk | Sequences |
gizmoSequenceError | @scape/sdk | Sequences |
GizmoSequenceStep | @scape/sdk | Sequences |
GizmoSignalStage | @scape/sdk | Partial synthesis |
GizmoSound | @scape/sdk | Audio & ambience |
GizmoSoundChoice | @scape/sdk | Audio & ambience |
GizmoSoundEffect | @scape/sdk | Synthesis |
GizmoSoundEnvelope | @scape/sdk | Synthesis |
GizmoSoundFilter | @scape/sdk | Synthesis |
GizmoSoundPoint | @scape/sdk | Synthesis |
GizmoSounds | @scape/sdk | Audio & ambience |
GizmoSoundSamples | @scape/sdk | Synthesis |
gizmoSoundsError | @scape/sdk | Audio & ambience |
GizmoSoundVoice | @scape/sdk | Synthesis |
GizmoSpriteAnimation | @scape/sdk | Layered sprites |
gizmoSpriteAnimationError | @scape/sdk | Layered sprites |
gizmoSpriteError | @scape/sdk | Layered sprites |
GizmoSpriteFill | @scape/sdk | Layered sprites |
GizmoSpriteFrame | @scape/sdk | Layered sprites |
GizmoSpriteRecipe | @scape/sdk | Layered sprites |
GizmoSpriteShape | @scape/sdk | Layered sprites |
GizmoStepEffects | @scape/sdk | Step feedback |
gizmoStepError | @scape/sdk | Step feedback |
GizmoStepEvent | @scape/sdk | Step feedback |
GizmoSynth | @scape/sdk | Synthesis |
gizmoSynthError | @scape/sdk | Synthesis |
GizmoTextEditor | @scape/sdk | World text |
GizmoTimeline | @scape/sdk | Models & animation |
GizmoTravel | @scape/sdk | Linking & travel |
gizmoTravelError | @scape/sdk | Linking & travel |
GizmoWorldDestination | @scape/sdk | World picking & navigation |
GizmoWorldEditor | @scape/sdk | World picking & navigation |
gizmoWorldText | @scape/sdk | World text |
jsonData | @scape/sdk | Definitions, state & actions |
localObjectRandomInt | @scape/sdk | Definitions, state & actions |
multiplyQuaternion | @scape/sdk | Models & animation |
ObjectAction | @scape/sdk | Definitions, state & actions |
ObjectActionError | @scape/sdk | Definitions, state & actions |
ObjectChoice | @scape/sdk | Definitions, state & actions |
ObjectConfiguration | @scape/sdk | Definitions, state & actions |
ObjectContext | @scape/sdk | Definitions, state & actions |
ObjectControl | @scape/sdk | Definitions, state & actions |
ObjectDefinition | @scape/sdk | Definitions, state & actions |
ObjectField | @scape/sdk | Definitions, state & actions |
objectId | @scape/sdk | Definitions, state & actions |
ObjectInstance | @scape/sdk | Definitions, state & actions |
ObjectView | @scape/sdk | Definitions, state & actions |
ObjectViewer | @scape/sdk | Definitions, state & actions |
PROJECT_OBJECT_LIMIT | @scape/sdk | Definitions, state & actions |
ProjectDefinition | @scape/sdk | Definitions, state & actions |
Quaternion | @scape/sdk | Models & animation |
readGizmoSound | @scape/sdk | Audio & ambience |
record | @scape/sdk | Definitions, state & actions |
renderGizmoNoise | @scape/sdk | Noise sounds |
renderGizmoPartials | @scape/sdk | Partial synthesis |
renderGizmoSound | @scape/sdk | Audio & ambience |
renderGizmoSynth | @scape/sdk | Synthesis |
requirePayload | @scape/sdk | Definitions, state & actions |
resolveGizmoLighting | @scape/sdk | State-driven lighting |
resolveGizmoNavigation | @scape/sdk | World picking & navigation |
resolveGizmoPush | @scape/sdk | Directional push |
resolveGizmoReaction | @scape/sdk | Accepted-action reactions |
resolveGizmoSounds | @scape/sdk | Sound banks & previews |
resolveGizmoSprite | @scape/sdk | Layered sprites |
resolveGizmoStep | @scape/sdk | Step feedback |
resolveGizmoTravel | @scape/sdk | Linking & travel |
slerpQuaternion | @scape/sdk | Models & animation |
spriteAnimationFrame | @scape/sdk | Layered sprites |
travelExitOffsets | @scape/sdk | Linking & travel |
validateGizmoModel | @scape/sdk | Models & animation |
validateGizmoSteps | @scape/sdk | Step feedback |
validGizmoAmbience | @scape/sdk | Audio & ambience |
validGizmoConfiguration | @scape/sdk | Portable configuration |
validGizmoGlow | @scape/sdk | Glow |
validGizmoInteraction | @scape/sdk | Accepted-action reactions |
validGizmoLink | @scape/sdk | Linking & travel |
validGizmoPresentation | @scape/sdk | Models & animation |
validGizmoTextEditor | @scape/sdk | World text |
validGizmoTimeline | @scape/sdk | Models & animation |
validGizmoWorldDestination | @scape/sdk | World picking & navigation |
validGizmoWorldEditor | @scape/sdk | World picking & navigation |
validGizmoWorldId | @scape/sdk | World picking & navigation |
validGizmoWorldText | @scape/sdk | World text |
validObjectView | @scape/sdk | View validation |
GizmoFailure | @scape/sdk/runtime | Host & test runtime |
isObjectConfiguration | @scape/sdk/runtime | Host & test runtime |
isObjectEnvelope | @scape/sdk/runtime | Host & test runtime |
OBJECT_STATE_BYTE_LIMIT | @scape/sdk/runtime | Host & test runtime |
ObjectRegistry | @scape/sdk/runtime | Host & test runtime |
