kittykatattack / learningPixi

A step-by-step introduction to making games and interactive media with the Pixi.js rendering engine.
4.4k stars 851 forks source link

problem with iOS devices, not working at all #160

Open vojjin opened 3 years ago

vojjin commented 3 years ago

Hello, I have faced an issue with iOS devices. I want to migrate from createjs to pixie for a same reason - not working at all on iOS. I have a very simple test app that is working everywhere - except on iOS device, any browser. Using the latest Pixi 6.0.2

<script src="/theme/js/pixi.js"></script>

<script>
let Application = PIXI.Application, Sprite = PIXI.Sprite;
let app = new Application({ 
    width: 256, 
    height: 256,  
    backgroundColor: 0x2c3e50,                  
    antialias: true, 
    resolution: 1
  }
);
document.body.appendChild(app.view);

let Stage=app.stage, loader = app.loader, resources = loader.resources;
loader.add("/theme/images/roll1.png").load(setup);

function setup() {
    let dice = new Sprite(resources["/theme/images/roll1.png"].texture);
    dice.anchor.set(0.5);
    dice.x = app.renderer.width / 2;
    dice.y = app.renderer.height / 2;
    Stage.addChild(dice);
}
</script>

this code is working on every desktop browser plus on any android browser, however on iOS devices I just have blue background, and nothing is displayed. Am I doing something wrong or there is an issue with pixi?

rndexe commented 2 years ago

Can you share the size of the image roll1.png?