签名关联类型:SceneAreaPlanRequestBase – SelectorProps
本页由当前 SDK 声明自动生成。
SceneAreaPlanRequestBase · SceneAreaPlanSource · SceneAreaPoint · SceneV2AnimationOp · SceneV2BoxOp · SceneV2CapsuleOp · SceneV2CylinderOp · SceneV2GroupOp · SceneV2MaterialAlphaMode · SceneV2MaterialOp · SceneV2MeshOp · SceneV2Op · SceneV2Pose · SceneV2SegmentOp · SceneV2ShapeBase · SceneV2ShapeOp · SceneV2SolidOp · SceneV2SphereOp · ScreenRect · SelectionActionActivation · SelectionActionContext · SelectionActionContribution · SelectionSnapshot · SelectorProps
SceneAreaPlanRequestBase
interface SceneAreaPlanRequestBase { contractVersion: typeof SCENE_AREA_PLAN_CONTRACT_VERSION; canvasId: WorldId; operationId: WorldId; area: SceneAreaPlanAreaSource; members: SceneAreaPlanMemberSet;}关联类型:WorldId · SceneAreaPlanAreaSource · SceneAreaPlanMemberSet
成员说明:
operationId:Idempotent intent identity; the same id with another intent is a conflict.
SceneAreaPlanSource
export interface SceneAreaPlanSource { area: SceneAreaPlanAreaSource; members: SceneAreaPlanMemberSet;}关联类型:SceneAreaPlanAreaSource · SceneAreaPlanMemberSet
SceneAreaPoint
export type SceneAreaPoint = { x: number; y: number;};SceneV2AnimationOp
export type SceneV2AnimationOp = { t: "oscillate" | "move" | "rotate"; id: string; axis: "x" | "y" | "z"; mode?: "position" | "rotation" | "scale"; amplitude?: number; speed?: number; phase?: number; range?: [ number, number ];};SceneV2BoxOp
export type SceneV2BoxOp = SceneV2ShapeBase & { t: "box"; size: Vec3;};关联类型:SceneV2ShapeBase · Vec3
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2CapsuleOp
export type SceneV2CapsuleOp = SceneV2ShapeBase & { t: "capsule"; radius: number; height: number;};关联类型:SceneV2ShapeBase
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2CylinderOp
export type SceneV2CylinderOp = SceneV2ShapeBase & { t: "cylinder"; radius: number; height: number;};关联类型:SceneV2ShapeBase
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2GroupOp
export type SceneV2GroupOp = SceneV2ShapeBase & { t: "group"; pose?: SceneV2Pose;};关联类型:SceneV2ShapeBase · SceneV2Pose
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2MaterialAlphaMode
export type SceneV2MaterialAlphaMode = "opaque" | "blend";SceneV2MaterialOp
受控 PBR material 声明(无 transform)。
export type SceneV2MaterialOp = { t: "material"; id: string; baseColor: string; roughness: number; metallic: number; emissive: string; emissiveStrength: number; alphaMode: SceneV2MaterialAlphaMode; doubleSided: boolean; unlit?: boolean; opacity?: number; baseColorTexture?: string;};成员说明:
unlit:不受光照,呈平面色。 可选:缺失即受光照,保持旧场景内容身份与材质缓存键不变。opacity:blend 模式下的静态透明度(0..1,缺省 0.6);其它模式出现即拒绝。 可选:缺失时按 [SCENE_V2_DEFAULT_BLEND_OPACITY] 呈现,且不写入规范 op。baseColorTexture:内嵌纹理(GLB 文件模型)的稳定纹理 id 。 纹理本身不进入 Scene IR / 规范 nodeData:由前端从原始 GLB 解码后经独立纹理通道上传, Rust 侧按 id 解析。缺失时保持纯色(旧场景内容身份逐字节不变)。
SceneV2MeshOp
export type SceneV2MeshOp = SceneV2ShapeBase & { t: "mesh"; vertices: Vec3[]; faces: number[][]; skin?: { jointIds: string[]; inverseBindMatrices: number[][]; indices: number[][]; weights: number[][]; }; normals?: Vec3[]; uvs?: [ number, number ][]; colors?: [ number, number, number, number ][];};关联类型:SceneV2ShapeBase · Vec3
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。skin:可选顶点属性。 长度必须与vertices一致;缺失时由运行时光滑法线回退(旧脚本场景语义不变)。
SceneV2Op
export type SceneV2Op = SceneV2ShapeOp | SceneV2MaterialOp | SceneV2AnimationOp;关联类型:SceneV2ShapeOp · SceneV2MaterialOp · SceneV2AnimationOp
SceneV2Pose
可选静态姿势。
与 group 的结构/绑定 TRS 分开保存:rotation 是绑定旋转之后的旋转增量(角度制、局部
Y-X-Z),position 是相对绑定位置的父空间平移偏移(模型米制)。至少一个通道;规范化后
等价零通道与空 pose 不保留,因此无姿势旧内容逐字节不漂移。
export type SceneV2Pose = { rotation?: Vec3; position?: Vec3;};关联类型:Vec3
SceneV2SegmentOp
export type SceneV2SegmentOp = SceneV2ShapeBase & { t: "segment"; from: Vec3; to: Vec3; width: number; depth: number; shape: "box" | "capsule"; overlap: number;};关联类型:SceneV2ShapeBase · Vec3
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2ShapeBase
export type SceneV2ShapeBase = { id: string; parent: string | null; position: Vec3; rotation: Vec3; scale: Vec3; material: string | null; color: string | null;};关联类型:Vec3
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2ShapeOp
export type SceneV2ShapeOp = SceneV2GroupOp | SceneV2SolidOp;关联类型:SceneV2GroupOp · SceneV2SolidOp
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2SolidOp
可承载材质的实体(group 无几何)。
export type SceneV2SolidOp = SceneV2BoxOp | SceneV2CylinderOp | SceneV2SphereOp | SceneV2CapsuleOp | SceneV2MeshOp | SceneV2SegmentOp;关联类型:SceneV2BoxOp · SceneV2CylinderOp · SceneV2SphereOp · SceneV2CapsuleOp · SceneV2MeshOp · SceneV2SegmentOp
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
SceneV2SphereOp
export type SceneV2SphereOp = SceneV2ShapeBase & { t: "sphere"; radius: number;};关联类型:SceneV2ShapeBase
成员说明:
material:引用的 material ID;与color互斥。color:简单材质简写(默认非金属高粗糙);与material互斥。
ScreenRect
单节点屏幕矩形(CSS px,含 canvas 外框偏移) 。
供宿主把横条/设置弹窗锚定到节点之上;由唯一 runtime 投影 nodeScreenRect 产出。
export type ScreenRect = { left: number; top: number; width: number; height: number;};SelectionActionActivation
多选横条命中上下文(menu 为独立设置箭头,当前无贡献使用)。
export type SelectionActionActivation = SelectionActionContext & { menu: boolean;};成员说明:
selectedNodeIds:当前选区(稳定 canonical nodeId;至少 2 个)。writable:当前会话是否可写。
SelectionActionContext
多选动作横条的选区上下文 。
横条锚定选区轴对齐包围盒顶部,没有单一节点身份;因此上下文只携带稳定选区与写权限。
export type SelectionActionContext = { selectedNodeIds: readonly string[]; writable: boolean;};成员说明:
selectedNodeIds:当前选区(稳定 canonical nodeId;至少 2 个)。writable:当前会话是否可写。
SelectionActionContribution
多选动作横条贡献。
与 canvas.node-action 同构,但目标从「单个节点」换成「当前选区」:宿主在选中 ≥2 个节点时
按 order 收集 describe,由 Bevy 在画布内绘制、Rust 命中;命中按 id 回传派发。宿主 MUST
NOT import 具体扩展实现或按业务 ID 分支。
export type SelectionActionContribution = { id: string; owner: string; order: number; available?: (context: SelectionActionContext) => boolean; describe: (context: SelectionActionContext) => NodeActionDescriptor | null; activate: (activation: SelectionActionActivation) => void;};关联类型:SelectionActionContext · NodeActionDescriptor · SelectionActionActivation
成员说明:
id:贡献稳定 ID(= 命中回传的actionId);同一 slot 内重复会启动失败。owner:拥有者(诊断用)。order:从左到右顺序。available:贡献当前选区是否可用;false 时不呈现。describe:纯数据动作描述;返回 null 表示当前不呈现。activate:命中派发;menu为真表示命中独立设置箭头。
SelectionSnapshot
瞬时选择 / 编辑焦点 / 快捷键范围的宿主侧存储 。
运行时上报完整选择集合与编辑焦点;这里保存页面级瞬时状态。节点业务数据不在这里,
一律在渲染时从规范 Canvas Store 解析。放在同源模块单例里而不是 React state,
是因为桥接回调来自 bootCanvas(非 React 边界),需要一个 React 可订阅的落点。
选择是瞬时的:不写 Y.Doc、不推进 revision、刷新后从空选择开始。
export type SelectionSnapshot = { nodeIds: string[]; primaryNodeId: string | null; editingFocus: boolean; keyboardActive: boolean;};成员说明:
nodeIds:已按规范画布过滤的选择集合(顺序即运行时的选择顺序)。primaryNodeId:主节点:单节点执行面板使用。editingFocus:运行时文本编辑面是否获得焦点;true 时暂停画布快捷键。keyboardActive:画布是否获得键盘范围(宿主 DOM 焦点 + 编辑焦点综合判定)。
SelectorProps
type SelectorProps = { model: string; options: readonly { value: string; label: string; detail?: string; provider?: string; sourceIdentity?: string; modelId?: string; disabled?: boolean; }[]; open: boolean; onOpenChange(open: boolean): void; onChange(value: string): void; label?: string; placeholder?: string; disabled?: boolean; onManage?(): void; keepOpenOnModelSelect?: boolean; variant?: { value: string; options: readonly { value: string; label: string; disabled?: boolean; }[]; onChange(value: string): void; };};成员说明:
keepOpenOnModelSelect:Kept as a source-compatible property; selections now always close the model directory.