mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 14:36:26 +01:00
Add DevTools
This commit is contained in:
parent
20e2c371e5
commit
926d5f8085
21
src/DevTools.ts
Normal file
21
src/DevTools.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { GetRoomEngine, RoomEngine } from '@nitrots/room';
|
||||
import { GetRenderer } from '@nitrots/utils';
|
||||
import { TextureSource } from 'pixi.js';
|
||||
export { };
|
||||
|
||||
declare global
|
||||
{
|
||||
interface Window
|
||||
{
|
||||
NitroDevTools?:
|
||||
{
|
||||
getRoomEngine(): RoomEngine;
|
||||
showTextureCache(): TextureSource<any>[];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
window.NitroDevTools = {
|
||||
getRoomEngine: () => GetRoomEngine(),
|
||||
showTextureCache: () => GetRenderer().texture.managedTextures,
|
||||
};
|
@ -2,6 +2,7 @@ import { AbstractRenderer, BrowserAdapter, DOMAdapter, HelloSystem } from 'pixi.
|
||||
|
||||
HelloSystem.defaultOptions.hello = true;
|
||||
AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat = false;
|
||||
//TextureSource.defaultOptions.scaleMode = 'nearest';
|
||||
DOMAdapter.set(BrowserAdapter);
|
||||
|
||||
export * from '@nitrots/api';
|
||||
@ -16,4 +17,5 @@ export * from '@nitrots/room';
|
||||
export * from '@nitrots/session';
|
||||
export * from '@nitrots/sound';
|
||||
export * from '@nitrots/utils';
|
||||
export * from './DevTools';
|
||||
export * from './pixi-proxy';
|
||||
|
Loading…
Reference in New Issue
Block a user