The background tag provides for a single color or cube-map image that forms the background of the scene. All other objects are drawn in front of the background. If specified, the six images are mapped to the inside of a cube. These are labeled [p|n][x|y|z] for positive or negative X, Y, or Z principal (world) axes.


  • backgroundtype [not implemented] – Specifies the type of background for the scene. The choices are
    1. sky (default) – use skycolor for a flat uniform background color.
    2. cube – use src to load a cube-mapped texture
    3. fixed – use src to load a single image to use a fixed (non-moving) texture.
    4. sphere – use src to load an equirectilinear image (photo-sphere) as a sphere-mapped texture
    5. camera – uses the device camera, if available.
  • skycolor – The uniform background color. The value of this attribute can be any legal color.
  • src -The interpretation of this value is dependent on the type of texture background as specified in backgroundtype.
    • backgroundtype == ‘cube’ (default)
      This value is either a URL that refers to a directory with a slash as the last character OR a URL with a single wild-card character (*) in the file-name portion.

      • If the last character is a slash, then the system looks for 6 image files in the directory called ‘px’, ‘nx’, ‘py’, ‘ny’, ‘pz’, and ‘nz’. The file type is given in the imgtype attribute (not yet implemented – required to be ‘jpg’).
      • If the value contains a single wildcard character (*), then the six textures are constructed from this value by substituting the following strings in place of the character: ‘front’, ‘back’, ‘left’, ‘right’, ‘top’, and ‘bottom’.
    • backgroundtype == ‘sphere’
      The src value specifies the URL to a equirectlinear image with width equal to twice height. This is mapped to the inside of a sphere. The sphere’s radius is specified by radius and must be positive.
    • backgroundtype == ‘fixed’
      The src value is the URL of a single image that is fixed as the background of the display.
    • backgroundtype == ‘camera’
      The src value is ignored and devices camera (environment i.e., back, camera is preferred) is requested. This only works if (all three required)

      1. The device has a camera
      2. the HTML was delivered using HTTPS (HTML5 media requirement)
      3. scene has transparent=’true’.
  • imgtype [not implemented] – The file extension of the background images. The default is ‘jpg’.

The following attributes are deprecated

  • srcfront – The URL to the front (aka nz) background image.
  • srcback – The URL to the back (aka pz) background image.
  • srcleft – The URL to the left (aka nx) background image.
  • srcright – The URL to the right (aka px) background image.
  • srctop – The URL to the top (aka py) background image.
  • srcbottom – The URL to the bottom (aka ny) background image.