Module: view/Game

view/Game

new require("view/Game")(model)

This:
Parameters:
Name Type Description
model module:model/Game The game model that the view should show on the screen.
Source:
Source:

Classes

require("view/Game")

Methods

<private> __initBall(group)

Create the ball from the model and add it to `group`.
This:
Parameters:
Name Type Description
group Object3D The group that the ball will be added to.
Source:

<private> __initExitPath(group)

Create the exit path from the model and add it to `group`.
This:
Parameters:
Name Type Description
group Object3D The group that the exit path will be added to.
Source:

<private> __initLabyrinthContainer()

Add the labyrinth container's 4 walls and floor.
This:
Source:

<private> __initLights(group)

Create lights and add them to `group`.
This:
Parameters:
Name Type Description
group Object3D The group that the lights will be added to.
Source:

<private> __initObstacles(group, obstacleTexturePath)

Create the obstacles from the model and add them to `group`.
This:
Parameters:
Name Type Description
group Object3D The group that the obstacles will be added to.
obstacleTexturePath String Path to the texture that will be used for the mesh.
Source:

<private> __initWalls(group)

Create the walls from the model and add them to `group`.
This:
Parameters:
Name Type Description
group Object3D The group that the walls will be added to.
Source:

<private> __onWindowResize()

Update the camera and renderer after the browser's window size has changed.
This:
Source:

render()

Start the render loop function.
This:
Source: