new Terrain()
Responsible for creating the ground and light for the scene.
- Source:
Methods
createGrass() → {Texture}
Loads up the grass texture and sets this a texture for the ground.
- Source:
Returns:
grass Grass texture for the ground.
- Type
- Texture
createGround() → {Mesh}
Creates the ground grass-effect that covers a large area enough for a reasonable amount of
manoeuvres.
- Source:
Returns:
ground Ground object covering large area using grass image.
- Type
- Mesh
createGroundMat(grass) → {Mesh}
Creates ground mesh plane to place in the scene. Applies the grass texture to it.
Places the ground at a slightly lower level than 0 on Y axis for plane to look grounded.
Parameters:
Name | Type | Description |
---|---|---|
grass |
Texture | Texture of the ground. |
- Source:
Returns:
ground Ground object covering large area using grass image.
- Type
- Mesh
setupLight() → {DirectionalLight}
Creates and returns a directional light that lights up the scene and aeroplane. Colour and positon of light
affects appearence.
- Source:
Returns:
light Light directed from a specified position.
- Type
- DirectionalLight