• Content Count

  • Joined

  • Last visited

  1. jake.caron

    getImageData() equivalent.

    Thank you Samme, do you know if there is a way to get just a section of the canvas or an element on the canvas? EDIT: Figured it out using a much less elegant solution.
  2. jake.caron

    getImageData() equivalent.

    Hi all, I am using Phaser, but I am also using standard canvas elements as well. My current objective is to render only one part of the Phaser canvas onto a new canvas element that is not associated with Phaser. One way I wanted to do this was to get the image data from an existing Phaser.Gameobject.Image. Is this possible and if so, how can it be done?
  3. jake.caron

    fps drop to 14 when drawing in update function

    Constantly resizing the window every frame is computationally expensive no matter the framework. As a solution, instead of doing this every frame, only do this when the window is resized. Here is a bit of code that may help: window.addEventListener('resize', <RESIZE_METHOD>);
  4. jake.caron

    Phaser bone/skeletal animations?

    Hi all, I am trying to create a game with bone-based animations using ES6 and either Phaser 2 or Phaser 3. Unfortunately I haven't found anything that suits my needs. I attempted to incorporate SBCGame's spriter library with phaser, but I hit a critical error when implementing it with ES6. Any guides, tutorials or suggestions would be greatly appreciated. Thank you, Jake
  5. Hi all, Just wondering if there is a library that is compatible with Phaser that allows you to animate a character and when transitioning between states, it interpolates all of the bones to the new state instead of snapping to the first frame. Thanks! Jake
  6. jake.caron

    Vertical scrolling

    Hi Keisha, I would probably use a geometry mask applied to a game object. I would then add a "draggable" listener to the gameobject and move it along the supplied Y value. Hope this helps. Let me know if you need a deeper explanation.
  7. jake.caron

    Best Skeletal Animation Library

    While investigating this deeper, there doesn't seem to be any support for skeletal/bone animations in Phaser 3. I suppose I'll be heading back to Phaser 2 land for a while.
  8. jake.caron

    Best Skeletal Animation Library

    Hi all, I am looking for a library that integrates with Phaser 3, so I can load an animation from Spriter, Spine or DragonBones. I did find this. However, it says to NOT use it in production. I would also prefer not to use that method as it does not incorporate much (if any) of Phaser's sprite functionality. I would be very appreciative if someone could point me in the direction of an existing Phaser 3 - Animation library. Thanks! Jake
  9. jake.caron

    this.sys.context is null?

    Ah, figured it out. You need to set the "type" in the config to Phaser.Canvas, not just the renderer.
  10. jake.caron

    this.sys.context is null?

    Hello, I am trying to follow this code snippet here: http://labs.phaser.io/edit.html?src=src\animation\spine test 1.js. When trying this on my own project, this.sys.conext is null right off the bat. Anyone know why this might be? The config can be seen below: let config = { type: Phaser.AUTO, width: 1024, height: 768, parent: 'gameWrapper', renderer: Phaser.CANVAS, physics: { default: 'arcade', arcade: { gravity: { y: 200 } } }, antialias: true, transparent: false, autoResize: true, scaleMode: phaser.ScaleModes.DEFAULT };
  11. jake.caron

    BitmapText Word Wrap

    Hi All, I am trying to add word-wrap to my bitmap text and have tried the following, but to no avail: this.questionText = this.scene.make.bitmapText({font: 'Nasalization', size: 30, align: 1, wordWrap:{ width: 450, useAdvancedWrap: true }}); This is dynamic text, so I am unable to tailor it with breaks. Thanks, Jake
  12. jake.caron

    Killing a Tween

    <tween>.stop() does stop the tween which is nice, although I do wish that killTweensOf and killAll would work as well. Thanks!
  13. jake.caron

    Scaling the game to fit inner window

    Great plugin Samme and thank you for the code James. I ended up going with James' approach and it works very well!
  14. jake.caron

    animations object

    Hi! Instead of this: op1.on('animationcomplete', ethis.openComplete, this); use this: op1.on('animationcomplete', ()=>{ethis.openComplete();}); That will ensure that you are still within your classes' scope.
  15. jake.caron

    Scaling the game to fit inner window

    Hi All, Just trying to scale the game so it works across multiple resolutions. I know that I can check the inner window's dimensions and adjust the height and width accordingly, but I would like to scale everything instead. In Phaser 2 I was able to use the following: this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.scale.pageAlignHorizontally = true; this.game.scale.pageAlignVertically = true; this.game.scale.updateLayout(true); this.game.scale.refresh(); Is there an equivalent in Phaser 3? Thank! Jake