-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae084aa
commit fe95f16
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ export default class EasterEgg extends Shadow() { | |
return this[`#loadDependency${globalNamespace}`] || (this[`#loadDependency${globalNamespace}`] = new Promise((resolve, reject) => { | ||
// @ts-ignore | ||
if (this.getScript(globalNamespace) || self[globalNamespace]) return resolve(self[globalNamespace]) | ||
// TODO: Add Sha-256 check | ||
const script = document.createElement('script') | ||
script.setAttribute('type', 'module') | ||
script.setAttribute('id', globalNamespace) | ||
|
@@ -112,7 +113,7 @@ export default class EasterEgg extends Shadow() { | |
} | ||
|
||
getScript (globalNamespace) { | ||
return this.root.querySelector(`#${globalNamespace}`) | ||
return this.root.querySelector(`${globalNamespace ? `#${globalNamespace}` : 'script'}`) | ||
} | ||
} | ||
|
||
|
@@ -171,8 +172,9 @@ const createGameScene = (importMetaUrl, Scene, Phaser) => class Game extends Sce | |
super('Game'); | ||
} | ||
create () { | ||
// TODO: - [ ] React on resize and rearrange all assets by viewport change | ||
// example code ➴ ➴ ➴ | ||
this.add.image(50, 50, 'migi').setOrigin(0) | ||
this.add.image(50, 50, 'migi').setOrigin(0).setAlpha(0.5) | ||
this.add.text(50, 175, `Make something fun!\nand share it with us:\[email protected]\n`, { | ||
fontFamily: 'Arial Black', fontSize: 38, color: '#ffffff', | ||
stroke: '#000000', strokeThickness: 8, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters