Skip to content
EN

Runtime API ​

Scene graph, nodes, components, assets, input, signals and camera APIs used by games and editor previews.

Interfaces ​

InterfaceDescription
TransformProperties-
SpriteProperties-
VectorProperties-
TextProperties-
ContainerProperties-
Locator2DProperties-
Camera2DProperties-
HitArea2DProperties-
PlayAudioProperties-
ComponentPropertyPatch-
ComponentCatalogSlotRender slot declared by catalog.render.slots.
ComponentCatalogComponentEngine component definition stored in the catalog.
ComponentCatalogComponent/render catalog passed to loadSceneInstance.
ResolvedComponentPatchNormalized property patch handed to a component renderer's apply.
ComponentCoreRead-only component projection shared by editor snapshots (docs/177 §6).
NodePublic SDK node facade handed to module handlers/renderers (docs/177 §3.2).
ComponentHandlePublic SDK component handle handed to module handlers/renderers.
SceneMinimal public SDK scene facade (see @suity/runtime/sdk for the full type).
ComponentContextUnified component context handed to module handlers (docs/177 §4.1).
EditorNodeSnapshotRead-only node projection used by editor snapshots (docs/177 §6).
EditorComponentSnapshotRead-only component snapshot used by editor node snapshots.
EditorAssetInfoAsset descriptor returned by the editor asset facade.
EditorAssetPickOptions-
EditorAssetApiEditor asset facade: runtime resolve/load plus workspace operations.
EditorTransactionHandle-
EditorTransactionApiEditor write gateway; document writes must go through this API.
EditorUndoApi-
EditorPreviewSessionOptions-
EditorPreviewApi-
EditorUiHost-
EditorContextUnified editor extension context (docs/177 §6). node / component / scene use the same SDK types as runtime; tx / undo / preview / ui and selection are editor-only extensions.
EditorNodeViewEditor-side view handed to module renderers.
EditorRenderServicesAdapter-owned helpers exposed to editor renderers.
EditorRenderContextEditor module renderer context (docs/177 S5).
EditorRendererEditor module renderer implementation.
ModuleComponentHandlerPublic-SDK module handler; node / component are never runtime classes.
ComponentHandlerContextContext handed to legacy (pre-S4) runtime component handlers.
ComponentHandlerLegacy lifecycle handler still accepted by SceneLoadContext.handlers.
RendererServicesEngine-provided renderer services (docs/177 §7), decoupled from node handles.
ModuleRenderContextPer-render-owner context handed to a registered renderer.
ComponentRendererRenderer implementation for one component type.
EngineSystem-
ComponentApiContextContext passed to a module component API factory (docs/125 S2 / 177 S7).
EngineModuleA module runtime entry point activated by loadSceneInstance.
EngineModuleHost-
ModuleHostOptions-
ModuleRegistry-
CustomPropertiesPropertiesStored shape of the suity.customProperties component properties.
ComponentPropertyTypesComponent type -> strongly typed property fields.
SvgVectorDisplayOptionsInputs for createVectorDisplay. Most app code should use suity.vector nodes instead of calling this directly.
SvgVectorDisplayResultResult of createVectorDisplay.
SuitySceneComponentComponent DTO as stored in scene/prefab documents.
SuitySceneNodeNode DTO as stored in scene/prefab documents.
SuitySceneDocumentScene or Prefab document (same core format, different kind).
ResolvedAssetResolved asset reference returned by the SuityAssets SDK.
AssetResolverAsset resolver abstraction used by runtime loading and Prefab expansion.
InputActionDef-
KeyBinding-
InputStateScene input state (docs/109 §5). Controllers read actions, never key codes.
SceneLoadContextOptions for loadSceneInstance.
NodeCullAreaNode-local culling rectangle in the node view's own coordinates (docs/161 §3.1). The container's world transform applies translation, rotation and scale; child visuals are culled with the node as one AABB.
InstantiatePrefabOptionsOptions for SceneInstance.instantiatePrefab.
RuntimeComponentInputComponent input accepted by SceneInstance.addNode.
AddNodeOptionsOptions for SceneInstance.addNode.
MoveNodeOptionsOptions for reparenting/reordering runtime nodes.
TagsQuery-
NodeQuery-
RuntimeNodeSnapshotOne node in a runtime snapshot.
RuntimeSceneSnapshotRead-only runtime-tree snapshot; never writes back to the scene document.
PrefabInstanceInfoPrefab instance metadata exposed on a scene node handle.
PixiNodeViewPer-node Pixi view.
SceneComponentHandleApp-facing component handle with its owning node.
CustomPropertySchemasProject/engine schema augmentation point for custom properties.
CustomPropertiesComponentHandlesuity.customProperties handle.
NodeSignalOne dispatched node signal passed to signals.on / signals.onAny.
SignalWatchOptionsOptions accepted by signals.watch*.
SetResultResult of signals.set(...).
StateDescriptorType metadata returned by signals.describe(...) (docs/130).
SignalSnapshotOrdered provider entries plus a flat first-registration-wins view.
SignalProviderState provider contract accepted by NodeSignals.registerSignalProvider.
SignalFieldOptionsFull per-field options for NodeSignals.provideSignal(signalName, fields). Provide get for a derived value, set for writable state, or value for a writable cell initialized to value. Omit both accessors and set writable: false for a read-only cell.
NodeSignalsNode-local state-provider facade exposed to scripts/apps (docs/130 S5). registerSignalProvider/provideSignal let scripts publish their own state; the script handler scopes and disposes registrations automatically for a script's node.
ScriptClassLikeStructural script class accepted by SceneNodeHandle.addScript. A ScriptComponent subclass satisfies it through name and the optional static runtimeKey / displayName.
SceneNodeHandle-
CustomPropertyEntryOne entry in suity.customProperties.values.
CustomPropertyReferenceAcceptsConstraints that narrow which node/component/asset a reference may target.
CustomPropertiesStored shape of the suity.customProperties component properties.
Locator2DStored shape of the suity.locator2d component properties.
HitArea2DStored shape of the suity.hitArea2d component properties.
HitAreaLocalRectLocal-space rectangle read from suity.hitArea2d.
HitAreaWorldRectWorld-space hit-area rectangle, including rotation/scale from the node view.
AnimationEventPayloadPayload dispatched when playback crosses a sprite animation event frame.
SceneIssueStructured runtime issue. Also replayed through assetMissing/error.
CameraViewRuntime view of the scene main camera, in scene-root coordinates.
SceneInstanceLoaded scene instance.
SceneLoaderLow-level loader that builds a Pixi display tree.
ScriptModuleLoadInputInjected ESM loader used by unit tests and non-browser hosts.
ScriptHandlerOptions-

