Viro: Can't find variable: ViroSkyBox

Created on 13 Nov 2017  路  8Comments  路  Source: viromedia/viro

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>

img_0026

Most helpful comment

The links for the skybox assets should be working now -> http://docs.viromedia.com/docs/assets#skyboxes

All 8 comments

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.

@achuvm That worked!

Another question related to skybox. If I had a predefined skybox, how would that be implemented? The way I thought to do it isn't working as planned...
<ViroSkyBox source={require('../portal_res/example.jpg')} />

BTW, those skybox download links are 404'ing for me.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Thomas101 picture Thomas101  路  3Comments

Thomas101 picture Thomas101  路  3Comments

dittmarconsulting picture dittmarconsulting  路  6Comments

u-can-miracle picture u-can-miracle  路  3Comments

parideis picture parideis  路  4Comments