expo / expo-pixi

Tools for using pixi.js in Expo
MIT License
304 stars 119 forks source link

image is not displayed after build in Expo #92

Open jeisonng opened 5 years ago

jeisonng commented 5 years ago

In developer mode the image loads normally, after the build in expo (android) it is no longer shown and instead a spinner is shown.

Expo: 33.0.0

my code:

`onReady = async () => { const { layoutWidth, layoutHeight, points } = this.state; this.sketch.graphics = new PIXI.Graphics();

    const background = await PIXI.Sprite.fromExpoAsync(
        "https://firebasestorage.googleapis.com/v0/b/resenha-auth-db-storage.appspot.com/o/resenha_completo2.jpg?alt=media&token=e3e74c67-5d25-47f8-8adc-34152b516ceb",
    );
    background.width = layoutWidth * scaleR;
    background.height = layoutHeight * scaleR;

    this.sketch.stage.addChild(background);
    this.sketch.renderer._update();
};`
mmarko-g commented 5 years ago

Same Issue for me. I can see this bug on the Android device. @jeisonng Does this error also appear on the IOS device? @evanbacon How do you think about this? I think we should solve this problem soon.

jeisonng commented 5 years ago

@angelsinjen I can not tell you about IOS because I did not build with it, in the end I migrated to a component that uses a webview, due to the delay of the answer on the subject I do not advise you to use this component until this issue is resolved, if if you choose the same path mine the component I used was https://www.npmjs.com/package/react-native-signature-canvas I was forced to make some modifications to his core to meet my demands, but solved my problem

mmarko-g commented 5 years ago

@jeisonng Thanks for your help. I used to expo-pixi library for the developing of the game on react native. And I've wanted to use more animation for pixi. But unless I can load an image on mobile, I won't use this library. So I found the other game engine as a react-native-game-engine library and I decided to use this one. Thanks.