Update config

This commit is contained in:
billsonnn 2024-03-26 22:43:01 -04:00
parent e96869d7eb
commit 38a9c746bf
4 changed files with 13 additions and 4 deletions

View File

@ -157,8 +157,7 @@ export class ConfigurationManager implements IConfigurationManager
public getDefaultConfig(): { [index: string]: any }
{
//@ts-ignore
return NitroConfig as { [index: string]: any };
return window.NitroConfig;
}
public get definitions(): Map<string, unknown>

View File

@ -0,0 +1,9 @@
export { };
declare global
{
interface Window
{
NitroConfig?: { [index: string]: any };
}
}

View File

@ -16,6 +16,7 @@ export * from './LegacyExternalInterface';
export * from './LinkTracker';
export * from './Matrix4x4';
export * from './NitroBundle';
export * from './NitroConfig';
export * from './NitroLogger';
export * from './NitroVersion';
export * from './Node3D';

View File

@ -1,8 +1,8 @@
import { AbstractRenderer, BrowserAdapter, DOMAdapter, HelloSystem } from 'pixi.js';
import { AbstractRenderer, BrowserAdapter, DOMAdapter, HelloSystem, TextureSource } from 'pixi.js';
HelloSystem.defaultOptions.hello = true;
AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat = false;
//TextureSource.defaultOptions.scaleMode = 'nearest';
TextureSource.defaultOptions.scaleMode = (!(window.devicePixelRatio % 1)) ? 'nearest' : 'linear';
DOMAdapter.set(BrowserAdapter);
export * from '@nitrots/api';