Home Reference Source Test
import BasicScene from 'seed-engine/src/scene/BasicScene.js'
public class | source

BasicScene

Extends:

UpdateableScene → BasicScene

A basic representation of a working scene. Scenes need a viewport to give Renderable components a place to be viewed by the RenderManager.

This scene only contains one viewport which takes up the size of the canvas element.

Constructor Summary

Public Constructor
public

Inherited Summary

From class Updateable
public
public
public
public

id: *

public

Cleanup code for when destroying an Updateable.

public

end()

Base call function for when this Updateable is to be ended.

public

onEnd()

Called when the object is being removed or cleaned up from usage.

public

Called when the object is intended to be paused.

public

Called when the the object is first introduced.

public

Called when the object is to be unpaused from paused state.

public

Called on every update within the game, once the object has had onStart called.

public

pause()

Base call function for when this Updateable is to be paused.

public

start()

Base call function for when this Updateable is to be started.

public

Base call function for when this Updateable is to be unpaused.

public

update()

Base call function for when this Updateable is to be updated.

From class Scene
public
public
public

viewports: *[]

public

registerRenderableComponent(renderable: Renderable, viewportIndex: number): *

Registers a Renderable component with the viewport, by index.

public

registerSceneObject(sceneObject: SceneObject): *

When a SceneObject is created, it is routed through the SceneManager to the current active scene to this function.

public

registerViewport(viewport: Viewport): *

When a Viewport is created, it is routed through the SceneManager to the current active scene to this function.

Public Constructors

public constructor() source

Builds the SceneObjects and Viewports list.

Override:

Scene#constructor