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
react native 0.76.5 react-native-gl-model-view android the 3Dmodel can not move?
when I try
use react-native-gl-model-view to display 3d molel with .obj file ,
in react native 0.76.5 android
it can display,
but the model can not move by e.nativeEvent.
the ios is ok!
the code like this:
import React from 'react';
import {
ActivityIndicator,
View,
StyleSheet,
TouchableOpacity,
Text,
Animated,
} from 'react-native';
import ModelView from 'react-native-gl-model-view';
import {Buffer} from 'buffer';
import axios from 'axios';
const AnimatedModelView = Animated.createAnimatedComponent(ModelView);
// XXX: This is the standard content header returned for a blob.
//const octetStreamHeader = 'data:application/octet-stream;base64,';
class My3DModel extends React.Component {
constructor() {
super();
this.state = {
rotateX: new Animated.Value(-8),
rotateZ: new Animated.Value(0),
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.
react native 0.76.5 react-native-gl-model-view android the 3Dmodel can not move?
when I try
use react-native-gl-model-view to display 3d molel with .obj file ,
in react native 0.76.5 android
it can display,
but the model can not move by e.nativeEvent.
the ios is ok!
the code like this:
import React from 'react';
import {
ActivityIndicator,
View,
StyleSheet,
TouchableOpacity,
Text,
Animated,
} from 'react-native';
import ModelView from 'react-native-gl-model-view';
import {Buffer} from 'buffer';
import axios from 'axios';
const AnimatedModelView = Animated.createAnimatedComponent(ModelView);
// XXX: This is the standard content header returned for a blob.
//const octetStreamHeader = 'data:application/octet-stream;base64,';
class My3DModel extends React.Component {
constructor() {
super();
this.state = {
rotateX: new Animated.Value(-8),
rotateZ: new Animated.Value(0),
...
onMoveEnd = () => {
this.setState({
fromXY: undefined,
});
};
onMove = e => {
let {pageX, pageY} = e.nativeEvent,
{rotateX, rotateZ, fromXY, valueXY} = this.state;
if (!this.state.fromXY) {
this.setState({
fromXY: [pageX, pageY],
valueXY: [rotateZ.__getValue(), rotateX.__getValue()],
});
} else {
rotateZ.setValue(valueXY[0] + (pageX - fromXY[0]) / 2);
rotateX.setValue(valueXY[1] + (pageY - fromXY[1]) / 2);
}
};
render() {
const {model, texture} = this.state;
let {rotateZ, rotateX, fromXY} = this.state;
}
}
The text was updated successfully, but these errors were encountered: