Hi everybody
I try to load the “Luckiest Guy” fontfamily to my app.
I wanna use the webfont plugin here : Webfont loader - Notes of Phaser 3
BUT i have an error when i do this :
in my index.html :
window.onload = function() {
var config = {
type: Phaser.AUTO,
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
width: 800,
height: 814//600
},pack: {
files: [{
type: 'plugin',
key: 'rexwebfontloaderplugin',
url: 'https://raw.githubusercontent.com/rexrainbow/phaser3-rex-notes/master/dist/ rexwebfontloaderplugin.min.js',
start: true
}]
},
scene: [MainScene, jeu, map, wanted, leaderboard]
};
game= new Phaser.Game(config);
};
<script type="text/javascript" src="MainScene.js"></script>
and in my MainScene.js :
class MainScene extends Phaser.Scene {
constructor(){
super({key: 'MainScene' });
}
preload () {
this.plugins.get('rexwebfontloaderplugin').addToScene(this);
it’s display this :
what i do wrong please ?
thx !