MRPanelEntity

MRPanelEntity ⇐ MRDivEntity

The main panel entity DOM used for webpages and UI elements in 3D space. mr-panel

Kind: global class
Extends: MRDivEntity

mrPanelEntity.MRPanelEntity

Kind: instance class of MRPanelEntity

new exports.MRPanelEntity()

Constructor for the main Panel. Sets up all the relevant object3D and window information. Includes information necessary for proper scrolling usage.

mrPanelEntity.height() ⇒ number

Gets the height of the current panel in 2D or 3D space (depending on the xr user state)

Kind: instance method of MRPanelEntity
Returns: number - height - the calcualted height value

mrPanelEntity.connected()

(async) Callback function of MREntity - handles setting up this Panel once it is connected to run as an entity component. Relevant tasks include setting up clipping and setting up for all necessary dispatchEvent connections including mutations and scrolling.

Kind: instance method of MRPanelEntity

mrPanelEntity.add(entity)

Adding an entity as a sub-object of this entity.

Kind: instance method of MRPanelEntity

Param Type Description
entity MREntity the entity to be added.

mrPanelEntity.removeEntity(entity)

Remove an entity as a sub-object of this entity.

Kind: instance method of MRPanelEntity

Param Type Description
entity MREntity the entity to be removed.

mrPanelEntity.onTouch(event)

Handles what should happen when a touch event is called. Updates items appropriately for scrolling on the panel. Triggers to use the browser’s own scrolling without a need to fake the scrolling itself.

Kind: instance method of MRPanelEntity

Param Type Description
event object the touch event

mrPanelEntity.onScroll(event)

Handles what should happen when a scroll event is called. Updates items appropriately for scrolling on the panel.

Kind: instance method of MRPanelEntity

Param Type Description
event object the scroll event