MRTextEntity

MRTextEntity ⇐ MRDivEntity

The text element that is used to represent normal HTML text one would expect in a web browser. Used specifically on mr-div items. Inherits from MRDivEntity.

Kind: global class
Extends: MRDivEntity

mrTextEntity.MRTextEntity

Kind: instance class of MRTextEntity

new exports.MRTextEntity()

Constructor for the MRTextEntity object. Sets up the 3D aspect of the text, including the object, texture, and update check. Additionally, adds an event listener for the text to auto-augment whenever the panel size changes.

mrTextEntity._textWasManuallyUpdated()

Helper for anytime text is manually touched - in connected and by use of innerText. Handles setting innerText like expected, sanitizing it for our use, and also making sure the updates are called.

Kind: instance method of MRTextEntity

mrTextEntity.innerText()

setter capture. Handles setting innerText like expected by also making sure it’s sanitized and the updates are called.

Kind: instance method of MRTextEntity

mrTextEntity.connected()

(async) sets up the textObject of the text item.

Kind: instance method of MRTextEntity

mrTextEntity.triggerTextStyleUpdate()

Triggers a system run to update text specifically for the entity calling it. Useful when it’s not an overall scene event and for cases where relying on an overall scene or all items to update isnt beneficial.

Kind: instance method of MRTextEntity

mrTextEntity.printCurrentTextDebugInfo(textObj)

Helper method for debugging the textObj visual information

Kind: instance method of MRTextEntity

Param Type Description
textObj object the textobj threejs renderable visual. Handled by troika. If no object is passed, defers to the textObj within this entity.