Environment

We will use the Environment API to change the background scene from the React code using its setBackgroundImage method:

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.

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.