Stage2D

A 2D stage

new virtuosity.engine2d.stage.Stage2D(name);


Parameter Type Description
name String name of the stage

Objects

Methods

Properties


Objects

add

add entities to the Stage2D

virtuosity.engine2d.stage.Stage2D.add

get

get live 2D assets

virtuosity.engine2d.stage.Stage2D.get

has

check if the Stage2D has a live 2D assets

virtuosity.engine2d.stage.Stage2D.has

forEach

itterate over all entities

virtuosity.engine2d.stage.Stage2D.forEach


Methods

setup

setup the Stage2D

virtuosity.engine2d.stage.Stage2D.setup(canvas);


Parameter Type Description
canvas String name of the canvas

teardown

teardown the Stage2D

virtuosity.engine2d.stage.Stage2D.teardown(canvas);


Parameter Type Description
canvas String name of the canvas

getEnabled

get canvases this Stage2D is enabled on (using setup)

virtuosity.engine2d.stage.Stage2D.getEnabled();

export

export the Stage2D for storage (returns JSON)

virtuosity.engine2d.stage.Stage2D.export();


Properties

name

name of the stage

virtuosity.engine2d.stage.Stage2D.name