@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.
@@ -241,9 +241,10 @@ export class GameApplication extends EventEmitter<GameEngineEvents> {
241
241
 
242
242
  const pixiOpts = {
243
243
  preference: 'webgl' as const,
244
- background: typeof this.config.loading?.backgroundColor === 'number'
245
- ? this.config.loading.backgroundColor
246
- : 0x000000,
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
- const basePath = this.initData?.assetsUrl ?? '';
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