feat: 增加轨迹
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { Timeline } from "./timeline";
|
||||
|
||||
export type ViewMode = "director" | "camera";
|
||||
export type RightPanelKind = "scene" | "character" | "prop" | "camera";
|
||||
export type RightPanelKind = "scene" | "character" | "prop" | "camera" | "trajectoryPoint";
|
||||
export type DirectorObjectKind = "character" | "scene" | "prop" | "camera" | "panorama";
|
||||
export const GEOMETRY_PRIMITIVE_OPTIONS = [
|
||||
{ type: "box", label: "立方体" },
|
||||
@@ -32,6 +32,16 @@ export interface DirectorTransform {
|
||||
scale: [number, number, number];
|
||||
}
|
||||
|
||||
/**
|
||||
* 变换的「重置」值:位置 / 旋转归零,缩放恢复为 1。
|
||||
* 角色卡片、模型卡片等属性面板标题后的重置按钮共用这一份,避免各写一套。
|
||||
*/
|
||||
export const DEFAULT_DIRECTOR_TRANSFORM: DirectorTransform = {
|
||||
position: [0, 0, 0],
|
||||
rotation: [0, 0, 0],
|
||||
scale: [1, 1, 1],
|
||||
};
|
||||
|
||||
export interface SceneSettings {
|
||||
scale: number;
|
||||
position: [number, number, number];
|
||||
@@ -79,6 +89,25 @@ export interface DirectorAssetRef {
|
||||
projectionMode?: PanoramaProjectionMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 运动轨迹点:角色在「场景」坐标系里的一个路点。
|
||||
*
|
||||
* 用户在画布上双击地面打点,新建时定位只取 x / z(y 固定为 0),所以默认轨迹是贴地平面的;
|
||||
* rotation 是该路点处角色的朝向,单位是度,顺序与 DirectorTransform 一致:
|
||||
* [俯仰角 pitch(X), 水平角 yaw(Y), 横滚角 roll(Z)]。
|
||||
*/
|
||||
export interface DirectorTrajectoryPoint {
|
||||
id: string;
|
||||
position: [number, number, number];
|
||||
rotation: [number, number, number];
|
||||
}
|
||||
|
||||
/** 当前选中的轨迹点:轨迹点存在角色身上,所以要同时记所属对象与点的 id。 */
|
||||
export interface DirectorTrajectoryPointRef {
|
||||
objectId: string;
|
||||
pointId: string;
|
||||
}
|
||||
|
||||
export interface DirectorObject {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -94,6 +123,8 @@ export interface DirectorObject {
|
||||
crowdLabel?: string;
|
||||
linkedCameraId?: string | null;
|
||||
characterRig?: CharacterRigState;
|
||||
/** 角色身上的运动轨迹点:按创建顺序连成路径,画布上以标记 + 连线呈现。 */
|
||||
trajectoryPoints?: DirectorTrajectoryPoint[];
|
||||
}
|
||||
|
||||
export interface DirectorCameraCapture {
|
||||
|
||||
Reference in New Issue
Block a user