跳转到内容

签名关联类型:WorldAuthoringNodeSnapshot – WorldCameraShotPhase

本页由当前 SDK 声明自动生成。

返回接口索引

WorldAuthoringNodeSnapshot · WorldAuthoringPrepareOutcome · WorldAuthoringReceipt · WorldAuthoringSourceSnapshot · WorldAuthoritySnapshot · WorldCameraCaptureMode · WorldCameraData · WorldCameraFailure · WorldCameraFailureCode · WorldCameraGestureDeps · WorldCameraHistoryEntry · WorldCameraHistoryListInput · WorldCameraHistoryListOutcome · WorldCameraHistorySnapshot · WorldCameraProjection · WorldCameraRestoreInput · WorldCameraRestoreOutcome · WorldCameraSavePort · WorldCameraSettings · WorldCameraSettingsPatch · WorldCameraSettingsSaveInput · WorldCameraSettingsSaveOutcome · WorldCameraShotKind · WorldCameraShotPhase

WorldAuthoringNodeSnapshot

One frozen node snapshot used by undo to restore exactly what was removed.

export interface WorldAuthoringNodeSnapshot {
nodeId: string;
node: unknown;
nodeData: unknown;
edges?: WorldAuthoringEdgeSnapshot[];
}

关联类型:WorldAuthoringEdgeSnapshot

成员说明:

  • node:Structural node row (position/width/height/parent/type only).
  • nodeData:Full nodeData value at the frozen source state.
  • edges:Edges incident to this node at the frozen source state. node.remove also removes incident edges, so undo must restore them explicitly.

WorldAuthoringPrepareOutcome

export type WorldAuthoringPrepareOutcome = {
ok: true;
snapshot: WorldPreparedAuthoritySnapshot;
} | WorldAuthoringFailure;

关联类型:WorldPreparedAuthoritySnapshot · WorldAuthoringFailure

WorldAuthoringReceipt

Immutable receipt written with its command. One per command record.

export interface WorldAuthoringReceipt {
version: typeof WORLD_AUTHORING_RECEIPT_VERSION;
canvasId: string;
operationId: string;
intent: SceneAreaPlan["intent"];
direction: "forward" | "undo" | "redo";
intentHash: string;
previousCommandId: string | null;
plan: SceneAreaPlan;
source: WorldAuthoringSourceSnapshot;
deletedNodes: WorldAuthoringNodeSnapshot[];
produced: {
areaScopeVersion: string | null;
targets: WorldObjectVersion[];
};
revision: number;
createdAt: string;
}

关联类型:SceneAreaPlan · WorldAuthoringSourceSnapshot · WorldAuthoringNodeSnapshot · WorldObjectVersion

成员说明:

  • intentHash:Stable semantic intent; reusing an operationId with another intent is rejected.
  • produced:Post-command versions; undo/redo require the current state to match.

WorldAuthoringSourceSnapshot

export interface WorldAuthoringSourceSnapshot {
area: WorldAuthoringNodeSnapshot;
members: Array<WorldAuthoringNodeSnapshot & {
identity: WorldObjectIdentity;
}>;
groups?: WorldAuthoringNodeSnapshot[];
}

关联类型:WorldAuthoringNodeSnapshot · WorldObjectIdentity

成员说明:

  • groups:2D groups whose membership was updated by deleting a member.

WorldAuthoritySnapshot

Exact gesture-start snapshot. members is ready to feed OC04 unchanged.

export interface WorldAuthoritySnapshot {
version: typeof WORLD_AUTHORING_VERSION;
canvasId: string;
revision: number;
scope: WorldScopeVersion;
areaNodeId: string;
area: SceneAreaPlanAreaSource;
bounds: GroundAabb;
writable: WorldObjectVersion[];
readOnly: WorldObjectVersion[];
members: SceneAreaPlanMemberSet;
objects: WorldObjectAuthorityEntry[];
}

