auto-git:
[change] tests/domain/scene-document-validation.test.ts
This commit is contained in:
@@ -3,7 +3,9 @@ import { describe, expect, it } from "vitest";
|
|||||||
import { createBoxBrush } from "../../src/document/brushes";
|
import { createBoxBrush } from "../../src/document/brushes";
|
||||||
import {
|
import {
|
||||||
createActiveSceneControlTargetRef,
|
createActiveSceneControlTargetRef,
|
||||||
|
createActivateCameraRigOverrideControlEffect,
|
||||||
createActorControlTargetRef,
|
createActorControlTargetRef,
|
||||||
|
createCameraRigControlTargetRef,
|
||||||
createFollowActorPathControlEffect,
|
createFollowActorPathControlEffect,
|
||||||
createLightControlTargetRef,
|
createLightControlTargetRef,
|
||||||
createPlayActorAnimationControlEffect,
|
createPlayActorAnimationControlEffect,
|
||||||
@@ -422,6 +424,42 @@ describe("validateSceneDocument", () => {
|
|||||||
expect(validation.errors).toEqual([]);
|
expect(validation.errors).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("accepts typed camera rig control effects in scheduler routines and interaction links", () => {
|
||||||
|
const triggerVolume = createTriggerVolumeEntity({
|
||||||
|
id: "entity-trigger-camera"
|
||||||
|
});
|
||||||
|
const cameraRig = createCameraRigEntity({
|
||||||
|
id: "entity-camera-rig-main"
|
||||||
|
});
|
||||||
|
const document = createEmptySceneDocument();
|
||||||
|
document.entities[triggerVolume.id] = triggerVolume;
|
||||||
|
document.entities[cameraRig.id] = cameraRig;
|
||||||
|
document.scheduler.routines["routine-camera-override"] =
|
||||||
|
createProjectScheduleRoutine({
|
||||||
|
id: "routine-camera-override",
|
||||||
|
title: "Camera Override",
|
||||||
|
target: createCameraRigControlTargetRef(cameraRig.id),
|
||||||
|
startHour: 8,
|
||||||
|
endHour: 18,
|
||||||
|
effect: createActivateCameraRigOverrideControlEffect({
|
||||||
|
target: createCameraRigControlTargetRef(cameraRig.id)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
document.interactionLinks["link-camera-override"] = createControlInteractionLink(
|
||||||
|
{
|
||||||
|
id: "link-camera-override",
|
||||||
|
sourceEntityId: triggerVolume.id,
|
||||||
|
effect: createActivateCameraRigOverrideControlEffect({
|
||||||
|
target: createCameraRigControlTargetRef(cameraRig.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const validation = validateSceneDocument(document);
|
||||||
|
|
||||||
|
expect(validation.errors).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
it("accepts actor scheduler animation and follow-path effects when the actor has one bound NPC usage", () => {
|
it("accepts actor scheduler animation and follow-path effects when the actor has one bound NPC usage", () => {
|
||||||
const actorTarget = createActorControlTargetRef("actor-patroller");
|
const actorTarget = createActorControlTargetRef("actor-patroller");
|
||||||
const npcModelAsset = {
|
const npcModelAsset = {
|
||||||
|
|||||||
Reference in New Issue
Block a user