canvas

properties of a canvas

virtuosity.engine2d.canvas

Methods


Methods

xPos

get / set the x position of a canvas

virtuosity.engine2d.canvas.xPos(canvas, x);


Parameter Type Description
canvas String id of the canvas
x Int (Optional) x position of the canvas

yPos

get / set the y position of a canvas

virtuosity.engine2d.canvas.yPos(canvas, y);


Parameter Type Description
canvas String id of the canvas
y Int (Optional) y position of the canvas

width

get / set the width of a canvas

virtuosity.engine2d.canvas.width(canvas, width);


Parameter Type Description
canvas String id of the canvas
width Int (Optional) width of the canvas

height

get / set the height of a canvas

virtuosity.engine2d.canvas.height(canvas, height);


Parameter Type Description
canvas String id of the canvas
height Int (Optional) height of the canvas

x

get / set the x position of a canvas camera

virtuosity.engine2d.canvas.x(canvas, x);


Parameter Type Description
canvas String id of the canvas
x Int (Optional) x of the canvas

y

get / set the y position of a canvas camera

virtuosity.engine2d.canvas.y(canvas, y);


Parameter Type Description
canvas String id of the canvas
y Int (Optional) y of the canvas

scale

get / set the scale of a canvas camera

virtuosity.engine2d.canvas.scale(canvas, y);


Parameter Type Description
canvas String id of the canvas
y Number (Optional) scale of the canvas

alpha

get / set the alpha of a canvas

virtuosity.engine2d.canvas.alpha(canvas, alpha);


Parameter Type Description
canvas String id of the canvas
alpha Number (Optional) the value to set the alpha

zIndex

get / set the zIndex of a canvas

virtuosity.engine2d.canvas.zIndex(canvas, zIndex);


Parameter Type Description
canvas String id of the canvas
zIndex Int (Optional) the value to set the z index

get

get a specific canvas

virtuosity.engine2d.canvas.get(canvas);


Parameter Type Description
canvas String id of the canvas

destroy

destroy a specific canvas

virtuosity.engine2d.canvas.destroy(canvas);


Parameter Type Description
canvas String id of the canvas