mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Camera updates
This commit is contained in:
parent
57227a9c64
commit
a37b9d287a
@ -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;
|
||||
|
@ -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);
|
||||
|
1
src/nitro/camera/events/index.ts
Normal file
1
src/nitro/camera/events/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './RoomCameraWidgetManagerEvent';
|
@ -1,4 +1,4 @@
|
||||
export * from './events/RoomCameraWidgetManagerEvent';
|
||||
export * from './events';
|
||||
export * from './IRoomCameraWidgetEffect';
|
||||
export * from './IRoomCameraWidgetManager';
|
||||
export * from './IRoomCameraWidgetSelectedEffect';
|
||||
|
Loading…
Reference in New Issue
Block a user