与渲染视图相比,我想将相机视图设置得更高。但我不知道在渲染视图时我可以在哪里设置初始相机位置。
我的组件安装如下:
export default class Hello360 extends React.Component {
// Our component will keep track of this state
state = {
count: 0,
};
render() {
return (
<View style={styles.panel}>
<View style={styles.greetingBox}>
<Text style={styles.greeting}>
Hello React
</Text>
<Text style={styles.greeting}>
{`Count: ${this.state.count}`}
</Text>
</View>
</View>
);
}
};
const styles = StyleSheet.create({
panel: {
// Fill the entire surface
width: 1000,
height: 600,
backgroundColor: 'rgba(255, 255, 255, 0.4)',
alignItems: 'center',
justifyContent: 'center'
}
});
AppRegistry.registerComponent('Hello360', () => Hello360);
组件看起来像这样:
field_listing_order
我尝试将transform属性添加到styles元素,但这不起作用。在此示例中,如何更改相对于已安装的Hello360组件的摄像机位置?
答案 0 :(得分:3)
您可以将相机位置设置得更高(在client.js中的init内):
1.A process was using malloc to allocate the memory.
2.While allocation process was interrupted and respective signal handler was
called.
3.in the signal handler again malloc was called, which leads to a hang.
https://github.com/facebook/react-360/blob/master/React360/js/ReactInstance.js