mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Merge branch 'dev' of https://git.krews.org/nitro/nitro-renderer into dev
This commit is contained in:
commit
4ff842af10
@ -8,6 +8,7 @@ import { RoomObjectLogicBase } from '../../../../../room/object/logic/RoomObject
|
||||
import { ColorConverter } from '../../../../../room/utils/ColorConverter';
|
||||
import { IRoomGeometry } from '../../../../../room/utils/IRoomGeometry';
|
||||
import { Vector3d } from '../../../../../room/utils/Vector3d';
|
||||
import { Nitro } from '../../../../Nitro';
|
||||
import { MouseEventType } from '../../../../ui/MouseEventType';
|
||||
import { RoomObjectTileMouseEvent } from '../../../events/RoomObjectTileMouseEvent';
|
||||
import { RoomObjectWallMouseEvent } from '../../../events/RoomObjectWallMouseEvent';
|
||||
@ -39,6 +40,7 @@ export class RoomLogic extends RoomObjectLogicBase
|
||||
private _colorTransitionLength: number;
|
||||
private _lastHoleUpdate: number;
|
||||
private _needsMapUpdate: boolean;
|
||||
private _skipColorTransition: boolean;
|
||||
|
||||
constructor()
|
||||
{
|
||||
@ -56,6 +58,7 @@ export class RoomLogic extends RoomObjectLogicBase
|
||||
this._colorTransitionLength = 1500;
|
||||
this._lastHoleUpdate = 0;
|
||||
this._needsMapUpdate = false;
|
||||
this._skipColorTransition = false;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[]
|
||||
@ -97,6 +100,8 @@ export class RoomLogic extends RoomObjectLogicBase
|
||||
this.object.model.setValue(RoomObjectVariable.ROOM_FLOOR_VISIBILITY, 1);
|
||||
this.object.model.setValue(RoomObjectVariable.ROOM_WALL_VISIBILITY, 1);
|
||||
this.object.model.setValue(RoomObjectVariable.ROOM_LANDSCAPE_VISIBILITY, 1);
|
||||
|
||||
this._skipColorTransition = (Nitro.instance.getConfiguration<boolean>('room.color.skip.transition') === true);
|
||||
}
|
||||
|
||||
public update(time: number): void
|
||||
@ -325,7 +330,11 @@ export class RoomLogic extends RoomObjectLogicBase
|
||||
this._targetColor = message.color;
|
||||
this._targetLight = message.light;
|
||||
this._colorChangedTime = this.time;
|
||||
this._colorTransitionLength = 1500;
|
||||
|
||||
if(this._skipColorTransition)
|
||||
this._colorTransitionLength = 0;
|
||||
else
|
||||
this._colorTransitionLength = 1500;
|
||||
|
||||
model.setValue(RoomObjectVariable.ROOM_COLORIZE_BG_ONLY, message.backgroundOnly);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user