@energy8platform/game-engine 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs.js +3 -2
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.esm.js +3 -2
- package/dist/core.esm.js.map +1 -1
- package/dist/host.cjs.js +3 -2
- package/dist/host.cjs.js.map +1 -1
- package/dist/host.esm.js +3 -2
- package/dist/host.esm.js.map +1 -1
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/GameApplication.ts +7 -5
|
@@ -241,9 +241,10 @@ export class GameApplication extends EventEmitter<GameEngineEvents> {
|
|
|
241
241
|
|
|
242
242
|
const pixiOpts = {
|
|
243
243
|
preference: 'webgl' as const,
|
|
244
|
-
background:
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
background:
|
|
245
|
+
typeof this.config.loading?.backgroundColor === 'number'
|
|
246
|
+
? this.config.loading.backgroundColor
|
|
247
|
+
: 0x000000,
|
|
247
248
|
antialias: true,
|
|
248
249
|
resolution: Math.min(window.devicePixelRatio, 2),
|
|
249
250
|
autoDensity: true,
|
|
@@ -286,8 +287,9 @@ export class GameApplication extends EventEmitter<GameEngineEvents> {
|
|
|
286
287
|
}
|
|
287
288
|
|
|
288
289
|
private initSubSystems(): void {
|
|
289
|
-
// Asset Manager
|
|
290
|
-
|
|
290
|
+
// Asset Manager. Base defaults to '/' (site root) when the bridge sends no assetsUrl — the
|
|
291
|
+
// asset folder lives in the manifest paths, not the base, so it needn't be named `assets`.
|
|
292
|
+
const basePath = this.initData?.assetsUrl ?? '/';
|
|
291
293
|
this.assets = new AssetManager(basePath, this.config.manifest);
|
|
292
294
|
|
|
293
295
|
// Audio Manager
|