mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-02-22 04:22:35 +01:00
More changes
This commit is contained in:
parent
5c0ed553e0
commit
76d1d11af7
@ -1,4 +1,4 @@
|
|||||||
import { AdvancedMap } from '../../../../core';
|
import { IAdvancedMap } from '../../../IAdvancedMap';
|
||||||
import { IFigurePartSet } from './IFigurePartSet';
|
import { IFigurePartSet } from './IFigurePartSet';
|
||||||
|
|
||||||
export interface ISetType
|
export interface ISetType
|
||||||
@ -8,5 +8,5 @@ export interface ISetType
|
|||||||
optionalFromClubLevel(_arg_1: string): number;
|
optionalFromClubLevel(_arg_1: string): number;
|
||||||
type: string;
|
type: string;
|
||||||
paletteID: number;
|
paletteID: number;
|
||||||
partSets: AdvancedMap<string, IFigurePartSet>;
|
partSets: IAdvancedMap<string, IFigurePartSet>;
|
||||||
}
|
}
|
||||||
|
@ -143,9 +143,9 @@ export class AdvancedMap<T, U> implements IAdvancedMap<T, U>
|
|||||||
return this._array.indexOf(value);
|
return this._array.indexOf(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public concatenate(newValues: AdvancedMap<T, U>): void
|
public concatenate(newValues: IAdvancedMap<T, U>): void
|
||||||
{
|
{
|
||||||
for(const k of newValues._keys) this.add(k, newValues.getValue(k));
|
for (const k of (newValues as AdvancedMap<T, U>)._keys) this.add(k, newValues.getValue(k));
|
||||||
}
|
}
|
||||||
|
|
||||||
public clone(): IAdvancedMap<T, U>
|
public clone(): IAdvancedMap<T, U>
|
||||||
|
@ -3,7 +3,7 @@ import { Container } from '@pixi/display';
|
|||||||
import { ColorMatrixFilter } from '@pixi/filter-color-matrix';
|
import { ColorMatrixFilter } from '@pixi/filter-color-matrix';
|
||||||
import { Rectangle } from '@pixi/math';
|
import { Rectangle } from '@pixi/math';
|
||||||
import { Sprite } from '@pixi/sprite';
|
import { Sprite } from '@pixi/sprite';
|
||||||
import { AvatarAction, AvatarDirectionAngle, AvatarScaleType, AvatarSetType, IActionDefinition, IActiveActionData, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
|
import { AvatarAction, AvatarDirectionAngle, AvatarScaleType, AvatarSetType, IActionDefinition, IActiveActionData, IAdvancedMap, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
|
||||||
import { AdvancedMap } from '../../core';
|
import { AdvancedMap } from '../../core';
|
||||||
import { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
|
import { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
|
||||||
import { ActiveActionData } from './actions';
|
import { ActiveActionData } from './actions';
|
||||||
@ -51,7 +51,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
private _sortedActions: IActiveActionData[];
|
private _sortedActions: IActiveActionData[];
|
||||||
private _lastActionsString: string;
|
private _lastActionsString: string;
|
||||||
private _currentActionsString: string;
|
private _currentActionsString: string;
|
||||||
private _fullImageCache: AdvancedMap<string, RenderTexture>;
|
private _fullImageCache: IAdvancedMap<string, RenderTexture>;
|
||||||
private _fullImageCacheSize: number = 5;
|
private _fullImageCacheSize: number = 5;
|
||||||
protected _isCachedImage: boolean = false;
|
protected _isCachedImage: boolean = false;
|
||||||
private _useFullImageCache: boolean = false;
|
private _useFullImageCache: boolean = false;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { IFigureDataPalette, IPalette, IPartColor } from '../../../../api';
|
import { IAdvancedMap, IFigureDataPalette, IPalette, IPartColor } from '../../../../api';
|
||||||
import { AdvancedMap } from '../../../../core';
|
import { AdvancedMap } from '../../../../core';
|
||||||
import { PartColor } from './PartColor';
|
import { PartColor } from './PartColor';
|
||||||
|
|
||||||
export class Palette implements IPalette
|
export class Palette implements IPalette
|
||||||
{
|
{
|
||||||
private _id: number;
|
private _id: number;
|
||||||
private _colors: AdvancedMap<string, IPartColor>;
|
private _colors: IAdvancedMap<string, IPartColor>;
|
||||||
|
|
||||||
constructor(data: IFigureDataPalette)
|
constructor(data: IFigureDataPalette)
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ export class Palette implements IPalette
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get colors(): AdvancedMap<string, IPartColor>
|
public get colors(): IAdvancedMap<string, IPartColor>
|
||||||
{
|
{
|
||||||
return this._colors;
|
return this._colors;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IFigureDataSetType, IFigurePartSet, ISetType } from '../../../../api';
|
import { IAdvancedMap, IFigureDataSetType, IFigurePartSet, ISetType } from '../../../../api';
|
||||||
import { AdvancedMap } from '../../../../core';
|
import { AdvancedMap } from '../../../../core';
|
||||||
import { FigurePartSet } from './FigurePartSet';
|
import { FigurePartSet } from './FigurePartSet';
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ export class SetType implements ISetType
|
|||||||
private _type: string;
|
private _type: string;
|
||||||
private _paletteId: number;
|
private _paletteId: number;
|
||||||
private _isMandatory: { [index: string]: boolean[] };
|
private _isMandatory: { [index: string]: boolean[] };
|
||||||
private _partSets: AdvancedMap<string, IFigurePartSet>;
|
private _partSets: IAdvancedMap<string, IFigurePartSet>;
|
||||||
|
|
||||||
constructor(data: IFigureDataSetType)
|
constructor(data: IFigureDataSetType)
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ export class SetType implements ISetType
|
|||||||
return _local_2.indexOf(false);
|
return _local_2.indexOf(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get partSets(): AdvancedMap<string, IFigurePartSet>
|
public get partSets(): IAdvancedMap<string, IFigurePartSet>
|
||||||
{
|
{
|
||||||
return this._partSets;
|
return this._partSets;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../../core';
|
import { AdvancedMap } from '../../../../../../core';
|
||||||
|
|
||||||
export class BadgesParser implements IMessageParser
|
export class BadgesParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _allBadgeCodes: string[];
|
private _allBadgeCodes: string[];
|
||||||
private _activeBadgeCodes: AdvancedMap<string, number>;
|
private _activeBadgeCodes: IAdvancedMap<string, number>;
|
||||||
private _badgeIds: AdvancedMap<string, number>;
|
private _badgeIds: IAdvancedMap<string, number>;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
import { AdvancedMap } from '../../../../../core';
|
||||||
|
|
||||||
export class UnseenItemsParser implements IMessageParser
|
export class UnseenItemsParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _items: AdvancedMap<number, number[]>;
|
private _items: IAdvancedMap<number, number[]>;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
import { AdvancedMap } from '../../../../../core';
|
||||||
|
|
||||||
export class UserSongDisksInventoryMessageParser implements IMessageParser
|
export class UserSongDisksInventoryMessageParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _songDiskInventory: AdvancedMap<number, number> = new AdvancedMap();
|
private _songDiskInventory: IAdvancedMap<number, number> = new AdvancedMap();
|
||||||
|
|
||||||
flush(): boolean
|
flush(): boolean
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../../core';
|
import { AdvancedMap } from '../../../../../../core';
|
||||||
import { RelationshipStatusInfo } from './RelationshipStatusInfo';
|
import { RelationshipStatusInfo } from './RelationshipStatusInfo';
|
||||||
|
|
||||||
export class RelationshipStatusInfoMessageParser implements IMessageParser
|
export class RelationshipStatusInfoMessageParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _userId: number;
|
private _userId: number;
|
||||||
private _relationshipStatusMap: AdvancedMap<number, RelationshipStatusInfo>;
|
private _relationshipStatusMap: IAdvancedMap<number, RelationshipStatusInfo>;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser
|
|||||||
return this._userId;
|
return this._userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get relationshipStatusMap(): AdvancedMap<number, RelationshipStatusInfo>
|
public get relationshipStatusMap(): IAdvancedMap<number, RelationshipStatusInfo>
|
||||||
{
|
{
|
||||||
return this._relationshipStatusMap;
|
return this._relationshipStatusMap;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BLEND_MODES } from '@pixi/constants';
|
import { BLEND_MODES } from '@pixi/constants';
|
||||||
import { Resource, Texture } from '@pixi/core';
|
import { Resource, Texture } from '@pixi/core';
|
||||||
import { AlphaTolerance, AvatarAction, AvatarGuideStatus, AvatarSetType, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IGraphicAsset, IObjectVisualizationData, IRoomGeometry, IRoomObject, IRoomObjectModel, RoomObjectSpriteType, RoomObjectVariable } from '../../../../../api';
|
import { AlphaTolerance, AvatarAction, AvatarGuideStatus, AvatarSetType, IAdvancedMap, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IGraphicAsset, IObjectVisualizationData, IRoomGeometry, IRoomObject, IRoomObjectModel, RoomObjectSpriteType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
import { AdvancedMap } from '../../../../../core';
|
||||||
import { RoomObjectSpriteVisualization } from '../../../../../room';
|
import { RoomObjectSpriteVisualization } from '../../../../../room';
|
||||||
import { ExpressionAdditionFactory, FloatingIdleZAddition, GameClickTargetAddition, GuideStatusBubbleAddition, IAvatarAddition, MutedBubbleAddition, NumberBubbleAddition, TypingBubbleAddition } from './additions';
|
import { ExpressionAdditionFactory, FloatingIdleZAddition, GameClickTargetAddition, GuideStatusBubbleAddition, IAvatarAddition, MutedBubbleAddition, NumberBubbleAddition, TypingBubbleAddition } from './additions';
|
||||||
@ -34,8 +34,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
|||||||
protected _data: AvatarVisualizationData;
|
protected _data: AvatarVisualizationData;
|
||||||
|
|
||||||
private _avatarImage: IAvatarImage;
|
private _avatarImage: IAvatarImage;
|
||||||
private _cachedAvatars: AdvancedMap<string, IAvatarImage>;
|
private _cachedAvatars: IAdvancedMap<string, IAvatarImage>;
|
||||||
private _cachedAvatarEffects: AdvancedMap<string, IAvatarImage>;
|
private _cachedAvatarEffects: IAdvancedMap<string, IAvatarImage>;
|
||||||
private _shadow: IGraphicAsset;
|
private _shadow: IGraphicAsset;
|
||||||
private _lastUpdate: number;
|
private _lastUpdate: number;
|
||||||
private _disposed: boolean;
|
private _disposed: boolean;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { IParticleSystem, RoomObjectVariable } from '../../../../../api';
|
import { IAdvancedMap, IParticleSystem, RoomObjectVariable } from '../../../../../api';
|
||||||
import { AdvancedMap, NitroLogger } from '../../../../../core';
|
import { AdvancedMap, NitroLogger } from '../../../../../core';
|
||||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||||
import { FurnitureParticleSystem } from './FurnitureParticleSystem';
|
import { FurnitureParticleSystem } from './FurnitureParticleSystem';
|
||||||
|
|
||||||
export class FurnitureFireworksVisualization extends FurnitureAnimatedVisualization
|
export class FurnitureFireworksVisualization extends FurnitureAnimatedVisualization
|
||||||
{
|
{
|
||||||
private _particleSystems: AdvancedMap<number, FurnitureParticleSystem>;
|
private _particleSystems: IAdvancedMap<number, FurnitureParticleSystem>;
|
||||||
private _currentParticleSystem: FurnitureParticleSystem;
|
private _currentParticleSystem: FurnitureParticleSystem;
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
|
@ -2,7 +2,7 @@ import { RenderTexture, Texture } from '@pixi/core';
|
|||||||
import { AlphaFilter } from '@pixi/filter-alpha';
|
import { AlphaFilter } from '@pixi/filter-alpha';
|
||||||
import { Graphics } from '@pixi/graphics';
|
import { Graphics } from '@pixi/graphics';
|
||||||
import { Matrix } from '@pixi/math';
|
import { Matrix } from '@pixi/math';
|
||||||
import { IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api';
|
import { IAdvancedMap, IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
import { AdvancedMap } from '../../../../../core';
|
||||||
import { NitroPoint, NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
|
import { NitroPoint, NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||||
import { Vector3D } from '../../../../avatar';
|
import { Vector3D } from '../../../../avatar';
|
||||||
@ -11,7 +11,7 @@ import { FurnitureParticleSystemEmitter } from './FurnitureParticleSystemEmitter
|
|||||||
|
|
||||||
export class FurnitureParticleSystem
|
export class FurnitureParticleSystem
|
||||||
{
|
{
|
||||||
private _emitters: AdvancedMap<number, FurnitureParticleSystemEmitter>;
|
private _emitters: IAdvancedMap<number, FurnitureParticleSystemEmitter>;
|
||||||
private _visualization: FurnitureAnimatedVisualization;
|
private _visualization: FurnitureAnimatedVisualization;
|
||||||
private _size: number;
|
private _size: number;
|
||||||
private _canvasId: number = -1;
|
private _canvasId: number = -1;
|
||||||
|
@ -35,9 +35,9 @@ export class RoomSessionWordQuizEvent extends RoomSessionEvent
|
|||||||
return this._pollType;
|
return this._pollType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set pollType(k: string)
|
public set pollType(pollType: string)
|
||||||
{
|
{
|
||||||
this._pollType = k;
|
this._pollType = pollType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get pollId(): number
|
public get pollId(): number
|
||||||
@ -95,9 +95,9 @@ export class RoomSessionWordQuizEvent extends RoomSessionEvent
|
|||||||
return this._value;
|
return this._value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set value(k: string)
|
public set value(value: string)
|
||||||
{
|
{
|
||||||
this._value = k;
|
this._value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get answerCounts(): Map<string, number>
|
public get answerCounts(): Map<string, number>
|
||||||
|
@ -6,11 +6,11 @@ export class UserNameUpdateEvent extends NitroEvent
|
|||||||
|
|
||||||
private _name: string;
|
private _name: string;
|
||||||
|
|
||||||
constructor(k: string)
|
constructor(name: string)
|
||||||
{
|
{
|
||||||
super(UserNameUpdateEvent.UNUE_NAME_UPDATED);
|
super(UserNameUpdateEvent.UNUE_NAME_UPDATED);
|
||||||
|
|
||||||
this._name = k;
|
this._name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get name(): string
|
public get name(): string
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IMusicManager, ISoundManager } from '../../api';
|
import { IAdvancedMap, IMusicManager, ISoundManager } from '../../api';
|
||||||
import { AdvancedMap, NitroEvent, NitroManager } from '../../core';
|
import { AdvancedMap, NitroEvent, NitroManager } from '../../core';
|
||||||
import { NitroSettingsEvent, NitroSoundEvent } from '../events';
|
import { NitroSettingsEvent, NitroSoundEvent } from '../events';
|
||||||
import { Nitro } from '../Nitro';
|
import { Nitro } from '../Nitro';
|
||||||
@ -11,9 +11,9 @@ export class SoundManager extends NitroManager implements ISoundManager
|
|||||||
private _volumeFurni: number;
|
private _volumeFurni: number;
|
||||||
private _volumeTrax: number;
|
private _volumeTrax: number;
|
||||||
|
|
||||||
private _internalSamples: AdvancedMap<string, HTMLAudioElement>;
|
private _internalSamples: IAdvancedMap<string, HTMLAudioElement>;
|
||||||
private _furniSamples: AdvancedMap<number, HTMLAudioElement>;
|
private _furniSamples: IAdvancedMap<number, HTMLAudioElement>;
|
||||||
private _furnitureBeingPlayed: AdvancedMap<number, number>;
|
private _furnitureBeingPlayed: IAdvancedMap<number, number>;
|
||||||
|
|
||||||
private _musicManager: MusicManager;
|
private _musicManager: MusicManager;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { IRoomObjectController, IRoomObjectManager } from '../api';
|
import { IAdvancedMap, IRoomObjectController, IRoomObjectManager } from '../api';
|
||||||
import { AdvancedMap } from '../core';
|
import { AdvancedMap } from '../core';
|
||||||
import { RoomObject } from './object';
|
import { RoomObject } from './object';
|
||||||
|
|
||||||
export class RoomObjectManager implements IRoomObjectManager
|
export class RoomObjectManager implements IRoomObjectManager
|
||||||
{
|
{
|
||||||
private _objects: AdvancedMap<number, IRoomObjectController>;
|
private _objects: IAdvancedMap<number, IRoomObjectController>;
|
||||||
private _objectsPerType: AdvancedMap<string, AdvancedMap<number, IRoomObjectController>>;
|
private _objectsPerType: IAdvancedMap<string, AdvancedMap<number, IRoomObjectController>>;
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@ export class RoomObjectManager implements IRoomObjectManager
|
|||||||
this._objectsPerType.reset();
|
this._objectsPerType.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTypeMap(k: string, _arg_2: boolean = true): AdvancedMap<number, IRoomObjectController>
|
private getTypeMap(k: string, _arg_2: boolean = true): IAdvancedMap<number, IRoomObjectController>
|
||||||
{
|
{
|
||||||
let existing = this._objectsPerType.getValue(k);
|
let existing = this._objectsPerType.getValue(k);
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ export class RoomObjectManager implements IRoomObjectManager
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get objects(): AdvancedMap<number, IRoomObjectController>
|
public get objects(): IAdvancedMap<number, IRoomObjectController>
|
||||||
{
|
{
|
||||||
return this._objects;
|
return this._objects;
|
||||||
}
|
}
|
||||||
|
@ -80,16 +80,16 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
return this._scale / Math.sqrt(0.5);
|
return this._scale / Math.sqrt(0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public set scale(k: number)
|
public set scale(scale: number)
|
||||||
{
|
{
|
||||||
if(k <= 1)
|
if (scale <= 1)
|
||||||
{
|
{
|
||||||
k = 1;
|
scale = 1;
|
||||||
}
|
}
|
||||||
k = (k * Math.sqrt(0.5));
|
scale = (scale * Math.sqrt(0.5));
|
||||||
if(k != this._scale)
|
if (scale != this._scale)
|
||||||
{
|
{
|
||||||
this._scale = k;
|
this._scale = scale;
|
||||||
this._updateId++;
|
this._updateId++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,9 +108,9 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
return this._location;
|
return this._location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set location(k: IVector3D)
|
public set location(location: IVector3D)
|
||||||
{
|
{
|
||||||
if(k == null)
|
if (location == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
const _local_2: number = this._loc.x;
|
const _local_2: number = this._loc.x;
|
||||||
const _local_3: number = this._loc.y;
|
const _local_3: number = this._loc.y;
|
||||||
const _local_4: number = this._loc.z;
|
const _local_4: number = this._loc.z;
|
||||||
this._loc.assign(k);
|
this._loc.assign(location);
|
||||||
this._loc.x = (this._loc.x / this._x_scale);
|
this._loc.x = (this._loc.x / this._x_scale);
|
||||||
this._loc.y = (this._loc.y / this._y_scale);
|
this._loc.y = (this._loc.y / this._y_scale);
|
||||||
this._loc.z = (this._loc.z / this._z_scale);
|
this._loc.z = (this._loc.z / this._z_scale);
|
||||||
@ -136,14 +136,14 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
return this._direction;
|
return this._direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set direction(k: IVector3D)
|
public set direction(direction: IVector3D)
|
||||||
{
|
{
|
||||||
let _local_21: number;
|
let _local_21: number;
|
||||||
let _local_22: number;
|
let _local_22: number;
|
||||||
let _local_23: IVector3D;
|
let _local_23: IVector3D;
|
||||||
let _local_24: IVector3D;
|
let _local_24: IVector3D;
|
||||||
let _local_25: IVector3D;
|
let _local_25: IVector3D;
|
||||||
if(k == null)
|
if (direction == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -154,8 +154,8 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
const _local_2: number = this._dir.x;
|
const _local_2: number = this._dir.x;
|
||||||
const _local_3: number = this._dir.y;
|
const _local_3: number = this._dir.y;
|
||||||
const _local_4: number = this._dir.z;
|
const _local_4: number = this._dir.z;
|
||||||
this._dir.assign(k);
|
this._dir.assign(direction);
|
||||||
this._direction.assign(k);
|
this._direction.assign(direction);
|
||||||
if ((((!(this._dir.x == _local_2)) || (!(this._dir.y == _local_3))) || (!(this._dir.z == _local_4))))
|
if ((((!(this._dir.x == _local_2)) || (!(this._dir.y == _local_3))) || (!(this._dir.z == _local_4))))
|
||||||
{
|
{
|
||||||
this._updateId++;
|
this._updateId++;
|
||||||
@ -163,9 +163,9 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
const _local_5: IVector3D = new Vector3d(0, 1, 0);
|
const _local_5: IVector3D = new Vector3d(0, 1, 0);
|
||||||
const _local_6: IVector3D = new Vector3d(0, 0, 1);
|
const _local_6: IVector3D = new Vector3d(0, 0, 1);
|
||||||
const _local_7: IVector3D = new Vector3d(1, 0, 0);
|
const _local_7: IVector3D = new Vector3d(1, 0, 0);
|
||||||
const _local_8: number = ((k.x / 180) * Math.PI);
|
const _local_8: number = ((direction.x / 180) * Math.PI);
|
||||||
const _local_9: number = ((k.y / 180) * Math.PI);
|
const _local_9: number = ((direction.y / 180) * Math.PI);
|
||||||
const _local_10: number = ((k.z / 180) * Math.PI);
|
const _local_10: number = ((direction.z / 180) * Math.PI);
|
||||||
const _local_11: number = Math.cos(_local_8);
|
const _local_11: number = Math.cos(_local_8);
|
||||||
const _local_12: number = Math.sin(_local_8);
|
const _local_12: number = Math.sin(_local_8);
|
||||||
const _local_13: IVector3D = Vector3d.sum(Vector3d.product(_local_5, _local_11), Vector3d.product(_local_7, -(_local_12)));
|
const _local_13: IVector3D = Vector3d.sum(Vector3d.product(_local_5, _local_11), Vector3d.product(_local_7, -(_local_12)));
|
||||||
@ -197,29 +197,29 @@ export class RoomGeometry implements IRoomGeometry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public set x_scale(k: number)
|
public set x_scale(xScale: number)
|
||||||
{
|
{
|
||||||
if(this._x_scale != (k * this._x_scale_internal))
|
if (this._x_scale != (xScale * this._x_scale_internal))
|
||||||
{
|
{
|
||||||
this._x_scale = (k * this._x_scale_internal);
|
this._x_scale = (xScale * this._x_scale_internal);
|
||||||
this._updateId++;
|
this._updateId++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public set y_scale(k: number)
|
public set y_scale(yScale: number)
|
||||||
{
|
{
|
||||||
if(this._y_scale != (k * this._y_scale_internal))
|
if (this._y_scale != (yScale * this._y_scale_internal))
|
||||||
{
|
{
|
||||||
this._y_scale = (k * this._y_scale_internal);
|
this._y_scale = (yScale * this._y_scale_internal);
|
||||||
this._updateId++;
|
this._updateId++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public set z_scale(k: number)
|
public set z_scale(zScale: number)
|
||||||
{
|
{
|
||||||
if(this._z_scale != (k * this._z_scale_internal))
|
if (this._z_scale != (zScale * this._z_scale_internal))
|
||||||
{
|
{
|
||||||
this._z_scale = (k * this._z_scale_internal);
|
this._z_scale = (zScale * this._z_scale_internal);
|
||||||
this._updateId++;
|
this._updateId++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
{
|
{
|
||||||
private static PREVIEW_ROOM_ID_BASE: number = 0x7FFF0000;
|
private static PREVIEW_ROOM_ID_BASE: number = 0x7FFF0000;
|
||||||
|
|
||||||
public static makeRoomPreviewerId(k: number): number
|
public static makeRoomPreviewerId(roomId: number): number
|
||||||
{
|
{
|
||||||
return (k & 0xFFFF) + RoomId.PREVIEW_ROOM_ID_BASE;
|
return (roomId & 0xFFFF) + RoomId.PREVIEW_ROOM_ID_BASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isRoomPreviewerId(k: number): boolean
|
public static isRoomPreviewerId(roomId: number): boolean
|
||||||
{
|
{
|
||||||
return (k >= RoomId.PREVIEW_ROOM_ID_BASE);
|
return (roomId >= RoomId.PREVIEW_ROOM_ID_BASE);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user