Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 reactVR 新手,我想在模型纹理上加载本地资源,代码如下:
<Model source={{obj: asset('Tree.obj')}} style={{transform: [{translate: [0, -1, -3]}]}} texture={asset('14HMTcQb.jpg')} />
我得到一个空屏幕。那么如何通过 ReactVR 将我的本地资源加载到纹理上呢?
代码看起来很棒,加载资源时是否有任何 js 错误或网络错误?
还要确保你
从'react-vr'导入{模型,资产};
并且您将您的“Tree.obj”和“14HMTcQb.jpg”文件放在项目根目录下的 static_assets 目录下。