• Content Count

  • Joined

  • Last visited

About phaserlover

  • Rank

Recent Profile Visitors

305 profile views
  1. phaserlover

    Showing cropped image

    A few things: =- Changing cutY, will change the position, I can't find anyway to fix it without manual offset - you can only change one of the images, if you need more than one you need to clone the frame
  2. phaserlover

    Prevent game pause

    You probably want server side validation...
  3. phaserlover

    Should I use Phaser 3?

    That looks pretty well. Congrats on the great work! I think would be nice to add an overview for each "class". Like why do I need that, what it does, some use cases... etc.
  4. phaserlover

    Pausing and Resuming main loop unintuitive

    Did you find any solution yet? Same question here...
  5. phaserlover

    Should I use Phaser 3?

    Thanks looks good. The only problem is that most of the examples that appear from google search are for phaser 2.
  6. phaserlover

    Should I use Phaser 3?

    I didn't say somebody should do. I just said that the docs are quite poor and the example are mostly in phaser 2. I don't remember finding any example in phaser 3 in the example folder. I just find them in the newsletters from the author. I think is fair to mention this to newcomers, maybe they expect some more docs and better api details.
  7. phaserlover

    Should I use Phaser 3?

    I don't want to be picky, but I didn't really believed the part "super easy to use". So I looked at your history quickly and seems that in sept 2017 you were asking something about phaser 3. So seems like you used more than "a few weeks", is half a year.
  8. phaserlover

    Should I use Phaser 3?

    I love phaser, I used phaser 2, 3 years ago and docs were bad. Not sure how it is now. Phaser 3 has really bad docs, almost all examples are for phaser 2, and has quite a lot of bugs that shouldn't really be bugs (a lot of hit area bugs for example, if you have a different resolution, change the rotation, put in a container, pan or zoom the camera, hit area gets messed up) at this point. In terms of being intuitive, I think is not, but you will get used pretty quickly to it. I've been doing js for more than 10 years, so is not intuitive. Even d3, rxjs, redux-observable is more intuitive than phaser tbh. About docs, the best thing is to read the random release newsletters. They are more important than the docs themselves! I used to discard the newsletters as I thought was just marketing, but they are the most useful thing I saw about phaser for free. I think you can buy some books/videos if you need better docs.
  9. phaserlover

    Touch Zoom

    I did it this way with hammerjs this.hammer = new Hammer.Manager(this.canvas); const pinch = new Hammer.Pinch(); this.hammer.add([pinch]); this.hammer.on('pinchmove', (event) => { mainCamera.zoom = (mainCamera.zoom * 0.9 + mainCamera.zoom * event.scale * 0.1); });
  10. phaserlover

    Sprite width after zoom?

    Did you find a way to do that?
  11. "phaser": "3.12.0-beta2", Reproduce at Hi! So when I change the scrollXY of the camera, and I try to click on a ImageGameObject it doesn't trigger the even pointerdown. If I randomly click in other places sometimes I hit the ImageGameObject, this makes me think there is a kind of offset problem in the calculation of the GO hit. // Game const config = { width: bbox.width, height: bbox.height, type: Phaser.AUTO, canvas: this.canvas, backgroundColor: '#091326', resolution: window.devicePixelRatio, render: { antialias: true, autoResize: true, }, scene: { preload: this.preload, create: this.create, update: this.update, } }; = new Phaser.Game(config); // In create this.hammer.on('pinchmove', (event) => { mainCamera.zoom = (mainCamera.zoom * 0.9 + mainCamera.zoom * event.scale * 0.1); }); this.hammer.on('panmove', (event) => { this.pan = {x: event.deltaX, y: event.deltaY}; }); this.hammer.on('panend', (event) => { this.pan = undefined; this.previousPan = undefined; }); // GO creation planetsGO[] = { planet: scene.add.image(planet.x, planet.y, textureId), healthBar: new HealthBar(scene, planet), }; planetsGO[].planet.displayWidth = planet.radius * 2; planetsGO[].planet.displayHeight = planet.radius * 2; planetsGO[].planet.setInteractive(); planetsGO[].planet.on('pointerdown', () => { this.props.onPlanetIdClick(; }); // In update loop if (this.pan) { if (this.previousPan) { mainCamera.scrollX += (this.previousPan.x - this.pan.x) / mainCamera.zoom; mainCamera.scrollY += (this.previousPan.y - this.pan.y) / mainCamera.zoom; } this.previousPan = {...this.pan}; }
  12. phaserlover

    How to listen on mouse wheel event?

    Thanks. Anyway, there are no notifications on this blog? I didn't receive any notification on my profile about your answer.
  13. phaserlover

    Webpacket + Typescript + Phaser 3 = Error with # ???

    Looks like your webpack is trying to import a .frag file, which is not javascript. "#define SHADER_NAME PH ASER_BIT MAP_MASK_FS" is a comment, but not in javascript, another language. You might want to exclude that extension, or similar. I'm using typescript and works fine out the box with create-react-app-typescript
  14. phaserlover

    How to listen on mouse wheel event?

    Hi! I was wondering how to get the mouse wheel event? Does phaser have anything special, or I should use the normal javascript event? I was looking at but they don't list the events available. I wonder where can I see the list of events that the scene.input emits. Took a quick look at but doesn't seem to have any list of events, must come from some other file... 😔 I used phaser 2 a few years ago, now I'm back to use phaser 3. I'm still disappointed with how hard is to get started with anything, most likely because of the docs (slow, confusing and incomplete). I really appreciate the effort of phaser, but really disappointed with the docs/api. I'm developing software for +10 years, and I never had to deal with something like this.
  15. For example when I'm dragging a map and the mouse is released out of the browser and then I return to the phaser game the map is still dragging because the mouseup event wasn't fired. How to fix this? thanks