如何在 React Native 中显示 360 度图像 [英] How to show 360 images in the react native
本文介绍了如何在 React Native 中显示 360 度图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Android 应用中显示 360 度全景图像或视频.我的 React Native 版本是 51
解决方案
您可以使用 react-原生 360. Google VR Cardboard SDK 的 React Native 包装器,用于 React Native 中的 360 度图像.
全景示例
import { PanoramaView } from 'react-native-360';<全景视图样式={{高度:200,宽度:宽度}}image={require('./andes.jpg')}displayMode='嵌入式'}启用全屏按钮启用纸板按钮启用触摸跟踪隐藏过渡视图enableInfoButton={false}/>
<块引用>
Android 封装仍在进行中,敬请期待
How can I show 360 images or video in the android apps. My react native version is 51
解决方案
You can use react-native-360. A React Native wrapper for Google VR Cardboard SDK for 360 images in react native.
Panorama Example
import { PanoramaView } from 'react-native-360';
<PanoramaView
style={{height:200,width:width}}
image={require('./andes.jpg')}
displayMode={'embedded'}
enableFullscreenButton
enableCardboardButton
enableTouchTracking
hidesTransitionView
enableInfoButton={false}
/>
The Android wrapper is still in progress, stay tuned
这篇关于如何在 React Native 中显示 360 度图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文