在React Native中绘制建筑模型

时间:2019-08-15 06:39:30

标签: react-native

我想在React Native应用中绘制建筑物/房间计划。在React Native中进行开发有多可行?网络上有一个反应计划器库。有什么反应本地的吗?有人做过吗?我试图使用panResponder做到这一点。这对我来说不是很好。 https://snack.expo.io/@codebyte99/quadrilateral-image

看一下我想要实现的视频:https://youtu.be/O9rGqzGHuC8

onTouchEvent(name, ev) {
  this.setState({
    x: ev.nativeEvent.locationX,
    y: ev.nativeEvent.locationY
  });
}

<View
    style={styles.container}
    onMoveShouldSetResponder={(ev) => true}
    onResponderMove={this.onTouchEvent.bind(this, "onResponderMove")}\
>
    <Text style={{
        position: 'absolute',
        top: this.state.x,
        bottom: 0,
        width: 50,
        height: 50,
        backgroundColor: 'green'
      }}>>Click me</Text>
</View>

0 个答案:

没有答案