Camera updates

This commit is contained in:
Bill 2021-08-06 02:51:54 -04:00
parent 57227a9c64
commit a37b9d287a
4 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
import { Resource, Texture } from '@pixi/core';
import { IEventDispatcher } from '../../core';
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
import { IRoomCameraWidgetSelectedEffect } from './IRoomCameraWidgetSelectedEffect';
@ -5,7 +6,7 @@ import { IRoomCameraWidgetSelectedEffect } from './IRoomCameraWidgetSelectedEffe
export interface IRoomCameraWidgetManager
{
init(): void;
applyEffects(image: HTMLImageElement, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement;
applyEffects(texture: Texture<Resource>, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement;
events: IEventDispatcher;
effects: Map<string, IRoomCameraWidgetEffect>;
isLoaded: boolean;

View File

@ -53,10 +53,9 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager
this.events.dispatchEvent(new RoomCameraWidgetManagerEvent(RoomCameraWidgetManagerEvent.INITIALIZED));
}
public applyEffects(image: HTMLImageElement, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement
public applyEffects(texture: Texture, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement
{
const container = new NitroContainer();
const texture = Texture.from(image);
const sprite = new NitroSprite(texture);
container.addChild(sprite);

View File

@ -0,0 +1 @@
export * from './RoomCameraWidgetManagerEvent';

View File

@ -1,4 +1,4 @@
export * from './events/RoomCameraWidgetManagerEvent';
export * from './events';
export * from './IRoomCameraWidgetEffect';
export * from './IRoomCameraWidgetManager';
export * from './IRoomCameraWidgetSelectedEffect';