Comments (14)
Ok give me a moment to fix the issue with this peer dependency
from ion-phaser.
I am using Vue and also need Phaser version of 3.50 or higher. I am a bit confused since in package.json I do have "phaser": "^3.52.0" but none of the functions which came with 3.5 work for me
from ion-phaser.
I am using angular and it works really well :) But I have some issues with version 3.19 and I hope that these issues are fixed in a newer version. But as ion-phaser depends on 3.19 I am not able to update. Thanks for updating @jdnichollsc π
from ion-phaser.
HeyΒ @jdnichollsc sorry for bugging you :D did you came up with a solution?
Best regards,
Nils
from ion-phaser.
Hey @jdnichollsc any updates on this topic? I also would like to use phaser 3.52 but ion-phaser depends on 3.19 :)
from ion-phaser.
Hey @NilsMinor,
As a workaround I endup creating a React componenet that manages Phaser's game instance. Here follows the base code for the componenet, maybe you'll have to tweak your CSS to actually show the canvas but that depends a lot on your layout. Hope it helps, beign that I'm not sure you're using React....
import React from "react";
import Phaser from "phaser";
let game = null;
class Game extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div id="game-container"></div>
);
}
componentDidMount() {
game = new Phaser.Game({
type: Phaser.AUTO,
parent: "game-container",
scale: {
mode: Phaser.Scale.RESIZE,
autoCenter: Phaser.Scale.CENTER_BOTH,
},
scene: [BootScene],
});
}
getScene(key) {
if (game && game.scene) {
return game.scene.getScene(key);
}
}
callFunctionInsideScene() {
this.getScene("SomeGameSceneKey").doSomethingInsideTheScene();
}
componentWillUnmount() {
game.destroy(true);
game = null;
}
}
from ion-phaser.
Let me fix that during this weekend, if you are using React you can try using hooks: https://stackblitz.com/edit/react-phaser
from ion-phaser.
Hey :) Any updates on the ion-phaser/phaser dependency ? I do not really understand how to fix this problem by myself with adding any code to the package.json for example, so I really need you to update the dependency inside ion-phaser ^^
Thanks, Nils :)
from ion-phaser.
Let me try to do that ASAP, I need to identify what's the problem with the current configuration because Phaser is a peer dependency, very odd
from ion-phaser.
Do you know any good npm package to analyze bundle size locally?
from ion-phaser.
I never used a nom package to analyze the size but this (https://www.npmjs.com/package/webpack-bundle-analyzer) seams to do exactly what you are looking for ? :)
from ion-phaser.
I'm trying to solve the issue with this peer dependency, any reaction or comment from the below issue itself is really appreciated! ionic-team/stencil#2829
from ion-phaser.
Please check the new version and let me know π
from ion-phaser.
Let me know if the issue persist, thanks!
from ion-phaser.
Related Issues (20)
- How do I declare functions in phaser using vue? HOT 8
- Issue while using with Vue 3 - Canvas not loaded HOT 8
- Strange Error With Using Spine HOT 4
- Using a custom `Phaser.Game` class HOT 1
- How to use with phaser 2? HOT 1
- Property 'ion-phaser' does not exist on type 'JSX.IntrinsicElements' HOT 2
- Next.js: ReferenceError: Phaser is not defined HOT 3
- image cannot be loaded HOT 3
- use in Taro HOT 3
- How to load a web picture HOT 1
- Interested making it work with next.js HOT 20
- React HTMLIonPhgaissue HOT 1
- Access Vue this from the scene object HOT 6
- Failed to parse source map warnings - @ion-phaser/react HOT 1
- Support React v17 HOT 3
- [Question] Is it possible to use reactive properties inside ion-phaser?
- Some functions are missing HOT 3
- Support React 18
- can not reinitialize after destroy becauseof plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ion-phaser.