Type Aliases ​

Type AliasDescription
ComponentPropertyPathPath relative to a component's properties; "asset" addresses the asset field.
EditorSceneOp-
EditorRendererFactory-
ComponentRendererFactory-
RuntimeAssetLoader-
ComponentApiFactoryBuilds the public runtime methods attached to one component handle.
PropsFor-
SvgPartsHiddenNamed SVG parts to hide.
InputActionType-
TypedComponentHandleComponent handle plus direct field accessors generated from the catalog.
CustomPropertySchemaDefault-
ComponentHandleFor-
SignalValueJSON-safe value accepted by node state providers (docs/130).
SignalFieldType-
SignalFieldSpecOne field in provideSignal(...): - a JSON value → writable cell initialized to it (type inferred); - () => value → read-only getter (type sampled once); - options object → explicit control.
SignalFieldsMap of field name → spec accepted by provideSignal(...).
CustomPropertyTypeValue types supported by suity.customProperties.
CustomPropertyReferenceStored value for type: "reference".
LocatorShapeLocator marker shape.
SceneEventScene events.
SceneIssueSeverity-
ScriptModuleLoader-

Variables ​

VariableDescription
ENGINE_IDEngine id used by engine.json, scene documents and the asset manifest.
ENGINE_PROFILEEngine profile used by scene documents (engineProfile).
ENGINE_VERSIONSemantic engine version, also exposed in engine.json and the manifest.
TRANSFORM_TYPETransform component type. Every spatial node should have exactly one.
SPRITE_TYPETexture-bound sprite component type.
VECTOR_TYPESVG vector component type (vector Graphics + raster fallback).
TEXT_TYPEText box component type (suity.text).
CONTAINER_TYPEContainer/group component type (alpha, zIndex).
CUSTOM_PROPERTIES_TYPEUser-defined typed values and references component type.
LOCATOR2D_TYPEPoint/rectangle/circle locator component type (editor-only preview).
HIT_AREA2D_TYPELocal-space rectangle hit-area component type (data only).
CAMERA2D_TYPEOrthographic 2D camera component type.
PLAY_AUDIO_TYPEAudio playback component type routed through the project mixer.
BUTTON_TYPEButton interaction component type paired with a render component.
IMAGE_TYPESized image component type with explicit width/height and a fit mode.
TRANSFORM_COMPONENTMinimal transform descriptor shared by runtime and editor.
COMPONENTSFull Pixi component catalog, generated from src/components.js.
PIXI_CATALOGEffective catalog used when no catalog is supplied.
MODULE_ABI_VERSIONModule ABI version implemented by this runtime.
PIXI_BUILTIN_MODULEBuilt-in module contributing sprite/vector renderers.
assetsAsset helpers backed by the global SuityAssets SDK (suity-assets.js).
SCRIPT_COMPONENT_TYPECore scene component type that mounts a script asset.
SIGNAL_REFRESH_KEYGlobal reserved event key ("$refresh", docs/176). Not a signal name and not a provider field: dispatched on a signal to say its source data is updated; watch* re-reads the provider field instead of using the payload value.

Functions ​

FunctionDescription
createModuleRegistry-
createModuleHost-
createVectorDisplayRenders SVG text into a Pixi container (vector + per-element raster fallback).
readCustomPropertiesReturns a flattened { name: value } map for the nearest suity.customProperties component. type, accepts and other entry metadata are intentionally omitted; use handle.component(CUSTOM_PROPERTIES_TYPE) for the raw structure or the reference helpers when they become available.
readCustomReferenceReads one structured reference from the node's custom-property component.
resolveCustomReferenceResolves a node/component reference inside the owner's document scope.
resolveCustomAssetResolves an asset reference using the owner's document aliases. Returns null for non-asset references or unresolved assets.
getLocatorWorldPointReturns the locator's world position (the node origin transformed by the node's current view), or null when the node has no locator.
hitTestNodeTests a global point against the node's local-space suity.hitArea2d rectangle. Returns false when the node has no hit area or its size is non-positive.
getHitAreaLocalRectReads the node's suity.hitArea2d rectangle in local space. x / y are the rectangle center offsets from the node origin. Returns null when the node has no hit area or its size is non-positive.
getHitAreaWorldRectReads the node's suity.hitArea2d rectangle in world space, including the node view's current translation, rotation and scale. Corners are ordered top-left, top-right, bottom-right, bottom-left. Returns null when the node has no hit area or its size is non-positive.
createSceneLoaderCreates a low-level scene loader.
loadSceneInstanceLoads a scene and returns a queryable instance.
createScriptHandlerLoads a built script manifest/bundle and returns a ready-to-inject suity.script component handler (docs/140 S3).

Suity 开发者文档 · API 由 TypeDoc 从声明文件生成