Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update version of the packages to 1.2.3 (core) and 1.2.2 (react)
- Loading branch information
1 parent
7457dad
commit 62c9613
Showing
32 changed files
with
2,482 additions
and
358 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"extends": [ | ||
"plugin:@stencil/recommended" | ||
], | ||
"rules": { | ||
"@stencil/strict-mutable": "off" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "16.7" | ||
} | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,86 @@ | ||
/** | ||
* @flow | ||
*/ | ||
|
||
import React, { useState } from 'react' | ||
import Phaser, { } from 'phaser' | ||
import { IonPhaser } from '@ion-phaser/react' | ||
import logo from './assets/logo.png' | ||
|
||
import './App.css' | ||
|
||
class MainScene extends Phaser.Scene { | ||
private helloWorld: Phaser.GameObjects.Text | ||
|
||
init () { | ||
this.cameras.main.setBackgroundColor('#24252A') | ||
} | ||
|
||
create () { | ||
this.helloWorld = this.add.text( | ||
this.cameras.main.centerX, | ||
this.cameras.main.centerY, | ||
"Hello World", { | ||
font: "40px Arial", | ||
fill: "#ffffff" | ||
} | ||
); | ||
this.helloWorld.setOrigin(0.5); | ||
} | ||
update () { | ||
this.helloWorld.angle += 1; | ||
} | ||
} | ||
|
||
const game: Phaser.Types.Core.GameConfig = { | ||
width: "100%", | ||
height: "100%", | ||
type: Phaser.AUTO, | ||
scale: { | ||
mode: Phaser.Scale.FIT, | ||
autoCenter: Phaser.Scale.CENTER_BOTH, | ||
width: '100%', | ||
height: '100%' | ||
}, | ||
render: { | ||
antialias: false, | ||
pixelArt: true, | ||
roundPixels: true | ||
}, | ||
physics: { | ||
default: 'arcade', | ||
arcade: { | ||
gravity: { y: 400 }, | ||
debug: true | ||
} | ||
}, | ||
scene: MainScene | ||
}; | ||
|
||
const destroy = () => window.location.reload() | ||
|
||
export default function App () { | ||
const [initialize, setInitialize] = useState(false) | ||
|
||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
{ initialize ? ( | ||
<> | ||
<IonPhaser game={game} initialize={initialize} /> | ||
<div onClick={destroy} className="flex destroyButton"> | ||
<a href="#1" className="bttn">Destroy</a> | ||
</div> | ||
</> | ||
) : ( | ||
<> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<div onClick={() => setInitialize(true)} className="flex"> | ||
<a href="#1" className="bttn">Initialize</a> | ||
</div> | ||
</> | ||
)} | ||
</header> | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="react-scripts" /> |
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,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react" | ||
}, | ||
"include": [ | ||
"src" | ||
] | ||
} |
Oops, something went wrong.