-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuring files of global and phaser types
- Loading branch information
1 parent
e93638b
commit ea2bc9e
Showing
6 changed files
with
65 additions
and
31 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 |
---|---|---|
@@ -1,9 +1,28 @@ | ||
import Phaser from 'phaser'; | ||
import { config } from './config'; | ||
|
||
// plugins | ||
// import 'phaser3-rex-plugins/.....' | ||
import 'phaser/plugins/spine/dist/SpinePlugin' | ||
|
||
// scenes | ||
import Preload from './scenes/Preload'; | ||
|
||
new Phaser.Game( | ||
Object.assign(config, { | ||
scene: [Preload] | ||
}) | ||
); | ||
new Phaser.Game({ | ||
//SCENES | ||
scene: [Preload], | ||
//PLUGINS | ||
plugins: { | ||
scene: [ | ||
{ key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' } | ||
] | ||
}, | ||
type: Phaser.AUTO, | ||
parent: 'db739594-062e-4b43-b0b5-3d3e3d17846e', | ||
backgroundColor: '#222', | ||
scale: { | ||
width: 1920, | ||
height: 1080, | ||
mode: Phaser.Scale.FIT, | ||
autoCenter: Phaser.Scale.CENTER_BOTH | ||
}, | ||
}); |
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 |
---|---|---|
@@ -1,28 +1,8 @@ | ||
|
||
//PHASER GLOBAL | ||
declare global { | ||
namespace Phaser { | ||
interface Game { | ||
|
||
} | ||
interface Scene { | ||
|
||
} | ||
namespace GameObjects { | ||
interface Text { | ||
|
||
} | ||
interface Image { | ||
|
||
} | ||
interface DOMElement { | ||
|
||
} | ||
} | ||
|
||
interface Window { | ||
SpinePlugin: any | ||
} | ||
|
||
} | ||
|
||
export interface HexColor extends String { } | ||
export {} | ||
|
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/// <reference path="../../node_modules/phaser/types/SpineGameObject.d.ts" /> | ||
/// <reference path="../../node_modules/phaser/types/SpinePlugin.d.ts" /> | ||
/// others type references here! | ||
|
||
declare global { | ||
|
||
namespace Phaser { | ||
interface Game { | ||
|
||
} | ||
interface Scene { | ||
teste:string | ||
} | ||
namespace GameObjects { | ||
interface Text { | ||
|
||
} | ||
interface Image { | ||
|
||
} | ||
interface DOMElement { | ||
|
||
} | ||
} | ||
|
||
} | ||
|
||
} | ||
export {} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export interface HexColor extends String { } |
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
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