mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Fixes
This commit is contained in:
parent
c0800343fa
commit
26dfb91534
@ -1,7 +1,7 @@
|
|||||||
import { Texture } from 'pixi.js';
|
import { RenderTexture } from 'pixi.js';
|
||||||
|
|
||||||
export interface IGetImageListener
|
export interface IGetImageListener
|
||||||
{
|
{
|
||||||
imageReady(id: number, texture: Texture, image?: HTMLImageElement): void;
|
imageReady(id: number, texture: RenderTexture, image?: HTMLImageElement): void;
|
||||||
imageFailed(id: number): void;
|
imageFailed(id: number): void;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
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;
|
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;
|
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;
|
selectRoomObject(roomId: number, objectId: number, objectCategory: number): void;
|
||||||
_Str_8675(): void;
|
_Str_8675(): void;
|
||||||
cancelRoomObjectPlacement(): void;
|
cancelRoomObjectPlacement(): void;
|
||||||
|
@ -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 { 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';
|
||||||
@ -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);
|
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 type: string = null;
|
||||||
let value = ((((typeId + ' ') + paletteId) + ' ') + color.toString(16));
|
let value = ((((typeId + ' ') + paletteId) + ' ') + color.toString(16));
|
||||||
|
|
||||||
if(!_arg_7) value = (value + (' ' + 'head'));
|
if(headOnly) value = (value + (' ' + 'head'));
|
||||||
|
|
||||||
if(customParts)
|
if(customParts)
|
||||||
{
|
{
|
||||||
@ -3219,7 +3219,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
const objectId = roomObject.id;
|
const objectId = roomObject.id;
|
||||||
const visualization = roomObject.visualization;
|
const visualization = roomObject.visualization;
|
||||||
|
|
||||||
let texture: Texture = null;
|
let texture: RenderTexture = null;
|
||||||
|
|
||||||
if(visualization)
|
if(visualization)
|
||||||
{
|
{
|
||||||
|
@ -775,7 +775,7 @@ export class RoomPreviewer
|
|||||||
return renderingCanvas;
|
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)
|
if(this.isRoomEngineReady)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Rectangle, RenderTexture, Texture } from 'pixi.js';
|
import { Rectangle, RenderTexture } from 'pixi.js';
|
||||||
import { IRoomGeometry } from '../../utils/IRoomGeometry';
|
import { IRoomGeometry } from '../../utils/IRoomGeometry';
|
||||||
import { IRoomObject } from '../IRoomObject';
|
import { IRoomObject } from '../IRoomObject';
|
||||||
import { IObjectVisualizationData } from './IRoomObjectVisualizationData';
|
import { IObjectVisualizationData } from './IRoomObjectVisualizationData';
|
||||||
@ -12,6 +12,6 @@ export interface IRoomObjectVisualization
|
|||||||
getImage(bgColor: number, originalId: number): RenderTexture;
|
getImage(bgColor: number, originalId: number): RenderTexture;
|
||||||
instanceId: number;
|
instanceId: number;
|
||||||
object: IRoomObject;
|
object: IRoomObject;
|
||||||
image: Texture;
|
image: RenderTexture;
|
||||||
updateSpriteCounter: number;
|
updateSpriteCounter: number;
|
||||||
}
|
}
|
||||||
|
@ -1080,4 +1080,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
|
|||||||
{
|
{
|
||||||
return this._canvasUpdated;
|
return this._canvasUpdated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public set canvasUpdated(flag: boolean)
|
||||||
|
{
|
||||||
|
this._canvasUpdated = flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user