Update player movement template in tests
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES,
|
||||
createPointLightEntity,
|
||||
createInteractableEntity,
|
||||
createPlayerStartMovementTemplate,
|
||||
createPlayerStartInputBindings,
|
||||
createPlayerStartEntity,
|
||||
createSceneEntryEntity,
|
||||
@@ -23,6 +24,8 @@ import { createProjectAssetStorageKey, type AudioAssetRecord } from "../../src/a
|
||||
import { buildRuntimeSceneFromDocument } from "../../src/runtime-three/runtime-scene-build";
|
||||
import { createFixtureLoadedModelAssetFromGeometry } from "../helpers/model-collider-fixtures";
|
||||
|
||||
const defaultMovementTemplate = createPlayerStartMovementTemplate();
|
||||
|
||||
describe("buildRuntimeSceneFromDocument", () => {
|
||||
it("builds runtime brush data, colliders, and an authored player spawn from the document", () => {
|
||||
const brush = createBoxBrush({
|
||||
@@ -400,7 +403,11 @@ describe("buildRuntimeSceneFromDocument", () => {
|
||||
movement: {
|
||||
templateKind: "default",
|
||||
moveSpeed: DEFAULT_PLAYER_START_MOVE_SPEED,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES
|
||||
maxSpeed: defaultMovementTemplate.maxSpeed,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES,
|
||||
jump: defaultMovementTemplate.jump,
|
||||
sprint: defaultMovementTemplate.sprint,
|
||||
crouch: defaultMovementTemplate.crouch
|
||||
},
|
||||
inputBindings: playerStart.inputBindings,
|
||||
collider: {
|
||||
@@ -574,7 +581,11 @@ describe("buildRuntimeSceneFromDocument", () => {
|
||||
movement: {
|
||||
templateKind: "default",
|
||||
moveSpeed: DEFAULT_PLAYER_START_MOVE_SPEED,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES
|
||||
maxSpeed: defaultMovementTemplate.maxSpeed,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES,
|
||||
jump: defaultMovementTemplate.jump,
|
||||
sprint: defaultMovementTemplate.sprint,
|
||||
crouch: defaultMovementTemplate.crouch
|
||||
},
|
||||
inputBindings: playerStart.inputBindings,
|
||||
collider: {
|
||||
@@ -599,7 +610,11 @@ describe("buildRuntimeSceneFromDocument", () => {
|
||||
expect(runtimeScene.playerMovement).toEqual({
|
||||
templateKind: "default",
|
||||
moveSpeed: DEFAULT_PLAYER_START_MOVE_SPEED,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES
|
||||
maxSpeed: defaultMovementTemplate.maxSpeed,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES,
|
||||
jump: defaultMovementTemplate.jump,
|
||||
sprint: defaultMovementTemplate.sprint,
|
||||
crouch: defaultMovementTemplate.crouch
|
||||
});
|
||||
expect(runtimeScene.playerInputBindings).toEqual(playerStart.inputBindings);
|
||||
expect(runtimeScene.navigationMode).toBe("firstPerson");
|
||||
@@ -647,7 +662,11 @@ describe("buildRuntimeSceneFromDocument", () => {
|
||||
expect(runtimeScene.playerMovement).toEqual({
|
||||
templateKind: "default",
|
||||
moveSpeed: DEFAULT_PLAYER_START_MOVE_SPEED,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES
|
||||
maxSpeed: defaultMovementTemplate.maxSpeed,
|
||||
capabilities: DEFAULT_PLAYER_START_MOVEMENT_CAPABILITIES,
|
||||
jump: defaultMovementTemplate.jump,
|
||||
sprint: defaultMovementTemplate.sprint,
|
||||
crouch: defaultMovementTemplate.crouch
|
||||
});
|
||||
expect(runtimeScene.playerInputBindings).toEqual(
|
||||
createPlayerStartInputBindings()
|
||||
|
||||
Reference in New Issue
Block a user