[gl-react-expo] app freezes and image isn't rendered
See original GitHub issuebug report
library version
"expo": "^17.0.0",
"gl-react": "^3.6.0",
"gl-react-expo": "^3.6.0"
Steps to reproduce the behavior
Trying to make work simple example given in README. On IOS Simulator app freezes and image is not rendered. On Android device app is working, but image isn’t rendered also. Here is the code:
import React from 'react';
import { Shaders, Node, GLSL } from 'gl-react';
const shaders = Shaders.create({
helloBlue: {
frag: GLSL`
precision highp float;
varying vec2 uv;
uniform float blue;
void main() {
gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
}`
}
});
class HelloBlue extends React.Component {
render() {
const { blue } = this.props;
return <Node shader={shaders.helloBlue} uniforms={{ blue }} />;
}
}
export default HelloBlue;
And
import React, { Component } from 'react';
import { Surface } from 'gl-react-expo';
import HelloBlue from '../components/blue/HelloBlue';
class FeedScreen extends Component {
render() {
return (
<Surface width={300} height={300}>
<HelloBlue blue={0.5} />
</Surface>
);
}
}
export default FeedScreen;
I’m pretty new to react-native, maybe I’m doing smth wrong.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Expo Go crashes when using captureRef without logging ...
I wish to use captureRef to save the image with the overlay, but when ever I try this Expo Go crashes without leaving...
Read more >gl-react/Lobby - Gitter
Hi everyone I'm having this issue. One of the sources for assign has an enumerable key on the prototype chain. Are you trying...
Read more >GLView - Expo Documentation
GLView. expo-gl provides a View that acts as an OpenGL ES render target, useful for rendering 2D and 3D graphics. On mounting, an...
Read more >Couldn't be opened because you don't have permission to ...
Coding example for the question Couldn't be opened because you don't have permission to view it - React Native - Expo?
Read more >detachpreviousscreen - You.com | The Search Engine You Control
Only applicable if detachInactiveScreens isn't set to false. ... Mysterious random delay in loading content in React Native Expo app.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DaniyarJakupov try changing your render method to this:
same happening with me @im-hamza-dev