• Content Count

  • Joined

  • Last visited

  1. Yes I would have, but couldn't find the mark as solve button.
  2. oops sorry just notice, I need to set time.advancedTiming = true;
  3. Hi rich, game.time.fps is not working, I'm getting 0's Or does phaser have another way of getting the current fps?
  4. I've tried adding a <canvas> tag directly on my html and it works as expected. However it gets behind the Phaser canvas when I try to move it, maybe because they're on different canvas. I also did experiment Phaser.Canvas.addToDomand it would work, but didn't get the result I wanted.I was hoping it to be part of Phaser so it would scale itself when needed specially on mobile. I ended up using html input and css to do this though(gets the job done right).
  5. Hi Rich, Can you point me as to how I could get it to work with phaser 1.1.5? The closest I could come to is with this code var bmd = this.game.add.bitmapData(350, 50); var sp = this.game.add.sprite(this.game.world.centerX, 150, bmd);sp.anchor.setTo(0.5, 0);sp.inputEnabled = true;var input = new CanvasInput({ canvas: bmd.canvas, fontSize: 18, fontFamily: 'Arial', fontColor: '#212121', fontWeight: 'bold', width: 300, padding: 8, borderWidth: 1, borderColor: '#000', borderRadius: 3, boxShadow: '1px 1px 0px #fff', innerShadow: '0px 0px 5px rgba(0, 0, 0, 0.5)', placeHolder: 'Username', }); However, it doesn't fire off the events.
  6. yes that would work. I just tried the simple <link href='http://fonts.googleapis.com/css?family=Londrina+Solid' rel='stylesheet' type='text/css'>then use it this.game.add.text(0, 0, 'text here', { font: '20px Londrina Solid', fill: '#663300', align: 'center' });
  7. 4ucai

    Masking Issues

    tried it, seems you are correct. I think if the result is the same in PIXI (which Phaser is using) then it is either that it is suppose to work this way or is a limitation.
  8. 4ucai

    state and mask

    Hi, I have a game state started with mask on one of my sprite. After switching to another state I get a black screen cover on top of the new state. I'm switching it like this this.game.state.start("somestate")Solution was to remove/null out the mask reference before switching state. Must be some issue with the "clearWorld" not properly handling mask
  9. http://www.html5gamedevs.com/topic/3735-masking-issue/?hl=masking
  10. it's been solved link here http://www.html5gamedevs.com/topic/3735-masking-issue/?hl=masking
  11. yes, refer to this issue solved http://www.html5gamedevs.com/topic/3735-masking-issue/?hl=masking
  12. I'm also having trouble with mask using Canvas as renderer. "Uncaught TypeError: Cannot read property 'alpha' of undefined"The error happens in PixiPatch.js Basically, I tried debugging around the error and it seems Phaser.Sprite has no mask property, which is weird since it should have inherit all the way to PIXI.DisplayObject which has the mask property. Although, I can only see PIXI.DisplayObjectContainer in it(using console.log). I hope someone can better address this or provide a fix.
  13. 4ucai

    masking issue

    Hi guys, I've recently ran into an issue with masking. The code below works if I use WebGL renderer. this.coverText = this.game.add.sprite(0, 0, 'cover_text'); this.maskGraphics = this.game.add.graphics(0, 0);this.maskGraphics.lineStyle(0, 0x0000FF, 1);this.maskGraphics.drawRect(0, 0, 100, 20); this.coverText.mask = this.maskGraphics;If I use Canvas renderer I get this error instead. I guess it's an issue in Pixi? Uncaught TypeError: Cannot read property 'alpha' of undefined PixiPatch.js:141 Another quick question. Why can't I use another sprite as the mask? I tried this this.coverText = this.game.add.sprite(0, 0, 'cover_text'); this.maskGraphics = this.game.add.sprite(0, 0, 'mask'); this.coverText.mask = this.maskGraphics;but it doesn't work. I'm currently looking at cropping feature but it would probably be tedious as a workaround. Thanks!