Skybox

Skybox

Skybox for the scene. Can be either SPHERE type or BOX type

Constructor

new Skybox(type, images, textureMode, yRotation, options)

Parameters:
Name Type Description
type String

'sphere' or 'box'

images Image

the image to set

textureMode String

only used in sphere skybox

yRotation Number

rotation on y axis

options Object

Methods

createSkyBox(images, textureMode, yRotation)

construct a skybox

Parameters:
Name Type Description
images Image

the image to set

textureMode String

only used in sphere skybox

yRotation Number

rotation on y axis

createSkySphere(images, textureMode, yRotation)

construct a skySphere skybox

Parameters:
Name Type Description
images Image

the image to set

textureMode String

only used in sphere skybox

yRotation Number

rotation on y axis

getEntity(world) → {Entity}

Create a skybox entity based on saved material, mesh and transform

Parameters:
Name Type Description
world World

setTexture(texture)

Set texture for this skybox

Parameters:
Name Type Description
texture