feat: support wired movement packets and room sync

This commit is contained in:
Lorenzune
2026-03-22 16:48:51 +01:00
parent 427f7c66e9
commit 38a79d4f80
16 changed files with 2634 additions and 29 deletions
@@ -7,9 +7,9 @@ export class ObjectAvatarUpdateMessage extends ObjectMoveUpdateMessage
private _canStandUp: boolean;
private _baseY: number;
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, headDirection: number, canStandUp: boolean, baseY: number)
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, headDirection: number, canStandUp: boolean, baseY: number, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION)
{
super(location, targetLocation, direction);
super(location, targetLocation, direction, isSlide, duration);
this._headDirection = headDirection;
this._canStandUp = canStandUp;
@@ -3,15 +3,19 @@ import { RoomObjectUpdateMessage } from './RoomObjectUpdateMessage';
export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
{
public static DEFAULT_DURATION: number = 500;
private _targetLocation: IVector3D;
private _isSlide: boolean;
private _duration: number;
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false)
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION)
{
super(location, direction);
this._targetLocation = targetLocation;
this._isSlide = isSlide;
this._duration = duration;
}
public get targetLocation(): IVector3D
@@ -25,4 +29,9 @@ export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
{
return this._isSlide;
}
public get duration(): number
{
return this._duration;
}
}