Replace intro with smaller file
parent
69d9f705a1
commit
8cce544536
Binary file not shown.
Binary file not shown.
|
@ -23,7 +23,7 @@ export class LoadingScene extends SceneBase {
|
|||
this.load['cacheBuster'] = buildIdMatch[1];
|
||||
}
|
||||
|
||||
this.load.video('intro_dark', 'images/intro_dark.mp4', true);
|
||||
this.load.video('intro_dark', 'images/intro_dark.webm', true);
|
||||
|
||||
this.loadImage('loading_bg', 'arenas');
|
||||
this.loadImage('logo', '');
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
let cacheBuster = '';
|
||||
|
||||
const ignoredFiles = [ 'intro_dark' ];
|
||||
|
||||
export default class CacheBustedLoaderPlugin extends Phaser.Loader.LoaderPlugin {
|
||||
constructor(scene: Phaser.Scene) {
|
||||
super(scene)
|
||||
|
@ -19,8 +17,7 @@ export default class CacheBustedLoaderPlugin extends Phaser.Loader.LoaderPlugin
|
|||
if (!Array.isArray(file))
|
||||
file = [ file ];
|
||||
|
||||
if (!ignoredFiles.includes(file?.key) && cacheBuster)
|
||||
file.forEach(item => item.url += '?v=' + cacheBuster);
|
||||
file.forEach(item => item.url += '?v=' + cacheBuster);
|
||||
|
||||
super.addFile(file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue