Update to pixi-7-2-4

This commit is contained in:
Bill 2023-07-19 16:28:51 -04:00
parent c95b1e852b
commit 1e375e59ac
52 changed files with 525 additions and 533 deletions

View File

@ -22,38 +22,31 @@
}, },
"main": "./index", "main": "./index",
"dependencies": { "dependencies": {
"@pixi/app": "~6.5.0", "@pixi/app": "~7.2.4",
"@pixi/basis": "~6.5.0", "@pixi/assets": "^7.2.4",
"@pixi/canvas-display": "~6.5.0", "@pixi/basis": "~7.2.4",
"@pixi/canvas-extract": "~6.5.0", "@pixi/canvas-display": "~7.2.4",
"@pixi/canvas-renderer": "~6.5.0", "@pixi/canvas-extract": "~7.2.4",
"@pixi/constants": "~6.5.0", "@pixi/canvas-renderer": "~7.2.4",
"@pixi/core": "~6.5.0", "@pixi/compressed-textures": "^7.2.4",
"@pixi/display": "~6.5.0", "@pixi/core": "~7.2.4",
"@pixi/events": "~6.5.0", "@pixi/display": "~7.2.4",
"@pixi/extensions": "~6.5.0", "@pixi/events": "~7.2.4",
"@pixi/extract": "~6.5.0", "@pixi/extensions": "~7.2.4",
"@pixi/filter-alpha": "~6.5.0", "@pixi/extract": "~7.2.4",
"@pixi/filter-color-matrix": "~6.5.0", "@pixi/filter-alpha": "~7.2.4",
"@pixi/graphics": "~6.5.0", "@pixi/filter-color-matrix": "~7.2.4",
"@pixi/graphics-extras": "~6.5.0", "@pixi/graphics": "~7.2.4",
"@pixi/interaction": "~6.5.0", "@pixi/graphics-extras": "~7.2.4",
"@pixi/loaders": "~6.5.0", "@pixi/math-extras": "~7.2.4",
"@pixi/math": "~6.5.0", "@pixi/mixin-cache-as-bitmap": "~7.2.4",
"@pixi/math-extras": "~6.5.0", "@pixi/mixin-get-child-by-name": "~7.2.4",
"@pixi/mixin-cache-as-bitmap": "~6.5.0", "@pixi/mixin-get-global-position": "~7.2.4",
"@pixi/mixin-get-child-by-name": "~6.5.0", "@pixi/sprite": "~7.2.4",
"@pixi/mixin-get-global-position": "~6.5.0", "@pixi/sprite-tiling": "~7.2.4",
"@pixi/polyfill": "~6.5.0", "@pixi/spritesheet": "~7.2.4",
"@pixi/runner": "~6.5.0", "@pixi/text": "~7.2.4",
"@pixi/settings": "~6.5.0", "@pixi/tilemap": "^4.0.0",
"@pixi/sprite": "~6.5.0",
"@pixi/sprite-tiling": "~6.5.0",
"@pixi/spritesheet": "~6.5.0",
"@pixi/text": "~6.5.0",
"@pixi/ticker": "~6.5.0",
"@pixi/tilemap": "^3.2.2",
"@pixi/utils": "~6.5.0",
"gifuct-js": "^2.1.2", "gifuct-js": "^2.1.2",
"howler": "^2.2.3", "howler": "^2.2.3",
"pako": "^2.0.4" "pako": "^2.0.4"

View File

@ -1,5 +1,4 @@
import { Resource, Texture } from '@pixi/core'; import { Rectangle, Resource, Texture } from '@pixi/core';
import { Rectangle } from '@pixi/math';
import { IGraphicAsset } from './IGraphicAsset'; import { IGraphicAsset } from './IGraphicAsset';
export class GraphicAsset implements IGraphicAsset export class GraphicAsset implements IGraphicAsset

View File

@ -1,7 +1,7 @@
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 { GetTickerTime } from '../../pixi-proxy'; import { GetTickerTime } from '../../pixi-proxy';
import { Dict } from '../utils';
import { GraphicAsset } from './GraphicAsset'; import { GraphicAsset } from './GraphicAsset';
import { GraphicAssetPalette } from './GraphicAssetPalette'; import { GraphicAssetPalette } from './GraphicAssetPalette';
import { IAsset } from './IAsset'; import { IAsset } from './IAsset';

View File

@ -1,5 +1,4 @@
import { Resource, Texture } from '@pixi/core'; import { Rectangle, Resource, Texture } from '@pixi/core';
import { Rectangle } from '@pixi/math';
export interface IGraphicAsset export interface IGraphicAsset
{ {

View File

@ -1,6 +1,5 @@
import { RenderTexture } from '@pixi/core'; import { Point, Rectangle, RenderTexture } from '@pixi/core';
import { DisplayObject } from '@pixi/display'; import { DisplayObject } from '@pixi/display';
import { Point, Rectangle } from '@pixi/math';
import { IRoomGeometry, IRoomManager, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRendererFactory, IRoomRenderingCanvas, IVector3D } from '../../room'; import { IRoomGeometry, IRoomManager, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRendererFactory, IRoomRenderingCanvas, IVector3D } from '../../room';
import { IPetCustomPart } from '../avatar'; import { IPetCustomPart } from '../avatar';
import { IRoomSessionManager, ISessionDataManager } from '../session'; import { IRoomSessionManager, ISessionDataManager } from '../session';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IVector3D } from './IVector3D'; import { IVector3D } from './IVector3D';
export interface IRoomGeometry export interface IRoomGeometry

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
export interface IPlaneDrawingData export interface IPlaneDrawingData
{ {

View File

@ -1,5 +1,4 @@
import { RenderTexture } from '@pixi/core'; import { Rectangle, RenderTexture } from '@pixi/core';
import { Rectangle } from '@pixi/math';
import { IRoomGeometry } from '../../IRoomGeometry'; import { IRoomGeometry } from '../../IRoomGeometry';
import { IRoomObject } from '../IRoomObject'; import { IRoomObject } from '../IRoomObject';
import { IObjectVisualizationData } from './IRoomObjectVisualizationData'; import { IObjectVisualizationData } from './IRoomObjectVisualizationData';

View File

@ -1,9 +1,8 @@
import { RenderTexture } from '@pixi/core'; import { Point, RenderTexture } from '@pixi/core';
import { DisplayObject } from '@pixi/display'; import { DisplayObject } from '@pixi/display';
import { Point } from '@pixi/math';
import { IRoomGeometry } from '../IRoomGeometry'; import { IRoomGeometry } from '../IRoomGeometry';
import { ISortableSprite } from '../object';
import { RoomObjectSpriteData } from '../RoomObjectSpriteData'; import { RoomObjectSpriteData } from '../RoomObjectSpriteData';
import { ISortableSprite } from '../object';
import { IRoomCanvasMouseListener } from './IRoomCanvasMouseListener'; import { IRoomCanvasMouseListener } from './IRoomCanvasMouseListener';
export interface IRoomRenderingCanvas export interface IRoomRenderingCanvas

View File

@ -1,6 +1,6 @@
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 { BaseTexture, TextureGCSystem, settings } from '@pixi/core';
import { AssetManager, IAvatarRenderManager, ICommunicationManager, IConfigurationManager, IEventDispatcher, ILinkEventTracker, ILocalizationManager, IRoomCameraWidgetManager, IRoomEngine, ISessionDataManager, ISoundManager, NitroConfiguration, NitroLogger } from '../api'; import { AssetManager, IAvatarRenderManager, ICommunicationManager, IConfigurationManager, IEventDispatcher, ILinkEventTracker, ILocalizationManager, IRoomCameraWidgetManager, IRoomEngine, ISessionDataManager, ISoundManager, NitroConfiguration, NitroLogger } from '../api';
import { EventDispatcher } from '../common'; import { EventDispatcher } from '../common';
import { GetTicker, PixiApplicationProxy } from '../pixi-proxy'; import { GetTicker, PixiApplicationProxy } from '../pixi-proxy';
@ -21,9 +21,10 @@ import { HabboWebTools } from './utils/HabboWebTools';
LegacyExternalInterface.available; LegacyExternalInterface.available;
settings.SCALE_MODE = (!(window.devicePixelRatio % 1)) ? SCALE_MODES.NEAREST : SCALE_MODES.LINEAR; BaseTexture.defaultOptions.scaleMode = (!(window.devicePixelRatio % 1)) ? SCALE_MODES.NEAREST : SCALE_MODES.LINEAR;
TextureGCSystem.defaultMaxIdle = 120;
settings.ROUND_PIXELS = true; settings.ROUND_PIXELS = true;
settings.GC_MAX_IDLE = 120;
export class Nitro implements INitro export class Nitro implements INitro
{ {
@ -45,7 +46,7 @@ export class Nitro implements INitro
private _soundManager: ISoundManager = new SoundManager(); private _soundManager: ISoundManager = new SoundManager();
private _linkTrackers: ILinkEventTracker[] = []; private _linkTrackers: ILinkEventTracker[] = [];
constructor(options?: IApplicationOptions) constructor(options?: Partial<IApplicationOptions>)
{ {
if(!Nitro.INSTANCE) Nitro.INSTANCE = this; if(!Nitro.INSTANCE) Nitro.INSTANCE = this;

View File

@ -1,21 +1,10 @@
import '@pixi/canvas-display'; import '@pixi/canvas-display';
import { BatchRenderer, extensions } from '@pixi/core'; import '@pixi/extract';
import { Extract } from '@pixi/extract';
import '@pixi/graphics-extras'; import '@pixi/graphics-extras';
import { InteractionManager } from '@pixi/interaction';
import '@pixi/math-extras'; import '@pixi/math-extras';
import '@pixi/mixin-cache-as-bitmap'; import '@pixi/mixin-cache-as-bitmap';
import '@pixi/mixin-get-child-by-name'; import '@pixi/mixin-get-child-by-name';
import '@pixi/mixin-get-global-position'; import '@pixi/mixin-get-global-position';
import '@pixi/polyfill'; import '@pixi/sprite-tiling';
import { TilingSpriteRenderer } from '@pixi/sprite-tiling'; import '@pixi/spritesheet';
import { SpritesheetLoader } from '@pixi/spritesheet'; import '@pixi/ticker';
import { TickerPlugin } from '@pixi/ticker';
extensions.add(
BatchRenderer,
Extract,
TilingSpriteRenderer,
InteractionManager,
SpritesheetLoader,
TickerPlugin);

View File

@ -1,7 +1,6 @@
import { RenderTexture, Texture } from '@pixi/core'; import { Rectangle, RenderTexture, Texture } from '@pixi/core';
import { Container } from '@pixi/display'; 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 { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { AdvancedMap, 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 { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy'; import { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';

View File

@ -1,5 +1,5 @@
import { Container } from '@pixi/display'; import { Point } from '@pixi/core';
import { Point } from '@pixi/math'; import { Container } from '@pixi/display';
export class AvatarImageBodyPartContainer export class AvatarImageBodyPartContainer
{ {

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { AvatarDirectionAngle, IActionDefinition, IActiveActionData, IAssetAnimation, IAssetManager, IAvatarFigureContainer, IAvatarImage, IAvatarRenderManager, IFigureData, IFigurePartSet, IPartColor, IStructureData } from '../../api'; import { AvatarDirectionAngle, IActionDefinition, IActiveActionData, IAssetAnimation, IAssetManager, IAvatarFigureContainer, IAvatarImage, IAvatarRenderManager, IFigureData, IFigurePartSet, IPartColor, IStructureData } from '../../api';
import { EventDispatcher } from '../../common'; import { EventDispatcher } from '../../common';
import { AvatarImagePartContainer } from './AvatarImagePartContainer'; import { AvatarImagePartContainer } from './AvatarImagePartContainer';

View File

@ -1,12 +1,11 @@
import { Texture } from '@pixi/core'; import { Matrix, Point, Rectangle, Texture } from '@pixi/core';
import { Matrix, Point, Rectangle } from '@pixi/math';
import { AvatarDirectionAngle, AvatarFigurePartType, AvatarScaleType, GeometryType, IActiveActionData, IAvatarImage, RoomObjectSpriteData } from '../../../api'; import { AvatarDirectionAngle, AvatarFigurePartType, AvatarScaleType, GeometryType, IActiveActionData, IAvatarImage, RoomObjectSpriteData } from '../../../api';
import { GetTickerTime, NitroContainer, NitroSprite } from '../../../pixi-proxy'; import { GetTickerTime, NitroContainer, NitroSprite } from '../../../pixi-proxy';
import { AssetAliasCollection } from '../alias';
import { AvatarAnimationLayerData } from '../animation';
import { AvatarImageBodyPartContainer } from '../AvatarImageBodyPartContainer'; import { AvatarImageBodyPartContainer } from '../AvatarImageBodyPartContainer';
import { AvatarImagePartContainer } from '../AvatarImagePartContainer'; import { AvatarImagePartContainer } from '../AvatarImagePartContainer';
import { AvatarStructure } from '../AvatarStructure'; import { AvatarStructure } from '../AvatarStructure';
import { AssetAliasCollection } from '../alias';
import { AvatarAnimationLayerData } from '../animation';
import { AvatarCanvas } from '../structure'; import { AvatarCanvas } from '../structure';
import { AvatarImageActionCache } from './AvatarImageActionCache'; import { AvatarImageActionCache } from './AvatarImageActionCache';
import { AvatarImageBodyPartCache } from './AvatarImageBodyPartCache'; import { AvatarImageBodyPartCache } from './AvatarImageBodyPartCache';

View File

@ -1,6 +1,5 @@
import { Resource, Texture } from '@pixi/core'; import { Point, Rectangle, Resource, Texture } from '@pixi/core';
import { Container } from '@pixi/display'; import { Container } from '@pixi/display';
import { Point, Rectangle } from '@pixi/math';
export class ImageData export class ImageData
{ {

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { AvatarScaleType } from '../../../api'; import { AvatarScaleType } from '../../../api';
export class AvatarCanvas export class AvatarCanvas

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { AnimationActionPart } from './AnimationActionPart'; import { AnimationActionPart } from './AnimationActionPart';
export class AnimationAction export class AnimationAction

View File

@ -1,6 +1,5 @@
import { RenderTexture, Resource, Texture } from '@pixi/core'; import { Matrix, Point, Rectangle, RenderTexture, Resource, Texture } from '@pixi/core';
import { Container, DisplayObject } from '@pixi/display'; import { Container, DisplayObject } from '@pixi/display';
import { Matrix, Point, Rectangle } from '@pixi/math';
import { ICommunicationManager, IConnection, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, 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 { ICommunicationManager, IConnection, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, 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 '../../common'; import { NitroManager } from '../../common';
import { BadgeImageReadyEvent, NitroEventDispatcher, NitroToolbarAnimateIconEvent, RoomBackgroundColorEvent, RoomDragEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomObjectEvent, RoomObjectFurnitureActionEvent, RoomObjectMouseEvent, RoomSessionEvent, RoomToObjectOwnAvatarMoveEvent } from '../../events'; import { BadgeImageReadyEvent, NitroEventDispatcher, NitroToolbarAnimateIconEvent, RoomBackgroundColorEvent, RoomDragEvent, RoomEngineEvent, RoomEngineObjectEvent, RoomObjectEvent, RoomObjectFurnitureActionEvent, RoomObjectMouseEvent, RoomSessionEvent, RoomToObjectOwnAvatarMoveEvent } from '../../events';
@ -398,7 +397,6 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
const overlay = new NitroSprite(Texture.EMPTY); const overlay = new NitroSprite(Texture.EMPTY);
overlay.name = RoomEngine.OVERLAY; overlay.name = RoomEngine.OVERLAY;
overlay.interactive = false;
displayObject.addChild(overlay); displayObject.addChild(overlay);
} }

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IVector3D, Vector3d } from '../../../api'; import { IVector3D, Vector3d } from '../../../api';
import { RoomFloorHole } from './RoomFloorHole'; import { RoomFloorHole } from './RoomFloorHole';
import { RoomMapData } from './RoomMapData'; import { RoomMapData } from './RoomMapData';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IVector3D, Vector3d } from '../../../api'; import { IVector3D, Vector3d } from '../../../api';
export class RoomWallData export class RoomWallData

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IRoomGeometry, IRoomObjectModel, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api'; import { IRoomGeometry, IRoomObjectModel, MouseEventType, NitroConfiguration, RoomObjectVariable, Vector3d } from '../../../../../api';
import { RoomObjectEvent, RoomObjectMouseEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomSpriteMouseEvent } from '../../../../../events'; import { RoomObjectEvent, RoomObjectMouseEvent, RoomObjectTileMouseEvent, RoomObjectWallMouseEvent, RoomSpriteMouseEvent } from '../../../../../events';
import { ColorConverter, RoomObjectLogicBase, RoomObjectUpdateMessage } from '../../../../../room'; import { ColorConverter, RoomObjectLogicBase, RoomObjectUpdateMessage } from '../../../../../room';

View File

@ -1,5 +1,4 @@
import { Resource, Texture } from '@pixi/core'; import { Matrix, Resource, Texture } from '@pixi/core';
import { Matrix } from '@pixi/math';
import { IGraphicAsset, IRoomObjectSprite, RoomObjectVariable } from '../../../../../api'; import { IGraphicAsset, IRoomObjectSprite, RoomObjectVariable } from '../../../../../api';
import { NitroSprite, TextureUtils } from '../../../../../pixi-proxy'; import { NitroSprite, TextureUtils } from '../../../../../pixi-proxy';
import { IsometricImageFurniVisualization } from './IsometricImageFurniVisualization'; import { IsometricImageFurniVisualization } from './IsometricImageFurniVisualization';

View File

@ -1,5 +1,4 @@
import { RenderTexture, Resource, Texture } from '@pixi/core'; import { Matrix, RenderTexture, Resource, Texture } from '@pixi/core';
import { Matrix } from '@pixi/math';
import { GetAssetManager, IGraphicAsset } from '../../../../../api'; import { GetAssetManager, IGraphicAsset } from '../../../../../api';
import { NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy'; import { NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
import { FurnitureBBVisualization } from './FurnitureBBVisualization'; import { FurnitureBBVisualization } from './FurnitureBBVisualization';

View File

@ -1,7 +1,6 @@
import { RenderTexture, Texture } from '@pixi/core'; import { Matrix, 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 { AdvancedMap, IAdvancedMap, IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api'; import { AdvancedMap, IAdvancedMap, IGraphicAsset, IParticleSystem, IRoomObjectSprite } from '../../../../../api';
import { NitroPoint, NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy'; import { NitroPoint, NitroSprite, PixiApplicationProxy } from '../../../../../pixi-proxy';
import { Vector3D } from '../../../../avatar'; import { Vector3D } from '../../../../avatar';

View File

@ -1,5 +1,4 @@
import { Resource, Texture } from '@pixi/core'; import { Matrix, Resource, Texture } from '@pixi/core';
import { Matrix } from '@pixi/math';
import { IGraphicAsset } from '../../../../../api'; import { IGraphicAsset } from '../../../../../api';
import { NitroSprite, NitroTexture, TextureUtils } from '../../../../../pixi-proxy'; import { NitroSprite, NitroTexture, TextureUtils } from '../../../../../pixi-proxy';
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization'; import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IPlaneDrawingData } from '../../../../../api'; import { IPlaneDrawingData } from '../../../../../api';
export class PlaneDrawingData implements IPlaneDrawingData export class PlaneDrawingData implements IPlaneDrawingData

View File

@ -1,5 +1,4 @@
import { Renderer, RenderTexture, Resource, Texture } from '@pixi/core'; import { Matrix, Point, Renderer, RenderTexture, Resource, Texture } from '@pixi/core';
import { Matrix, Point } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { IRoomGeometry, IRoomPlane, IVector3D, Vector3d } from '../../../../../api'; import { IRoomGeometry, IRoomPlane, IVector3D, Vector3d } from '../../../../../api';
import { PixiApplicationProxy, PlaneTextureCache } from '../../../../../pixi-proxy'; import { PixiApplicationProxy, PlaneTextureCache } from '../../../../../pixi-proxy';
@ -51,7 +50,7 @@ export class RoomPlane implements IRoomPlane
private _rectangleMasks: RoomPlaneRectangleMask[]; private _rectangleMasks: RoomPlaneRectangleMask[];
private _maskChanged: boolean; private _maskChanged: boolean;
private _maskBitmapData: RenderTexture; private _maskBitmapData: RenderTexture;
private _maskPixels: Uint8Array; private _maskPixels: Uint8Array | Uint8ClampedArray;
private _bitmapMasksOld: RoomPlaneBitmapMask[]; private _bitmapMasksOld: RoomPlaneBitmapMask[];
private _rectangleMasksOld: RoomPlaneRectangleMask[]; private _rectangleMasksOld: RoomPlaneRectangleMask[];
private _cornerA: Vector3d; private _cornerA: Vector3d;
@ -862,7 +861,7 @@ export class RoomPlane implements IRoomPlane
this.combineTextureMask(canvas, this._maskPixels); this.combineTextureMask(canvas, this._maskPixels);
} }
private combineTextureMask(canvas: RenderTexture, maskPixels: Uint8Array): void private combineTextureMask(canvas: RenderTexture, maskPixels: Uint8Array | Uint8ClampedArray): void
{ {
if(!canvas || !maskPixels) return; if(!canvas || !maskPixels) return;

View File

@ -1,4 +1,4 @@
import { Rectangle } from '@pixi/math'; import { Rectangle } from '@pixi/core';
import { AlphaTolerance, IObjectVisualizationData, IPlaneVisualization, IRoomGeometry, IRoomObjectModel, IRoomObjectSprite, IRoomPlane, RoomObjectSpriteType, RoomObjectVariable, Vector3d } from '../../../../../api'; import { AlphaTolerance, IObjectVisualizationData, IPlaneVisualization, IRoomGeometry, IRoomObjectModel, IRoomObjectSprite, IRoomPlane, RoomObjectSpriteType, RoomObjectVariable, Vector3d } from '../../../../../api';
import { PlaneTextureCache } from '../../../../../pixi-proxy'; import { PlaneTextureCache } from '../../../../../pixi-proxy';
import { RoomObjectSpriteVisualization } from '../../../../../room'; import { RoomObjectSpriteVisualization } from '../../../../../room';

View File

@ -1,5 +1,4 @@
import { RenderTexture } from '@pixi/core'; import { Matrix, Point, RenderTexture } from '@pixi/core';
import { Matrix, Point } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { IAssetPlaneMaskData, IAssetPlaneTextureBitmap, IGraphicAssetCollection, IVector3D } from '../../../../../../api'; import { IAssetPlaneMaskData, IAssetPlaneTextureBitmap, IGraphicAssetCollection, IVector3D } from '../../../../../../api';
import { PixiApplicationProxy } from '../../../../../../pixi-proxy'; import { PixiApplicationProxy } from '../../../../../../pixi-proxy';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IGraphicAsset } from '../../../../../../../api'; import { IGraphicAsset } from '../../../../../../../api';
export class AnimationItem export class AnimationItem

View File

@ -1,4 +1,4 @@
import { Matrix, Point } from '@pixi/math'; import { Matrix, Point } from '@pixi/core';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { TilingSprite } from '@pixi/sprite-tiling'; import { TilingSprite } from '@pixi/sprite-tiling';
import { IGraphicAsset, IVector3D } from '../../../../../../../api'; import { IGraphicAsset, IVector3D } from '../../../../../../../api';

View File

@ -1,5 +1,4 @@
import { RenderTexture } from '@pixi/core'; import { Point, Rectangle, RenderTexture } from '@pixi/core';
import { Point, Rectangle } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { IVector3D, NitroLogger, Vector3d } from '../../../../../../../api'; import { IVector3D, NitroLogger, Vector3d } from '../../../../../../../api';
import { PlaneTextureCache, TextureUtils } from '../../../../../../../pixi-proxy'; import { PlaneTextureCache, TextureUtils } from '../../../../../../../pixi-proxy';

View File

@ -1,5 +1,4 @@
import { RenderTexture, Resource, Texture } from '@pixi/core'; import { Point, RenderTexture, Resource, Texture } from '@pixi/core';
import { Point } from '@pixi/math';
import { IAssetPlaneMaterial, IAssetPlaneMaterialCellColumn, IAssetPlaneTexture, IAssetPlaneVisualization, IAssetPlaneVisualizationData, IAssetPlaneVisualizationLayer, IGraphicAsset, IGraphicAssetCollection, IRoomGeometry, IVector3D, Vector3d } from '../../../../../../../api'; import { IAssetPlaneMaterial, IAssetPlaneMaterialCellColumn, IAssetPlaneTexture, IAssetPlaneVisualization, IAssetPlaneVisualizationData, IAssetPlaneVisualizationLayer, IGraphicAsset, IGraphicAssetCollection, IRoomGeometry, IVector3D, Vector3d } from '../../../../../../../api';
import { PlaneTextureCache } from '../../../../../../../pixi-proxy'; import { PlaneTextureCache } from '../../../../../../../pixi-proxy';
import { Rasterizer, RoomGeometry } from '../../../../../../../room'; import { Rasterizer, RoomGeometry } from '../../../../../../../room';

View File

@ -1,6 +1,5 @@
import { RenderTexture, Texture } from '@pixi/core'; import { Point, Rectangle, RenderTexture, Texture } from '@pixi/core';
import { Container, DisplayObject } from '@pixi/display'; import { Container, DisplayObject } from '@pixi/display';
import { Point, Rectangle } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { IGetImageListener, IImageResult, IObjectData, IRoomEngine, IRoomObjectController, IRoomRenderingCanvas, IVector3D, LegacyDataType, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../../api'; import { IGetImageListener, IImageResult, IObjectData, IRoomEngine, IRoomObjectController, IRoomRenderingCanvas, IVector3D, LegacyDataType, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../../api';
import { NitroEventDispatcher, RoomEngineEvent, RoomEngineObjectEvent } from '../../../events'; import { NitroEventDispatcher, RoomEngineEvent, RoomEngineObjectEvent } from '../../../events';

View File

@ -1,8 +1,8 @@
import { Point, Rectangle } from '@pixi/math'; import { Point, Rectangle } from '@pixi/core';
import { IPlaneDrawingData, IPlaneVisualization, IRoomObjectSpriteVisualization, IRoomPlane, IRoomRenderingCanvas, RoomObjectCategory, RoomObjectSpriteData, Vector3d } from '../../../api'; import { IPlaneDrawingData, IPlaneVisualization, IRoomObjectSpriteVisualization, IRoomPlane, IRoomRenderingCanvas, RoomObjectCategory, RoomObjectSpriteData, Vector3d } from '../../../api';
import { PixiApplicationProxy } from '../../../pixi-proxy'; import { PixiApplicationProxy } from '../../../pixi-proxy';
import { PlaneDrawingData } from '../object';
import { RoomEngine } from '../RoomEngine'; import { RoomEngine } from '../RoomEngine';
import { PlaneDrawingData } from '../object';
export class SpriteDataCollector export class SpriteDataCollector
{ {

View File

@ -1,3 +1,3 @@
import { IPoint } from '@pixi/math'; import { IPoint } from '@pixi/core';
export type INitroPoint = IPoint export type INitroPoint = IPoint

View File

@ -1,4 +1,5 @@
import { Point } from '@pixi/math';
import { Point } from '@pixi/core';
import { INitroPoint } from './INitroPoint'; import { INitroPoint } from './INitroPoint';
export class NitroPoint extends Point implements INitroPoint export class NitroPoint extends Point implements INitroPoint

View File

@ -1,4 +1,4 @@
import { Polygon } from '@pixi/math'; import { Polygon } from '@pixi/core';
export class NitroPolygon extends Polygon export class NitroPolygon extends Polygon
{} {}

View File

@ -1,4 +1,4 @@
import { Rectangle } from '@pixi/math'; import { Rectangle } from '@pixi/core';
export class NitroRectangle extends Rectangle export class NitroRectangle extends Rectangle
{} {}

View File

@ -4,7 +4,7 @@ export class PixiApplicationProxy extends Application
{ {
private static INSTANCE: Application = null; private static INSTANCE: Application = null;
constructor(options?: IApplicationOptions) constructor(options?: Partial<IApplicationOptions>)
{ {
super(options); super(options);

View File

@ -1,4 +0,0 @@
import { InteractionEvent } from '@pixi/interaction';
export class PixiInteractionEventProxy extends InteractionEvent
{}

View File

@ -1,9 +1,8 @@
import { AbstractRenderer, Renderer, RenderTexture, Texture } from '@pixi/core'; import { ICanvas, IRenderer, Matrix, Rectangle, RenderTexture, Texture } from '@pixi/core';
import { DisplayObject } from '@pixi/display'; import { DisplayObject } from '@pixi/display';
import { Extract } from '@pixi/extract'; import { IExtract } from '@pixi/extract';
import { Matrix, Rectangle } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { PixiApplicationProxy } from './PixiApplicationProxy'; import { TextureUtils } from './TextureUtils';
export class PlaneTextureCache export class PlaneTextureCache
{ {
@ -87,43 +86,26 @@ export class PlaneTextureCache
public clearAndFillRenderTexture(renderTexture: RenderTexture, color: number = 16777215): RenderTexture public clearAndFillRenderTexture(renderTexture: RenderTexture, color: number = 16777215): RenderTexture
{ {
if(!renderTexture) return null; return TextureUtils.clearAndFillRenderTexture(renderTexture, color);
const sprite = new Sprite(Texture.WHITE);
sprite.tint = color;
sprite.width = renderTexture.width;
sprite.height = renderTexture.height;
return this.writeToRenderTexture(sprite, renderTexture);
} }
public writeToRenderTexture(displayObject: DisplayObject, renderTexture: RenderTexture, clear: boolean = true, transform: Matrix = null): RenderTexture public writeToRenderTexture(displayObject: DisplayObject, renderTexture: RenderTexture, clear: boolean = true, transform: Matrix = null): RenderTexture
{ {
if(!displayObject || !renderTexture) return null; return TextureUtils.writeToRenderTexture(displayObject, renderTexture, clear, transform);
this.getRenderer().render(displayObject, {
renderTexture,
clear,
transform
});
return renderTexture;
} }
public getPixels(displayObject: DisplayObject | RenderTexture, frame: Rectangle = null): Uint8Array public getPixels(displayObject: DisplayObject | RenderTexture, frame: Rectangle = null): Uint8Array | Uint8ClampedArray
{ {
return this.getExtractor().pixels(displayObject); return TextureUtils.getPixels(displayObject, frame);
} }
public getRenderer(): Renderer | AbstractRenderer public getRenderer(): IRenderer<ICanvas>
{ {
return PixiApplicationProxy.instance.renderer; return TextureUtils.getRenderer();
} }
public getExtractor(): Extract public getExtractor(): IExtract
{ {
return (this.getRenderer().plugins.extract as Extract); return TextureUtils.getExtractor();
} }
} }

View File

@ -1,8 +1,6 @@
import { AbstractRenderer, Renderer, RenderTexture, Resource, Texture } from '@pixi/core'; import { ICanvas, IRenderer, Matrix, Rectangle, RenderTexture, Resource, settings, Texture } from '@pixi/core';
import { DisplayObject } from '@pixi/display'; import { DisplayObject } from '@pixi/display';
import { Extract } from '@pixi/extract'; import { IExtract } from '@pixi/extract';
import { Matrix, Rectangle } from '@pixi/math';
import { settings } from '@pixi/settings';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { PixiApplicationProxy } from './PixiApplicationProxy'; import { PixiApplicationProxy } from './PixiApplicationProxy';
@ -42,7 +40,7 @@ export class TextureUtils
return this.getExtractor().base64(target); return this.getExtractor().base64(target);
} }
public static generateCanvas(target: DisplayObject | RenderTexture): HTMLCanvasElement public static generateCanvas(target: DisplayObject | RenderTexture): ICanvas
{ {
if(!target) return null; if(!target) return null;
@ -111,18 +109,18 @@ export class TextureUtils
return renderTexture; return renderTexture;
} }
public static getPixels(displayObject: DisplayObject | RenderTexture, frame: Rectangle = null): Uint8Array public static getPixels(displayObject: DisplayObject | RenderTexture, frame: Rectangle = null): Uint8Array | Uint8ClampedArray
{ {
return this.getExtractor().pixels(displayObject); return this.getExtractor().pixels(displayObject);
} }
public static getRenderer(): Renderer | AbstractRenderer public static getRenderer(): IRenderer<ICanvas>
{ {
return PixiApplicationProxy.instance.renderer; return PixiApplicationProxy.instance.renderer;
} }
public static getExtractor(): Extract public static getExtractor(): IExtract
{ {
return (this.getRenderer().plugins.extract as Extract); return this.getRenderer().extract;
} }
} }

View File

@ -1,5 +1,4 @@
export { POINT_STRUCT_SIZE } from '@pixi/tilemap'; export { POINT_STRUCT_SIZE } from '@pixi/tilemap';
export * from './adjustment-filter';
export * from './CopyChannelFilter'; export * from './CopyChannelFilter';
export * from './GetTicker'; export * from './GetTicker';
export * from './GetTickerFPS'; export * from './GetTickerFPS';
@ -19,6 +18,6 @@ export * from './NitroTexture';
export * from './NitroTilemap'; export * from './NitroTilemap';
export * from './PaletteMapFilter'; export * from './PaletteMapFilter';
export * from './PixiApplicationProxy'; export * from './PixiApplicationProxy';
export * from './PixiInteractionEventProxy';
export * from './RoomTextureUtils'; export * from './RoomTextureUtils';
export * from './TextureUtils'; export * from './TextureUtils';
export * from './adjustment-filter';

View File

@ -1,5 +1,4 @@
import { RenderTexture } from '@pixi/core'; import { Point, Rectangle, RenderTexture } from '@pixi/core';
import { Point, Rectangle } from '@pixi/math';
import { IGraphicAssetCollection, IObjectVisualizationData, IRoomGeometry, IRoomObjectController, IRoomObjectSprite, IRoomObjectSpriteVisualization, RoomObjectSpriteData } from '../../../api'; import { IGraphicAssetCollection, IObjectVisualizationData, IRoomGeometry, IRoomObjectController, IRoomObjectSprite, IRoomObjectSpriteVisualization, RoomObjectSpriteData } from '../../../api';
import { NitroContainer, NitroSprite, TextureUtils } from '../../../pixi-proxy'; import { NitroContainer, NitroSprite, TextureUtils } from '../../../pixi-proxy';
import { RoomObjectSprite } from './RoomObjectSprite'; import { RoomObjectSprite } from './RoomObjectSprite';

View File

@ -1,7 +1,6 @@
import { RenderTexture } from '@pixi/core'; import { Matrix, Point, Rectangle, RenderTexture } from '@pixi/core';
import { Container, DisplayObject } from '@pixi/display'; import { Container, DisplayObject } from '@pixi/display';
import { Graphics } from '@pixi/graphics'; import { Graphics } from '@pixi/graphics';
import { Matrix, Point, Rectangle } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { IRoomCanvasMouseListener, IRoomGeometry, IRoomObject, IRoomObjectSprite, IRoomObjectSpriteVisualization, IRoomRenderingCanvas, IRoomSpriteCanvasContainer, IRoomSpriteMouseEvent, MouseEventType, RoomObjectSpriteData, RoomObjectSpriteType, Vector3d } from '../../api'; import { IRoomCanvasMouseListener, IRoomGeometry, IRoomObject, IRoomObjectSprite, IRoomObjectSpriteVisualization, IRoomRenderingCanvas, IRoomSpriteCanvasContainer, IRoomSpriteMouseEvent, MouseEventType, RoomObjectSpriteData, RoomObjectSpriteType, Vector3d } from '../../api';
import { RoomSpriteMouseEvent } from '../../events'; import { RoomSpriteMouseEvent } from '../../events';
@ -124,8 +123,6 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
if(!this._master) if(!this._master)
{ {
this._master = new NitroSprite(); this._master = new NitroSprite();
this._master.interactiveChildren = false;
} }
if(!this._display) if(!this._display)
@ -237,7 +234,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
if(this._master) if(this._master)
{ {
if(this._master.hitArea) /* if(this._master.hitArea)
{ {
const hitArea = (this._master.hitArea as Rectangle); const hitArea = (this._master.hitArea as Rectangle);
@ -247,7 +244,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
else else
{ {
this._master.hitArea = new Rectangle(0, 0, width, height); this._master.hitArea = new Rectangle(0, 0, width, height);
} } */
if(this._master.filterArea) if(this._master.filterArea)
{ {

View File

@ -1,6 +1,5 @@
import { BLEND_MODES } from '@pixi/constants'; import { BLEND_MODES } from '@pixi/constants';
import { BaseTexture, Resource, Texture } from '@pixi/core'; import { BaseTexture, Point, Resource, Texture } from '@pixi/core';
import { Point } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { AlphaTolerance } from '../../../api'; import { AlphaTolerance } from '../../../api';
import { TextureUtils } from '../../../pixi-proxy'; import { TextureUtils } from '../../../pixi-proxy';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
export class PointMath export class PointMath
{ {

View File

@ -1,6 +1,5 @@
import { Resource, Texture } from '@pixi/core'; import { Matrix, Resource, Texture } from '@pixi/core';
import { Graphics } from '@pixi/graphics'; import { Graphics } from '@pixi/graphics';
import { Matrix } from '@pixi/math';
import { Sprite } from '@pixi/sprite'; import { Sprite } from '@pixi/sprite';
import { PixiApplicationProxy, TextureUtils } from '../../pixi-proxy'; import { PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';

View File

@ -1,4 +1,4 @@
import { Point } from '@pixi/math'; import { Point } from '@pixi/core';
import { IRoomGeometry, IVector3D, Vector3d } from '../../api'; import { IRoomGeometry, IVector3D, Vector3d } from '../../api';
export class RoomGeometry implements IRoomGeometry export class RoomGeometry implements IRoomGeometry

778
yarn.lock

File diff suppressed because it is too large Load Diff