Skip to content

Commit 26f08ef

Browse files
authored
Merge pull request #31 from proyecto26/develop
Release 1.3.0
2 parents 2f61b32 + 0382047 commit 26f08ef

31 files changed

+1334
-909
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Looking for [Phaser Framework CE (Community Edition)](https://github.com/photons
3838

3939
### Script tag
4040

41-
- Put a script tag similar to this `<script src='https://unpkg.com/@ion-phaser/core@1.2.3/dist/ionphaser.js'></script>` in the head of your index.html
41+
- Put a script tag similar to this `<script src='https://unpkg.com/@ion-phaser/core@1.3.0/dist/ionphaser.js'></script>` in the head of your index.html
4242
- Then you can use the element anywhere in your template, JSX, html etc
4343

4444
### Node Modules
@@ -292,6 +292,11 @@ export default {
292292

293293
[_from stencil documentation_](https://github.com/ionic-team/stencil-site/blob/master/src/docs/framework-integration/vue.md)
294294

295+
## Contributing ✨
296+
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
297+
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** ❤️.
298+
You can learn more about how you can contribute to this project in the [contribution guide](https://github.com/proyecto26/ion-phaser/blob/develop/CONTRIBUTING.md).
299+
295300
## Supporting 🍻
296301
I believe in Unicorns 🦄
297302
Support [me](http://www.paypal.me/jdnichollsc/2), if you do too.
@@ -305,6 +310,9 @@ The maintainers of IonPhaser and thousands of other packages are working with Ti
305310
## Security contact information 🚨
306311
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
307312

313+
## License ⚖️
314+
This repository is available under the [MIT License](https://github.com/proyecto26/ion-phaser/blob/develop/LICENSE).
315+
308316
## Happy coding 💯
309317
Made with ❤️
310318

demo-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@angular/platform-browser": "~8.0.0",
2020
"@angular/platform-browser-dynamic": "~8.0.0",
2121
"@angular/router": "~8.0.0",
22-
"@ion-phaser/core": "file:..",
22+
"@ion-phaser/core": "^1.3.0",
2323
"phaser": "^3.19.0",
2424
"rxjs": "~6.4.0",
2525
"tslib": "^1.9.0",

demo-angular/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CommonScene extends Phaser.Scene {
1919
this.cameras.main.centerY,
2020
"Hello World", {
2121
font: "40px Arial",
22-
fill: "#ffffff"
22+
color: "#ffffff"
2323
}
2424
);
2525
this.helloWorld.setOrigin(0.5);

demo-react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@ion-phaser/react": "^1.2.2",
6+
"@ion-phaser/react": "^1.3.0",
77
"@types/jest": "^25.2.1",
88
"@types/node": "^13.13.4",
99
"@types/react": "^16.9.34",
1010
"@types/react-dom": "^16.9.7",
11-
"phaser": "^3.23.0",
11+
"phaser": "^3.53.1",
1212
"react": "^16.13.1",
1313
"react-dom": "^16.13.1",
1414
"react-scripts": "3.4.1",
15-
"typescript": "^3.8.3"
15+
"typescript": "^4.0.0"
1616
},
1717
"scripts": {
1818
"start": "react-scripts start",

demo-react/src/App.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react'
1+
import React, { useState, useEffect, useRef } from 'react'
22
import Phaser from 'phaser'
33
import { IonPhaser, GameInstance } from '@ion-phaser/react'
44
import logo from './assets/logo.png'
@@ -18,7 +18,7 @@ class MainScene extends Phaser.Scene {
1818
this.cameras.main.centerY,
1919
"Hello World", {
2020
font: "40px Arial",
21-
fill: "#ffffff"
21+
color: "#ffffff"
2222
}
2323
);
2424
this.helloWorld.setOrigin(0.5);
@@ -54,11 +54,12 @@ const gameConfig: GameInstance = {
5454
};
5555

5656
export default function App () {
57+
const gameRef = useRef<HTMLIonPhaserElement>()
5758
const [game, setGame] = useState<GameInstance>()
5859
const [initialize, setInitialize] = useState(false)
5960

6061
const destroy = () => {
61-
console.log('Instance', game?.instance)
62+
gameRef.current?.destroy()
6263
setInitialize(false)
6364
setGame(undefined)
6465
}
@@ -74,7 +75,7 @@ export default function App () {
7475
<header className="App-header">
7576
{ initialize ? (
7677
<>
77-
<IonPhaser game={game} initialize={initialize} />
78+
<IonPhaser ref={gameRef} game={game} initialize={initialize} />
7879
<div onClick={destroy} className="flex destroyButton">
7980
<a href="#1" className="bttn">Destroy</a>
8081
</div>

demo-react/src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ body {
66
sans-serif;
77
-webkit-font-smoothing: antialiased;
88
-moz-osx-font-smoothing: grayscale;
9+
overflow: hidden;
910
}
1011

1112
code {

demo-vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"dependencies": {
1111
"core-js": "^2.6.5",
1212
"vue": "^2.6.10",
13-
"phaser": "3.19.0",
14-
"@ion-phaser/core": "file:.."
13+
"phaser": "3.53.1",
14+
"@ion-phaser/core": "^1.3.0"
1515
},
1616
"devDependencies": {
1717
"@vue/cli-plugin-babel": "^3.11.0",

0 commit comments

Comments
 (0)