mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-02-17 02:22:36 +01:00
Update typings
This commit is contained in:
parent
daf41b4b85
commit
1571d0ac89
@ -1,6 +1,6 @@
|
|||||||
import { BaseTexture, ILoaderResource, Loader, LoaderResource, Spritesheet, Texture } from 'pixi.js';
|
import { BaseTexture, ILoaderResource, Loader, LoaderResource, Resource, Spritesheet, Texture } from 'pixi.js';
|
||||||
|
import { IGraphicAsset } from '../../room';
|
||||||
import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection';
|
import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection';
|
||||||
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
|
||||||
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
||||||
import { Disposable } from '../common/disposable/Disposable';
|
import { Disposable } from '../common/disposable/Disposable';
|
||||||
import { INitroLogger } from '../common/logger/INitroLogger';
|
import { INitroLogger } from '../common/logger/INitroLogger';
|
||||||
@ -12,7 +12,7 @@ import { NitroBundle } from './NitroBundle';
|
|||||||
export class AssetManager extends Disposable implements IAssetManager
|
export class AssetManager extends Disposable implements IAssetManager
|
||||||
{
|
{
|
||||||
private _logger: INitroLogger;
|
private _logger: INitroLogger;
|
||||||
private _textures: Map<string, Texture>;
|
private _textures: Map<string, Texture<Resource>>;
|
||||||
private _collections: Map<string, IGraphicAssetCollection>;
|
private _collections: Map<string, IGraphicAssetCollection>;
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
@ -29,7 +29,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
return (name.substring(0, name.lastIndexOf('.')) || name);
|
return (name.substring(0, name.lastIndexOf('.')) || name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTexture(name: string): Texture
|
public getTexture(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!name) return null;
|
if(!name) return null;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setTexture(name: string, texture: Texture): void
|
public setTexture(name: string, texture: Texture<Resource>): void
|
||||||
{
|
{
|
||||||
if(!name || !texture) return;
|
if(!name || !texture) return;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import { Spritesheet, Texture } from 'pixi.js';
|
import { Resource, Spritesheet, Texture } from 'pixi.js';
|
||||||
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
||||||
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
||||||
import { IAssetData } from './interfaces';
|
import { IAssetData } from './interfaces';
|
||||||
@ -7,8 +7,8 @@ import { IAssetData } from './interfaces';
|
|||||||
export interface IAssetManager
|
export interface IAssetManager
|
||||||
{
|
{
|
||||||
dispose(): void;
|
dispose(): void;
|
||||||
getTexture(name: string): Texture;
|
getTexture(name: string): Texture<Resource>;
|
||||||
setTexture(name: string, texture: Texture): void;
|
setTexture(name: string, texture: Texture<Resource>): void;
|
||||||
getAsset(name: string): IGraphicAsset;
|
getAsset(name: string): IGraphicAsset;
|
||||||
getCollection(name: string): IGraphicAssetCollection;
|
getCollection(name: string): IGraphicAssetCollection;
|
||||||
createCollection(data: IAssetData, spritesheet: Spritesheet): IGraphicAssetCollection;
|
createCollection(data: IAssetData, spritesheet: Spritesheet): IGraphicAssetCollection;
|
||||||
|
8
src/nitro/avatar/cache/ImageData.ts
vendored
8
src/nitro/avatar/cache/ImageData.ts
vendored
@ -1,15 +1,15 @@
|
|||||||
import { Container, Point, Rectangle, Texture } from 'pixi.js';
|
import { Container, Point, Rectangle, Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export class ImageData
|
export class ImageData
|
||||||
{
|
{
|
||||||
private _texture: Texture;
|
private _texture: Texture<Resource>;
|
||||||
private _container: Container;
|
private _container: Container;
|
||||||
private _rect: Rectangle;
|
private _rect: Rectangle;
|
||||||
private _regPoint: Point;
|
private _regPoint: Point;
|
||||||
private _flipH: boolean;
|
private _flipH: boolean;
|
||||||
private _colorTransform: number;
|
private _colorTransform: number;
|
||||||
|
|
||||||
constructor(texture: Texture, rectangle: Rectangle, _arg_3: Point, flipH: boolean, color: number, container: Container = null)
|
constructor(texture: Texture<Resource>, rectangle: Rectangle, _arg_3: Point, flipH: boolean, color: number, container: Container = null)
|
||||||
{
|
{
|
||||||
this._texture = texture;
|
this._texture = texture;
|
||||||
this._container = container;
|
this._container = container;
|
||||||
@ -28,7 +28,7 @@ export class ImageData
|
|||||||
this._colorTransform = null;
|
this._colorTransform = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get texture(): Texture
|
public get texture(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._texture;
|
return this._texture;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export interface IRoomCameraWidgetEffect
|
export interface IRoomCameraWidgetEffect
|
||||||
{
|
{
|
||||||
name: string;
|
name: string;
|
||||||
minLevel: number;
|
minLevel: number;
|
||||||
texture: Texture;
|
texture: Texture<Resource>;
|
||||||
colorMatrix: ColorMatrix;
|
colorMatrix: ColorMatrix;
|
||||||
blendMode: number;
|
blendMode: number;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
|
||||||
export class RoomCameraWidgetEffect implements IRoomCameraWidgetEffect
|
export class RoomCameraWidgetEffect implements IRoomCameraWidgetEffect
|
||||||
{
|
{
|
||||||
private _name: string;
|
private _name: string;
|
||||||
private _minLevel: number = -1;
|
private _minLevel: number = -1;
|
||||||
private _texture: Texture = null;
|
private _texture: Texture<Resource> = null;
|
||||||
private _colorMatrix: ColorMatrix = null;
|
private _colorMatrix: ColorMatrix = null;
|
||||||
private _blendMode: number = null;
|
private _blendMode: number = null;
|
||||||
|
|
||||||
constructor(name: string, minLevel: number = -1, texture: Texture = null, colorMatrix: ColorMatrix = null, blendMode: number = null)
|
constructor(name: string, minLevel: number = -1, texture: Texture<Resource> = null, colorMatrix: ColorMatrix = null, blendMode: number = null)
|
||||||
{
|
{
|
||||||
this._name = name;
|
this._name = name;
|
||||||
this._minLevel = minLevel;
|
this._minLevel = minLevel;
|
||||||
@ -24,12 +24,12 @@ export class RoomCameraWidgetEffect implements IRoomCameraWidgetEffect
|
|||||||
return this._name;
|
return this._name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get texture(): Texture
|
public get texture(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._texture;
|
return this._texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set texture(texture: Texture)
|
public set texture(texture: Texture<Resource>)
|
||||||
{
|
{
|
||||||
this._texture = texture;
|
this._texture = texture;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||||
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, FurnitureGuildInfoComposer, MysteryBoxKeysEvent, PetMountComposer, PetSupplementComposer, RemovePetSaddleComposer, RoomUnitGiveHandItemPetComposer, RoomWidgetCameraPublishedEvent, RoomWidgetCameraPurchaseComposer, SellablePetPalettesEvent, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from './messages';
|
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, FurnitureGuildInfoComposer, MysteryBoxKeysEvent, PetExperienceEvent, PetMountComposer, PetSupplementComposer, RemovePetSaddleComposer, RoomUnitGiveHandItemPetComposer, RoomWidgetCameraPublishedEvent, RoomWidgetCameraPurchaseComposer, SellablePetPalettesEvent, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from './messages';
|
||||||
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||||
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
||||||
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
||||||
@ -639,6 +639,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
// PET
|
// PET
|
||||||
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
||||||
this._events.set(IncomingHeader.PET_INFO, PetInfoEvent);
|
this._events.set(IncomingHeader.PET_INFO, PetInfoEvent);
|
||||||
|
this._events.set(IncomingHeader.PET_EXPERIENCE, PetExperienceEvent);
|
||||||
|
|
||||||
// SESSION
|
// SESSION
|
||||||
this._events.set(IncomingHeader.PLAYING_GAME, YouArePlayingGameEvent);
|
this._events.set(IncomingHeader.PLAYING_GAME, YouArePlayingGameEvent);
|
||||||
|
@ -251,4 +251,5 @@ export class IncomingHeader
|
|||||||
public static CATALOG_RECEIVE_PET_BREEDS = 3331;
|
public static CATALOG_RECEIVE_PET_BREEDS = 3331;
|
||||||
public static CATALOG_APPROVE_NAME_RESULT = 1503;
|
public static CATALOG_APPROVE_NAME_RESULT = 1503;
|
||||||
public static OBJECTS_DATA_UPDATE = 1453;
|
public static OBJECTS_DATA_UPDATE = 1453;
|
||||||
|
public static PET_EXPERIENCE = 2156;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
import { IMessageEvent, MessageEvent } from '../../../../../../core/communication/messages';
|
||||||
|
import { PetExperienceParser } from '../../../parser';
|
||||||
|
|
||||||
|
export class PetExperienceEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, PetExperienceParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): PetExperienceParser
|
||||||
|
{
|
||||||
|
return this.parser as PetExperienceParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export * from './BreedingPetInfo';
|
export * from './BreedingPetInfo';
|
||||||
export * from './PetBreedingResultData';
|
export * from './PetBreedingResultData';
|
||||||
|
export * from './PetExperienceEvent';
|
||||||
export * from './PetFigureUpdateEvent';
|
export * from './PetFigureUpdateEvent';
|
||||||
export * from './PetInfoEvent';
|
export * from './PetInfoEvent';
|
||||||
export * from './RarityCategoryData';
|
export * from './RarityCategoryData';
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class PetExperienceParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _petId: number;
|
||||||
|
private _roomIndex: number;
|
||||||
|
private _gainedExperience: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._petId = -1;
|
||||||
|
this._roomIndex = -1;
|
||||||
|
this._gainedExperience = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._petId = wrapper.readInt();
|
||||||
|
this._roomIndex = wrapper.readInt();
|
||||||
|
this._gainedExperience = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get petId(): number
|
||||||
|
{
|
||||||
|
return this._petId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get roomIndex(): number
|
||||||
|
{
|
||||||
|
return this._roomIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get gainedExperience(): number
|
||||||
|
{
|
||||||
|
return this._gainedExperience;
|
||||||
|
}
|
||||||
|
}
|
@ -1,2 +1,3 @@
|
|||||||
|
export * from './PetExperienceParser';
|
||||||
export * from './PetFigureUpdateParser';
|
export * from './PetFigureUpdateParser';
|
||||||
export * from './PetInfoParser';
|
export * from './PetInfoParser';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { BaseTexture, ILoaderResource, Loader, LoaderResource, Spritesheet, Texture } from 'pixi.js';
|
import { BaseTexture, ILoaderResource, Loader, LoaderResource, Resource, Spritesheet, Texture } from 'pixi.js';
|
||||||
import { IAssetData } from '../../core/asset/interfaces';
|
import { IAssetData } from '../../core/asset/interfaces';
|
||||||
import { NitroBundle } from '../../core/asset/NitroBundle';
|
import { NitroBundle } from '../../core/asset/NitroBundle';
|
||||||
import { INitroLogger } from '../../core/common/logger/INitroLogger';
|
import { INitroLogger } from '../../core/common/logger/INitroLogger';
|
||||||
@ -316,7 +316,7 @@ export class RoomContentLoader implements IFurnitureDataListener
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
public addAssetToCollection(collectionName: string, assetName: string, texture: Texture): boolean
|
public addAssetToCollection(collectionName: string, assetName: string, texture: Texture<Resource>): boolean
|
||||||
{
|
{
|
||||||
const collection = this.getCollection(collectionName);
|
const collection = this.getCollection(collectionName);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Container, DisplayObject, Matrix, Point, Rectangle, RenderTexture, Sprite, Texture } from 'pixi.js';
|
import { Container, DisplayObject, Matrix, Point, Rectangle, RenderTexture, Resource, Sprite, Texture } from 'pixi.js';
|
||||||
import { IDisposable } from '../../core/common/disposable/IDisposable';
|
import { IDisposable } from '../../core/common/disposable/IDisposable';
|
||||||
import { IUpdateReceiver } from '../../core/common/IUpdateReceiver';
|
import { IUpdateReceiver } from '../../core/common/IUpdateReceiver';
|
||||||
import { NitroLogger } from '../../core/common/logger/NitroLogger';
|
import { NitroLogger } from '../../core/common/logger/NitroLogger';
|
||||||
@ -2727,7 +2727,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
this._roomObjectEventHandler.cancelRoomObjectInsert(this._activeRoomId);
|
this._roomObjectEventHandler.cancelRoomObjectInsert(this._activeRoomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private addOverlayIconSprite(k: Sprite, _arg_2: string, _arg_3: Texture, scale: number = 1): Sprite
|
private addOverlayIconSprite(k: Sprite, _arg_2: string, _arg_3: Texture<Resource>, scale: number = 1): Sprite
|
||||||
{
|
{
|
||||||
if(!k || !_arg_3) return;
|
if(!k || !_arg_3) return;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { IConnection } from '../../core/communication/connections/IConnection';
|
|||||||
import { IVector3D } from '../../room/utils/IVector3D';
|
import { IVector3D } from '../../room/utils/IVector3D';
|
||||||
import { Vector3d } from '../../room/utils/Vector3d';
|
import { Vector3d } from '../../room/utils/Vector3d';
|
||||||
import { PetType } from '../avatar/pets/PetType';
|
import { PetType } from '../avatar/pets/PetType';
|
||||||
import { ObjectsDataUpdateEvent } from '../communication';
|
import { ObjectsDataUpdateEvent, PetExperienceEvent } from '../communication';
|
||||||
import { ObjectsRollingEvent } from '../communication/messages/incoming/room/engine/ObjectsRollingEvent';
|
import { ObjectsRollingEvent } from '../communication/messages/incoming/room/engine/ObjectsRollingEvent';
|
||||||
import { FurnitureFloorAddEvent } from '../communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent';
|
import { FurnitureFloorAddEvent } from '../communication/messages/incoming/room/furniture/floor/FurnitureFloorAddEvent';
|
||||||
import { FurnitureFloorEvent } from '../communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent';
|
import { FurnitureFloorEvent } from '../communication/messages/incoming/room/furniture/floor/FurnitureFloorEvent';
|
||||||
@ -142,6 +142,7 @@ export class RoomMessageHandler extends Disposable
|
|||||||
this._connection.addMessageEvent(new RoomUnitChatWhisperEvent(this.onRoomUnitChatEvent.bind(this)));
|
this._connection.addMessageEvent(new RoomUnitChatWhisperEvent(this.onRoomUnitChatEvent.bind(this)));
|
||||||
this._connection.addMessageEvent(new RoomUnitTypingEvent(this.onRoomUnitTypingEvent.bind(this)));
|
this._connection.addMessageEvent(new RoomUnitTypingEvent(this.onRoomUnitTypingEvent.bind(this)));
|
||||||
this._connection.addMessageEvent(new PetFigureUpdateEvent(this.onPetFigureUpdateEvent.bind(this)));
|
this._connection.addMessageEvent(new PetFigureUpdateEvent(this.onPetFigureUpdateEvent.bind(this)));
|
||||||
|
this._connection.addMessageEvent(new PetExperienceEvent(this.onPetExperienceEvent.bind(this)));
|
||||||
this._connection.addMessageEvent(new YouArePlayingGameEvent(this.onYouArePlayingGameEvent.bind(this)));
|
this._connection.addMessageEvent(new YouArePlayingGameEvent(this.onYouArePlayingGameEvent.bind(this)));
|
||||||
this._connection.addMessageEvent(new FurnitureState2Event(this.onFurnitureState2Event.bind(this)));
|
this._connection.addMessageEvent(new FurnitureState2Event(this.onFurnitureState2Event.bind(this)));
|
||||||
this._connection.addMessageEvent(new IgnoreResultEvent(this.onIgnoreResultEvent.bind(this)));
|
this._connection.addMessageEvent(new IgnoreResultEvent(this.onIgnoreResultEvent.bind(this)));
|
||||||
@ -859,6 +860,15 @@ export class RoomMessageHandler extends Disposable
|
|||||||
this._roomCreator.updateRoomObjectUserFigure(this._currentRoomId, parser.roomIndex, parser.figureData.figuredata, '' , '', parser.isRiding);
|
this._roomCreator.updateRoomObjectUserFigure(this._currentRoomId, parser.roomIndex, parser.figureData.figuredata, '' , '', parser.isRiding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private onPetExperienceEvent(event: PetExperienceEvent): void
|
||||||
|
{
|
||||||
|
const parser = event.getParser();
|
||||||
|
|
||||||
|
if(!parser) return;
|
||||||
|
|
||||||
|
this._roomCreator.updateRoomObjectUserAction(this._currentRoomId, parser.roomIndex, RoomObjectVariable.FIGURE_GAINED_EXPERIENCE, parser.gainedExperience);
|
||||||
|
}
|
||||||
|
|
||||||
private onYouArePlayingGameEvent(event: YouArePlayingGameEvent): void
|
private onYouArePlayingGameEvent(event: YouArePlayingGameEvent): void
|
||||||
{
|
{
|
||||||
if(!event) return;
|
if(!event) return;
|
||||||
|
@ -28,6 +28,7 @@ export class RoomObjectVariable
|
|||||||
public static FIGURE_IS_TYPING: string = 'figure_is_typing';
|
public static FIGURE_IS_TYPING: string = 'figure_is_typing';
|
||||||
public static FIGURE_IS_MUTED: string = 'figure_is_muted';
|
public static FIGURE_IS_MUTED: string = 'figure_is_muted';
|
||||||
public static FIGURE_GAINED_EXPERIENCE: string = 'figure_gained_experience';
|
public static FIGURE_GAINED_EXPERIENCE: string = 'figure_gained_experience';
|
||||||
|
public static FIGURE_EXPERIENCE_TIMESTAMP: string = 'figure_experience_timestamp';
|
||||||
public static FIGURE_NUMBER_VALUE: string = 'figure_number_value';
|
public static FIGURE_NUMBER_VALUE: string = 'figure_number_value';
|
||||||
public static FIGURE_IS_PLAYING_GAME: string = 'figure_is_playing_game';
|
public static FIGURE_IS_PLAYING_GAME: string = 'figure_is_playing_game';
|
||||||
public static FIGURE_GUIDE_STATUS: string = 'figure_guide_status';
|
public static FIGURE_GUIDE_STATUS: string = 'figure_guide_status';
|
||||||
|
@ -9,6 +9,7 @@ import { PetFigureData } from '../../../../avatar/pets/PetFigureData';
|
|||||||
import { PetType } from '../../../../avatar/pets/PetType';
|
import { PetType } from '../../../../avatar/pets/PetType';
|
||||||
import { MouseEventType } from '../../../../ui/MouseEventType';
|
import { MouseEventType } from '../../../../ui/MouseEventType';
|
||||||
import { RoomObjectMoveEvent } from '../../../events/RoomObjectMoveEvent';
|
import { RoomObjectMoveEvent } from '../../../events/RoomObjectMoveEvent';
|
||||||
|
import { ObjectAvatarExperienceUpdateMessage } from '../../../messages';
|
||||||
import { ObjectAvatarChatUpdateMessage } from '../../../messages/ObjectAvatarChatUpdateMessage';
|
import { ObjectAvatarChatUpdateMessage } from '../../../messages/ObjectAvatarChatUpdateMessage';
|
||||||
import { ObjectAvatarFigureUpdateMessage } from '../../../messages/ObjectAvatarFigureUpdateMessage';
|
import { ObjectAvatarFigureUpdateMessage } from '../../../messages/ObjectAvatarFigureUpdateMessage';
|
||||||
import { ObjectAvatarPetGestureUpdateMessage } from '../../../messages/ObjectAvatarPetGestureUpdateMessage';
|
import { ObjectAvatarPetGestureUpdateMessage } from '../../../messages/ObjectAvatarPetGestureUpdateMessage';
|
||||||
@ -213,6 +214,14 @@ export class PetLogic extends MovingObjectLogic
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(message instanceof ObjectAvatarExperienceUpdateMessage)
|
||||||
|
{
|
||||||
|
model.setValue(RoomObjectVariable.FIGURE_EXPERIENCE_TIMESTAMP, this.time);
|
||||||
|
model.setValue(RoomObjectVariable.FIGURE_GAINED_EXPERIENCE, message.gainedExperience);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void
|
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { BLEND_MODES, Texture } from 'pixi.js';
|
import { BLEND_MODES, Resource, Texture } from 'pixi.js';
|
||||||
import { AdvancedMap } from '../../../../../core/utils/AdvancedMap';
|
import { AdvancedMap } from '../../../../../core/utils/AdvancedMap';
|
||||||
import { AlphaTolerance } from '../../../../../room/object/enum/AlphaTolerance';
|
import { AlphaTolerance } from '../../../../../room/object/enum/AlphaTolerance';
|
||||||
import { RoomObjectSpriteType } from '../../../../../room/object/enum/RoomObjectSpriteType';
|
import { RoomObjectSpriteType } from '../../../../../room/object/enum/RoomObjectSpriteType';
|
||||||
@ -1090,7 +1090,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAvatarRenderAsset(name: string): Texture
|
public getAvatarRenderAsset(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
const url = (Nitro.instance.getConfiguration<string>('images.url') + '/additions/' + name + '.png');
|
const url = (Nitro.instance.getConfiguration<string>('images.url') + '/additions/' + name + '.png');
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IAssetData } from '../../../../../core/asset/interfaces';
|
import { IAssetData } from '../../../../../core/asset/interfaces';
|
||||||
import { Disposable } from '../../../../../core/common/disposable/Disposable';
|
import { Disposable } from '../../../../../core/common/disposable/Disposable';
|
||||||
import { IObjectVisualizationData } from '../../../../../room/object/visualization/IRoomObjectVisualizationData';
|
import { IObjectVisualizationData } from '../../../../../room/object/visualization/IRoomObjectVisualizationData';
|
||||||
@ -37,7 +37,7 @@ export class AvatarVisualizationData extends Disposable implements IObjectVisual
|
|||||||
return avatarImage;
|
return avatarImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAvatarRendererAsset(name: string): Texture
|
public getAvatarRendererAsset(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!this._avatarRenderer) return null;
|
if(!this._avatarRenderer) return null;
|
||||||
|
|
||||||
@ -58,4 +58,4 @@ export class AvatarVisualizationData extends Disposable implements IObjectVisual
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
||||||
import { Nitro } from '../../../../../Nitro';
|
import { Nitro } from '../../../../../Nitro';
|
||||||
import { AvatarVisualization } from '../AvatarVisualization';
|
import { AvatarVisualization } from '../AvatarVisualization';
|
||||||
@ -12,7 +12,7 @@ export class FloatingHeartAddition extends ExpressionAddition
|
|||||||
private static STATE_FLOAT: number = 2;
|
private static STATE_FLOAT: number = 2;
|
||||||
private static STATE_COMPLETE: number = 3;
|
private static STATE_COMPLETE: number = 3;
|
||||||
|
|
||||||
private _asset: Texture;
|
private _asset: Texture<Resource>;
|
||||||
private _startTime: number;
|
private _startTime: number;
|
||||||
private _delta: number;
|
private _delta: number;
|
||||||
private _offsetY: number;
|
private _offsetY: number;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
||||||
import { Nitro } from '../../../../../Nitro';
|
import { Nitro } from '../../../../../Nitro';
|
||||||
import { AvatarVisualization } from '../AvatarVisualization';
|
import { AvatarVisualization } from '../AvatarVisualization';
|
||||||
@ -14,7 +14,7 @@ export class FloatingIdleZAddition implements IAvatarAddition
|
|||||||
|
|
||||||
private _id: number;
|
private _id: number;
|
||||||
private _visualization: AvatarVisualization;
|
private _visualization: AvatarVisualization;
|
||||||
private _asset: Texture;
|
private _asset: Texture<Resource>;
|
||||||
private _startTime: number;
|
private _startTime: number;
|
||||||
private _offsetY: number;
|
private _offsetY: number;
|
||||||
private _scale: number;
|
private _scale: number;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
||||||
import { AvatarVisualization } from '../AvatarVisualization';
|
import { AvatarVisualization } from '../AvatarVisualization';
|
||||||
import { IAvatarAddition } from './IAvatarAddition';
|
import { IAvatarAddition } from './IAvatarAddition';
|
||||||
@ -7,7 +7,7 @@ export class MutedBubbleAddition implements IAvatarAddition
|
|||||||
{
|
{
|
||||||
private _id: number;
|
private _id: number;
|
||||||
private _visualization: AvatarVisualization;
|
private _visualization: AvatarVisualization;
|
||||||
private _asset: Texture;
|
private _asset: Texture<Resource>;
|
||||||
|
|
||||||
constructor(id: number, visualization: AvatarVisualization)
|
constructor(id: number, visualization: AvatarVisualization)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
||||||
import { AvatarVisualization } from '../AvatarVisualization';
|
import { AvatarVisualization } from '../AvatarVisualization';
|
||||||
import { IAvatarAddition } from './IAvatarAddition';
|
import { IAvatarAddition } from './IAvatarAddition';
|
||||||
@ -7,7 +7,7 @@ export class NumberBubbleAddition implements IAvatarAddition
|
|||||||
{
|
{
|
||||||
private _id: number;
|
private _id: number;
|
||||||
private _visualization: AvatarVisualization;
|
private _visualization: AvatarVisualization;
|
||||||
private _asset: Texture;
|
private _asset: Texture<Resource>;
|
||||||
private _scale: number;
|
private _scale: number;
|
||||||
private _number: number;
|
private _number: number;
|
||||||
private _numberValueFadeDirection: number;
|
private _numberValueFadeDirection: number;
|
||||||
@ -180,4 +180,4 @@ export class NumberBubbleAddition implements IAvatarAddition
|
|||||||
{
|
{
|
||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
import { IRoomObjectSprite } from '../../../../../../room/object/visualization/IRoomObjectSprite';
|
||||||
import { AvatarVisualization } from '../AvatarVisualization';
|
import { AvatarVisualization } from '../AvatarVisualization';
|
||||||
import { IAvatarAddition } from './IAvatarAddition';
|
import { IAvatarAddition } from './IAvatarAddition';
|
||||||
@ -7,7 +7,7 @@ export class TypingBubbleAddition implements IAvatarAddition
|
|||||||
{
|
{
|
||||||
private _id: number;
|
private _id: number;
|
||||||
private _visualization: AvatarVisualization;
|
private _visualization: AvatarVisualization;
|
||||||
private _asset: Texture;
|
private _asset: Texture<Resource>;
|
||||||
private _relativeDepth: number;
|
private _relativeDepth: number;
|
||||||
|
|
||||||
constructor(id: number, visualization: AvatarVisualization)
|
constructor(id: number, visualization: AvatarVisualization)
|
||||||
@ -96,4 +96,4 @@ export class TypingBubbleAddition implements IAvatarAddition
|
|||||||
{
|
{
|
||||||
this._relativeDepth = depth;
|
this._relativeDepth = depth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { Nitro } from '../../../../Nitro';
|
import { Nitro } from '../../../../Nitro';
|
||||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||||
import { FurnitureVisualization } from './FurnitureVisualization';
|
import { FurnitureVisualization } from './FurnitureVisualization';
|
||||||
@ -80,7 +80,7 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected imageReady(texture: Texture, imageUrl: string): void
|
protected imageReady(texture: Texture<Resource>, imageUrl: string): void
|
||||||
{
|
{
|
||||||
if(!texture)
|
if(!texture)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { DirectionalOffsetData } from '../data/DirectionalOffsetData';
|
import { DirectionalOffsetData } from '../data/DirectionalOffsetData';
|
||||||
import { FurnitureBrandedImageVisualization } from './FurnitureBrandedImageVisualization';
|
import { FurnitureBrandedImageVisualization } from './FurnitureBrandedImageVisualization';
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ export class FurnitureRoomBackgroundVisualization extends FurnitureBrandedImageV
|
|||||||
{
|
{
|
||||||
private _imageOffset: DirectionalOffsetData;
|
private _imageOffset: DirectionalOffsetData;
|
||||||
|
|
||||||
protected imageReady(texture: Texture, imageUrl: string): void
|
protected imageReady(texture: Texture<Resource>, imageUrl: string): void
|
||||||
{
|
{
|
||||||
super.imageReady(texture, imageUrl);
|
super.imageReady(texture, imageUrl);
|
||||||
|
|
||||||
@ -56,4 +56,4 @@ export class FurnitureRoomBackgroundVisualization extends FurnitureBrandedImageV
|
|||||||
{
|
{
|
||||||
return super.getLayerZOffset(scale, direction, layerId) + (-(this._offsetZ));
|
return super.getLayerZOffset(scale, direction, layerId) + (-(this._offsetZ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Matrix, Rectangle, Sprite, Texture } from 'pixi.js';
|
import { Matrix, Rectangle, Resource, Sprite, Texture } from 'pixi.js';
|
||||||
import { IGraphicAsset } from '../../../../../room/object/visualization/utils/IGraphicAsset';
|
import { IGraphicAsset } from '../../../../../room/object/visualization/utils/IGraphicAsset';
|
||||||
import { TextureUtils } from '../../../../../room/utils/TextureUtils';
|
import { TextureUtils } from '../../../../../room/utils/TextureUtils';
|
||||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||||
@ -8,7 +8,7 @@ export class FurnitureThumbnailVisualization extends FurnitureAnimatedVisualizat
|
|||||||
protected static THUMBNAIL: string = 'THUMBNAIL';
|
protected static THUMBNAIL: string = 'THUMBNAIL';
|
||||||
|
|
||||||
private _thumbnailAssetNameNormal: string;
|
private _thumbnailAssetNameNormal: string;
|
||||||
private _thumbnailImageNormal: Texture;
|
private _thumbnailImageNormal: Texture<Resource>;
|
||||||
private _thumbnailDirection: number;
|
private _thumbnailDirection: number;
|
||||||
private _thumbnailChanged: boolean;
|
private _thumbnailChanged: boolean;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ export class FurnitureThumbnailVisualization extends FurnitureAnimatedVisualizat
|
|||||||
return !(this._thumbnailImageNormal == null);
|
return !(this._thumbnailImageNormal == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public setThumbnailImages(k: Texture): void
|
public setThumbnailImages(k: Texture<Resource>): void
|
||||||
{
|
{
|
||||||
this._thumbnailImageNormal = k;
|
this._thumbnailImageNormal = k;
|
||||||
this._thumbnailChanged = true;
|
this._thumbnailChanged = true;
|
||||||
@ -61,7 +61,7 @@ export class FurnitureThumbnailVisualization extends FurnitureAnimatedVisualizat
|
|||||||
this._thumbnailDirection = this.direction;
|
this._thumbnailDirection = this.direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
private addThumbnailAsset(k: Texture, scale: number): void
|
private addThumbnailAsset(k: Texture<Resource>, scale: number): void
|
||||||
{
|
{
|
||||||
let layerId = 0;
|
let layerId = 0;
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ export class FurnitureThumbnailVisualization extends FurnitureAnimatedVisualizat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private generateTransformedThumbnail(texture: Texture, asset: IGraphicAsset): Texture
|
private generateTransformedThumbnail(texture: Texture<Resource>, asset: IGraphicAsset): Texture<Resource>
|
||||||
{
|
{
|
||||||
const _local_3 = 1.1;
|
const _local_3 = 1.1;
|
||||||
const matrix = new Matrix();
|
const matrix = new Matrix();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Graphics, Matrix, Point, Rectangle, RenderTexture, Texture } from 'pixi.js';
|
import { Graphics, Matrix, Point, Rectangle, RenderTexture, Resource, Texture } from 'pixi.js';
|
||||||
import { IRoomPlane } from '../../../../../room/object/visualization/IRoomPlane';
|
import { IRoomPlane } from '../../../../../room/object/visualization/IRoomPlane';
|
||||||
import { IRoomGeometry } from '../../../../../room/utils/IRoomGeometry';
|
import { IRoomGeometry } from '../../../../../room/utils/IRoomGeometry';
|
||||||
import { IVector3D } from '../../../../../room/utils/IVector3D';
|
import { IVector3D } from '../../../../../room/utils/IVector3D';
|
||||||
@ -149,7 +149,7 @@ export class RoomPlane implements IRoomPlane
|
|||||||
return this._canBeVisible;
|
return this._canBeVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get bitmapData(): Texture
|
public get bitmapData(): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!this.visible || !this._bitmapData) return null;
|
if(!this.visible || !this._bitmapData) return null;
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ export class RoomPlane implements IRoomPlane
|
|||||||
this._disposed = true;
|
this._disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public copyBitmapData(k: Texture): Texture
|
public copyBitmapData(k: Texture<Resource>): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!this.visible || !this._bitmapData || !k) return null;
|
if(!this.visible || !this._bitmapData || !k) return null;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Rectangle, RenderTexture, Texture } from 'pixi.js';
|
import { Rectangle, RenderTexture, Resource, Texture } from 'pixi.js';
|
||||||
import { AdvancedMap } from '../../../../../core/utils/AdvancedMap';
|
import { AdvancedMap } from '../../../../../core/utils/AdvancedMap';
|
||||||
import { AlphaTolerance } from '../../../../../room/object/enum/AlphaTolerance';
|
import { AlphaTolerance } from '../../../../../room/object/enum/AlphaTolerance';
|
||||||
import { RoomObjectSpriteType } from '../../../../../room/object/enum/RoomObjectSpriteType';
|
import { RoomObjectSpriteType } from '../../../../../room/object/enum/RoomObjectSpriteType';
|
||||||
@ -982,7 +982,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
|||||||
k.name = ((_arg_3 + '_') + this._assetUpdateCounter);
|
k.name = ((_arg_3 + '_') + this._assetUpdateCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPlaneBitmap(k: RoomPlane, _arg_2: string): Texture
|
private getPlaneBitmap(k: RoomPlane, _arg_2: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
return k.bitmapData;
|
return k.bitmapData;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Graphics, Point, Texture } from 'pixi.js';
|
import { Graphics, Point, Resource, Texture } from 'pixi.js';
|
||||||
import { IGraphicAsset } from '../../../../../../../room/object/visualization/utils/IGraphicAsset';
|
import { IGraphicAsset } from '../../../../../../../room/object/visualization/utils/IGraphicAsset';
|
||||||
import { IGraphicAssetCollection } from '../../../../../../../room/object/visualization/utils/IGraphicAssetCollection';
|
import { IGraphicAssetCollection } from '../../../../../../../room/object/visualization/utils/IGraphicAssetCollection';
|
||||||
import { IRoomGeometry } from '../../../../../../../room/utils/IRoomGeometry';
|
import { IRoomGeometry } from '../../../../../../../room/utils/IRoomGeometry';
|
||||||
@ -252,7 +252,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
|||||||
|
|
||||||
if(texture)
|
if(texture)
|
||||||
{
|
{
|
||||||
let newTexture: Texture = texture;
|
let newTexture: Texture<Resource> = texture;
|
||||||
|
|
||||||
if(asset.flipH)
|
if(asset.flipH)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IVector3D } from '../../../../../../../room/utils/IVector3D';
|
import { IVector3D } from '../../../../../../../room/utils/IVector3D';
|
||||||
import { PlaneTextureBitmap } from './PlaneTextureBitmap';
|
import { PlaneTextureBitmap } from './PlaneTextureBitmap';
|
||||||
|
|
||||||
@ -29,12 +29,12 @@ export class PlaneTexture
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public addBitmap(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void
|
public addBitmap(k: Texture<Resource>, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void
|
||||||
{
|
{
|
||||||
this._bitmaps.push(new PlaneTextureBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6));
|
this._bitmaps.push(new PlaneTextureBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6));
|
||||||
}
|
}
|
||||||
|
|
||||||
public getBitmap(k: IVector3D): Texture
|
public getBitmap(k: IVector3D): Texture<Resource>
|
||||||
{
|
{
|
||||||
const _local_2 = this.getPlaneTextureBitmap(k);
|
const _local_2 = this.getPlaneTextureBitmap(k);
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export class PlaneTextureBitmap
|
export class PlaneTextureBitmap
|
||||||
{
|
{
|
||||||
public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
|
public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
|
||||||
public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
|
public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
|
||||||
|
|
||||||
private _bitmap: Texture;
|
private _bitmap: Texture<Resource>;
|
||||||
private _normalMinX: number;
|
private _normalMinX: number;
|
||||||
private _normalMaxX: number;
|
private _normalMaxX: number;
|
||||||
private _normalMinY: number;
|
private _normalMinY: number;
|
||||||
private _normalMaxY: number;
|
private _normalMaxY: number;
|
||||||
private _assetName: string;
|
private _assetName: string;
|
||||||
|
|
||||||
constructor(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null)
|
constructor(k: Texture<Resource>, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null)
|
||||||
{
|
{
|
||||||
this._normalMinX = _arg_2;
|
this._normalMinX = _arg_2;
|
||||||
this._normalMaxX = _arg_3;
|
this._normalMaxX = _arg_3;
|
||||||
@ -22,7 +22,7 @@ export class PlaneTextureBitmap
|
|||||||
this._bitmap = k;
|
this._bitmap = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get bitmap(): Texture
|
public get bitmap(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._bitmap;
|
return this._bitmap;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IAssetManager } from '../../core/asset/IAssetManager';
|
import { IAssetManager } from '../../core/asset/IAssetManager';
|
||||||
import { IEventDispatcher } from '../../core/events/IEventDispatcher';
|
import { IEventDispatcher } from '../../core/events/IEventDispatcher';
|
||||||
import { Nitro } from '../Nitro';
|
import { Nitro } from '../Nitro';
|
||||||
@ -26,7 +26,7 @@ export class BadgeImageManager
|
|||||||
this._assets = null;
|
this._assets = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getBadgeImage(badgeName: string, type: string = 'normal_badge', load: boolean = true): Texture
|
public getBadgeImage(badgeName: string, type: string = 'normal_badge', load: boolean = true): Texture<Resource>
|
||||||
{
|
{
|
||||||
let badge = this.getBadgeTexture(badgeName, type);
|
let badge = this.getBadgeTexture(badgeName, type);
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export class BadgeImageManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getBadgeTexture(badgeName: string, type: string = 'normal_badge'): Texture
|
private getBadgeTexture(badgeName: string, type: string = 'normal_badge'): Texture<Resource>
|
||||||
{
|
{
|
||||||
const existing = this._assets.getTexture(badgeName);
|
const existing = this._assets.getTexture(badgeName);
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ export class BadgeImageManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getBadgePlaceholder(): Texture
|
private getBadgePlaceholder(): Texture<Resource>
|
||||||
{
|
{
|
||||||
const existing = this._assets.getTexture('loading_icon');
|
const existing = this._assets.getTexture('loading_icon');
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export class BadgeInfo
|
export class BadgeInfo
|
||||||
{
|
{
|
||||||
private _image: Texture;
|
private _image: Texture<Resource>;
|
||||||
private _placeHolder: boolean;
|
private _placeHolder: boolean;
|
||||||
|
|
||||||
constructor(image: Texture, placeHolder: boolean)
|
constructor(image: Texture<Resource>, placeHolder: boolean)
|
||||||
{
|
{
|
||||||
this._image = image;
|
this._image = image;
|
||||||
this._placeHolder = placeHolder;
|
this._placeHolder = placeHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get image(): Texture
|
public get image(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._image;
|
return this._image;
|
||||||
}
|
}
|
||||||
@ -20,4 +20,4 @@ export class BadgeInfo
|
|||||||
{
|
{
|
||||||
return this._placeHolder;
|
return this._placeHolder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { INitroManager } from '../../core/common/INitroManager';
|
import { INitroManager } from '../../core/common/INitroManager';
|
||||||
import { INitroCommunicationManager } from '../communication/INitroCommunicationManager';
|
import { INitroCommunicationManager } from '../communication/INitroCommunicationManager';
|
||||||
import { IFurnitureData } from './furniture/IFurnitureData';
|
import { IFurnitureData } from './furniture/IFurnitureData';
|
||||||
@ -17,9 +17,9 @@ export interface ISessionDataManager extends INitroManager
|
|||||||
getProductData(type: string): IProductData;
|
getProductData(type: string): IProductData;
|
||||||
getBadgeUrl(name: string): string;
|
getBadgeUrl(name: string): string;
|
||||||
getGroupBadgeUrl(name: string): string;
|
getGroupBadgeUrl(name: string): string;
|
||||||
getBadgeImage(name: string): Texture;
|
getBadgeImage(name: string): Texture<Resource>;
|
||||||
loadBadgeImage(name: string): string;
|
loadBadgeImage(name: string): string;
|
||||||
getGroupBadgeImage(name: string): Texture;
|
getGroupBadgeImage(name: string): Texture<Resource>;
|
||||||
loadGroupBadgeImage(name: string): string;
|
loadGroupBadgeImage(name: string): string;
|
||||||
hasSecurity(level: number): boolean;
|
hasSecurity(level: number): boolean;
|
||||||
giveRespect(userId: number): void;
|
giveRespect(userId: number): void;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { NitroManager } from '../../core/common/NitroManager';
|
import { NitroManager } from '../../core/common/NitroManager';
|
||||||
import { IMessageComposer } from '../../core/communication/messages/IMessageComposer';
|
import { IMessageComposer } from '../../core/communication/messages/IMessageComposer';
|
||||||
import { NitroEvent } from '../../core/events/NitroEvent';
|
import { NitroEvent } from '../../core/events/NitroEvent';
|
||||||
@ -472,12 +472,12 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
return this._badgeImageManager.getBadgeUrl(name, BadgeImageManager.GROUP_BADGE);
|
return this._badgeImageManager.getBadgeUrl(name, BadgeImageManager.GROUP_BADGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getBadgeImage(name: string): Texture
|
public getBadgeImage(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._badgeImageManager.getBadgeImage(name);
|
return this._badgeImageManager.getBadgeImage(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getGroupBadgeImage(name: string): Texture
|
public getGroupBadgeImage(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._badgeImageManager.getBadgeImage(name, BadgeImageManager.GROUP_BADGE);
|
return this._badgeImageManager.getBadgeImage(name, BadgeImageManager.GROUP_BADGE);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { NitroEvent } from '../../../core/events/NitroEvent';
|
import { NitroEvent } from '../../../core/events/NitroEvent';
|
||||||
|
|
||||||
export class BadgeImageReadyEvent extends NitroEvent
|
export class BadgeImageReadyEvent extends NitroEvent
|
||||||
@ -6,9 +6,9 @@ export class BadgeImageReadyEvent extends NitroEvent
|
|||||||
public static IMAGE_READY: string = 'BIME_BADGE_IMAGE_READY';
|
public static IMAGE_READY: string = 'BIME_BADGE_IMAGE_READY';
|
||||||
|
|
||||||
private _badgeId: string;
|
private _badgeId: string;
|
||||||
private _image: Texture;
|
private _image: Texture<Resource>;
|
||||||
|
|
||||||
constructor(badgeId: string, image: Texture)
|
constructor(badgeId: string, image: Texture<Resource>)
|
||||||
{
|
{
|
||||||
super(BadgeImageReadyEvent.IMAGE_READY);
|
super(BadgeImageReadyEvent.IMAGE_READY);
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ export class BadgeImageReadyEvent extends NitroEvent
|
|||||||
return this._badgeId;
|
return this._badgeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get image(): Texture
|
public get image(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._image;
|
return this._image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Container, Matrix, Renderer, Texture } from 'pixi.js';
|
import { Container, Matrix, Renderer, Resource, Texture } from 'pixi.js';
|
||||||
import { Constant } from './Constant';
|
import { Constant } from './Constant';
|
||||||
import { RectTileLayer } from './RectTileLayer';
|
import { RectTileLayer } from './RectTileLayer';
|
||||||
|
|
||||||
@ -118,9 +118,9 @@ export class CompositeRectTileLayer extends Container
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
addFrame(texture_: Texture | string | number, x: number, y: number, animX?: number, animY?: number, animWidth?: number, animHeight?: number, alpha?: number, yaxis?: number, xaxis?: number): this
|
addFrame(texture_: Texture<Resource> | string | number, x: number, y: number, animX?: number, animY?: number, animWidth?: number, animHeight?: number, alpha?: number, yaxis?: number, xaxis?: number): this
|
||||||
{
|
{
|
||||||
let texture: Texture;
|
let texture: Texture<Resource>;
|
||||||
let layer: RectTileLayer = null;
|
let layer: RectTileLayer = null;
|
||||||
let ind = 0;
|
let ind = 0;
|
||||||
const children = this.children;
|
const children = this.children;
|
||||||
|
@ -45,7 +45,7 @@ export class MultiTextureResource extends Resource
|
|||||||
boundSprites: Array<Sprite> = [];
|
boundSprites: Array<Sprite> = [];
|
||||||
dirties: Array<number> = [];
|
dirties: Array<number> = [];
|
||||||
|
|
||||||
setTexture(ind: number, texture: Texture)
|
setTexture(ind: number, texture: Texture<Resource>)
|
||||||
{
|
{
|
||||||
const spr = this.boundSprites[ind];
|
const spr = this.boundSprites[ind];
|
||||||
if(spr.texture.baseTexture === texture.baseTexture)
|
if(spr.texture.baseTexture === texture.baseTexture)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Bounds, Container, DRAW_MODES, groupD8, Matrix, Rectangle, Renderer, Texture } from 'pixi.js';
|
import { Bounds, Container, DRAW_MODES, groupD8, Matrix, Rectangle, Renderer, Resource, Texture } from 'pixi.js';
|
||||||
import { Constant } from './Constant';
|
import { Constant } from './Constant';
|
||||||
import { RectTileGeom } from './RectTileShader';
|
import { RectTileGeom } from './RectTileShader';
|
||||||
import { TileRenderer } from './TileRenderer';
|
import { TileRenderer } from './TileRenderer';
|
||||||
@ -24,7 +24,7 @@ export const POINT_STRUCT_SIZE_TWO = (Object.keys(PointStruct).length / 2);
|
|||||||
//export const POINT_STRUCT_SIZE = 12;
|
//export const POINT_STRUCT_SIZE = 12;
|
||||||
export class RectTileLayer extends Container
|
export class RectTileLayer extends Container
|
||||||
{
|
{
|
||||||
constructor(zIndex: number, texture: Texture | Array<Texture>)
|
constructor(zIndex: number, texture: Texture<Resource> | Array<Texture>)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.initialize(zIndex, texture);
|
this.initialize(zIndex, texture);
|
||||||
@ -44,7 +44,7 @@ export class RectTileLayer extends Container
|
|||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
compositeParent = false;
|
compositeParent = false;
|
||||||
|
|
||||||
initialize(zIndex: number, textures: Texture | Array<Texture>)
|
initialize(zIndex: number, textures: Texture<Resource> | Array<Texture>)
|
||||||
{
|
{
|
||||||
if(!textures)
|
if(!textures)
|
||||||
{
|
{
|
||||||
@ -67,9 +67,9 @@ export class RectTileLayer extends Container
|
|||||||
this.hasAnim = false;
|
this.hasAnim = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
addFrame(texture_: Texture | string | number, x: number, y: number, animX: number, animY: number)
|
addFrame(texture_: Texture<Resource> | string | number, x: number, y: number, animX: number, animY: number)
|
||||||
{
|
{
|
||||||
let texture: Texture;
|
let texture: Texture<Resource>;
|
||||||
let textureIndex = 0;
|
let textureIndex = 0;
|
||||||
|
|
||||||
if(typeof texture_ === 'number')
|
if(typeof texture_ === 'number')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Container, Filter, Texture } from 'pixi.js';
|
import { Container, Filter, Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export interface IRoomObjectSprite
|
export interface IRoomObjectSprite
|
||||||
{
|
{
|
||||||
@ -6,7 +6,7 @@ export interface IRoomObjectSprite
|
|||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
spriteType: number;
|
spriteType: number;
|
||||||
texture: Texture;
|
texture: Texture<Resource>;
|
||||||
container: Container;
|
container: Container;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { BLEND_MODES, Container, Filter, Texture } from 'pixi.js';
|
import { BLEND_MODES, Container, Filter, Resource, Texture } from 'pixi.js';
|
||||||
import { AlphaTolerance } from '../enum/AlphaTolerance';
|
import { AlphaTolerance } from '../enum/AlphaTolerance';
|
||||||
import { RoomObjectSpriteType } from '../enum/RoomObjectSpriteType';
|
import { RoomObjectSpriteType } from '../enum/RoomObjectSpriteType';
|
||||||
import { IRoomObjectSprite } from './IRoomObjectSprite';
|
import { IRoomObjectSprite } from './IRoomObjectSprite';
|
||||||
@ -11,7 +11,7 @@ export class RoomObjectSprite implements IRoomObjectSprite
|
|||||||
private _name: string;
|
private _name: string;
|
||||||
private _type: string;
|
private _type: string;
|
||||||
private _spriteType: number;
|
private _spriteType: number;
|
||||||
private _texture: Texture;
|
private _texture: Texture<Resource>;
|
||||||
private _container: Container;
|
private _container: Container;
|
||||||
|
|
||||||
private _width: number;
|
private _width: number;
|
||||||
@ -123,12 +123,12 @@ export class RoomObjectSprite implements IRoomObjectSprite
|
|||||||
this._spriteType = type;
|
this._spriteType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get texture(): Texture
|
public get texture(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._texture;
|
return this._texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set texture(texture: Texture)
|
public set texture(texture: Texture<Resource>)
|
||||||
{
|
{
|
||||||
if(this._texture === texture) return;
|
if(this._texture === texture) return;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Rectangle, Texture } from 'pixi.js';
|
import { Rectangle, Resource, Texture } from 'pixi.js';
|
||||||
import { IGraphicAsset } from './IGraphicAsset';
|
import { IGraphicAsset } from './IGraphicAsset';
|
||||||
|
|
||||||
export class GraphicAsset implements IGraphicAsset
|
export class GraphicAsset implements IGraphicAsset
|
||||||
@ -7,7 +7,7 @@ export class GraphicAsset implements IGraphicAsset
|
|||||||
|
|
||||||
private _name: string;
|
private _name: string;
|
||||||
private _source: string;
|
private _source: string;
|
||||||
private _texture: Texture;
|
private _texture: Texture<Resource>;
|
||||||
private _usesPalette: boolean;
|
private _usesPalette: boolean;
|
||||||
private _x: number;
|
private _x: number;
|
||||||
private _y: number;
|
private _y: number;
|
||||||
@ -18,7 +18,7 @@ export class GraphicAsset implements IGraphicAsset
|
|||||||
private _rectangle: Rectangle;
|
private _rectangle: Rectangle;
|
||||||
private _initialized: boolean;
|
private _initialized: boolean;
|
||||||
|
|
||||||
public static createAsset(name: string, source: string, texture: Texture, x: number, y: number, flipH: boolean = false, flipV: boolean = false, usesPalette: boolean = false): GraphicAsset
|
public static createAsset(name: string, source: string, texture: Texture<Resource>, x: number, y: number, flipH: boolean = false, flipV: boolean = false, usesPalette: boolean = false): GraphicAsset
|
||||||
{
|
{
|
||||||
const graphicAsset = (GraphicAsset.GRAPHIC_POOL.length ? GraphicAsset.GRAPHIC_POOL.pop() : new GraphicAsset());
|
const graphicAsset = (GraphicAsset.GRAPHIC_POOL.length ? GraphicAsset.GRAPHIC_POOL.pop() : new GraphicAsset());
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ export class GraphicAsset implements IGraphicAsset
|
|||||||
return this._source;
|
return this._source;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get texture(): Texture
|
public get texture(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._texture;
|
return this._texture;
|
||||||
}
|
}
|
||||||
@ -137,4 +137,4 @@ export class GraphicAsset implements IGraphicAsset
|
|||||||
|
|
||||||
return this._rectangle;
|
return this._rectangle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private createAsset(name: string, source: string, texture: Texture, flipH: boolean, flipV: boolean, x: number, y: number, usesPalette: boolean): boolean
|
private createAsset(name: string, source: string, texture: Texture<Resource>, flipH: boolean, flipV: boolean, x: number, y: number, usesPalette: boolean): boolean
|
||||||
{
|
{
|
||||||
if(this._assets.get(name)) return false;
|
if(this._assets.get(name)) return false;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private replaceAsset(name: string, source: string, texture: Texture, flipH: boolean, flipV: boolean, x: number, y: number, usesPalette: boolean): boolean
|
private replaceAsset(name: string, source: string, texture: Texture<Resource>, flipH: boolean, flipV: boolean, x: number, y: number, usesPalette: boolean): boolean
|
||||||
{
|
{
|
||||||
const existing = this._assets.get(name);
|
const existing = this._assets.get(name);
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public addAsset(name: string, texture: Texture, override: boolean, x: number = 0, y: number = 0, flipH: boolean = false, flipV: boolean = false): boolean
|
public addAsset(name: string, texture: Texture<Resource>, override: boolean, x: number = 0, y: number = 0, flipH: boolean = false, flipV: boolean = false): boolean
|
||||||
{
|
{
|
||||||
if(!name || !texture) return false;
|
if(!name || !texture) return false;
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
|||||||
existing.recycle();
|
existing.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getLibraryAsset(name: string): Texture
|
public getLibraryAsset(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!name) return null;
|
if(!name) return null;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Sprite, Texture } from 'pixi.js';
|
import { Resource, Sprite, Texture } from 'pixi.js';
|
||||||
import { TextureUtils } from '../../../utils';
|
import { TextureUtils } from '../../../utils';
|
||||||
|
|
||||||
export class GraphicAssetPalette
|
export class GraphicAssetPalette
|
||||||
@ -22,7 +22,7 @@ export class GraphicAssetPalette
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyPalette(texture: Texture): Texture
|
public applyPalette(texture: Texture<Resource>): Texture<Resource>
|
||||||
{
|
{
|
||||||
const sprite = Sprite.from(texture);
|
const sprite = Sprite.from(texture);
|
||||||
const textureCanvas = TextureUtils.generateCanvas(sprite);
|
const textureCanvas = TextureUtils.generateCanvas(sprite);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Rectangle, Texture } from 'pixi.js';
|
import { Rectangle, Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export interface IGraphicAsset
|
export interface IGraphicAsset
|
||||||
{
|
{
|
||||||
name: string;
|
name: string;
|
||||||
source: string;
|
source: string;
|
||||||
texture: Texture;
|
texture: Texture<Resource>;
|
||||||
usesPalette: boolean;
|
usesPalette: boolean;
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
@ -15,4 +15,4 @@ export interface IGraphicAsset
|
|||||||
flipH: boolean;
|
flipH: boolean;
|
||||||
flipV: boolean;
|
flipV: boolean;
|
||||||
rectangle: Rectangle;
|
rectangle: Rectangle;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { Resource, Texture } from 'pixi.js';
|
||||||
import { IAssetData } from '../../../../core/asset/interfaces';
|
import { IAssetData } from '../../../../core/asset/interfaces';
|
||||||
import { GraphicAssetPalette } from './GraphicAssetPalette';
|
import { GraphicAssetPalette } from './GraphicAssetPalette';
|
||||||
import { IGraphicAsset } from './IGraphicAsset';
|
import { IGraphicAsset } from './IGraphicAsset';
|
||||||
@ -14,10 +14,10 @@ export interface IGraphicAssetCollection
|
|||||||
getPaletteNames(): string[];
|
getPaletteNames(): string[];
|
||||||
getPaletteColors(paletteName: string): number[];
|
getPaletteColors(paletteName: string): number[];
|
||||||
getPalette(name: string): GraphicAssetPalette;
|
getPalette(name: string): GraphicAssetPalette;
|
||||||
addAsset(name: string, texture: Texture, override: boolean, x?: number, y?: number, flipH?: boolean, flipV?: boolean): boolean;
|
addAsset(name: string, texture: Texture<Resource>, override: boolean, x?: number, y?: number, flipH?: boolean, flipV?: boolean): boolean;
|
||||||
disposeAsset(name: string): void;
|
disposeAsset(name: string): void;
|
||||||
referenceCount: number;
|
referenceCount: number;
|
||||||
referenceTimestamp: number;
|
referenceTimestamp: number;
|
||||||
name: string;
|
name: string;
|
||||||
data: IAssetData;
|
data: IAssetData;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { BaseTexture, BLEND_MODES, Point, RenderTexture, Sprite, Texture } from 'pixi.js';
|
import { BaseTexture, BLEND_MODES, Point, RenderTexture, Resource, Sprite, Texture } from 'pixi.js';
|
||||||
import { TextureUtils } from '../../utils';
|
import { TextureUtils } from '../../utils';
|
||||||
|
|
||||||
export class ExtendedSprite extends Sprite
|
export class ExtendedSprite extends Sprite
|
||||||
@ -13,7 +13,7 @@ export class ExtendedSprite extends Sprite
|
|||||||
private _pairedSpriteId: number;
|
private _pairedSpriteId: number;
|
||||||
private _pairedSpriteUpdateCounter: number;
|
private _pairedSpriteUpdateCounter: number;
|
||||||
|
|
||||||
constructor(texture: Texture = null)
|
constructor(texture: Texture<Resource> = null)
|
||||||
{
|
{
|
||||||
super(texture);
|
super(texture);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ export class ExtendedSprite extends Sprite
|
|||||||
super.calculateVertices();
|
super.calculateVertices();
|
||||||
}
|
}
|
||||||
|
|
||||||
public setTexture(texture: Texture): void
|
public setTexture(texture: Texture<Resource>): void
|
||||||
{
|
{
|
||||||
if(!texture) texture = Texture.EMPTY;
|
if(!texture) texture = Texture.EMPTY;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Graphics, Matrix, Texture } from 'pixi.js';
|
import { Graphics, Matrix, Resource, Texture } from 'pixi.js';
|
||||||
import { TextureUtils } from './TextureUtils';
|
import { TextureUtils } from './TextureUtils';
|
||||||
|
|
||||||
export class Rasterizer
|
export class Rasterizer
|
||||||
@ -61,7 +61,7 @@ export class Rasterizer
|
|||||||
// k.unlock();
|
// k.unlock();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public static getFlipHBitmapData(k: Texture): Texture
|
public static getFlipHBitmapData(k: Texture<Resource>): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!k) return null;
|
if(!k) return null;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ export class Rasterizer
|
|||||||
return TextureUtils.generateTexture(graphic);
|
return TextureUtils.generateTexture(graphic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getFlipVBitmapData(k: Texture): Texture
|
public static getFlipVBitmapData(k: Texture<Resource>): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!k) return null;
|
if(!k) return null;
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ export class Rasterizer
|
|||||||
return TextureUtils.generateTexture(graphic);
|
return TextureUtils.generateTexture(graphic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getFlipHVBitmapData(k: Texture): Texture
|
public static getFlipHVBitmapData(k: Texture<Resource>): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!k) return null;
|
if(!k) return null;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Extract } from '@pixi/extract';
|
import { Extract } from '@pixi/extract';
|
||||||
import { AbstractRenderer, DisplayObject, Rectangle, Renderer, RenderTexture, SCALE_MODES, Texture } from 'pixi.js';
|
import { AbstractRenderer, DisplayObject, Rectangle, Renderer, RenderTexture, Resource, SCALE_MODES, Texture } from 'pixi.js';
|
||||||
import { Nitro } from '../../nitro/Nitro';
|
import { Nitro } from '../../nitro/Nitro';
|
||||||
|
|
||||||
export class TextureUtils
|
export class TextureUtils
|
||||||
@ -13,7 +13,7 @@ export class TextureUtils
|
|||||||
return TextureUtils.getRenderer().generateTexture(displayObject, scaleMode, resolution, region);
|
return TextureUtils.getRenderer().generateTexture(displayObject, scaleMode, resolution, region);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static generateTextureFromImage(image: HTMLImageElement): Texture
|
public static generateTextureFromImage(image: HTMLImageElement): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!image) return null;
|
if(!image) return null;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user