I'm going through the portal tutorial and changing out <Viro3DObject> with <ViroSkybox>. However, the debugger tells me that it 'can't find variable: viroskybox'.
I've followed the skybox resources found here.
<ViroPortalScene passable={true} dragType="FixedDistance" onDrag={()=>{}}>
<ViroPortal position={[0, 0, -1]} scale={[.1, .1, .1]}>
<Viro3DObject source={require('../portal_res/portal_ship/portal_ship.vrx')}
resources={[require('../portal_res/portal_ship/portal_ship_diffuse.png'),
require('../portal_res/portal_ship/portal_ship_normal.png'),
require('../portal_res/portal_ship/portal_ship_specular.png')]}
type="VRX"/>
</ViroPortal>
<ViroSkyBox source={{
nx:require('../portal_res/skybox_img.jpg'),
px:require('../portal_res/skybox_img.jpg'),
ny:require('../portal_res/skybox_img.jpg'),
py:require('../portal_res/skybox_img.jpg'),
nz:require('../portal_res/skybox_img.jpg'),
pz:require('../portal_res/skybox_img.jpg')
}} />
</ViroPortalScene>
Hi @mikeyamato,
You may have to import the ViroSkyBox if you haven't already:
import {
...,
ViroSkyBox,
} from 'react-viro';
Let us know if this doesn't fix your issue,
Andy
Ah! Didn't do that previously and that most likely is the issue. Let me try and report back.
@mikeyamato great that works.
Looks like we're having some issues with those download links. I'll see if we can get them back up.
In the meantime, check out our ViroSkyBox guide here: http://docs.viromedia.com/docs/viroskybox1
Essentially, ViroSkyBox takes 6 images in the source and that'll texture each side of the ViroSkyBox (the download should include 6 image assets).
Thanks,
@achuvm got it. since i couldn't download them i didn't know how it was packaged up. i thought it was 1 img file but in fact it sounds like there are 6 img files.
thanks for all your help!
The links for the skybox assets should be working now -> http://docs.viromedia.com/docs/assets#skyboxes
@dam00n happy thanksgiving.
it appears that the download links for the skybox assets are 404'ing again.
Happy Thanksgiving. Sorry about that. Links for skyboxes should be working now.
Most helpful comment
The links for the skybox assets should be working now -> http://docs.viromedia.com/docs/assets#skyboxes