Web Development GuideMar 21, 2016

Samsung Internet for Gear VR provides many features to give users more immersive browsing experience. Here are some tips to make your web sites fully utilize our features.

Samsung Internet for Gear VR 4.2

Skybox Settings

Samsung Internet for Gear VR 4.2 lets web contents change the skybox – which is the background image or images surrounding the VR user space. Users and web developers can choose the best skybox that goes with the content to get a more immersive experience.

The Skybox of your contents can be set via the following ways:

  1. Through JavaScript API (experimental)

    Web developers can use the JavaScript API to set the best Skybox that goes with their content. Any content provider can use our JavaScript API to let their users automatically enjoy the Skybox when entering the web site.

    Note

    We are looking for web content providers that would like to collaborate with us for using this JavaScript API.

    The JavaScript API for changing the skybox is as follows:

    window.SamsungChangeSky({[KEYWORD]: ‘[URL]’, … });

    The parameter for SamsungChangeSky() is JavaScript Objects that contain [KEYWORD]:’[URL]’ pairs.

    The properties needed for the supported skybox types are:

    Through JavaScript API
    Skybox type [KEYWORD]
    360˚ Image sphere
    Mono 6-sided skybox front, back, left, right, up, down
    Stereo 6-sided skybox Lfront, Lback, Lleft, Lright, Lup, Ldown, Rfront, Rback, Rleft, Rright, Rup, Rdown
    (‘L’ and ‘R’ each meaning left eye and reight eye)

    Each image for mono/stereo 6-sided skybox should be prepared with right direction and specified with correct keyword. Below mono 6-sided skybox example explains a detail case.

    (ex) // 360˚ Image skybox
    
    	window.SamsungChangeSky({sphere:’http://your.url/skysphere.png’});
    
    	// Mono 6-sided skybox
    	window.SamsungChangeSky({front:’http://your.url/C.png’, back:’http://your.url/E.png’,
    				left:’http://your.url/D.png’, right:’http://your.url/B.png’,
    				up:’http://your.url/A.png’, down:’http://your.url/F.png’});
    							
    Figure 9: Samsung Emulator

    (Each character on face also represents image filename. Note that, the face corresponding to keyword ‘left’ is placed on the right side in the view of user, so does the face corresponding to keyword ‘right’ vice-versa. It is a conventional notation to handle skybox for 3D modeling tool and game engine.)

    * This feature is experimental. Specifications are subject to change without prior notice.

    * The priority is sphere > (front, …) > (Lfront, ...). That means if ‘sphere’ exists, use it even though front or Lfront are co-exists.

    * In “Mono 6-sided skybox” or “Stereo 6-sided skybox” case, if some parameters are not defined or have invalid URL, that side will be displayed as “black” (means blank).

  2. Through Open JSON API new

    Through “change background” menu on Samsung Internet for Gear VR, you can change your default skybox to one of the premium images from our partners.

    Note

    We are looking for partners who want to deliver the skybox images. The content providers will implement our Open JSON API, and we will list up them in the user’s setting menu.

    Supported skybox types are:

    • 360˚ image (Equirectangular projected image)

    • Mono 6-sided skybox images

    • Stereo 6-sided skybox images