WebGLCubeRenderTarget - Verge3D User Manual - Soft8Soft
Description: Learn how to use WebGLCubeRenderTarget in your interactive 3D apps made with Verge3D

WebGLRenderTarget →

# WebGLCubeRenderTarget

Used by the CubeCamera class as its WebGLRenderTarget.

## Constructor

### WebGLCubeRenderTarget(size : Integer, options : Object)

size
  the size, in pixels. Default is `1`.
options

  (optional) object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans. For an explanation of the texture parameters see Texture. The following are valid options:

  wrapS
    Default is ClampToEdgeWrapping.
  wrapT
    Default is ClampToEdgeWrapping.
  magFilter
    Default is LinearFilter.
  minFilter
    Default is LinearFilter.
  generateMipmaps
    Default is `false`.
  format
    Default is RGBAFormat.
  type
    Default is UnsignedByteType.
  anisotropy
    Default is `1`. See Texture.anisotropy
  encoding
    Default is LinearEncoding.
  depthBuffer
    Default is `true`.
  stencilBuffer
    Default is `false`.

Creates a new WebGLCubeRenderTarget.

## Properties

See WebGLRenderTarget for inherited properties.

## Methods

See WebGLRenderTarget for inherited methods.

### # .fromEquirectangularTexture(renderer : WebGLRenderer, texture : Texture) → this

- renderer — the renderer.
- texture — the equirectangular texture.

Use this method if you want to convert an equirectangular panorama to the cubemap format.

### # .clear(renderer : WebGLRenderer, color : Boolean, depth : Boolean, stencil : Boolean)

Call this to clear the renderTarget's color, depth, and/or stencil buffers. The color buffer is set to the renderer's current clear color. Arguments default to `true`.

## Source

For more info on how to obtain the source code of this module see this page.