mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Update config
This commit is contained in:
parent
e96869d7eb
commit
38a9c746bf
@ -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>
|
||||
|
9
packages/utils/src/NitroConfig.ts
Normal file
9
packages/utils/src/NitroConfig.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export { };
|
||||
|
||||
declare global
|
||||
{
|
||||
interface Window
|
||||
{
|
||||
NitroConfig?: { [index: string]: any };
|
||||
}
|
||||
}
|
@ -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';
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user