ernamed radialvelocity to angularvelocity

This commit is contained in:
azykov@mail.ru 2026-06-03 20:53:00 +03:00
parent b5a9772248
commit 2dd3aff737
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,8 @@ export class GameState {
); );
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// @ts-ignore
private withoutAutoSave(fn: () => void) { private withoutAutoSave(fn: () => void) {
this._stopAutoSave(); this._stopAutoSave();
fn(); fn();
@ -100,7 +102,7 @@ export class GameState {
public setCharacterTransform( public setCharacterTransform(
transform: Pos3, transform: Pos3,
linearVelocity?: V3, linearVelocity?: V3,
radialVelocity?: R3, angularVelocity?: R3,
): void { ): void {
if (this.isPaused) if (this.isPaused)
return; return;
@ -108,8 +110,8 @@ export class GameState {
this.scene.character.transform = transform; this.scene.character.transform = transform;
if (linearVelocity) if (linearVelocity)
this.scene.character.linearVelocity = linearVelocity; this.scene.character.linearVelocity = linearVelocity;
if (radialVelocity) if (angularVelocity)
this.scene.character.radialVelocity = radialVelocity; this.scene.character.angularVelocity = angularVelocity;
// console.log(`changed character to ${JSON.stringify(this.scene.character)}`); // console.log(`changed character to ${JSON.stringify(this.scene.character)}`);
} }

View File

@ -20,7 +20,7 @@ export type ObjectInstance = {
export type GameObjectData = { export type GameObjectData = {
linearVelocity: V3; linearVelocity: V3;
radialVelocity: R3; angularVelocity: R3;
} }
export type GameObjectInstance = ObjectInstance & GameObjectData; export type GameObjectInstance = ObjectInstance & GameObjectData;