diff --git a/src/nitro/room/IGetImageListener.ts b/src/nitro/room/IGetImageListener.ts index c272f21a..615f988b 100644 --- a/src/nitro/room/IGetImageListener.ts +++ b/src/nitro/room/IGetImageListener.ts @@ -1,7 +1,7 @@ -import { Texture } from 'pixi.js'; +import { RenderTexture } from 'pixi.js'; export interface IGetImageListener { - imageReady(id: number, texture: Texture, image?: HTMLImageElement): void; + imageReady(id: number, texture: RenderTexture, image?: HTMLImageElement): void; imageFailed(id: number): void; -} \ No newline at end of file +} diff --git a/src/nitro/room/IRoomEngine.ts b/src/nitro/room/IRoomEngine.ts index bfd44afc..596b5b6e 100644 --- a/src/nitro/room/IRoomEngine.ts +++ b/src/nitro/room/IRoomEngine.ts @@ -70,7 +70,7 @@ export interface IRoomEngine extends INitroManager getFurnitureFloorImage(typeId: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor?: number, extras?: string, state?: number, frameCount?: number, objectData?: IObjectData): ImageResult; getFurnitureWallImage(typeId: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor?: number, extras?: string, state?: number, frameCount?: number): ImageResult; getRoomObjectImage(roomId: number, objectId: number, category: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor?: number): ImageResult; - getRoomObjectPetImage(typeId: number, paletteId: number, color: number, direction: IVector3D, scale: number, listener: IGetImageListener, _arg_7?: boolean, bgColor?: number, customParts?: PetCustomPart[], posture?: string): ImageResult; + getRoomObjectPetImage(typeId: number, paletteId: number, color: number, direction: IVector3D, scale: number, listener: IGetImageListener, headOnly?: boolean, bgColor?: number, customParts?: PetCustomPart[], posture?: string): ImageResult; selectRoomObject(roomId: number, objectId: number, objectCategory: number): void; _Str_8675(): void; cancelRoomObjectPlacement(): void; diff --git a/src/nitro/room/RoomEngine.ts b/src/nitro/room/RoomEngine.ts index 8375cc9b..0433a9e2 100644 --- a/src/nitro/room/RoomEngine.ts +++ b/src/nitro/room/RoomEngine.ts @@ -1,4 +1,4 @@ -import { Container, DisplayObject, Matrix, Point, Rectangle, Sprite, Texture } from 'pixi.js'; +import { Container, DisplayObject, Matrix, Point, Rectangle, RenderTexture, Sprite, Texture } from 'pixi.js'; import { IDisposable } from '../../core/common/disposable/IDisposable'; import { IUpdateReceiver } from '../../core/common/IUpdateReceiver'; import { NitroLogger } from '../../core/common/logger/NitroLogger'; @@ -2972,12 +2972,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato return this.getGenericRoomObjectImage(type, color, direction, scale, listener, bgColor, extras, null, state, frameCount); } - public getRoomObjectPetImage(typeId: number, paletteId: number, color: number, direction: IVector3D, scale: number, listener: IGetImageListener, _arg_7: boolean = true, bgColor: number = 0, customParts: PetCustomPart[] = null, posture: string = null): ImageResult + public getRoomObjectPetImage(typeId: number, paletteId: number, color: number, direction: IVector3D, scale: number, listener: IGetImageListener, headOnly: boolean = false, bgColor: number = 0, customParts: PetCustomPart[] = null, posture: string = null): ImageResult { let type: string = null; let value = ((((typeId + ' ') + paletteId) + ' ') + color.toString(16)); - if(!_arg_7) value = (value + (' ' + 'head')); + if(headOnly) value = (value + (' ' + 'head')); if(customParts) { @@ -3219,7 +3219,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const objectId = roomObject.id; const visualization = roomObject.visualization; - let texture: Texture = null; + let texture: RenderTexture = null; if(visualization) { diff --git a/src/nitro/room/preview/RoomPreviewer.ts b/src/nitro/room/preview/RoomPreviewer.ts index 24bea90c..231c56ce 100644 --- a/src/nitro/room/preview/RoomPreviewer.ts +++ b/src/nitro/room/preview/RoomPreviewer.ts @@ -775,7 +775,7 @@ export class RoomPreviewer return renderingCanvas; } - public getGenericRoomObjectImage(type: string, value: string, direction: IVector3D, scale: number, listener:IGetImageListener, bgColor: number = 0, extras: string = null, objectData: IObjectData = null, state: number = -1, frame: number = -1, posture: string = null): ImageResult + public getGenericRoomObjectImage(type: string, value: string, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor: number = 0, extras: string = null, objectData: IObjectData = null, state: number = -1, frame: number = -1, posture: string = null): ImageResult { if(this.isRoomEngineReady) { diff --git a/src/room/object/visualization/IRoomObjectVisualization.ts b/src/room/object/visualization/IRoomObjectVisualization.ts index 5f2a09b5..ed16b108 100644 --- a/src/room/object/visualization/IRoomObjectVisualization.ts +++ b/src/room/object/visualization/IRoomObjectVisualization.ts @@ -1,4 +1,4 @@ -import { Rectangle, RenderTexture, Texture } from 'pixi.js'; +import { Rectangle, RenderTexture } from 'pixi.js'; import { IRoomGeometry } from '../../utils/IRoomGeometry'; import { IRoomObject } from '../IRoomObject'; import { IObjectVisualizationData } from './IRoomObjectVisualizationData'; @@ -12,6 +12,6 @@ export interface IRoomObjectVisualization getImage(bgColor: number, originalId: number): RenderTexture; instanceId: number; object: IRoomObject; - image: Texture; + image: RenderTexture; updateSpriteCounter: number; -} \ No newline at end of file +} diff --git a/src/room/renderer/RoomSpriteCanvas.ts b/src/room/renderer/RoomSpriteCanvas.ts index 418c58a6..e9b25172 100644 --- a/src/room/renderer/RoomSpriteCanvas.ts +++ b/src/room/renderer/RoomSpriteCanvas.ts @@ -1080,4 +1080,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { return this._canvasUpdated; } + + public set canvasUpdated(flag: boolean) + { + this._canvasUpdated = flag; + } }