Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.3.0 #31

Merged
merged 2 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Looking for [Phaser Framework CE (Community Edition)](https://github.com/photons

### Script tag

- 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
- 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
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules
Expand Down Expand Up @@ -292,6 +292,11 @@ export default {

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

## Contributing ✨
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.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** ❤️.
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).

## Supporting 🍻
I believe in Unicorns 🦄
Support [me](http://www.paypal.me/jdnichollsc/2), if you do too.
Expand All @@ -305,6 +310,9 @@ The maintainers of IonPhaser and thousands of other packages are working with Ti
## Security contact information 🚨
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.

## License ⚖️
This repository is available under the [MIT License](https://github.com/proyecto26/ion-phaser/blob/develop/LICENSE).

## Happy coding 💯
Made with ❤️

Expand Down
2 changes: 1 addition & 1 deletion demo-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"@ion-phaser/core": "file:..",
"@ion-phaser/core": "^1.3.0",
"phaser": "^3.19.0",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
Expand Down
2 changes: 1 addition & 1 deletion demo-angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CommonScene extends Phaser.Scene {
this.cameras.main.centerY,
"Hello World", {
font: "40px Arial",
fill: "#ffffff"
color: "#ffffff"
}
);
this.helloWorld.setOrigin(0.5);
Expand Down
6 changes: 3 additions & 3 deletions demo-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ion-phaser/react": "^1.2.2",
"@ion-phaser/react": "^1.3.0",
"@types/jest": "^25.2.1",
"@types/node": "^13.13.4",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.7",
"phaser": "^3.23.0",
"phaser": "^3.53.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"typescript": "^3.8.3"
"typescript": "^4.0.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
9 changes: 5 additions & 4 deletions demo-react/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react'
import React, { useState, useEffect, useRef } from 'react'
import Phaser from 'phaser'
import { IonPhaser, GameInstance } from '@ion-phaser/react'
import logo from './assets/logo.png'
Expand All @@ -18,7 +18,7 @@ class MainScene extends Phaser.Scene {
this.cameras.main.centerY,
"Hello World", {
font: "40px Arial",
fill: "#ffffff"
color: "#ffffff"
}
);
this.helloWorld.setOrigin(0.5);
Expand Down Expand Up @@ -54,11 +54,12 @@ const gameConfig: GameInstance = {
};

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

const destroy = () => {
console.log('Instance', game?.instance)
gameRef.current?.destroy()
setInitialize(false)
setGame(undefined)
}
Expand All @@ -74,7 +75,7 @@ export default function App () {
<header className="App-header">
{ initialize ? (
<>
<IonPhaser game={game} initialize={initialize} />
<IonPhaser ref={gameRef} game={game} initialize={initialize} />
<div onClick={destroy} className="flex destroyButton">
<a href="#1" className="bttn">Destroy</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions demo-react/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow: hidden;
}

code {
Expand Down
4 changes: 2 additions & 2 deletions demo-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"core-js": "^2.6.5",
"vue": "^2.6.10",
"phaser": "3.19.0",
"@ion-phaser/core": "file:.."
"phaser": "3.53.1",
"@ion-phaser/core": "^1.3.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.11.0",
Expand Down
Loading