Class: LabelCanvas

SG2D.LabelCanvas(text, options) → {SG2D.LabelCanvas}

Создаёт CANVAS-элемент с графическим текстом

Constructor

new LabelCanvas(text, options) → {SG2D.LabelCanvas}

Parameters:
Name Type Description
text string
options object
Properties
Name Type Attributes Description
parent HTMLElement <optional>

Контейнер, в который размещается CANVAS-элемент надписи

Source:
Returns:
Type
SG2D.LabelCanvas
Example
let canvasTitle = new SG2D.LabelCanvas("SG2D DEMO", {
	font: "metal_yellow_big",
	parent: document.querySelector("#title")
});

Methods

setText(text)

Установить текст надписи

Parameters:
Name Type Description
text string
Source: