expo-pixi
expo-pixi copied to clipboard
Can't get example to work
I have had no luck getting the example to work, any guidance is appreciated. Steps I followed:
expo init example && cd example yarn add expo-pixi yarn start
package.json dependencies:
"dependencies": {
"expo": "^32.0.0",
"expo-pixi": "^0.3.2",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
},
the error I get:
TypeError: undefined is not an object (evaluating '_expo.default.GLView')
This error is located at:
in _default (at withExpoRoot.js:22)
in RootErrorBoundary (at withExpoRoot.js:21)
in ExpoRootComponent (at renderApplication.js:34)
in RCTView (at View.js:44)
in RCTView (at View.js:44)
in AppContainer (at renderApplication.js:33)
* App.js:6:8 in _default
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:10865:22 in mountIndeterminateComponent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14091:21 in performUnitOfWork
- ... 17 more stack frames from framework internals
My App.js is copy-pasted from the example
import React from 'react';
import Expo from 'expo';
import ExpoPixi from 'expo-pixi';
export default () => (
<Expo.GLView
style={{ flex: 1 }}
onContextCreate={async context => {
const app = ExpoPixi.application({ context });
const sprite = await ExpoPixi.spriteAsync(
'http://i.imgur.com/uwrbErh.png',
);
app.stage.addChild(sprite);
}}
/>
);
Is this an error on my part or is there something wrong here? Thanks
Edit: Have not resolved this yet sorry gave up for the meanwhile (1-25-19)
Hi were you able to resolve this? I'm having same issue
how did you resolve this plz?
Try import {GLView} from 'expo'; OR import * as Expo from 'expo'
This is very odd I use this and it can work
import { GLView } from 'expo-gl'
I think it's not stable :(