Class: World

World(container)

This represents the world. The whole scene is contained and managed in this class.

Constructor

new World(container)

Parameters:
Name Type Description
container HTMLDivElement Append the Scene to this container
Source:

Methods

(async) init(spinner)

You need to call this method to initialize the world. It will create all the objects and add them to the scene.
Parameters:
Name Type Description
spinner HTMLElement The spinner will be hidden after the world is initialized
Source:

render()

This method is called every frame from the loop. It is used to update the camera position and interactions with other objects. It also update the animation of the water.
Source:

setText(text)

Sets the text of the interaction text
Parameters:
Name Type Description
text String Anzuzeigender Text
Source:

start()

Starts the loop for animating the scene
Source:

stop()

Stops the loop for animating the scene
Source:

toggleStats()

Toggle the stats for the threejs canvas
Source: