Skip to content

marble3 / createSkybox

Function: createSkybox() ​

createSkybox(dir, size?, opacity?): Mesh<BoxGeometry, ShaderMaterial, Object3DEventMap>

Defined in: src/skybox.ts:11

Builds a skybox, a cube to add to the scene, from the six WebP images in dir: left.webp, right.webp, up.webp, down.webp, front.webp and back.webp.

Parameters ​

dir ​

string

URL of the directory, without a trailing slash.

size? ​

number = 2000

Edge of the cube, in world units: larger than the world, and within the camera's far plane.

opacity? ​

number = 1

Below 1, the scene's background shows through.

Returns ​

Mesh<BoxGeometry, ShaderMaterial, Object3DEventMap>