expo / expo-pixi

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

Library doesn't work with Camera Roll assets #138

Open 0plus1 opened 3 years ago

0plus1 commented 3 years ago

More than an issue I want to give a heads up to people interested in this library for local image manipulation: it simply does not work.

Assuming you can get over the hurdle of loading a camera roll image (you can but you have to manually instantiate an expo Asset class), you are going to get into other issues, the most notable one being:

TypeError: undefined is not an object (evaluating 'texture.defaultAnchor.x')]

This happens because for some reason this library doesn't correctly set height/width with local assets. This repo is full of open requests and “solutions” which are hacks on top of hacks.

If you need to work with local assets stay clear of this library.

Would love to be proven wrong by someone posting the loading of an asset-library HEIC without using polyfills or reference juggling.

josmontes commented 3 years ago

Hello @0plus1 I'm looking for a way to draw or add stickers on top of a local image, did you find any other alternatives? Thanks

0plus1 commented 3 years ago

Hi Jos, Not really, the only Library that actually works is the base ExpoGL library: https://docs.expo.io/versions/latest/sdk/gl-view/ It's pretty low level and high effort but it's stable and actually does work.

josmontes commented 3 years ago

Thanks!