Chen Ling Xue

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. Been already spending time to solve this problem. Your knowledge or solution to this problem is much appreciated. Thanks in advance Currently I am developing app using > **Phaser Frame Work** and encounter this problem when we put our assets folder to a different folder like we have our cdn. When loading the game assets to the same server it works perfectly fine. When we put our assets to a different server that will serves as our resource folder then our assets are not being loaded. Here is a sample of our preload function Preload(game) { this._oPhaser = game; }; Preload.prototype = { preload: function () { var p = this._oPhaser; p.load.crossOrigin = "anonymous"; var time = new Date().getTime(); var default_assets = _ASSETS_ + 'assets/default/img/'; var lang_assets = _ASSETS_ + 'assets/' + p._LANGUAGE + '/img/'; var images = { 'report-header': lang_assets + 'report/report-header.jpg', 'report-description': default_assets + 'report/report-description.jpg', 'horizontal': default_assets + 'report/horizontal.jpg', 'vertical': default_assets + 'report/vertical.jpg', 'bg' : default_assets + 'report/report.jpg', 'tie_game' : lang_assets + 'report/tie_game.png', 'player_wins' : lang_assets + 'report/player_wins.png', 'dealer_wins' : lang_assets + 'report/dealer_wins.png', 'chip_report' : default_assets + 'report/chip_report.png', } for (var i in images) { p.load.image(i, images[i] + '?' + time); } var atlas = { 'dice' : default_assets + 'dices', 'result' : default_assets + 'result' }; for (var i in atlas) { p.load.atlas(i, atlas[i] + '.png?' + time, atlas[i] + ".json?" + time); }; p.load.json('lang_file', _ASSETS_ + 'assets/' + p._LANGUAGE + '/lang/language.json'); }, create: function () { this._oPhaser._LANGUAGE_FILE = this.game.cache.getJSON('lang_file'); this._oPhaser.state.start('report'); } }; all the codes work well on android devices, desktop. Except that it is not working on **iOS Device iPhone Chrome Browser** but works well on SAFARI BROWSER. When i take a look at the console.log of the test device using WEINRE debugging tools. I have this following warnings > Phaser.Loader - image[report-header]: error loading asset from URL > https://www.url.com/assets/default/img/report/report-header.jpg?1496277589789 > Phaser.Loader - image[report-description]: error loading asset from > URL > https://www.url.com/assets/default/img/report/report-description.jpg?1496277589789 > Phaser.Loader - image[horizontal]: error loading asset from URL > https://www.url.com/assets/default/img/report/horizontal.jpg?1496277589789 > Phaser.Loader - image[vertical]: error loading asset from URL > https://www.url.com/assets/default/img/report/vertical.jpg?1496277589789 > Phaser.Loader - image[bg]: error loading asset from URL > https://www.url.com/assets/default/img/report/report.jpg?1496277589789 > Phaser.Loader - image[tie_game]: error loading asset from URL > https://www.url.com/assets/default/img/report/tie_game.png?1496277589789 > Phaser.Loader - image[player_wins]: error loading asset from URL > https://www.url.com/assets/default/img/report/player_wins.png?1496277589789 > Phaser.Loader - image[dealer_wins]: error loading asset from URL > https://www.url.com/assets/default/img/report/dealer_wins.png?1496277589789 > Phaser.Loader - image[chip_report]: error loading asset from URL > https://www.url.com/assets/default/img/report/chip_report.png?1496277589789 > Phaser.Loader - textureatlas[dice]: error loading asset from URL > https://www.url.com/assets/default/img/dices.png?1496277589789 > Phaser.Loader - textureatlas[result]: error loading asset from URL > https://www.url.com/assets/default/img/result.png?1496277589789 > Phaser.Loader - json[lang_file]: error loading asset from URL > https://www.url.com/assets/default/lang/language.json Causing the app not to properly render. > NOTE : IPHONE CHROME BROWSER iOS 10.3.2 CHROME VERSION 58.0.3029.113
  2. I want to make use of phaser js callback function on fullscreen enterFullScreen leaveFullScreen i tried to see the example from this https://github.com/photonstorm/phaser-examples/blob/master/examples/display/fullscreen buttons.js Thanks.
  3. I'm having a bit of trouble of finding solutions why does BitmapText is sometimes not render on Firefox I found this link and follow the suggestion of 'bubamara' but doesn't solve my problem on the issue I uploaded also my xml and .png so maybe can help to look on the problem currently i am making use of Phaser v2.4.7 | Pixi.js v2.2.9 Thanks a lot in advance. bet_text.xml
  4. @Mat Groves can you show me how an example on how to skew a image using phaser.js/pixi.js using your example SkewableSprite.updateTransform = function() { // TODO OPTIMIZE THIS!! with dirty this.localTransform[0] = this.scale.x//this._cr * this.scale.x; this.localTransform[1] = Math.tan(this.skew) * this.scale.y;// -this._sr * this.scale.y this.localTransform[3] = 0//Math.tan(0.5);//this._sr * this.scale.x; this.localTransform[4] = this.scale.y//this._cr * this.scale.y; ///AAARR GETTER SETTTER! this.localTransform[2] = this.position.x; this.localTransform[5] = this.position.y; // TODO optimize? mat3.multiply(this.localTransform, this.parent.worldTransform, this.worldTransform); this.worldAlpha = this.alpha * this.parent.worldAlpha; }