HtmlComponent

HtmlComponent

Adds a 2D DOM element to the entity, that can move with its transform.

Constructor

new HtmlComponent(domElement, optionsopt)

Parameters:
Name Type Attributes Description
domElement DOMElement
options object <optional>
Properties
Name Type Attributes Default Description
hidden boolean <optional>
false
useTransformComponent boolean <optional>
true
pixelPerfect boolean <optional>
true

Members

domElement

DOM element.

hidden :boolean

pixelPerfect :boolean

Snap to integer pixel positions.

useTransformComponent :boolean

Move with the screen position of the entity.