关联类型:WorldScopeVersion · SceneAreaPlanAreaSource · GroundAabb · WorldObjectVersion · SceneAreaPlanMemberSet · WorldObjectAuthorityEntry

WorldCameraCaptureMode

Dynamic sampling semantics are specified by the later animation contract.

export type WorldCameraCaptureMode = {
kind: "static";
} | {
kind: "dynamic";
};

WorldCameraData

export interface WorldCameraData {
kind: "world-camera";
version: typeof SHARED_WORLD_VERSION;
cameraId: WorldId;
settingsVersion: WorldVersion;
position: WorldPoint;
rotation: WorldRotation;
projection: WorldCameraProjection;
captureMode: WorldCameraCaptureMode;
aspect: {
width: number;
height: number;
};
boundInstanceId: WorldId | null;
}

关联类型:WorldId · WorldVersion · WorldPoint · WorldRotation · WorldCameraProjection · WorldCameraCaptureMode

成员说明:

  • boundInstanceId:null means unbound; a missing bound target must never be treated as null.

WorldCameraFailure

export interface WorldCameraFailure {
ok: false;
code: WorldCameraFailureCode;
message: string;
conflicts?: WorldAuthoringConflict[];
}

关联类型:WorldCameraFailureCode · WorldAuthoringConflict

WorldCameraFailureCode

export type WorldCameraFailureCode = "invalid-data" | "unsupported-version" | "not-ready" | "not-found" | "version-conflict" | "operation-conflict" | "lease-conflict" | "stale-epoch" | "outside-scope" | "target-unavailable" | "cancelled" | "write-forbidden";

WorldCameraGestureDeps

export type WorldCameraGestureDeps = {
save?: WorldCameraSavePort["save"];
recordExternal?: (entry: {
id: string;
label: string;
revision?: number;
undo: () => Promise<{
ok: true;
} | {
ok: false;
reason: string;
}>;
redo: () => Promise<{
ok: true;
} | {
ok: false;
reason: string;
}>;
}) => {
ok: boolean;
reason?: string;
};
moveCard?: (nodeId: string, position: {
x: number;
y: number;
}, operationId: string) => Promise<{
ok: true;
} | {
ok: false;
reason: string;
}>;
operationId: () => string;
onError?: (message: string) => void;
};

关联类型:WorldCameraSavePort

成员说明:

  • save:页面的权威镜头保存端口(缺省取 ctx.canvasRemote 的 saveWorldCamera)。
  • recordExternal:页面撤销历史;缺省时只提交,不进入撤销时间线。
  • moveCard:同步移动镜头卡片(不新增撤销条目;由本手势的外部历史统一管理)。 缺省时只移动镜头、不动卡片(测试/最小宿主)。

WorldCameraHistoryEntry

Durable assistant-completion history entry.

export interface WorldCameraHistoryEntry {
completionKey: string;
canvasId: WorldId;
cameraId: WorldId;
runId: WorldId;
completionId: WorldId;
settingsVersion: WorldVersion;
createdAt: string;
snapshot: WorldCameraHistorySnapshot;
}

关联类型:WorldId · WorldVersion · WorldCameraHistorySnapshot

WorldCameraHistoryListInput

export interface WorldCameraHistoryListInput {
canvasId: WorldId;
cameraId: WorldId;
limit?: number;
}

关联类型:WorldId

WorldCameraHistoryListOutcome

export type WorldCameraHistoryListOutcome = {
ok: true;
canvasId: WorldId;
cameraId: WorldId;
entries: WorldCameraHistoryEntry[];
} | WorldCameraFailure;

关联类型:WorldId · WorldCameraHistoryEntry · WorldCameraFailure

WorldCameraHistorySnapshot

History persists only the completion intent and the camera settings. World, models, captures, playback, locks and local resources are deliberately absent.

export interface WorldCameraHistorySnapshot {
version: typeof WORLD_CAMERA_HISTORY_VERSION;
completion: WorldCompletion;
camera: WorldCameraData;
}

关联类型:WorldCompletion · WorldCameraData

WorldCameraProjection

