0

I am new to reactVR, and I want to load local resource on my Model texture, here is the code:

<Model
  source={{obj: asset('Tree.obj')}}
  style={{transform: [{translate: [0, -1, -3]}]}}
  texture={asset('14HMTcQb.jpg')}
/>

and I get a empty screen. So how to load my local resource on texture via ReactVR?

Perry Chen
  • 50
  • 4

1 Answers1

0

Code looks great, do you have any js errors or network errors loading the resources?

Also make sure you

import { Model, asset } from 'react-vr';

and also you place your 'Tree.obj' and '14HMTcQb.jpg' files under your static_assets directory on the project root.

Carlos Ruana
  • 2,138
  • 1
  • 15
  • 14