• Content count

  • Joined

  • Last visited

  • Days Won


samme last won the day on July 3

samme had the most liked content!

About samme

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. samme

    Phaser tweens cause memory leaks?

    That's not a memory leak, but frequent garbage collection, which is normal but unwanted. Chrome can show you where in the code most memory allocations are made. If a tween has completed naturally you can call start again without to/from. That will restart it without creating a new data timeline. You can use generateData to build a list of values and reuse it.
  2. samme

    Sparks particles with different colours

    See the Textures examples for dynamic textures. A simpler way is to use a white image texture and then tint at random.
  4. samme

    Why does allowGravity() affect all sprites?

    Check browser console. You need either body.setAllowGravity(false) body.allowGravity = false
  5. samme

    Movement and speed

    Can you do it with just setVelocityFromRotation?
  6. samme

    Movement and speed

    Are you trying to move a sprite from point to point, or are you trying to move a sprite continuously based on its rotation and speed?
  7. samme

    Game Scale Plugin

    I'll add to npm soon. You can still do npm install samme/phaser-plugin-game-scale now though.
  8. samme

    Pass custom variable into Phaser.Game()

    I think it would have to be { callbacks: { preBoot: function (game) { game.registry.merge(myCustomObject); } } } You could make a feature request. Maybe a game config key like data that could pass through arbitrary data.
  9. samme

    Transparent Background

    If you just need to get your TypeScript code working right away, copy the phaser.ts file, correct the errors, and use the corrected definitions instead. But you should report or correct the errors in the Phaser repo to get them fixed for good.
  10. samme

    adding extended sprite to scene

    player = new Player(this, 0, 0, 'image'); this.add.existing(player);
  11. samme

    Tilemap (layer) offset

    According to the docs, TilemapLayer#x and y are supposed to be set from the Tiled layer offsets and can be set themselves to do the same thing.\game objects\tilemap\tests\visual tile coords test.js seems to be doing this. I think it also shows the problem with clipping from camera movement.
  12. samme

    Lacking Tween Documentation on callbacks

    You just need to learn the JSDoc format and make changes in the right place. Imitate the existing docs. If you step through the tween creation code in the example you should be able to follow the values. It looks like TweenManager#add and Tween#callbacks need further description.
  13. samme

    Game Scale Plugin
  14. samme

    adding extended sprite to scene