export type WorldCameraProjection = {
kind: "isometric";
verticalSizeMeters: number;
nearMeters: number;
farMeters: number;
} | {
kind: "perspective";
verticalFovRadians: number;
nearMeters: number;
farMeters: number;
};

WorldCameraRestoreInput

Restore one assistant completion using the current world and current models.

export interface WorldCameraRestoreInput {
canvasId: WorldId;
cameraId: WorldId;
completionKey: string;
expectedSettingsVersion: WorldVersion;
contextId?: WorldId;
actorId?: string;
}

关联类型:WorldId · WorldVersion

成员说明:

  • expectedSettingsVersion:Canonical settings version observed at gesture start.

WorldCameraRestoreOutcome

export type WorldCameraRestoreOutcome = (Extract<WorldCameraSettingsSaveOutcome, {
ok: true;
}> & {
history: WorldCameraHistoryEntry;
}) | WorldCameraFailure;

关联类型:WorldCameraSettingsSaveOutcome · WorldCameraHistoryEntry · WorldCameraFailure

WorldCameraSavePort

export type WorldCameraSavePort = {
save(input: {
canvasId: string;
cameraId: string;
expectedSettingsVersion: string;
settings: ReturnType<typeof worldCameraSettingsOfPose>;
operationId: string;
}, signal?: AbortSignal): Promise<SaveOutcome>;
};

关联类型:SaveOutcome

WorldCameraSettings

User-editable camera settings; identity and version are assigned by the authority.

export interface WorldCameraSettings {
position: WorldPoint;
rotation: WorldRotation;
projection: WorldCameraProjection;
captureMode: WorldCameraCaptureMode;
aspect: {
width: number;
height: number;
};
boundInstanceId: WorldId | null;
}

关联类型:WorldPoint · WorldRotation · WorldCameraProjection · WorldCameraCaptureMode · WorldId

成员说明:

  • boundInstanceId:null is an explicit unbind. A missing bound target is never rewritten to null.

WorldCameraSettingsPatch

Partial camera settings for scoped edits: omitted fields keep their current canonical value. Nested objects (projection, captureMode, aspect) are replaced wholesale when present; boundInstanceId: null is an explicit unbind.

export type WorldCameraSettingsPatch = Partial<WorldCameraSettings>;

关联类型:WorldCameraSettings

成员说明:

  • boundInstanceId:null is an explicit unbind. A missing bound target is never rewritten to null.

WorldCameraSettingsSaveInput

export interface WorldCameraSettingsSaveInput {
canvasId: WorldId;
cameraId: WorldId;
expectedSettingsVersion: WorldVersion;
settings: WorldCameraSettingsPatch;
contextId?: WorldId;
actorId?: string;
operationId?: WorldId;
expectedPayloadHash?: string;
}

关联类型:WorldId · WorldVersion · WorldCameraSettingsPatch

成员说明:

  • expectedSettingsVersion:Canonical settings version observed at gesture start.
  • settings:Full settings or a patch; omitted fields keep the current canonical value.
  • contextId:Optional host-issued world tool context; required for assistant-scoped writes.
  • expectedPayloadHash:Optional frozen command payload hash. A caller that has already persisted a durable write intent passes the hash it derived for the exact camera patch, so an idempotent retry can only resolve the same command identity and never silently accept a different payload.

WorldCameraSettingsSaveOutcome

export type WorldCameraSettingsSaveOutcome = {
ok: true;
canvasId: WorldId;
cameraId: WorldId;
commandId: string;
revision: number;
duplicate: boolean;
camera: WorldCameraData;
settingsVersion: WorldVersion;
} | WorldCameraFailure;

关联类型:WorldId · WorldCameraData · WorldVersion · WorldCameraFailure

WorldCameraShotKind

export type WorldCameraShotKind = "static" | "dynamic";

WorldCameraShotPhase

卡片呈现状态;preview 永不可下载或提交。

export type WorldCameraShotPhase = "preview" | "ready" | "stale" | "failed";