mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40: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 { ColorConverter } from '../../../../../room/utils/ColorConverter';
|
||||||
import { IRoomGeometry } from '../../../../../room/utils/IRoomGeometry';
|
import { IRoomGeometry } from '../../../../../room/utils/IRoomGeometry';
|
||||||
import { Vector3d } from '../../../../../room/utils/Vector3d';
|
import { Vector3d } from '../../../../../room/utils/Vector3d';
|
||||||
|
import { Nitro } from '../../../../Nitro';
|
||||||
import { MouseEventType } from '../../../../ui/MouseEventType';
|
import { MouseEventType } from '../../../../ui/MouseEventType';
|
||||||
import { RoomObjectTileMouseEvent } from '../../../events/RoomObjectTileMouseEvent';
|
import { RoomObjectTileMouseEvent } from '../../../events/RoomObjectTileMouseEvent';
|
||||||
import { RoomObjectWallMouseEvent } from '../../../events/RoomObjectWallMouseEvent';
|
import { RoomObjectWallMouseEvent } from '../../../events/RoomObjectWallMouseEvent';
|
||||||
@ -39,6 +40,7 @@ export class RoomLogic extends RoomObjectLogicBase
|
|||||||
private _colorTransitionLength: number;
|
private _colorTransitionLength: number;
|
||||||
private _lastHoleUpdate: number;
|
private _lastHoleUpdate: number;
|
||||||
private _needsMapUpdate: boolean;
|
private _needsMapUpdate: boolean;
|
||||||
|
private _skipColorTransition: boolean;
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
@ -56,6 +58,7 @@ export class RoomLogic extends RoomObjectLogicBase
|
|||||||
this._colorTransitionLength = 1500;
|
this._colorTransitionLength = 1500;
|
||||||
this._lastHoleUpdate = 0;
|
this._lastHoleUpdate = 0;
|
||||||
this._needsMapUpdate = false;
|
this._needsMapUpdate = false;
|
||||||
|
this._skipColorTransition = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEventTypes(): string[]
|
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_FLOOR_VISIBILITY, 1);
|
||||||
this.object.model.setValue(RoomObjectVariable.ROOM_WALL_VISIBILITY, 1);
|
this.object.model.setValue(RoomObjectVariable.ROOM_WALL_VISIBILITY, 1);
|
||||||
this.object.model.setValue(RoomObjectVariable.ROOM_LANDSCAPE_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
|
public update(time: number): void
|
||||||
@ -325,6 +330,10 @@ export class RoomLogic extends RoomObjectLogicBase
|
|||||||
this._targetColor = message.color;
|
this._targetColor = message.color;
|
||||||
this._targetLight = message.light;
|
this._targetLight = message.light;
|
||||||
this._colorChangedTime = this.time;
|
this._colorChangedTime = this.time;
|
||||||
|
|
||||||
|
if(this._skipColorTransition)
|
||||||
|
this._colorTransitionLength = 0;
|
||||||
|
else
|
||||||
this._colorTransitionLength = 1500;
|
this._colorTransitionLength = 1500;
|
||||||
|
|
||||||
model.setValue(RoomObjectVariable.ROOM_COLORIZE_BG_ONLY, message.backgroundOnly);
|
model.setValue(RoomObjectVariable.ROOM_COLORIZE_BG_ONLY, message.backgroundOnly);
|
||||||
|
Loading…
Reference in New Issue
Block a user