Jump to content

jdeagle

Members
  • Content Count

    5
  • Joined

  • Last visited

About jdeagle

  • Rank
    Newbie

Profile Information

  • Gender
    Male

Contact Methods

  • Twitter
    jdeagle
  1. I'm using game.debug.body in my update() to debug the bounding box for sprites in my game. It draws the bounding box but doesn't clear the previous drawn box so I am left with a trail of boxes across the screen. This seems to effect all sprites. game.debug.body(this.masterSprite, 'rgba(255, 255, 0, 0.1)');I looked into the source and apparently there is a preUpdate function that is supposed to get called but it seems to only get called when game.debug.dirty === false yet only clears the canvas if dirty === true. preUpdate: function () { if (this.dirty && this.sprite) {
  2. I am loading a small tile map (created in tiled) and scaling it to be double the size to fill the screen. The scaling works but something is off with the tile layer scrolling. The tile layers scroll on the x axis as the player moves to the right but it stops short of the end of the level (meaning the player continues on but the tile layers stop scrolling short of the boundry). I suspect this is something with my bounds settings but I'm not getting anywhere adjusting settings. Even worse, the tile layers do not scroll at all on the Y axis. Has anyone had a similar issue or a possible fix? I fig
  3. Thanks for the tip with bitmapData.canvas. I think there is a issue with bitmapData.alphaMask. The masking works but it also shows the mask image where it should be transparent. I mocked a example based on the phaser example(http://examples.phaser.io/_site/view_full.html?d=display&f=alpha+mask.js&t=alpha%20mask) and here is what I get. It looks like alphaMask doesn't understand how to display transparent pixels from the masked element. I'm going to try masking the mask with the src png but that seems like a costly/backward fix. Edit: Using Phaser 2.0.4 var testBMD = game.make.bitma
  4. Does this only work if you are using the Canvas renderer?
  5. Can you create a alphaMask from bitmapdata rather than images? I have a circle loader that I am building as bitmapData and I have the source image I want to mask, but I can't figure out how to use the mask bitmap data for bmd.alphaMask or convert the mask bitmapData to a image that the method can use. Any help would be appreciated. createPie : function (game, w, h) { console.log("create pie", w, h, this); var mask = game.add.bitmapData(w, w), bmd = game.add.bitmapData(w, w), canvas = bmd.canvas, context = bmd.ctx, size = 270, degreesToRadians = function (degrees) { return (degrees * Mat
×
×
  • Create New...