Remove tests for input suspension in navigation controllers
This commit is contained in:
@@ -222,33 +222,6 @@ describe("FirstPersonNavigationController", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("ignores mouse look while input is suspended", () => {
|
||||
const { context, domElement } = createRuntimeControllerContext();
|
||||
const controller = new FirstPersonNavigationController();
|
||||
|
||||
context.isInputSuspended = () => true;
|
||||
Object.defineProperty(document, "pointerLockElement", {
|
||||
configurable: true,
|
||||
get: () => domElement
|
||||
});
|
||||
|
||||
controller.activate(context);
|
||||
|
||||
const initialQuaternion = context.camera.quaternion.clone();
|
||||
document.dispatchEvent(
|
||||
new MouseEvent("mousemove", {
|
||||
movementX: 40,
|
||||
movementY: 20
|
||||
})
|
||||
);
|
||||
controller.update(0);
|
||||
|
||||
expect(context.camera.quaternion.equals(initialQuaternion)).toBe(true);
|
||||
|
||||
controller.deactivate(context, {
|
||||
releasePointerLock: false
|
||||
});
|
||||
});
|
||||
|
||||
it("uses the authored movement template speed for first-person motion telemetry", () => {
|
||||
const playerStart = createPlayerStartEntity({
|
||||
|
||||
@@ -165,39 +165,6 @@ describe("ThirdPersonNavigationController", () => {
|
||||
controller.deactivate(context);
|
||||
});
|
||||
|
||||
it("ignores drag orbit and zoom while input is suspended", () => {
|
||||
const { context } = createRuntimeControllerContext();
|
||||
const controller = new ThirdPersonNavigationController();
|
||||
|
||||
context.isInputSuspended = () => true;
|
||||
controller.activate(context);
|
||||
|
||||
const initialPosition = context.camera.position.clone();
|
||||
context.domElement.dispatchEvent(
|
||||
new PointerEvent("pointerdown", {
|
||||
button: 0,
|
||||
clientX: 100,
|
||||
clientY: 100
|
||||
})
|
||||
);
|
||||
window.dispatchEvent(
|
||||
new PointerEvent("pointermove", {
|
||||
clientX: 180,
|
||||
clientY: 160
|
||||
})
|
||||
);
|
||||
context.domElement.dispatchEvent(
|
||||
new WheelEvent("wheel", {
|
||||
deltaY: -240,
|
||||
cancelable: true
|
||||
})
|
||||
);
|
||||
controller.update(0);
|
||||
|
||||
expect(context.camera.position.equals(initialPosition)).toBe(true);
|
||||
|
||||
controller.deactivate(context);
|
||||
});
|
||||
|
||||
it("uses the authored movement template speed for third-person motion telemetry", () => {
|
||||
const playerStart = createPlayerStartEntity({
|
||||
|
||||
Reference in New Issue
Block a user