You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Improve wired movement rendering and follow sync
This commit is contained in:
@@ -9,7 +9,7 @@ export class ObjectAvatarUpdateMessage extends ObjectMoveUpdateMessage
|
||||
|
||||
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, isSlide, duration);
|
||||
super(location, targetLocation, direction, isSlide, duration, 0);
|
||||
|
||||
this._headDirection = headDirection;
|
||||
this._canStandUp = canStandUp;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IVector3D } from '@nitrots/api';
|
||||
import { IRoomObjectController, IVector3D } from '@nitrots/api';
|
||||
import { RoomObjectUpdateMessage } from './RoomObjectUpdateMessage';
|
||||
|
||||
export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
|
||||
@@ -8,14 +8,20 @@ export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
|
||||
private _targetLocation: IVector3D;
|
||||
private _isSlide: boolean;
|
||||
private _duration: number;
|
||||
private _elapsed: number;
|
||||
private _anchorObject: IRoomObjectController;
|
||||
private _anchorOffset: IVector3D;
|
||||
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION)
|
||||
constructor(location: IVector3D, targetLocation: IVector3D, direction: IVector3D, isSlide: boolean = false, duration: number = ObjectMoveUpdateMessage.DEFAULT_DURATION, elapsed: number = 0, anchorObject: IRoomObjectController = null, anchorOffset: IVector3D = null)
|
||||
{
|
||||
super(location, direction);
|
||||
|
||||
this._targetLocation = targetLocation;
|
||||
this._isSlide = isSlide;
|
||||
this._duration = duration;
|
||||
this._elapsed = elapsed;
|
||||
this._anchorObject = anchorObject;
|
||||
this._anchorOffset = anchorOffset;
|
||||
}
|
||||
|
||||
public get targetLocation(): IVector3D
|
||||
@@ -34,4 +40,19 @@ export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage
|
||||
{
|
||||
return this._duration;
|
||||
}
|
||||
|
||||
public get elapsed(): number
|
||||
{
|
||||
return this._elapsed;
|
||||
}
|
||||
|
||||
public get anchorObject(): IRoomObjectController
|
||||
{
|
||||
return this._anchorObject;
|
||||
}
|
||||
|
||||
public get anchorOffset(): IVector3D
|
||||
{
|
||||
return this._anchorOffset;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user