Update tests to include scheduler and presence features

This commit is contained in:
2026-04-14 02:05:37 +02:00
parent 08c63ceb98
commit 97e9b7fa0a
2 changed files with 13 additions and 0 deletions

View File

@@ -15,7 +15,9 @@ import {
} from "../../src/interactions/interaction-links"; } from "../../src/interactions/interaction-links";
import { createDefaultProjectTimeSettings } from "../../src/document/project-time-settings"; import { createDefaultProjectTimeSettings } from "../../src/document/project-time-settings";
import { createDefaultWorldSettings } from "../../src/document/world-settings"; import { createDefaultWorldSettings } from "../../src/document/world-settings";
import { createEmptyProjectScheduler } from "../../src/scheduler/project-scheduler";
import { RuntimeInteractionSystem } from "../../src/runtime-three/runtime-interaction-system"; import { RuntimeInteractionSystem } from "../../src/runtime-three/runtime-interaction-system";
import { createRuntimeProjectSchedulerState } from "../../src/runtime-three/runtime-project-scheduler";
import type { RuntimeSceneDefinition } from "../../src/runtime-three/runtime-scene-build"; import type { RuntimeSceneDefinition } from "../../src/runtime-three/runtime-scene-build";
function createRuntimeSceneFixture(): RuntimeSceneDefinition { function createRuntimeSceneFixture(): RuntimeSceneDefinition {
@@ -23,6 +25,9 @@ function createRuntimeSceneFixture(): RuntimeSceneDefinition {
return { return {
time: createDefaultProjectTimeSettings(), time: createDefaultProjectTimeSettings(),
scheduler: createRuntimeProjectSchedulerState({
document: createEmptyProjectScheduler()
}),
world: { world: {
...createDefaultWorldSettings(), ...createDefaultWorldSettings(),
background: { background: {

View File

@@ -1,10 +1,15 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import {
createActorControlTargetRef,
createSetActorPresenceControlEffect
} from "../../src/controls/control-surface";
import { import {
AUTHORED_OBJECT_STATE_SCENE_DOCUMENT_VERSION, AUTHORED_OBJECT_STATE_SCENE_DOCUMENT_VERSION,
DEFAULT_PROJECT_NAME, DEFAULT_PROJECT_NAME,
DEFAULT_SCENE_EDITOR_SNAP_STEP, DEFAULT_SCENE_EDITOR_SNAP_STEP,
NPC_COLLIDER_SCENE_DOCUMENT_VERSION, NPC_COLLIDER_SCENE_DOCUMENT_VERSION,
NPC_PRESENCE_SCENE_DOCUMENT_VERSION,
PLAYER_START_GAMEPAD_CAMERA_LOOK_SCENE_DOCUMENT_VERSION, PLAYER_START_GAMEPAD_CAMERA_LOOK_SCENE_DOCUMENT_VERSION,
PROJECT_TIME_DAY_NIGHT_PROFILE_SCENE_DOCUMENT_VERSION, PROJECT_TIME_DAY_NIGHT_PROFILE_SCENE_DOCUMENT_VERSION,
RUNNER_LOADING_SCREEN_SCENE_DOCUMENT_VERSION, RUNNER_LOADING_SCREEN_SCENE_DOCUMENT_VERSION,
@@ -19,9 +24,12 @@ import {
createDefaultWorldTimePhaseProfile createDefaultWorldTimePhaseProfile
} from "../../src/document/world-settings"; } from "../../src/document/world-settings";
import { import {
createNpcEntity,
createNpcTimeWindowPresence,
createSceneEntryEntity, createSceneEntryEntity,
createSceneExitEntity createSceneExitEntity
} from "../../src/entities/entity-instances"; } from "../../src/entities/entity-instances";
import { createProjectScheduleRoutine } from "../../src/scheduler/project-scheduler";
import { import {
parseProjectDocumentJson, parseProjectDocumentJson,
serializeProjectDocument serializeProjectDocument