Class: Scene

Grape2D. Scene

new Scene()

A scene controls, at a high level, the running of the game. Being responsible for the updating and rendering. This is the component object of what is a composite pattern.
Source:

Methods

render(renderer, camera)

Renders the scene to a renderer.
Parameters:
Name Type Description
renderer Grape2D.Renderer Place to render the scene.
camera Grape2D.Camera Camera to transform the coordinates and to select the objects to be rendered.
Source:

update(dt)

Updates the scene.
Parameters:
Name Type Description
dt number Time elapsed since the last update.
Source: