mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-23 08:00:51 +01:00
Merge branch 'main' of https://git.krews.org/nitro/nitro-renderer
This commit is contained in:
commit
52743e0d98
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@nitrots/nitro-renderer",
|
"name": "@nitrots/nitro-renderer",
|
||||||
"description": "Javascript library for rendering Nitro in the browser using PixiJS",
|
"description": "Javascript library for rendering Nitro in the browser using PixiJS",
|
||||||
"version": "1.4.2",
|
"version": "1.4.7",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
@ -17,8 +17,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc --project ./tsconfig.json",
|
"compile": "tsc --project ./tsconfig.json",
|
||||||
"eslint": "eslint ./src --fix",
|
"eslint": "eslint ./src --fix"
|
||||||
"postinstall": "node ./post-install.js"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"howler": "^2.2.3",
|
"howler": "^2.2.3",
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
function install()
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// const params = {};
|
|
||||||
|
|
||||||
// params['packageName'] = process.env.npm_package_name;
|
|
||||||
// params['packageVersion'] = process.env.npm_package_version;
|
|
||||||
|
|
||||||
// const data = JSON.stringify(params);
|
|
||||||
// const request = httpsRequest({
|
|
||||||
// hostname: 'install.nitrots.co',
|
|
||||||
// port: 443,
|
|
||||||
// path: '/collect',
|
|
||||||
// method: 'POST',
|
|
||||||
// headers: {
|
|
||||||
// 'Content-Type': 'application/json',
|
|
||||||
// 'Content-Length': data.length
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// request.write(data);
|
|
||||||
// request.end();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// catch (e)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
install();
|
|
@ -1,4 +1,3 @@
|
|||||||
import { IAssetManager } from './asset';
|
|
||||||
import { IDisposable } from './common';
|
import { IDisposable } from './common';
|
||||||
import { ICommunicationManager } from './communication';
|
import { ICommunicationManager } from './communication';
|
||||||
import { IConfigurationManager } from './configuration';
|
import { IConfigurationManager } from './configuration';
|
||||||
@ -6,6 +5,5 @@ import { IConfigurationManager } from './configuration';
|
|||||||
export interface INitroCore extends IDisposable
|
export interface INitroCore extends IDisposable
|
||||||
{
|
{
|
||||||
configuration: IConfigurationManager;
|
configuration: IConfigurationManager;
|
||||||
asset: IAssetManager;
|
|
||||||
communication: ICommunicationManager;
|
communication: ICommunicationManager;
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,20 @@
|
|||||||
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
||||||
import { Loader, LoaderResource } from '@pixi/loaders';
|
import { Loader, LoaderResource } from '@pixi/loaders';
|
||||||
import { Spritesheet } from '@pixi/spritesheet';
|
import { Spritesheet } from '@pixi/spritesheet';
|
||||||
import { IAssetData, IAssetManager, IGraphicAsset, IGraphicAssetCollection, NitroLogger } from '../../api';
|
import { NitroLogger } from '../common';
|
||||||
import { Disposable } from '../common';
|
import { ArrayBufferToBase64, NitroBundle } from '../utils';
|
||||||
import { ArrayBufferToBase64 } from '../utils';
|
|
||||||
import { GraphicAssetCollection } from './GraphicAssetCollection';
|
import { GraphicAssetCollection } from './GraphicAssetCollection';
|
||||||
import { NitroBundle } from './NitroBundle';
|
import { IAssetData } from './IAssetData';
|
||||||
|
import { IAssetManager } from './IAssetManager';
|
||||||
|
import { IGraphicAsset } from './IGraphicAsset';
|
||||||
|
import { IGraphicAssetCollection } from './IGraphicAssetCollection';
|
||||||
|
|
||||||
export class AssetManager extends Disposable implements IAssetManager
|
export class AssetManager implements IAssetManager
|
||||||
{
|
{
|
||||||
private _textures: Map<string, Texture<Resource>>;
|
public static _INSTANCE: IAssetManager = new AssetManager();
|
||||||
private _collections: Map<string, IGraphicAssetCollection>;
|
|
||||||
|
|
||||||
constructor()
|
private _textures: Map<string, Texture<Resource>> = new Map();
|
||||||
{
|
private _collections: Map<string, IGraphicAssetCollection> = new Map();
|
||||||
super();
|
|
||||||
|
|
||||||
this._textures = new Map();
|
|
||||||
this._collections = new Map();
|
|
||||||
}
|
|
||||||
|
|
||||||
public getTexture(name: string): Texture<Resource>
|
public getTexture(name: string): Texture<Resource>
|
||||||
{
|
{
|
3
src/api/asset/GetAssetManager.ts
Normal file
3
src/api/asset/GetAssetManager.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import { AssetManager } from './AssetManager';
|
||||||
|
|
||||||
|
export const GetAssetManager = () => AssetManager._INSTANCE;
|
@ -1,6 +1,6 @@
|
|||||||
import { Resource, Texture } from '@pixi/core';
|
import { Resource, Texture } from '@pixi/core';
|
||||||
import { Rectangle } from '@pixi/math';
|
import { Rectangle } from '@pixi/math';
|
||||||
import { IGraphicAsset } from '../../api';
|
import { IGraphicAsset } from './IGraphicAsset';
|
||||||
|
|
||||||
export class GraphicAsset implements IGraphicAsset
|
export class GraphicAsset implements IGraphicAsset
|
||||||
{
|
{
|
@ -1,10 +1,14 @@
|
|||||||
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
||||||
import { Spritesheet } from '@pixi/spritesheet';
|
import { Spritesheet } from '@pixi/spritesheet';
|
||||||
import { Dict } from '@pixi/utils';
|
import { Dict } from '@pixi/utils';
|
||||||
import { IAsset, IAssetData, IAssetPalette, IGraphicAsset, IGraphicAssetCollection } from '../../api';
|
|
||||||
import { GetTickerTime } from '../../pixi-proxy';
|
import { GetTickerTime } from '../../pixi-proxy';
|
||||||
import { GraphicAsset } from './GraphicAsset';
|
import { GraphicAsset } from './GraphicAsset';
|
||||||
import { GraphicAssetPalette } from './GraphicAssetPalette';
|
import { GraphicAssetPalette } from './GraphicAssetPalette';
|
||||||
|
import { IAsset } from './IAsset';
|
||||||
|
import { IAssetData } from './IAssetData';
|
||||||
|
import { IAssetPalette } from './IAssetPalette';
|
||||||
|
import { IGraphicAsset } from './IGraphicAsset';
|
||||||
|
import { IGraphicAssetCollection } from './IGraphicAssetCollection';
|
||||||
|
|
||||||
export class GraphicAssetCollection implements IGraphicAssetCollection
|
export class GraphicAssetCollection implements IGraphicAssetCollection
|
||||||
{
|
{
|
@ -7,7 +7,6 @@ import { IGraphicAssetCollection } from './IGraphicAssetCollection';
|
|||||||
|
|
||||||
export interface IAssetManager
|
export interface IAssetManager
|
||||||
{
|
{
|
||||||
dispose(): void;
|
|
||||||
getTexture(name: string): Texture<Resource>;
|
getTexture(name: string): Texture<Resource>;
|
||||||
setTexture(name: string, texture: Texture<Resource>): void;
|
setTexture(name: string, texture: Texture<Resource>): void;
|
||||||
getAsset(name: string): IGraphicAsset;
|
getAsset(name: string): IGraphicAsset;
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
export * from './animation';
|
export * from './animation';
|
||||||
|
export * from './AssetManager';
|
||||||
|
export * from './GetAssetManager';
|
||||||
|
export * from './GraphicAsset';
|
||||||
|
export * from './GraphicAssetCollection';
|
||||||
|
export * from './GraphicAssetGifCollection';
|
||||||
|
export * from './GraphicAssetPalette';
|
||||||
export * from './IAsset';
|
export * from './IAsset';
|
||||||
export * from './IAssetAlias';
|
export * from './IAssetAlias';
|
||||||
export * from './IAssetData';
|
export * from './IAssetData';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IBinaryWriter } from './IBinaryWriter';
|
import { IBinaryWriter } from '../utils';
|
||||||
import { IConnection } from './IConnection';
|
import { IConnection } from './IConnection';
|
||||||
import { IMessageDataWrapper } from './IMessageDataWrapper';
|
import { IMessageDataWrapper } from './IMessageDataWrapper';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IBinaryReader } from './IBinaryReader';
|
import { IBinaryReader } from '../utils';
|
||||||
|
|
||||||
export interface IMessageDataWrapper
|
export interface IMessageDataWrapper
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
export * from './enums';
|
export * from './enums';
|
||||||
export * from './IBinaryReader';
|
|
||||||
export * from './IBinaryWriter';
|
|
||||||
export * from './ICodec';
|
export * from './ICodec';
|
||||||
export * from './ICommunicationManager';
|
export * from './ICommunicationManager';
|
||||||
export * from './IConnection';
|
export * from './IConnection';
|
||||||
|
@ -13,7 +13,6 @@ export * from './common';
|
|||||||
export * from './communication';
|
export * from './communication';
|
||||||
export * from './communication/enums';
|
export * from './communication/enums';
|
||||||
export * from './configuration';
|
export * from './configuration';
|
||||||
export * from './IAdvancedMap';
|
|
||||||
export * from './INitroCore';
|
export * from './INitroCore';
|
||||||
export * from './nitro';
|
export * from './nitro';
|
||||||
export * from './nitro/avatar';
|
export * from './nitro/avatar';
|
||||||
@ -36,6 +35,7 @@ export * from './nitro/room/utils';
|
|||||||
export * from './nitro/session';
|
export * from './nitro/session';
|
||||||
export * from './nitro/session/enum';
|
export * from './nitro/session/enum';
|
||||||
export * from './nitro/sound';
|
export * from './nitro/sound';
|
||||||
|
export * from './nitro/sound/common';
|
||||||
export * from './room';
|
export * from './room';
|
||||||
export * from './room/object';
|
export * from './room/object';
|
||||||
export * from './room/object/enum';
|
export * from './room/object/enum';
|
||||||
@ -45,3 +45,4 @@ export * from './room/renderer';
|
|||||||
export * from './ui';
|
export * from './ui';
|
||||||
export * from './ui/widget';
|
export * from './ui/widget';
|
||||||
export * from './ui/widget/enums';
|
export * from './ui/widget/enums';
|
||||||
|
export * from './utils';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAdvancedMap } from '../../../IAdvancedMap';
|
import { IAdvancedMap } from '../../../utils';
|
||||||
import { IPartColor } from './IPartColor';
|
import { IPartColor } from './IPartColor';
|
||||||
|
|
||||||
export interface IPalette
|
export interface IPalette
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAdvancedMap } from '../../../IAdvancedMap';
|
import { IAdvancedMap } from '../../../utils';
|
||||||
import { IFigurePartSet } from './IFigurePartSet';
|
import { IFigurePartSet } from './IFigurePartSet';
|
||||||
|
|
||||||
export interface ISetType
|
export interface ISetType
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IAdvancedMap } from '../../IAdvancedMap';
|
import { IAdvancedMap } from '../../utils';
|
||||||
import { ISongInfo } from './common/ISongInfo';
|
import { ISongInfo } from './common';
|
||||||
import { IPlaylistController } from './IPlaylistController';
|
import { IPlaylistController } from './IPlaylistController';
|
||||||
|
|
||||||
export interface IMusicController
|
export interface IMusicController
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAdvancedMap } from '../IAdvancedMap';
|
import { IAdvancedMap } from '../utils';
|
||||||
import { IRoomObjectController } from './object';
|
import { IRoomObjectController } from './object';
|
||||||
|
|
||||||
export interface IRoomObjectManager
|
export interface IRoomObjectManager
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAdvancedMap } from '../../IAdvancedMap';
|
import { IAdvancedMap } from '../../utils';
|
||||||
import { IRoomObjectModel } from './IRoomObjectModel';
|
import { IRoomObjectModel } from './IRoomObjectModel';
|
||||||
|
|
||||||
export interface IRoomObjectModelController extends IRoomObjectModel
|
export interface IRoomObjectModelController extends IRoomObjectModel
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAdvancedMap } from '../../api';
|
import { IAdvancedMap } from './IAdvancedMap';
|
||||||
|
|
||||||
export class AdvancedMap<T, U> implements IAdvancedMap<T, U>
|
export class AdvancedMap<T, U> implements IAdvancedMap<T, U>
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
import { IBinaryReader } from '../../api';
|
import { IBinaryReader } from './IBinaryReader';
|
||||||
|
|
||||||
export class BinaryReader implements IBinaryReader
|
export class BinaryReader implements IBinaryReader
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
import { IBinaryWriter } from '../../api';
|
import { IBinaryWriter } from './IBinaryWriter';
|
||||||
|
|
||||||
export class BinaryWriter implements IBinaryWriter
|
export class BinaryWriter implements IBinaryWriter
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
import { IDisposable } from './common';
|
import { IDisposable } from '../common';
|
||||||
|
|
||||||
export interface IAdvancedMap<T = any, U = any> extends IDisposable
|
export interface IAdvancedMap<T = any, U = any> extends IDisposable
|
||||||
{
|
{
|
@ -1,6 +1,7 @@
|
|||||||
import { BaseTexture } from '@pixi/core';
|
import { BaseTexture } from '@pixi/core';
|
||||||
import { Data, inflate } from 'pako';
|
import { Data, inflate } from 'pako';
|
||||||
import { ArrayBufferToBase64, BinaryReader } from '../utils';
|
import { ArrayBufferToBase64 } from './ArrayBufferToBase64';
|
||||||
|
import { BinaryReader } from './BinaryReader';
|
||||||
|
|
||||||
export class NitroBundle
|
export class NitroBundle
|
||||||
{
|
{
|
@ -2,4 +2,7 @@ export * from './AdvancedMap';
|
|||||||
export * from './ArrayBufferToBase64';
|
export * from './ArrayBufferToBase64';
|
||||||
export * from './BinaryReader';
|
export * from './BinaryReader';
|
||||||
export * from './BinaryWriter';
|
export * from './BinaryWriter';
|
||||||
export * from './SayHello';
|
export * from './IAdvancedMap';
|
||||||
|
export * from './IBinaryReader';
|
||||||
|
export * from './IBinaryWriter';
|
||||||
|
export * from './NitroBundle';
|
@ -1,36 +1,26 @@
|
|||||||
import { IAssetManager, ICommunicationManager, IConfigurationManager, INitroCore } from '../api';
|
import { ICommunicationManager, IConfigurationManager, INitroCore } from '../api';
|
||||||
import { AssetManager } from './asset';
|
|
||||||
import { Disposable } from './common';
|
import { Disposable } from './common';
|
||||||
import { CommunicationManager } from './communication';
|
import { CommunicationManager } from './communication';
|
||||||
import { ConfigurationManager } from './configuration';
|
import { ConfigurationManager } from './configuration';
|
||||||
import { SayHello } from './utils';
|
import { NitroVersion } from './NitroVersion';
|
||||||
|
|
||||||
export class NitroCore extends Disposable implements INitroCore
|
export class NitroCore extends Disposable implements INitroCore
|
||||||
{
|
{
|
||||||
private _configuration: IConfigurationManager;
|
private _configuration: IConfigurationManager;
|
||||||
private _communication: ICommunicationManager;
|
private _communication: ICommunicationManager;
|
||||||
private _asset: IAssetManager;
|
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
SayHello();
|
NitroVersion.sayHello();
|
||||||
|
|
||||||
this._configuration = new ConfigurationManager();
|
this._configuration = new ConfigurationManager();
|
||||||
this._communication = new CommunicationManager();
|
this._communication = new CommunicationManager();
|
||||||
this._asset = new AssetManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onDispose(): void
|
protected onDispose(): void
|
||||||
{
|
{
|
||||||
if(this._asset)
|
|
||||||
{
|
|
||||||
this._asset.dispose();
|
|
||||||
|
|
||||||
this._asset = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this._communication)
|
if(this._communication)
|
||||||
{
|
{
|
||||||
this._communication.dispose();
|
this._communication.dispose();
|
||||||
@ -48,9 +38,4 @@ export class NitroCore extends Disposable implements INitroCore
|
|||||||
{
|
{
|
||||||
return this._communication;
|
return this._communication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get asset(): IAssetManager
|
|
||||||
{
|
|
||||||
return this._asset;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,30 @@
|
|||||||
export class NitroVersion
|
export class NitroVersion
|
||||||
{
|
{
|
||||||
public static RENDERER_VERSION: string = '1.4.2';
|
public static RENDERER_VERSION: string = '1.4.7';
|
||||||
public static UI_VERSION: string = '';
|
public static UI_VERSION: string = '';
|
||||||
|
|
||||||
|
public static sayHello(): void
|
||||||
|
{
|
||||||
|
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1)
|
||||||
|
{
|
||||||
|
const args = [
|
||||||
|
`\n %c %c %c Nitro ${NitroVersion.UI_VERSION} - Renderer ${NitroVersion.RENDERER_VERSION} %c %c %c https://discord.nitrodev.co %c %c \n\n`,
|
||||||
|
'background: #ffffff; padding:5px 0;',
|
||||||
|
'background: #ffffff; padding:5px 0;',
|
||||||
|
'color: #ffffff; background: #000000; padding:5px 0;',
|
||||||
|
'background: #ffffff; padding:5px 0;',
|
||||||
|
'background: #ffffff; padding:5px 0;',
|
||||||
|
'background: #000000; padding:5px 0;',
|
||||||
|
'background: #ffffff; padding:5px 0;',
|
||||||
|
'background: #ffffff; padding:5px 0;'
|
||||||
|
];
|
||||||
|
|
||||||
|
self.console.log(...args);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(self.console)
|
||||||
|
{
|
||||||
|
self.console.log(`Nitro ${NitroVersion.UI_VERSION} - Renderer ${NitroVersion.RENDERER_VERSION} `);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
export * from './AssetManager';
|
|
||||||
export * from './GraphicAsset';
|
|
||||||
export * from './GraphicAssetCollection';
|
|
||||||
export * from './GraphicAssetGifCollection';
|
|
||||||
export * from './GraphicAssetPalette';
|
|
||||||
export * from './NitroBundle';
|
|
@ -1,5 +1,4 @@
|
|||||||
import { IBinaryWriter, ICodec, IConnection, IMessageDataWrapper } from '../../../../api';
|
import { BinaryReader, BinaryWriter, IBinaryWriter, ICodec, IConnection, IMessageDataWrapper } from '../../../../api';
|
||||||
import { BinaryReader, BinaryWriter } from '../../../utils';
|
|
||||||
import { Byte } from '../Byte';
|
import { Byte } from '../Byte';
|
||||||
import { Short } from '../Short';
|
import { Short } from '../Short';
|
||||||
import { EvaWireDataWrapper } from './EvaWireDataWrapper';
|
import { EvaWireDataWrapper } from './EvaWireDataWrapper';
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
export * from './asset';
|
|
||||||
export * from './common';
|
export * from './common';
|
||||||
export * from './communication';
|
export * from './communication';
|
||||||
export * from './communication/codec';
|
export * from './communication/codec';
|
||||||
@ -7,4 +6,3 @@ export * from './communication/messages';
|
|||||||
export * from './configuration';
|
export * from './configuration';
|
||||||
export * from './NitroCore';
|
export * from './NitroCore';
|
||||||
export * from './NitroVersion';
|
export * from './NitroVersion';
|
||||||
export * from './utils';
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
import { NitroVersion } from '../NitroVersion';
|
|
||||||
|
|
||||||
export const SayHello = () =>
|
|
||||||
{
|
|
||||||
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1)
|
|
||||||
{
|
|
||||||
const args = [
|
|
||||||
`\n %c %c %c Nitro ${NitroVersion.UI_VERSION} - Renderer ${NitroVersion.RENDERER_VERSION} %c %c %c https://discord.nitrodev.co %c %c \n\n`,
|
|
||||||
'background: #ffffff; padding:5px 0;',
|
|
||||||
'background: #ffffff; padding:5px 0;',
|
|
||||||
'color: #ffffff; background: #000000; padding:5px 0;',
|
|
||||||
'background: #ffffff; padding:5px 0;',
|
|
||||||
'background: #ffffff; padding:5px 0;',
|
|
||||||
'background: #000000; padding:5px 0;',
|
|
||||||
'background: #ffffff; padding:5px 0;',
|
|
||||||
'background: #ffffff; padding:5px 0;'
|
|
||||||
];
|
|
||||||
|
|
||||||
self.console.log(...args);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(self.console)
|
|
||||||
{
|
|
||||||
self.console.log(`Nitro ${NitroVersion.UI_VERSION} - Renderer ${NitroVersion.RENDERER_VERSION} `);
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,4 +1,4 @@
|
|||||||
import { NitroEvent } from '../../events';
|
import { NitroEvent } from '../core';
|
||||||
|
|
||||||
export class RoomContentLoadedEvent extends NitroEvent
|
export class RoomContentLoadedEvent extends NitroEvent
|
||||||
{
|
{
|
@ -14,6 +14,7 @@ export class RoomEngineObjectEvent extends RoomEngineEvent
|
|||||||
public static REQUEST_MANIPULATION: string = 'REOE_REQUEST_MANIPULATION';
|
public static REQUEST_MANIPULATION: string = 'REOE_REQUEST_MANIPULATION';
|
||||||
public static MOUSE_ENTER: string = 'REOE_MOUSE_ENTER';
|
public static MOUSE_ENTER: string = 'REOE_MOUSE_ENTER';
|
||||||
public static MOUSE_LEAVE: string = 'REOE_MOUSE_LEAVE';
|
public static MOUSE_LEAVE: string = 'REOE_MOUSE_LEAVE';
|
||||||
|
public static DOUBLE_CLICK: string = 'REOE_DOUBLE_CLICK';
|
||||||
|
|
||||||
private _objectId: number;
|
private _objectId: number;
|
||||||
private _category: number;
|
private _category: number;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectBadgeAssetEvent extends RoomObjectEvent
|
export class RoomObjectBadgeAssetEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectDataRequestEvent extends RoomObjectEvent
|
export class RoomObjectDataRequestEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent
|
export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectFloorHoleEvent extends RoomObjectEvent
|
export class RoomObjectFloorHoleEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectFurnitureActionEvent extends RoomObjectEvent
|
export class RoomObjectFurnitureActionEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectHSLColorEnableEvent extends RoomObjectEvent
|
export class RoomObjectHSLColorEnableEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectMoveEvent extends RoomObjectEvent
|
export class RoomObjectMoveEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectRoomAdEvent extends RoomObjectEvent
|
export class RoomObjectRoomAdEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent
|
export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectStateChangedEvent extends RoomObjectEvent
|
export class RoomObjectStateChangedEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectMouseEvent } from '../../room';
|
import { RoomObjectMouseEvent } from './RoomObjectMouseEvent';
|
||||||
|
|
||||||
export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
|
export class RoomObjectTileMouseEvent extends RoomObjectMouseEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject, IVector3D, Vector3d } from '../../api';
|
import { IRoomObject, IVector3D, Vector3d } from '../../api';
|
||||||
import { RoomObjectMouseEvent } from '../../room';
|
import { RoomObjectMouseEvent } from './RoomObjectMouseEvent';
|
||||||
|
|
||||||
export class RoomObjectWallMouseEvent extends RoomObjectMouseEvent
|
export class RoomObjectWallMouseEvent extends RoomObjectMouseEvent
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IRoomObject } from '../../api';
|
import { IRoomObject } from '../../api';
|
||||||
import { RoomObjectEvent } from '../../room';
|
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||||
|
|
||||||
export class RoomObjectWidgetRequestEvent extends RoomObjectEvent
|
export class RoomObjectWidgetRequestEvent extends RoomObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { NitroEvent } from '../../events';
|
import { NitroEvent } from '../core';
|
||||||
|
|
||||||
export class RoomToObjectEvent extends NitroEvent
|
export class RoomToObjectEvent extends NitroEvent
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
import { IVector3D } from '../../api';
|
import { IVector3D } from '../../api';
|
||||||
import { RoomToObjectEvent } from '../../room';
|
import { RoomToObjectEvent } from './RoomToObjectEvent';
|
||||||
|
|
||||||
export class RoomToObjectOwnAvatarMoveEvent extends RoomToObjectEvent
|
export class RoomToObjectOwnAvatarMoveEvent extends RoomToObjectEvent
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export * from './RoomBackgroundColorEvent';
|
export * from './RoomBackgroundColorEvent';
|
||||||
|
export * from './RoomContentLoadedEvent';
|
||||||
export * from './RoomDragEvent';
|
export * from './RoomDragEvent';
|
||||||
export * from './RoomEngineDimmerStateEvent';
|
export * from './RoomEngineDimmerStateEvent';
|
||||||
export * from './RoomEngineEvent';
|
export * from './RoomEngineEvent';
|
||||||
@ -13,10 +14,12 @@ export * from './RoomEngineUseProductEvent';
|
|||||||
export * from './RoomObjectBadgeAssetEvent';
|
export * from './RoomObjectBadgeAssetEvent';
|
||||||
export * from './RoomObjectDataRequestEvent';
|
export * from './RoomObjectDataRequestEvent';
|
||||||
export * from './RoomObjectDimmerStateUpdateEvent';
|
export * from './RoomObjectDimmerStateUpdateEvent';
|
||||||
|
export * from './RoomObjectEvent';
|
||||||
export * from './RoomObjectFloorHoleEvent';
|
export * from './RoomObjectFloorHoleEvent';
|
||||||
export * from './RoomObjectFurnitureActionEvent';
|
export * from './RoomObjectFurnitureActionEvent';
|
||||||
export * from './RoomObjectHSLColorEnabledEvent';
|
export * from './RoomObjectHSLColorEnabledEvent';
|
||||||
export * from './RoomObjectHSLColorEnableEvent';
|
export * from './RoomObjectHSLColorEnableEvent';
|
||||||
|
export * from './RoomObjectMouseEvent';
|
||||||
export * from './RoomObjectMoveEvent';
|
export * from './RoomObjectMoveEvent';
|
||||||
export * from './RoomObjectPlaySoundIdEvent';
|
export * from './RoomObjectPlaySoundIdEvent';
|
||||||
export * from './RoomObjectRoomAdEvent';
|
export * from './RoomObjectRoomAdEvent';
|
||||||
@ -26,5 +29,7 @@ export * from './RoomObjectStateChangedEvent';
|
|||||||
export * from './RoomObjectTileMouseEvent';
|
export * from './RoomObjectTileMouseEvent';
|
||||||
export * from './RoomObjectWallMouseEvent';
|
export * from './RoomObjectWallMouseEvent';
|
||||||
export * from './RoomObjectWidgetRequestEvent';
|
export * from './RoomObjectWidgetRequestEvent';
|
||||||
|
export * from './RoomSpriteMouseEvent';
|
||||||
|
export * from './RoomToObjectEvent';
|
||||||
export * from './RoomToObjectOwnAvatarMoveEvent';
|
export * from './RoomToObjectOwnAvatarMoveEvent';
|
||||||
export * from './RoomZoomEvent';
|
export * from './RoomZoomEvent';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Application } from '@pixi/app';
|
import { Application } from '@pixi/app';
|
||||||
import { Ticker } from '@pixi/ticker';
|
|
||||||
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker } from '../api';
|
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker } from '../api';
|
||||||
|
|
||||||
export interface INitro
|
export interface INitro
|
||||||
@ -32,8 +31,6 @@ export interface INitro
|
|||||||
soundManager: ISoundManager;
|
soundManager: ISoundManager;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
ticker: Ticker;
|
|
||||||
time: number;
|
|
||||||
isReady: boolean;
|
isReady: boolean;
|
||||||
isDisposed: boolean;
|
isDisposed: boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { Application, IApplicationOptions } from '@pixi/app';
|
import { Application, IApplicationOptions } from '@pixi/app';
|
||||||
import { SCALE_MODES } from '@pixi/constants';
|
import { SCALE_MODES } from '@pixi/constants';
|
||||||
import { settings } from '@pixi/settings';
|
import { settings } from '@pixi/settings';
|
||||||
import { Ticker } from '@pixi/ticker';
|
|
||||||
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker, NitroConfiguration } from '../api';
|
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker, NitroConfiguration } from '../api';
|
||||||
import { ConfigurationEvent, EventDispatcher, NitroCore } from '../core';
|
import { ConfigurationEvent, EventDispatcher, NitroCore } from '../core';
|
||||||
import { NitroEvent, RoomEngineEvent } from '../events';
|
import { NitroEvent, RoomEngineEvent } from '../events';
|
||||||
import { PixiApplicationProxy } from '../pixi-proxy';
|
import { GetTicker, PixiApplicationProxy } from '../pixi-proxy';
|
||||||
import { RoomManager } from '../room';
|
import { RoomManager } from '../room';
|
||||||
import { AvatarRenderManager } from './avatar';
|
import { AvatarRenderManager } from './avatar';
|
||||||
import { RoomCameraWidgetManager } from './camera';
|
import { RoomCameraWidgetManager } from './camera';
|
||||||
@ -200,9 +199,9 @@ export class Nitro implements INitro
|
|||||||
private onConfigurationLoadedEvent(event: ConfigurationEvent): void
|
private onConfigurationLoadedEvent(event: ConfigurationEvent): void
|
||||||
{
|
{
|
||||||
const animationFPS = NitroConfiguration.getValue<number>('system.animation.fps', 24);
|
const animationFPS = NitroConfiguration.getValue<number>('system.animation.fps', 24);
|
||||||
const limitsFPS = NitroConfiguration.getValue<boolean>('system.limits.fps', true);
|
const limitsFPS = NitroConfiguration.getValue<boolean>('system.limits.fps', false);
|
||||||
|
|
||||||
if(limitsFPS) Nitro.instance.ticker.maxFPS = animationFPS;
|
if(limitsFPS) GetTicker().maxFPS = animationFPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onRoomEngineReady(event: RoomEngineEvent): void
|
private onRoomEngineReady(event: RoomEngineEvent): void
|
||||||
@ -392,16 +391,6 @@ export class Nitro implements INitro
|
|||||||
return this._application.renderer.height;
|
return this._application.renderer.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get ticker(): Ticker
|
|
||||||
{
|
|
||||||
return Ticker.shared;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get time(): number
|
|
||||||
{
|
|
||||||
return this.ticker.lastTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get isReady(): boolean
|
public get isReady(): boolean
|
||||||
{
|
{
|
||||||
return this._isReady;
|
return this._isReady;
|
||||||
|
@ -3,8 +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, IAdvancedMap, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
|
import { AdvancedMap, AvatarAction, AvatarDirectionAngle, AvatarScaleType, AvatarSetType, IActionDefinition, IActiveActionData, IAdvancedMap, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
|
||||||
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';
|
||||||
import { AssetAliasCollection } from './alias';
|
import { AssetAliasCollection } from './alias';
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { AvatarSetType, IAssetManager, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IFigureData, IFigurePartSet, IFigureSetData, IGraphicAsset, INitroEvent, IStructureData, NitroConfiguration, NitroLogger } from '../../api';
|
import { AvatarSetType, GetAssetManager, IAssetManager, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IFigureData, IFigurePartSet, IFigureSetData, IGraphicAsset, INitroEvent, IStructureData, NitroConfiguration, NitroLogger } from '../../api';
|
||||||
import { NitroManager } from '../../core';
|
import { NitroManager } from '../../core';
|
||||||
import { AvatarRenderEvent, NitroEvent } from '../../events';
|
import { AvatarRenderEvent, NitroEvent } from '../../events';
|
||||||
import { Nitro } from '../Nitro';
|
|
||||||
import { FigureDataContainer } from '../utils';
|
import { FigureDataContainer } from '../utils';
|
||||||
import { AssetAliasCollection } from './alias';
|
import { AssetAliasCollection } from './alias';
|
||||||
import { AvatarAssetDownloadManager } from './AvatarAssetDownloadManager';
|
import { AvatarAssetDownloadManager } from './AvatarAssetDownloadManager';
|
||||||
@ -70,13 +69,13 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
this.loadAnimations();
|
this.loadAnimations();
|
||||||
this.loadFigureData();
|
this.loadFigureData();
|
||||||
|
|
||||||
this._aliasCollection = new AssetAliasCollection(this, Nitro.instance.core.asset);
|
this._aliasCollection = new AssetAliasCollection(this, GetAssetManager());
|
||||||
|
|
||||||
this._aliasCollection.init();
|
this._aliasCollection.init();
|
||||||
|
|
||||||
if(!this._avatarAssetDownloadManager)
|
if(!this._avatarAssetDownloadManager)
|
||||||
{
|
{
|
||||||
this._avatarAssetDownloadManager = new AvatarAssetDownloadManager(Nitro.instance.core.asset, this._structure);
|
this._avatarAssetDownloadManager = new AvatarAssetDownloadManager(GetAssetManager(), this._structure);
|
||||||
|
|
||||||
this._avatarAssetDownloadManager.addEventListener(AvatarAssetDownloadManager.DOWNLOADER_READY, this.onAvatarAssetDownloaderReady);
|
this._avatarAssetDownloadManager.addEventListener(AvatarAssetDownloadManager.DOWNLOADER_READY, this.onAvatarAssetDownloaderReady);
|
||||||
this._avatarAssetDownloadManager.addEventListener(AvatarAssetDownloadManager.LIBRARY_LOADED, this.onAvatarAssetDownloaded);
|
this._avatarAssetDownloadManager.addEventListener(AvatarAssetDownloadManager.LIBRARY_LOADED, this.onAvatarAssetDownloaded);
|
||||||
@ -84,7 +83,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
|
|
||||||
if(!this._effectAssetDownloadManager)
|
if(!this._effectAssetDownloadManager)
|
||||||
{
|
{
|
||||||
this._effectAssetDownloadManager = new EffectAssetDownloadManager(Nitro.instance.core.asset, this._structure);
|
this._effectAssetDownloadManager = new EffectAssetDownloadManager(GetAssetManager(), this._structure);
|
||||||
|
|
||||||
this._effectAssetDownloadManager.addEventListener(EffectAssetDownloadManager.DOWNLOADER_READY, this.onEffectAssetDownloaderReady);
|
this._effectAssetDownloadManager.addEventListener(EffectAssetDownloadManager.DOWNLOADER_READY, this.onEffectAssetDownloaderReady);
|
||||||
this._effectAssetDownloadManager.addEventListener(EffectAssetDownloadManager.LIBRARY_LOADED, this.onEffectAssetDownloaded);
|
this._effectAssetDownloadManager.addEventListener(EffectAssetDownloadManager.LIBRARY_LOADED, this.onEffectAssetDownloaded);
|
||||||
@ -136,7 +135,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
const defaultActions = NitroConfiguration.getValue<string>('avatar.default.actions');
|
const defaultActions = NitroConfiguration.getValue<string>('avatar.default.actions');
|
||||||
|
|
||||||
if(defaultActions) this._structure.initActions(Nitro.instance.core.asset, defaultActions);
|
if(defaultActions) this._structure.initActions(GetAssetManager(), defaultActions);
|
||||||
|
|
||||||
const request = new XMLHttpRequest();
|
const request = new XMLHttpRequest();
|
||||||
|
|
||||||
@ -442,7 +441,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
|
|
||||||
public get assets(): IAssetManager
|
public get assets(): IAssetManager
|
||||||
{
|
{
|
||||||
return Nitro.instance.core.asset;
|
return GetAssetManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isReady(): boolean
|
public get isReady(): boolean
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IFigureDataPalette, IPalette, IPartColor } from '../../../../api';
|
import { AdvancedMap, IAdvancedMap, IFigureDataPalette, IPalette, IPartColor } from '../../../../api';
|
||||||
import { AdvancedMap } from '../../../../core';
|
|
||||||
import { PartColor } from './PartColor';
|
import { PartColor } from './PartColor';
|
||||||
|
|
||||||
export class Palette implements IPalette
|
export class Palette implements IPalette
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IFigureDataSetType, IFigurePartSet, ISetType } from '../../../../api';
|
import { AdvancedMap, IAdvancedMap, IFigureDataSetType, IFigurePartSet, ISetType } from '../../../../api';
|
||||||
import { AdvancedMap } from '../../../../core';
|
|
||||||
import { FigurePartSet } from './FigurePartSet';
|
import { FigurePartSet } from './FigurePartSet';
|
||||||
|
|
||||||
export class SetType implements ISetType
|
export class SetType implements ISetType
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../../core';
|
|
||||||
|
|
||||||
export class BadgesParser implements IMessageParser
|
export class BadgesParser implements IMessageParser
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
|
|
||||||
export class UnseenItemsParser implements IMessageParser
|
export class UnseenItemsParser implements IMessageParser
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
|
|
||||||
export class JukeboxSongDisksMessageParser implements IMessageParser
|
export class JukeboxSongDisksMessageParser implements IMessageParser
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
|
|
||||||
export class UserSongDisksInventoryMessageParser implements IMessageParser
|
export class UserSongDisksInventoryMessageParser implements IMessageParser
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../../core';
|
|
||||||
import { RelationshipStatusInfo } from './RelationshipStatusInfo';
|
import { RelationshipStatusInfo } from './RelationshipStatusInfo';
|
||||||
|
|
||||||
export class RelationshipStatusInfoMessageParser implements IMessageParser
|
export class RelationshipStatusInfoMessageParser implements IMessageParser
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
import { BaseTexture, Resource, Texture } from '@pixi/core';
|
||||||
import { Loader, LoaderResource } from '@pixi/loaders';
|
import { Loader, LoaderResource } from '@pixi/loaders';
|
||||||
import { Spritesheet } from '@pixi/spritesheet';
|
import { Spritesheet } from '@pixi/spritesheet';
|
||||||
import { FurnitureType, IAssetData, IEventDispatcher, IFurnitureData, IFurnitureDataListener, IGraphicAssetCollection, IGraphicAssetGifCollection, IPetColorResult, IRoomContentListener, IRoomContentLoader, IRoomObject, ISessionDataManager, NitroConfiguration, NitroLogger, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, RoomObjectVisualizationType } from '../../api';
|
import { FurnitureType, GetAssetManager, GraphicAssetCollection, GraphicAssetGifCollection, IAssetData, IEventDispatcher, IFurnitureData, IFurnitureDataListener, IGraphicAssetCollection, IGraphicAssetGifCollection, IPetColorResult, IRoomContentListener, IRoomContentLoader, IRoomObject, ISessionDataManager, NitroBundle, NitroConfiguration, NitroLogger, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, RoomObjectVisualizationType } from '../../api';
|
||||||
import { GraphicAssetCollection, GraphicAssetGifCollection, NitroBundle } from '../../core';
|
|
||||||
import { NitroEvent } from '../../events';
|
import { NitroEvent } from '../../events';
|
||||||
import { RoomContentLoadedEvent } from '../../room/events/RoomContentLoadedEvent';
|
import { RoomContentLoadedEvent } from '../../events/room/RoomContentLoadedEvent';
|
||||||
import { Nitro } from '../Nitro';
|
|
||||||
import { PetColorResult } from './PetColorResult';
|
import { PetColorResult } from './PetColorResult';
|
||||||
|
|
||||||
export class RoomContentLoader implements IFurnitureDataListener, IRoomContentLoader
|
export class RoomContentLoader implements IFurnitureDataListener, IRoomContentLoader
|
||||||
@ -282,7 +280,7 @@ export class RoomContentLoader implements IFurnitureDataListener, IRoomContentLo
|
|||||||
|
|
||||||
if(!existing)
|
if(!existing)
|
||||||
{
|
{
|
||||||
const globalCollection = Nitro.instance.core.asset.getCollection(name);
|
const globalCollection = GetAssetManager().getCollection(name);
|
||||||
|
|
||||||
if(globalCollection)
|
if(globalCollection)
|
||||||
{
|
{
|
||||||
|
@ -3,12 +3,11 @@ import { Container, DisplayObject } from '@pixi/display';
|
|||||||
import { Matrix, Point, Rectangle } from '@pixi/math';
|
import { Matrix, Point, Rectangle } from '@pixi/math';
|
||||||
import { IConnection, IDisposable, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, INitroCommunicationManager, INitroEvent, IObjectData, IPetColorResult, IPetCustomPart, IRoomContentListener, IRoomContentLoader, IRoomCreator, IRoomEngine, IRoomEngineServices, IRoomGeometry, IRoomInstance, IRoomManager, IRoomManagerListener, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRenderer, IRoomRendererFactory, IRoomRenderingCanvas, IRoomSessionManager, ISelectedRoomObjectData, ISessionDataManager, ITileObjectMap, IUpdateReceiver, IVector3D, LegacyDataType, MouseEventType, NitroConfiguration, NitroLogger, ObjectDataFactory, RoomControllerLevel, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, ToolbarIconEnum, Vector3d } from '../../api';
|
import { IConnection, IDisposable, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, INitroCommunicationManager, INitroEvent, IObjectData, IPetColorResult, IPetCustomPart, IRoomContentListener, IRoomContentLoader, IRoomCreator, IRoomEngine, IRoomEngineServices, IRoomGeometry, IRoomInstance, IRoomManager, IRoomManagerListener, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRenderer, IRoomRendererFactory, IRoomRenderingCanvas, IRoomSessionManager, ISelectedRoomObjectData, ISessionDataManager, ITileObjectMap, IUpdateReceiver, IVector3D, LegacyDataType, MouseEventType, NitroConfiguration, NitroLogger, ObjectDataFactory, RoomControllerLevel, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, ToolbarIconEnum, Vector3d } from '../../api';
|
||||||
import { NitroManager } from '../../core';
|
import { NitroManager } from '../../core';
|
||||||
import { BadgeImageReadyEvent, NitroToolbarAnimateIconEvent, RoomBackgroundColorEvent, RoomDragEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomObjectFurnitureActionEvent, RoomSessionEvent, RoomToObjectOwnAvatarMoveEvent } from '../../events';
|
import { BadgeImageReadyEvent, NitroToolbarAnimateIconEvent, RoomBackgroundColorEvent, RoomDragEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomObjectEvent, RoomObjectFurnitureActionEvent, RoomObjectMouseEvent, RoomSessionEvent, RoomToObjectOwnAvatarMoveEvent } from '../../events';
|
||||||
import { GetTickerTime, NitroSprite, TextureUtils } from '../../pixi-proxy';
|
import { GetTicker, GetTickerTime, NitroSprite, TextureUtils } from '../../pixi-proxy';
|
||||||
import { NumberBank, RoomEnterEffect, RoomGeometry, RoomInstance, RoomObjectEvent, RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomRendererFactory } from '../../room';
|
import { NumberBank, RoomEnterEffect, RoomGeometry, RoomInstance, RoomObjectUpdateMessage, RoomRendererFactory } from '../../room';
|
||||||
import { PetFigureData } from '../avatar';
|
import { PetFigureData } from '../avatar';
|
||||||
import { RenderRoomMessageComposer, RenderRoomThumbnailMessageComposer } from '../communication';
|
import { RenderRoomMessageComposer, RenderRoomThumbnailMessageComposer } from '../communication';
|
||||||
import { Nitro } from '../Nitro';
|
|
||||||
import { FurniId } from '../utils';
|
import { FurniId } from '../utils';
|
||||||
import { ImageResult } from './ImageResult';
|
import { ImageResult } from './ImageResult';
|
||||||
import { ObjectAvatarCarryObjectUpdateMessage, ObjectAvatarChatUpdateMessage, ObjectAvatarDanceUpdateMessage, ObjectAvatarEffectUpdateMessage, ObjectAvatarExperienceUpdateMessage, ObjectAvatarExpressionUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarFlatControlUpdateMessage, ObjectAvatarGestureUpdateMessage, ObjectAvatarGuideStatusUpdateMessage, ObjectAvatarMutedUpdateMessage, ObjectAvatarOwnMessage, ObjectAvatarPetGestureUpdateMessage, ObjectAvatarPlayerValueUpdateMessage, ObjectAvatarPlayingGameUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSignUpdateMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarTypingUpdateMessage, ObjectAvatarUpdateMessage, ObjectAvatarUseObjectUpdateMessage, ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage, ObjectHeightUpdateMessage, ObjectItemDataUpdateMessage, ObjectModelDataUpdateMessage, ObjectMoveUpdateMessage, ObjectRoomColorUpdateMessage, ObjectRoomFloorHoleUpdateMessage, ObjectRoomMaskUpdateMessage, ObjectRoomPlanePropertyUpdateMessage, ObjectRoomPlaneVisibilityUpdateMessage, ObjectRoomUpdateMessage, ObjectStateUpdateMessage } from './messages';
|
import { ObjectAvatarCarryObjectUpdateMessage, ObjectAvatarChatUpdateMessage, ObjectAvatarDanceUpdateMessage, ObjectAvatarEffectUpdateMessage, ObjectAvatarExperienceUpdateMessage, ObjectAvatarExpressionUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarFlatControlUpdateMessage, ObjectAvatarGestureUpdateMessage, ObjectAvatarGuideStatusUpdateMessage, ObjectAvatarMutedUpdateMessage, ObjectAvatarOwnMessage, ObjectAvatarPetGestureUpdateMessage, ObjectAvatarPlayerValueUpdateMessage, ObjectAvatarPlayingGameUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSignUpdateMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarTypingUpdateMessage, ObjectAvatarUpdateMessage, ObjectAvatarUseObjectUpdateMessage, ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage, ObjectHeightUpdateMessage, ObjectItemDataUpdateMessage, ObjectModelDataUpdateMessage, ObjectMoveUpdateMessage, ObjectRoomColorUpdateMessage, ObjectRoomFloorHoleUpdateMessage, ObjectRoomMaskUpdateMessage, ObjectRoomPlanePropertyUpdateMessage, ObjectRoomPlaneVisibilityUpdateMessage, ObjectRoomUpdateMessage, ObjectStateUpdateMessage } from './messages';
|
||||||
@ -151,7 +150,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
|
|
||||||
this.events.addEventListener(RoomContentLoader.LOADER_READY, this.onRoomContentLoaderReadyEvent);
|
this.events.addEventListener(RoomContentLoader.LOADER_READY, this.onRoomContentLoaderReadyEvent);
|
||||||
|
|
||||||
Nitro.instance.ticker.add(this.update, this);
|
GetTicker().add(this.update, this);
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', this.runVisibilityUpdate);
|
document.addEventListener('visibilitychange', this.runVisibilityUpdate);
|
||||||
}
|
}
|
||||||
@ -167,7 +166,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
|
|
||||||
document.removeEventListener('visibilitychange', this.runVisibilityUpdate);
|
document.removeEventListener('visibilitychange', this.runVisibilityUpdate);
|
||||||
|
|
||||||
Nitro.instance.ticker.remove(this.update, this);
|
GetTicker().remove(this.update, this);
|
||||||
|
|
||||||
if(this._roomObjectEventHandler) this._roomObjectEventHandler.dispose();
|
if(this._roomObjectEventHandler) this._roomObjectEventHandler.dispose();
|
||||||
|
|
||||||
@ -787,12 +786,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
{
|
{
|
||||||
if(flag)
|
if(flag)
|
||||||
{
|
{
|
||||||
Nitro.instance.ticker.remove(this.update, this);
|
GetTicker().remove(this.update, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Nitro.instance.ticker.remove(this.update, this);
|
GetTicker().remove(this.update, this);
|
||||||
Nitro.instance.ticker.add(this.update, this);
|
GetTicker().add(this.update, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IFurnitureStackingHeightMap, ILegacyWallGeometry, IObjectData, IRoomCanvasMouseListener, IRoomEngineServices, IRoomGeometry, IRoomObject, IRoomObjectController, IRoomObjectEventManager, ISelectedRoomObjectData, IVector3D, MouseEventType, NitroConfiguration, NitroLogger, RoomObjectCategory, RoomObjectOperationType, RoomObjectPlacementSource, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
|
import { IFurnitureStackingHeightMap, ILegacyWallGeometry, IObjectData, IRoomCanvasMouseListener, IRoomEngineServices, IRoomGeometry, IRoomObject, IRoomObjectController, IRoomObjectEventManager, ISelectedRoomObjectData, IVector3D, MouseEventType, NitroConfiguration, NitroLogger, RoomObjectCategory, RoomObjectOperationType, RoomObjectPlacementSource, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
|
||||||
import { Disposable } from '../../core';
|
import { Disposable } from '../../core';
|
||||||
import { RoomEngineDimmerStateEvent, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomEngineObjectPlacedOnUserEvent, RoomEngineObjectPlaySoundEvent, RoomEngineRoomAdEvent, RoomEngineSamplePlaybackEvent, RoomEngineTriggerWidgetEvent, RoomEngineUseProductEvent, RoomObjectBadgeAssetEvent, RoomObjectDataRequestEvent, RoomObjectDimmerStateUpdateEvent, RoomObjectFloorHoleEvent, RoomObjectFurnitureActionEvent, RoomObjectHSLColorEnabledEvent, RoomObjectHSLColorEnableEvent, RoomObjectMoveEvent, RoomObjectPlaySoundIdEvent, RoomObjectRoomAdEvent, RoomObjectSamplePlaybackEvent, RoomObjectSoundMachineEvent, RoomObjectStateChangedEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomObjectWidgetRequestEvent } from '../../events';
|
import { RoomEngineDimmerStateEvent, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomEngineObjectPlacedOnUserEvent, RoomEngineObjectPlaySoundEvent, RoomEngineRoomAdEvent, RoomEngineSamplePlaybackEvent, RoomEngineTriggerWidgetEvent, RoomEngineUseProductEvent, RoomObjectBadgeAssetEvent, RoomObjectDataRequestEvent, RoomObjectDimmerStateUpdateEvent, RoomObjectEvent, RoomObjectFloorHoleEvent, RoomObjectFurnitureActionEvent, RoomObjectHSLColorEnabledEvent, RoomObjectHSLColorEnableEvent, RoomObjectMouseEvent, RoomObjectMoveEvent, RoomObjectPlaySoundIdEvent, RoomObjectRoomAdEvent, RoomObjectSamplePlaybackEvent, RoomObjectSoundMachineEvent, RoomObjectStateChangedEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../events';
|
||||||
import { RoomEnterEffect, RoomId, RoomObjectEvent, RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../room';
|
import { RoomEnterEffect, RoomId, RoomObjectUpdateMessage } from '../../room';
|
||||||
import { BotPlaceComposer, FurnitureColorWheelComposer, FurnitureDiceActivateComposer, FurnitureDiceDeactivateComposer, FurnitureFloorUpdateComposer, FurnitureGroupInfoComposer, FurnitureMultiStateComposer, FurnitureOneWayDoorComposer, FurniturePickupComposer, FurniturePlaceComposer, FurniturePostItPlaceComposer, FurnitureRandomStateComposer, FurnitureWallMultiStateComposer, FurnitureWallUpdateComposer, GetItemDataComposer, GetResolutionAchievementsMessageComposer, PetMoveComposer, PetPlaceComposer, RemoveWallItemComposer, RoomUnitLookComposer, RoomUnitWalkComposer, SetItemDataMessageComposer, SetObjectDataMessageComposer } from '../communication';
|
import { BotPlaceComposer, FurnitureColorWheelComposer, FurnitureDiceActivateComposer, FurnitureDiceDeactivateComposer, FurnitureFloorUpdateComposer, FurnitureGroupInfoComposer, FurnitureMultiStateComposer, FurnitureOneWayDoorComposer, FurniturePickupComposer, FurniturePlaceComposer, FurniturePostItPlaceComposer, FurnitureRandomStateComposer, FurnitureWallMultiStateComposer, FurnitureWallUpdateComposer, GetItemDataComposer, GetResolutionAchievementsMessageComposer, PetMoveComposer, PetPlaceComposer, RemoveWallItemComposer, RoomUnitLookComposer, RoomUnitWalkComposer, SetItemDataMessageComposer, SetObjectDataMessageComposer } from '../communication';
|
||||||
import { Nitro } from '../Nitro';
|
import { Nitro } from '../Nitro';
|
||||||
import { ObjectAvatarSelectedMessage, ObjectDataUpdateMessage, ObjectSelectedMessage, ObjectTileCursorUpdateMessage, ObjectVisibilityUpdateMessage } from './messages';
|
import { ObjectAvatarSelectedMessage, ObjectDataUpdateMessage, ObjectSelectedMessage, ObjectTileCursorUpdateMessage, ObjectVisibilityUpdateMessage } from './messages';
|
||||||
@ -296,6 +296,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
case RoomObjectMouseEvent.CLICK:
|
case RoomObjectMouseEvent.CLICK:
|
||||||
this.handleRoomObjectMouseClickEvent(event, roomId);
|
this.handleRoomObjectMouseClickEvent(event, roomId);
|
||||||
return;
|
return;
|
||||||
|
case RoomObjectMouseEvent.DOUBLE_CLICK:
|
||||||
|
this.handleRoomObjectMouseDoubleClickEvent(event, roomId);
|
||||||
|
return;
|
||||||
case RoomObjectMouseEvent.MOUSE_MOVE:
|
case RoomObjectMouseEvent.MOUSE_MOVE:
|
||||||
this.handleRoomObjectMouseMoveEvent(event, roomId);
|
this.handleRoomObjectMouseMoveEvent(event, roomId);
|
||||||
return;
|
return;
|
||||||
@ -491,6 +494,18 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private handleRoomObjectMouseDoubleClickEvent(event: RoomObjectMouseEvent, roomId: number): void
|
||||||
|
{
|
||||||
|
const id = event.objectId;
|
||||||
|
const type = event.objectType;
|
||||||
|
const category = this._roomEngine.getRoomObjectCategoryForType(type);
|
||||||
|
|
||||||
|
if(this._roomEngine.events)
|
||||||
|
{
|
||||||
|
this._roomEngine.events.dispatchEvent(new RoomEngineObjectEvent(RoomEngineObjectEvent.DOUBLE_CLICK, roomId, id, category));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private handleRoomObjectMouseMoveEvent(event: RoomObjectMouseEvent, roomId: number): void
|
private handleRoomObjectMouseMoveEvent(event: RoomObjectMouseEvent, roomId: number): void
|
||||||
{
|
{
|
||||||
if(!event) return;
|
if(!event) return;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
import { AvatarAction, IRoomGeometry, IRoomObjectModel, MouseEventType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
import { AvatarAction, IRoomGeometry, IRoomObjectModel, MouseEventType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||||
import { RoomObjectFurnitureActionEvent, RoomObjectMoveEvent } from '../../../../../events';
|
import { RoomObjectFurnitureActionEvent, RoomObjectMouseEvent, RoomObjectMoveEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||||
import { RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectAvatarCarryObjectUpdateMessage, ObjectAvatarChatUpdateMessage, ObjectAvatarDanceUpdateMessage, ObjectAvatarEffectUpdateMessage, ObjectAvatarExpressionUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarFlatControlUpdateMessage, ObjectAvatarGestureUpdateMessage, ObjectAvatarMutedUpdateMessage, ObjectAvatarOwnMessage, ObjectAvatarPlayerValueUpdateMessage, ObjectAvatarPlayingGameUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSelectedMessage, ObjectAvatarSignUpdateMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarTypingUpdateMessage, ObjectAvatarUpdateMessage, ObjectAvatarUseObjectUpdateMessage } from '../../../messages';
|
import { ObjectAvatarCarryObjectUpdateMessage, ObjectAvatarChatUpdateMessage, ObjectAvatarDanceUpdateMessage, ObjectAvatarEffectUpdateMessage, ObjectAvatarExpressionUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarFlatControlUpdateMessage, ObjectAvatarGestureUpdateMessage, ObjectAvatarMutedUpdateMessage, ObjectAvatarOwnMessage, ObjectAvatarPlayerValueUpdateMessage, ObjectAvatarPlayingGameUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSelectedMessage, ObjectAvatarSignUpdateMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarTypingUpdateMessage, ObjectAvatarUpdateMessage, ObjectAvatarUseObjectUpdateMessage } from '../../../messages';
|
||||||
import { MovingObjectLogic } from '../MovingObjectLogic';
|
import { MovingObjectLogic } from '../MovingObjectLogic';
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export class AvatarLogic extends MovingObjectLogic
|
|||||||
|
|
||||||
public getEventTypes(): string[]
|
public getEventTypes(): string[]
|
||||||
{
|
{
|
||||||
const types = [RoomObjectMouseEvent.CLICK, RoomObjectMoveEvent.POSITION_CHANGED, RoomObjectMouseEvent.MOUSE_ENTER, RoomObjectMouseEvent.MOUSE_LEAVE, RoomObjectFurnitureActionEvent.MOUSE_BUTTON, RoomObjectFurnitureActionEvent.MOUSE_ARROW];
|
const types = [RoomObjectMouseEvent.CLICK, RoomObjectMouseEvent.DOUBLE_CLICK, RoomObjectMoveEvent.POSITION_CHANGED, RoomObjectMouseEvent.MOUSE_ENTER, RoomObjectMouseEvent.MOUSE_LEAVE, RoomObjectFurnitureActionEvent.MOUSE_BUTTON, RoomObjectFurnitureActionEvent.MOUSE_ARROW];
|
||||||
|
|
||||||
return this.mergeTypes(super.getEventTypes(), types);
|
return this.mergeTypes(super.getEventTypes(), types);
|
||||||
}
|
}
|
||||||
@ -461,6 +461,9 @@ export class AvatarLogic extends MovingObjectLogic
|
|||||||
case MouseEventType.MOUSE_CLICK:
|
case MouseEventType.MOUSE_CLICK:
|
||||||
eventType = RoomObjectMouseEvent.CLICK;
|
eventType = RoomObjectMouseEvent.CLICK;
|
||||||
break;
|
break;
|
||||||
|
case MouseEventType.DOUBLE_CLICK:
|
||||||
|
eventType = RoomObjectMouseEvent.DOUBLE_CLICK;
|
||||||
|
break;
|
||||||
case MouseEventType.ROLL_OVER:
|
case MouseEventType.ROLL_OVER:
|
||||||
eventType = RoomObjectMouseEvent.MOUSE_ENTER;
|
eventType = RoomObjectMouseEvent.MOUSE_ENTER;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RoomObjectVariable } from '../../../../../api';
|
import { RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectBadgeAssetEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectBadgeAssetEvent, RoomObjectEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
||||||
import { RoomObjectEvent, RoomObjectUpdateMessage } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectGroupBadgeUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
import { ObjectGroupBadgeUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
||||||
import { FurnitureBadgeDisplayLogic } from './FurnitureBadgeDisplayLogic';
|
import { FurnitureBadgeDisplayLogic } from './FurnitureBadgeDisplayLogic';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
||||||
import { RoomObjectStateChangedEvent } from '../../../../../events';
|
import { RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectEvent, RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureCounterClockLogic extends FurnitureLogic
|
export class FurnitureCounterClockLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
||||||
import { RoomObjectFurnitureActionEvent } from '../../../../../events';
|
import { RoomObjectEvent, RoomObjectFurnitureActionEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectEvent, RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureDiceLogic extends FurnitureLogic
|
export class FurnitureDiceLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IAssetData, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
import { IAssetData, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureEditableInternalLinkLogic extends FurnitureLogic
|
export class FurnitureEditableInternalLinkLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IAssetData, IParticleSystem, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
import { IAssetData, IParticleSystem, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectStateChangedEvent } from '../../../../../events';
|
import { RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectEvent, RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureFireworksLogic extends FurnitureLogic
|
export class FurnitureFireworksLogic extends FurnitureLogic
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IRoomGeometry, MouseEventType, RoomObjectVariable, StringDataType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType, RoomObjectVariable, StringDataType } from '../../../../../api';
|
||||||
import { RoomObjectBadgeAssetEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectBadgeAssetEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||||
import { RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
import { ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
||||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
||||||
import { RoomObjectStateChangedEvent } from '../../../../../events';
|
import { RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectEvent, RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureHockeyScoreLogic extends FurnitureLogic
|
export class FurnitureHockeyScoreLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IAssetData, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
import { IAssetData, IRoomGeometry, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureInternalLinkLogic extends FurnitureLogic
|
export class FurnitureInternalLinkLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IAssetData, IRoomGeometry, IRoomObjectController, IRoomObjectModel, IVector3D, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api';
|
import { IAssetData, IRoomGeometry, IRoomObjectController, IRoomObjectModel, IVector3D, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||||
import { RoomObjectRoomAdEvent, RoomObjectStateChangedEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectMouseEvent, RoomObjectRoomAdEvent, RoomObjectStateChangedEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectDataUpdateMessage, ObjectHeightUpdateMessage, ObjectItemDataUpdateMessage, ObjectMoveUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
import { ObjectDataUpdateMessage, ObjectHeightUpdateMessage, ObjectItemDataUpdateMessage, ObjectMoveUpdateMessage, ObjectSelectedMessage } from '../../../messages';
|
||||||
import { MovingObjectLogic } from '../MovingObjectLogic';
|
import { MovingObjectLogic } from '../MovingObjectLogic';
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
||||||
import { RoomObjectFurnitureActionEvent } from '../../../../../events';
|
import { RoomObjectFurnitureActionEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
export class FurnitureMultiStateLogic extends FurnitureLogic
|
export class FurnitureMultiStateLogic extends FurnitureLogic
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IAssetData, IParticleSystem, IRoomGeometry, MapDataType, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
import { IAssetData, IParticleSystem, IRoomGeometry, MapDataType, MouseEventType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectFurnitureActionEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectFurnitureActionEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectDataUpdateMessage, ObjectModelDataUpdateMessage } from '../../../messages';
|
import { ObjectDataUpdateMessage, ObjectModelDataUpdateMessage } from '../../../messages';
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { RoomObjectVariable, RoomWidgetEnum } from '../../../../../api';
|
import { AdvancedMap, RoomObjectVariable, RoomWidgetEnum } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
import { RoomObjectDataRequestEvent } from '../../../../../events';
|
import { RoomObjectDataRequestEvent } from '../../../../../events';
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IRoomGeometry, MouseEventType, NumberDataType, RoomObjectVariable } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType, NumberDataType, RoomObjectVariable } from '../../../../../api';
|
||||||
import { RoomObjectHSLColorEnableEvent, RoomObjectWidgetRequestEvent } from '../../../../../events';
|
import { RoomObjectHSLColorEnableEvent, RoomObjectWidgetRequestEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectDataUpdateMessage } from '../../../messages';
|
import { ObjectDataUpdateMessage } from '../../../messages';
|
||||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { BaseTexture, Texture } from '@pixi/core';
|
import { BaseTexture, Texture } from '@pixi/core';
|
||||||
import { decompressFrames, parseGIF } from 'gifuct-js';
|
import { decompressFrames, parseGIF } from 'gifuct-js';
|
||||||
import { IAssetData, IRoomGeometry, MapDataType, MouseEventType, RoomObjectVariable, RoomWidgetEnumItemExtradataParameter } from '../../../../../api';
|
import { GetAssetManager, IAssetData, IRoomGeometry, MapDataType, MouseEventType, RoomObjectVariable, RoomWidgetEnumItemExtradataParameter } from '../../../../../api';
|
||||||
import { RoomObjectRoomAdEvent } from '../../../../../events';
|
import { RoomObjectRoomAdEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { Nitro } from '../../../../Nitro';
|
import { Nitro } from '../../../../Nitro';
|
||||||
import { ObjectAdUpdateMessage, ObjectDataUpdateMessage } from '../../../messages';
|
import { ObjectAdUpdateMessage, ObjectDataUpdateMessage } from '../../../messages';
|
||||||
import { FurnitureLogic } from './FurnitureLogic';
|
import { FurnitureLogic } from './FurnitureLogic';
|
||||||
@ -208,7 +208,7 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const asset = Nitro.instance.core && Nitro.instance.core.asset;
|
const asset = GetAssetManager();
|
||||||
|
|
||||||
if(!asset) return;
|
if(!asset) return;
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
import { IRoomGeometry, MouseEventType } from '../../../../../api';
|
||||||
import { RoomObjectStateChangedEvent } from '../../../../../events';
|
import { RoomObjectStateChangedEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomSpriteMouseEvent } from '../../../../../room';
|
|
||||||
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
|
||||||
|
|
||||||
export class FurnitureWelcomeGiftLogic extends FurnitureMultiStateLogic
|
export class FurnitureWelcomeGiftLogic extends FurnitureMultiStateLogic
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IAssetData, IRoomGeometry, IRoomObjectModel, MouseEventType, PetType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
import { IAssetData, IRoomGeometry, IRoomObjectModel, MouseEventType, PetType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||||
import { RoomObjectMoveEvent } from '../../../../../events';
|
import { RoomObjectMouseEvent, RoomObjectMoveEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { PetFigureData } from '../../../../avatar';
|
import { PetFigureData } from '../../../../avatar';
|
||||||
import { ObjectAvatarChatUpdateMessage, ObjectAvatarExperienceUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarPetGestureUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSelectedMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarUpdateMessage } from '../../../messages';
|
import { ObjectAvatarChatUpdateMessage, ObjectAvatarExperienceUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarPetGestureUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSelectedMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarUpdateMessage } from '../../../messages';
|
||||||
import { MovingObjectLogic } from '../MovingObjectLogic';
|
import { MovingObjectLogic } from '../MovingObjectLogic';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Point } from '@pixi/math';
|
import { Point } from '@pixi/math';
|
||||||
import { IRoomGeometry, IRoomObjectModel, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api';
|
import { IRoomGeometry, IRoomObjectModel, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||||
import { RoomObjectTileMouseEvent, RoomObjectWallMouseEvent } from '../../../../../events';
|
import { RoomObjectEvent, RoomObjectMouseEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomSpriteMouseEvent } from '../../../../../events';
|
||||||
import { ColorConverter, RoomObjectEvent, RoomObjectLogicBase, RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
import { ColorConverter, RoomObjectLogicBase, RoomObjectUpdateMessage } from '../../../../../room';
|
||||||
import { ObjectRoomColorUpdateMessage, ObjectRoomFloorHoleUpdateMessage, ObjectRoomMapUpdateMessage, ObjectRoomMaskUpdateMessage, ObjectRoomPlanePropertyUpdateMessage, ObjectRoomPlaneVisibilityUpdateMessage, ObjectRoomUpdateMessage } from '../../../messages';
|
import { ObjectRoomColorUpdateMessage, ObjectRoomFloorHoleUpdateMessage, ObjectRoomMapUpdateMessage, ObjectRoomMaskUpdateMessage, ObjectRoomPlanePropertyUpdateMessage, ObjectRoomPlaneVisibilityUpdateMessage, ObjectRoomUpdateMessage } from '../../../messages';
|
||||||
import { RoomMapData } from '../../RoomMapData';
|
import { RoomMapData } from '../../RoomMapData';
|
||||||
import { RoomPlaneBitmapMaskData } from '../../RoomPlaneBitmapMaskData';
|
import { RoomPlaneBitmapMaskData } from '../../RoomPlaneBitmapMaskData';
|
||||||
|
@ -1,7 +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, IAdvancedMap, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IGraphicAsset, IObjectVisualizationData, IRoomGeometry, IRoomObject, IRoomObjectModel, RoomObjectSpriteType, RoomObjectVariable } from '../../../../../api';
|
import { AdvancedMap, AlphaTolerance, AvatarAction, AvatarGuideStatus, AvatarSetType, IAdvancedMap, IAvatarEffectListener, IAvatarImage, IAvatarImageListener, IGraphicAsset, IObjectVisualizationData, IRoomGeometry, IRoomObject, IRoomObjectModel, RoomObjectSpriteType, RoomObjectVariable } from '../../../../../api';
|
||||||
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';
|
||||||
import { AvatarVisualizationData } from './AvatarVisualizationData';
|
import { AvatarVisualizationData } from './AvatarVisualizationData';
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Resource, Texture } from '@pixi/core';
|
import { Resource, Texture } from '@pixi/core';
|
||||||
import { RoomObjectVariable } from '../../../../../api';
|
import { GetAssetManager, GraphicAssetGifCollection, RoomObjectVariable } from '../../../../../api';
|
||||||
import { GraphicAssetGifCollection } from '../../../../../core';
|
|
||||||
import { Nitro } from '../../../../Nitro';
|
import { Nitro } from '../../../../Nitro';
|
||||||
import { FurnitureVisualization } from './FurnitureVisualization';
|
import { FurnitureVisualization } from './FurnitureVisualization';
|
||||||
|
|
||||||
@ -147,7 +146,7 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texture = Nitro.instance.core.asset.getTexture(imageUrl);
|
texture = GetAssetManager().getTexture(imageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!texture) return false;
|
if(!texture) return false;
|
||||||
@ -183,7 +182,7 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization
|
|||||||
|
|
||||||
if(!this._imageUrl) return;
|
if(!this._imageUrl) return;
|
||||||
|
|
||||||
const texture = Nitro.instance.core.asset.getTexture(this._imageUrl);
|
const texture = GetAssetManager().getTexture(this._imageUrl);
|
||||||
|
|
||||||
if(!texture) return;
|
if(!texture) return;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IAdvancedMap, IParticleSystem, NitroLogger, RoomObjectVariable } from '../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IParticleSystem, NitroLogger, RoomObjectVariable } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||||
import { FurnitureParticleSystem } from './FurnitureParticleSystem';
|
import { FurnitureParticleSystem } from './FurnitureParticleSystem';
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
|
import { RenderTexture, Resource, Texture } from '@pixi/core';
|
||||||
|
import { Matrix } from '@pixi/math';
|
||||||
import { IGraphicAsset, IRoomObjectSprite, RoomObjectVariable } from '../../../../../api';
|
import { IGraphicAsset, IRoomObjectSprite, RoomObjectVariable } from '../../../../../api';
|
||||||
|
import { NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||||
import { IsometricImageFurniVisualization } from './IsometricImageFurniVisualization';
|
import { IsometricImageFurniVisualization } from './IsometricImageFurniVisualization';
|
||||||
|
|
||||||
export class FurnitureGuildIsometricBadgeVisualization extends IsometricImageFurniVisualization
|
export class FurnitureGuildIsometricBadgeVisualization extends IsometricImageFurniVisualization
|
||||||
@ -33,6 +36,58 @@ export class FurnitureGuildIsometricBadgeVisualization extends IsometricImageFur
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected generateTransformedThumbnail(texture: Texture<Resource>, asset: IGraphicAsset): Texture<Resource>
|
||||||
|
{
|
||||||
|
const scale = 1.1;
|
||||||
|
const matrix = new Matrix();
|
||||||
|
const difference = (asset.width / texture.width);
|
||||||
|
|
||||||
|
console.log(((0.5 * difference) * texture.width));
|
||||||
|
|
||||||
|
switch(this.direction)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
matrix.a = difference;
|
||||||
|
matrix.b = (-0.5 * difference);
|
||||||
|
matrix.c = 0;
|
||||||
|
matrix.d = (difference * scale);
|
||||||
|
matrix.tx = 0;
|
||||||
|
matrix.ty = 20;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
case 4:
|
||||||
|
matrix.a = difference;
|
||||||
|
matrix.b = (0.5 * difference);
|
||||||
|
matrix.c = 0;
|
||||||
|
matrix.d = (difference * scale);
|
||||||
|
matrix.tx = 0;
|
||||||
|
matrix.ty = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
matrix.a = difference;
|
||||||
|
matrix.b = 0;
|
||||||
|
matrix.c = 0;
|
||||||
|
matrix.d = difference;
|
||||||
|
matrix.tx = 0;
|
||||||
|
matrix.ty = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const sprite = new NitroSprite(texture);
|
||||||
|
|
||||||
|
const renderTexture = RenderTexture.create({
|
||||||
|
width: (asset.width + matrix.tx),
|
||||||
|
height: (asset.height + matrix.ty)
|
||||||
|
});
|
||||||
|
|
||||||
|
PixiApplicationProxy.instance.renderer.render(sprite, {
|
||||||
|
renderTexture,
|
||||||
|
clear: true,
|
||||||
|
transform: matrix
|
||||||
|
});
|
||||||
|
|
||||||
|
return renderTexture;
|
||||||
|
}
|
||||||
|
|
||||||
protected getLayerColor(scale: number, layerId: number, colorId: number): number
|
protected getLayerColor(scale: number, layerId: number, colorId: number): number
|
||||||
{
|
{
|
||||||
const tag = this.getLayerTag(scale, this._direction, layerId);
|
const tag = this.getLayerTag(scale, this._direction, layerId);
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { RenderTexture, Resource, Texture } from '@pixi/core';
|
import { RenderTexture, Resource, Texture } from '@pixi/core';
|
||||||
import { Matrix } from '@pixi/math';
|
import { Matrix } from '@pixi/math';
|
||||||
import { IGraphicAsset } from '../../../../../api';
|
import { GetAssetManager, IGraphicAsset } from '../../../../../api';
|
||||||
import { NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
|
import { NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||||
import { Nitro } from '../../../../Nitro';
|
|
||||||
import { FurnitureBBVisualization } from './FurnitureBBVisualization';
|
import { FurnitureBBVisualization } from './FurnitureBBVisualization';
|
||||||
import { FurnitureBrandedImageVisualization } from './FurnitureBrandedImageVisualization';
|
import { FurnitureBrandedImageVisualization } from './FurnitureBrandedImageVisualization';
|
||||||
|
|
||||||
@ -154,7 +153,7 @@ export class FurnitureIsometricBBVisualization extends FurnitureBBVisualization
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.generateTransformedImage(Nitro.instance.core.asset.getTexture(this._imageUrl), this.getAsset(super.getSpriteAssetName(scale, layerId)));
|
this.generateTransformedImage(GetAssetManager().getTexture(this._imageUrl), this.getAsset(super.getSpriteAssetName(scale, layerId)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +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 { IAdvancedMap, IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api';
|
import { AdvancedMap, IAdvancedMap, IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api';
|
||||||
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';
|
||||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||||
|
@ -91,7 +91,7 @@ export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualiza
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private generateTransformedThumbnail(texture: Texture<Resource>, asset: IGraphicAsset): Texture<Resource>
|
protected generateTransformedThumbnail(texture: Texture<Resource>, asset: IGraphicAsset): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(this._hasOutline)
|
if(this._hasOutline)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Resource, Texture } from '@pixi/core';
|
import { Resource, Texture } from '@pixi/core';
|
||||||
import { IGraphicAsset, IObjectVisualizationData, IRoomGeometry, RoomObjectVariable, RoomObjectVisualizationType } from '../../../../../api';
|
import { GetAssetManager, IGraphicAsset, IObjectVisualizationData, IRoomGeometry, RoomObjectVariable, RoomObjectVisualizationType } from '../../../../../api';
|
||||||
import { Nitro } from '../../../../Nitro';
|
|
||||||
import { AnimationData, AnimationStateData, DirectionData, LayerData } from '../data';
|
import { AnimationData, AnimationStateData, DirectionData, LayerData } from '../data';
|
||||||
import { FurnitureAnimatedVisualization, FurnitureVisualizationData } from '../furniture';
|
import { FurnitureAnimatedVisualization, FurnitureVisualizationData } from '../furniture';
|
||||||
import { ExperienceData } from './ExperienceData';
|
import { ExperienceData } from './ExperienceData';
|
||||||
@ -594,6 +593,6 @@ export class PetVisualization extends FurnitureAnimatedVisualization
|
|||||||
|
|
||||||
public getPetAdditionAsset(name: string): Texture<Resource>
|
public getPetAdditionAsset(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
return Nitro.instance.core.asset.getTexture(name);
|
return GetAssetManager().getTexture(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderTexture, Resource, Texture } from '@pixi/core';
|
import { RenderTexture, Resource, Texture } from '@pixi/core';
|
||||||
import { Rectangle } from '@pixi/math';
|
import { Rectangle } from '@pixi/math';
|
||||||
import { AlphaTolerance, IObjectVisualizationData, IPlaneVisualization, IRoomGeometry, IRoomObjectModel, IRoomObjectSprite, IRoomPlane, RoomObjectSpriteType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
import { AdvancedMap, AlphaTolerance, IObjectVisualizationData, IPlaneVisualization, IRoomGeometry, IRoomObjectModel, IRoomObjectSprite, IRoomPlane, RoomObjectSpriteType, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||||
import { AdvancedMap } from '../../../../../core';
|
|
||||||
import { RoomObjectSpriteVisualization } from '../../../../../room';
|
import { RoomObjectSpriteVisualization } from '../../../../../room';
|
||||||
import { RoomMapData } from '../../RoomMapData';
|
import { RoomMapData } from '../../RoomMapData';
|
||||||
import { RoomMapMaskData } from '../../RoomMapMaskData';
|
import { RoomMapMaskData } from '../../RoomMapMaskData';
|
||||||
|
@ -135,8 +135,8 @@ export class LandscapeRasterizer extends PlaneRasterizer
|
|||||||
const assetId = item.assetId;
|
const assetId = item.assetId;
|
||||||
const x = this.getCoordinateValue(item.x || '', item.randomX || '');
|
const x = this.getCoordinateValue(item.x || '', item.randomX || '');
|
||||||
const y = this.getCoordinateValue(item.y || '', item.randomY || '');
|
const y = this.getCoordinateValue(item.y || '', item.randomY || '');
|
||||||
const speedX = item.speedX ? item.speedX / NitroConfiguration.getValue<number>('system.animation.fps') : 0;
|
const speedX = item.speedX ? item.speedX / NitroConfiguration.getValue<number>('system.animation.fps', 24) : 0;
|
||||||
const speedY = item.speedY ? item.speedY / NitroConfiguration.getValue<number>('system.animation.fps') : 0;
|
const speedY = item.speedY ? item.speedY / NitroConfiguration.getValue<number>('system.animation.fps', 24) : 0;
|
||||||
|
|
||||||
animationItems.push({
|
animationItems.push({
|
||||||
asset: assetId,
|
asset: assetId,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Resource, Texture } from '@pixi/core';
|
import { Resource, Texture } from '@pixi/core';
|
||||||
import { IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api';
|
import { GetAssetManager, IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api';
|
||||||
import { NitroManager } from '../../core';
|
import { NitroManager } from '../../core';
|
||||||
import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events';
|
import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events';
|
||||||
import { AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer } from '../communication';
|
import { AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer } from '../communication';
|
||||||
@ -175,7 +175,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
{
|
{
|
||||||
if(this._badgeImageManager) return;
|
if(this._badgeImageManager) return;
|
||||||
|
|
||||||
this._badgeImageManager = new BadgeImageManager(Nitro.instance.core.asset, this);
|
this._badgeImageManager = new BadgeImageManager(GetAssetManager(), this);
|
||||||
this._badgeImageManager.init();
|
this._badgeImageManager.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IAdvancedMap, IMusicController, INitroEvent, ISoundManager, NitroConfiguration } from '../../api';
|
import { AdvancedMap, IAdvancedMap, IMusicController, INitroEvent, ISoundManager, NitroConfiguration } from '../../api';
|
||||||
import { AdvancedMap, NitroManager } from '../../core';
|
import { NitroManager } from '../../core';
|
||||||
import { NitroSettingsEvent, NitroSoundEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomEngineSamplePlaybackEvent } from '../../events';
|
import { NitroSettingsEvent, NitroSoundEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomEngineSamplePlaybackEvent } from '../../events';
|
||||||
import { Nitro } from '../Nitro';
|
import { Nitro } from '../Nitro';
|
||||||
import { MusicController } from './music/MusicController';
|
import { MusicController } from './music/MusicController';
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user