Environment

In the game, we will set the world or background scene with equirectangular panoramic images. We will use the Environment API from React 360 to change this background scene dynamically from the React code using its setBackgroundImage method. This method can be used as follows:

Environment.setBackgroundImage( {uri: 'http://linktopanoramaimage.jpg' } )

This method sets the current background image with the resource at the specified URL. When we integrate the React 360 game code with the MERN stack containing the game application backend, we can use this to set the game world image dynamically using image links provided by the user. In the next section, we will explore native modules that will allow us to play audio in this rendered scene in the browser, and provide access to the browser location.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset