Global

Methods

createAmbientLight()

Create the AmbientLight
Source:
Returns:
THREE.SpotLight

createGround()

Create a terrain
Source:
Returns:
THREE.Mesh

createOcean()

Create the ocean
Source:
Returns:
Water

createPerspectiveCamera(startPositon)

Create a camera.
Parameters:
Name Type Description
startPositon THREE.Vector3 Default to 0,0,0
Source:
Returns:
THREE.PerspectiveCamera

createRenderer() → {THREE.WebGLRenderer}

Create a renderer for the scene and set its shadow map.
Source:
Returns:
Type
THREE.WebGLRenderer

createRock(positionX, positionY, positionZ)

Create a rock
Parameters:
Name Type Description
positionX Number Position in x axis
positionY Number Position in y axis
positionZ Number Position in z axis
Source:
Returns:
THREE.Group

createScene()

Setup the Scene
Source:
Returns:
THREE.Scene

createSky()

Create the sky
Source:
Returns:
Sky

createSpotLight(position)

Create the SpotLight
Parameters:
Name Type Description
position THREE.Vector3
Source:
Returns:
THREE.SpotLight

createSun(sky)

Add a sun to the sky
Parameters:
Name Type Description
sky Sky Sky where the sun is added
Source:
Returns:
Vector3