11. VIRO MEDIA IS THE CREATOR OFVIROREACT AND
VIROCORE, PLATFORMS FOR DEVELOPERS TO BUILD
IMMERSIVE AUGMENTED REALITY (AR) ANDVIRTUAL
REALITY (VR) APPLICATIONS.
28. ViroBox,
ViroMaterials,
Import Components
<ViroBox position={[0, -.5, -1]} scale={[.3, .3, .1]}
materials={["grid"]} />
New Component in render()
ViroMaterials.createMaterials({
grid: {
diffuseTexture: require('./res/grid_bg.jpg'),
},
});
Add after class declaration
Adding a Box to a Scene
29. Viro3DObject,
ViroAmbientLight,
ViroSpotLight,
Import Components
<ViroAmbientLight color={"#aaaaaa"} />
<ViroSpotLight
innerAngle={5}
outerAngle={90}
direction={[0,-1,-.2]}
position={[0, 3, 1]}
color="#ffffff"
castsShadow={true} />
<Viro3DObject
source={require('./res/emoji_smile/emoji_smile.vrx')}
position={[-.5, -.5, -.5]}
scale={[.2, .2, .2]}
type="VRX" />
New Components in render()
Adding a 3D object to a Scene