Skybox

clay.plugin. Skybox

# new Skybox()

Source:
Example
var skyTex = new clay.TextureCube();
    skyTex.load({
        'px': 'assets/textures/sky/px.jpg',
        'nx': 'assets/textures/sky/nx.jpg'
        'py': 'assets/textures/sky/py.jpg'
        'ny': 'assets/textures/sky/ny.jpg'
        'pz': 'assets/textures/sky/pz.jpg'
        'nz': 'assets/textures/sky/nz.jpg'
    });
    var skybox = new clay.plugin.Skybox({
        scene: scene
    });
    skybox.material.set('environmentMap', skyTex);

Members

# scene :clay.Scene

Source:
Type:

Methods

# attachScene(scene)

Source:

Attach the skybox to the scene

Parameters:
Name Type Description
scene clay.Scene

# detachScene()

Source:

Detach from scene

# dispose(renderer)

Source:

Dispose skybox

Parameters:
Name Type Description
renderer clay.Renderer

# getEnvironmentMap() → {clay.TextureCube}

Source:

Get environment map

Returns:
Type
clay.TextureCube

# setEnvironmentMap(envMap)

Source:

Set environment map

Parameters:
Name Type Description
envMap clay.TextureCube