Kamaz

Members
  • Content count

    4
  • Joined

  • Last visited

  1. How to improve performance on mobile

    I can. The segment of these devices in the world more than 25%
  2. How to improve performance on mobile

    2018 year and perfomance on mobiles so bad. Android tablet 4.3: WebGL - does't work(blinking screen only in chrome); Canvas - 5 FPS. Android 6, 7 - WebGL 40-60 fps. Iphone 5s and se: WebGL 20-30 fps. Canvas slowly Ipad pro: all modes work good. Desktop - all modes work perfect
  3. Input events

    I draw all the game objects (images, animations, fonts) using renderTexture in State.Update(). Is there any way to handle mouse events? Without adding to the stage. Simple example, events don't work: public create(): void { let self = this; this.texture = this.game.add.renderTexture(this.game.width, this.game.height); this.game.add.sprite(0, 0, this.texture); this.image = this.parentGame.game.make.sprite(0, 0, this.filename); this.image.inputEnabled = true; this.image.input.useHandCursor = true; this.image.events.onInputDown.add(function () { if (self.onMouseEvent) { self.onMouseEvent(); } }); } public update(): void { this.texture.renderXY(this.image, 0, 0, this.clearBeforeDraw); }
  4. Game resources from bindata.

    I receive the encrypted file from the server containing the sounds, images, atlases. I found a solution how to get the image from the data array. let imageData = window.DWP(dataArray); let bmd:Phaser.BitmapData = this.game.add.bitmapData(imageData.width, imageData.height, key, true); bmd.ctx.putImageData(imageData, 0, 0); let imageSprite:Phaser.Sprite = this.game.make.sprite(this.currentImageXPos, 0, bmd.texture); How to work with other resource types, such as sounds and xml? Thank you