You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
width: 1000,// 1000 should enough for offscreen canvas usage
507
+
height: 1000,// or Dimensions.get('window').height * 2 like https://github.com/flyskywhy/react-native-babylonjs/commit/d5df5d2
508
+
position: 'absolute',
509
+
left: 1000,// 1000 should enough to not display on screen means offscreen canvas :P
510
+
top: 0,
511
+
zIndex: -100,// -100 should enough to not bother onscreen canvas
512
+
}}
513
+
offscreenCanvas={true}
514
+
onCanvasCreate={(canvas)=>this.setState({hasOc1: true})}// it's better to setState some as describe in https://github.com/flyskywhy/react-native-gcanvas/blob/master/README.MD
515
+
devicePixelRatio={1}// should not 1 < devicePixelRatio < 2 as float to avoid pixel offset flaw when GetImageData with PixelsSampler in @flyskywhy/react-native-gcanvas/core/src/support/GLUtil.cpp
516
+
isGestureResponsible={false}// who will need gesture with offscreen canvas?
0 commit comments