Update runtime-host.test.ts with new control effects and entities

This commit is contained in:
2026-04-14 02:41:16 +02:00
parent c22a991a9a
commit 75c50e3899

View File

@@ -2,29 +2,52 @@ import { waitFor } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest"; import { afterEach, describe, expect, it, vi } from "vitest";
import { import {
createActiveSceneControlTargetRef,
createActorControlTargetRef, createActorControlTargetRef,
createLightControlTargetRef, createLightControlTargetRef,
createModelInstanceControlTargetRef,
createPlayModelAnimationControlEffect,
createPlaySoundControlEffect,
createSetActorPresenceControlEffect, createSetActorPresenceControlEffect,
type ControlEffect, type ControlEffect,
createSetAmbientLightColorControlEffect,
createSetAmbientLightIntensityControlEffect,
createSetLightEnabledControlEffect, createSetLightEnabledControlEffect,
createSetLightIntensityControlEffect createSetLightColorControlEffect,
createSetLightIntensityControlEffect,
createSetModelInstanceVisibleControlEffect,
createSetSoundVolumeControlEffect,
createSetSunLightColorControlEffect,
createSetSunLightIntensityControlEffect,
createSoundEmitterControlTargetRef,
createStopModelAnimationControlEffect,
createStopSoundControlEffect
} from "../../src/controls/control-surface"; } from "../../src/controls/control-surface";
import { createEmptySceneDocument } from "../../src/document/scene-document"; import { createEmptySceneDocument } from "../../src/document/scene-document";
import { import {
createNpcEntity, createNpcEntity,
createPointLightEntity createPointLightEntity,
createSoundEmitterEntity,
createTriggerVolumeEntity
} from "../../src/entities/entity-instances"; } from "../../src/entities/entity-instances";
import { import {
createControlInteractionLink, createControlInteractionLink,
type InteractionLink type InteractionLink
} from "../../src/interactions/interaction-links"; } from "../../src/interactions/interaction-links";
import { createProjectScheduleRoutine } from "../../src/scheduler/project-scheduler"; import { createProjectScheduleRoutine } from "../../src/scheduler/project-scheduler";
import {
createProjectAssetStorageKey,
type AudioAssetRecord,
type ModelAssetRecord
} from "../../src/assets/project-assets";
import { createModelInstance } from "../../src/assets/model-instances";
import { RapierCollisionWorld } from "../../src/runtime-three/rapier-collision-world"; import { RapierCollisionWorld } from "../../src/runtime-three/rapier-collision-world";
import { import {
RuntimeHost, RuntimeHost,
type RuntimeSceneLoadState type RuntimeSceneLoadState
} from "../../src/runtime-three/runtime-host"; } from "../../src/runtime-three/runtime-host";
import { buildRuntimeSceneFromDocument } from "../../src/runtime-three/runtime-scene-build"; import { buildRuntimeSceneFromDocument } from "../../src/runtime-three/runtime-scene-build";
import type { AnimationMixer } from "three";
function createDeferred<T>() { function createDeferred<T>() {
let resolve: ((value: T) => void) | null = null; let resolve: ((value: T) => void) | null = null;