react-native Error setting property 'onSurfaceCreate' of RNWebGLView with tag #303????
Huanqiang opened this issue · comments
Huanqiang commented
library version
"gl-react": "^3.14.0",
"gl-react-image": "^3.1.1",
"gl-react-native": "^3.14.0",
"react-native-webgl": "^0.8.0",
bug report
Its issue console (in xcode):
2018-08-06 22:59:23.543 [info][tid:main][RNWebGLView.m:115] Error setting property 'onSurfaceCreate' of RNWebGLView with tag #303: RNWebGL: Can only run on JavaScriptCore! Do you have 'Remote Debugging' enabled in your app's Developer Menu (https://facebook.github.io/react-native/docs/debugging.html)? RNWebGL is not supported while using Remote Debugging, you will need to disable it to use RNWebGL.
When I use the following code,There is nothing in . it can't show anything...
import { Shaders, Node, GLSL } from 'gl-react'
import { Surface } from 'gl-react-native'
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 }} />
}
}
<Surface style={{ width: 300, height: 300 }}>
<HelloBlue blue={0.5} />
</Surface>