Update runtime global state to include clock state and modify scene build to use project time settings
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
import { createDefaultProjectTimeSettings } from "../document/project-time-settings";
|
||||
|
||||
import {
|
||||
createRuntimeClockState,
|
||||
type RuntimeClockState
|
||||
} from "./runtime-project-time";
|
||||
|
||||
export interface RuntimeSceneTransitionRecord {
|
||||
fromSceneId: string;
|
||||
fromSceneName: string;
|
||||
@@ -12,13 +19,17 @@ export interface RuntimeGlobalState {
|
||||
activeMusicCueId: string | null;
|
||||
transitionCount: number;
|
||||
lastSceneTransition: RuntimeSceneTransitionRecord | null;
|
||||
clock: RuntimeClockState;
|
||||
}
|
||||
|
||||
export function createDefaultRuntimeGlobalState(): RuntimeGlobalState {
|
||||
export function createDefaultRuntimeGlobalState(
|
||||
timeSettings = createDefaultProjectTimeSettings()
|
||||
): RuntimeGlobalState {
|
||||
return {
|
||||
flags: {},
|
||||
activeMusicCueId: null,
|
||||
transitionCount: 0,
|
||||
lastSceneTransition: null
|
||||
lastSceneTransition: null,
|
||||
clock: createRuntimeClockState(timeSettings)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -51,9 +51,14 @@ export interface RuntimeBoxBrushInstance {
|
||||
rotationDegrees: Vec3;
|
||||
size: Vec3;
|
||||
geometry: BoxBrushGeometry;
|
||||
import {
|
||||
cloneProjectTimeSettings,
|
||||
type ProjectTimeSettings
|
||||
} from "../document/project-time-settings";
|
||||
faces: Record<BoxFaceId, RuntimeBrushFace>;
|
||||
volume: BoxBrushVolumeSettings;
|
||||
}
|
||||
time: ProjectTimeSettings;
|
||||
|
||||
export interface RuntimeFogVolume {
|
||||
brushId: string;
|
||||
|
||||
Reference in New Issue
Block a user