签名关联类型:ResourceRef – SceneAreaPlanRequest
本页由当前 SDK 声明自动生成。
ResourceRef · RouteProps · RunLifecycleOwner · RunStateProjectionInput · RuntimeIssue · SaveOutcome · SceneAreaDragMode · SceneAreaEdge · SceneAreaGestureBeginInput · SceneAreaGestureIntent · SceneAreaGesturePort · SceneAreaGestureResult · SceneAreaGestureStart · SceneAreaPlan · SceneAreaPlanAreaSource · SceneAreaPlanCameraIdentity · SceneAreaPlanCameraMember · SceneAreaPlanCommand · SceneAreaPlanInstanceIdentity · SceneAreaPlanInstanceMember · SceneAreaPlanIntent · SceneAreaPlanInverseCommand · SceneAreaPlanMemberSet · SceneAreaPlanRequest
ResourceRef
资源(画布)身份:本期只支持 canvas。
export type ResourceRef = { kind: "canvas"; id: string;};RouteProps
export type RouteProps = { path: string; navigate: (to: string) => void;};RunLifecycleOwner
生命周期 owner。
server:经 Task Service / Canvas Service 执行(含 3D/镜头服务端生成);local:浏览器本地编码/截图/导出(不强行走 Task Service)。
export type RunLifecycleOwner = "server" | "local";RunStateProjectionInput
运行状态投影输入 。
有界:summaries 每节点一条;records 是有界操作记录集合;currentOperationByNode 把
“当前生效版本”对应的操作身份映射到圆点装饰(由 node-history 插件提供,缺失时不装饰)。
export type RunStateProjectionInput = NodeRunStateProjection;成员说明:
unseenByNode:nodeId → 尚未查看的历史 entryId;只作为圆点角标提示,不改变选中/当前语义。
RuntimeIssue
Runtime-owned, bounded diagnostics. Reporting must never interrupt rendering.
export type RuntimeIssue = { key: string; scope: "frame" | "texture" | "runtime"; operation: string; nodeId?: string; message: string; detail: string; recoverable: boolean; retainedPreview?: boolean;};SaveOutcome
提交结果的可用形状;不在本模块决定权威服务实现。
type SaveOutcome = { ok: true; camera: WorldCameraData; settingsVersion: string; revision?: number;} | { ok: false; message?: string; code?: string;};关联类型:WorldCameraData
SceneAreaDragMode
export type SceneAreaDragMode = "auto" | "move" | "resize";SceneAreaEdge
手势边缘:-1 = min 侧,1 = max 侧,0 = 该轴不动。
export type SceneAreaEdge = { u: -1 | 0 | 1; v: -1 | 0 | 1;};SceneAreaGestureBeginInput
export type SceneAreaGestureBeginInput = { point: SceneAreaPoint; areaNodeId?: string | null; card: boolean; altKey?: boolean; moveMembers?: boolean; preferredAreaNodeId?: string | null; mode?: SceneAreaDragMode;};关联类型:SceneAreaPoint · SceneAreaDragMode
成员说明:
areaNodeId:卡片命中时传入;地面空白由运行时按地面坐标寻找。card:指针是否落在区域卡片本体。moveMembers:Move the fixed scene members together with the area (defaults to true).preferredAreaNodeId:优先使用的已选区域(重叠时稳定选择)。
SceneAreaGestureIntent
export type SceneAreaGestureIntent = "move" | "resize";SceneAreaGesturePort
export type SceneAreaGesturePort = { begin(input: SceneAreaGestureBeginInput): SceneAreaGestureStart | null; update(point: SceneAreaPoint, options?: { moveMembers?: boolean; }): boolean; setMoveMembers(moveMembers: boolean): boolean; end(): Promise<SceneAreaGestureResult>; cancel(): void; active(): boolean; ending(): boolean; mode(): SceneAreaDragMode; deleteArea(areaNodeId: string, withContents: boolean): Promise<SceneAreaGestureResult>; undo(): Promise<SceneAreaGestureResult>; redo(): Promise<SceneAreaGestureResult>;};关联类型:SceneAreaGestureBeginInput · SceneAreaGestureStart · SceneAreaPoint · SceneAreaGestureResult · SceneAreaDragMode
成员说明:
ending:A release/commit is in flight; a new gesture must not overwrite it.
SceneAreaGestureResult
export type SceneAreaGestureResult = { ok: true; operationId: string; intent: SceneAreaPlanIntent; receipt: import("@woohaa3/contracts").WorldAuthoringReceipt; warning?: string;} | { ok: true; noop: true;} | { ok: false; code: string; message: string; conflicts?: WorldAuthoringConflict[];};关联类型:SceneAreaPlanIntent · WorldAuthoringReceipt · WorldAuthoringConflict
SceneAreaGestureStart
export type SceneAreaGestureStart = { areaNodeId: string; intent: SceneAreaGestureIntent; edge?: SceneAreaEdge;};关联类型:SceneAreaGestureIntent · SceneAreaEdge
SceneAreaPlan
One atomic operation: every forward command commits together or none does.
source is the exact gesture-time snapshot; inverse is its undo plan.
export interface SceneAreaPlan { contractVersion: typeof SCENE_AREA_PLAN_CONTRACT_VERSION; canvasId: WorldId; operationId: WorldId; intent: SceneAreaPlanIntent; source: SceneAreaPlanSource; commands: SceneAreaPlanCommand[]; inverse: SceneAreaPlanInverseCommand[];}关联类型:WorldId · SceneAreaPlanIntent · SceneAreaPlanSource · SceneAreaPlanCommand · SceneAreaPlanInverseCommand
SceneAreaPlanAreaSource
Source area snapshot. scopeVersion changes when bounds or area identity change.
export interface SceneAreaPlanAreaSource { areaId: WorldId; scopeVersion: WorldVersion; bounds: GroundAabb;}关联类型:WorldId · WorldVersion · GroundAabb
SceneAreaPlanCameraIdentity
export type SceneAreaPlanCameraIdentity = Extract<WorldObjectIdentity, { kind: "camera";}>;关联类型:WorldObjectIdentity
SceneAreaPlanCameraMember
One camera whose ground anchor was inside the area at gesture start.
version must equal camera.settingsVersion; the card position is not used.
export interface SceneAreaPlanCameraMember { identity: SceneAreaPlanCameraIdentity; version: WorldVersion; camera: WorldCameraData;}关联类型:SceneAreaPlanCameraIdentity · WorldVersion · WorldCameraData
SceneAreaPlanCommand
Forward commands carry the source version they expect, so the authority can reject the whole batch before writing when a member or area changed. These expected versions belong to the first committed attempt; an idempotent retry returns the original plan, while redo binds the frozen values through the authority receipt.
export type SceneAreaPlanCommand = { kind: "set-scene-area-bounds"; areaId: WorldId; expectedScopeVersion: WorldVersion; bounds: GroundAabb;} | { kind: "set-instance-transform"; target: SceneAreaPlanInstanceIdentity; expectedVersion: WorldVersion; transform: WorldTransform;} | { kind: "set-world-camera-pose"; target: SceneAreaPlanCameraIdentity; expectedVersion: WorldVersion; position: WorldPoint; rotation: WorldRotation;} | { kind: "delete-scene-area"; areaId: WorldId; expectedScopeVersion: WorldVersion;} | { kind: "delete-instance"; target: SceneAreaPlanInstanceIdentity; expectedVersion: WorldVersion;} | { kind: "delete-world-camera"; target: SceneAreaPlanCameraIdentity; expectedVersion: WorldVersion;};关联类型:WorldId · WorldVersion · GroundAabb · SceneAreaPlanInstanceIdentity · WorldTransform · SceneAreaPlanCameraIdentity · WorldPoint · WorldRotation
SceneAreaPlanInstanceIdentity
export type SceneAreaPlanInstanceIdentity = Extract<WorldObjectIdentity, { kind: "instance";}>;关联类型:WorldObjectIdentity
SceneAreaPlanInstanceMember
One complete instance fixed at gesture start, with the source object version.
export interface SceneAreaPlanInstanceMember { identity: SceneAreaPlanInstanceIdentity; version: WorldVersion; transform: WorldTransform;}关联类型:SceneAreaPlanInstanceIdentity · WorldVersion · WorldTransform
成员说明:
version:Source object version; the authority rejects a write when it no longer matches.
SceneAreaPlanIntent
export type SceneAreaPlanIntent = "move" | "rotate" | "resize" | "delete-area" | "delete-area-with-contents";SceneAreaPlanInverseCommand
Inverse commands replay the frozen pre-gesture values exactly, including the
frozen source area scopeVersion. The authority receipt binds the inverse to the
exact post-forward state it produced and rejects a stale receipt before writing,
so undo restores the frozen snapshot identity instead of minting a fresh version
and never recomputes membership. A normal forward bounds edit still replaces the
scope version as declared by SceneAreaData in shared-world.ts.
Inverse member commands carry the source object versions for the same reason: they describe the frozen snapshot, not a new forward write. The receipt, not the planner, supplies the version that the forward commit actually produced.
export type SceneAreaPlanInverseCommand = { kind: "restore-scene-area-bounds"; areaId: WorldId; scopeVersion: WorldVersion; bounds: GroundAabb;} | { kind: "restore-scene-area"; areaId: WorldId; scopeVersion: WorldVersion; bounds: GroundAabb;} | { kind: "restore-instance"; target: SceneAreaPlanInstanceIdentity; version: WorldVersion; transform: WorldTransform;} | { kind: "restore-world-camera"; target: SceneAreaPlanCameraIdentity; version: WorldVersion; camera: WorldCameraData;};关联类型:WorldId · WorldVersion · GroundAabb · SceneAreaPlanInstanceIdentity · WorldTransform · SceneAreaPlanCameraIdentity · WorldCameraData
SceneAreaPlanMemberSet
Complete fixed writable set. Read-only references and partial containment are intentionally absent: they cannot be promoted by planning.
export interface SceneAreaPlanMemberSet { instances: SceneAreaPlanInstanceMember[]; cameras: SceneAreaPlanCameraMember[];}关联类型:SceneAreaPlanInstanceMember · SceneAreaPlanCameraMember
SceneAreaPlanRequest
Supported intents. rotate turns the fixed member set clockwise by 90 degrees; move preserves height and relative pose; resize
is the edge drag / explicit range mode and changes bounds only; the two delete
intents differ only in whether the fixed member set is deleted too.
export type SceneAreaPlanRequest = (SceneAreaPlanRequestBase & { intent: "move"; delta: GroundPoint;}) | (SceneAreaPlanRequestBase & { intent: "rotate";}) | (SceneAreaPlanRequestBase & { intent: "resize"; bounds: GroundAabb;}) | (SceneAreaPlanRequestBase & { intent: "delete-area";}) | (SceneAreaPlanRequestBase & { intent: "delete-area-with-contents";});关联类型:SceneAreaPlanRequestBase · GroundPoint · GroundAabb
成员说明:
operationId:Idempotent intent identity; the same id with another intent is a conflict.