+
MREntity
+
+
MREntity ⇐ MRElement
+
The default representation of an MRElement to be expanded upon by actual details ECS Entity items. mr-entity
+
Kind: global class
+ Extends: MRElement
+
+
+
mrEntity.MREntity
+
Kind: instance class of MREntity
+
+
new exports.MREntity()
+
Constructor for the default Entity Component (MREntity). Sets up the base object3D and useful Mixed Reality information including rendering, touching, and component basics.
+
+
mrEntity.width() ⇒ number
+
Calculates the width of the Entity based on the viewPort’s shape. If in Mixed Reality, adjusts the value appropriately.
+
Kind: instance method of MREntity
+ Returns: number - - the resolved width
+
+
mrEntity.contentWidth() ⇒ number
+
The actual 3D value of the content’s width.
+
Kind: instance method of MREntity
+ Returns: number - - width of the 3D object.
+
+
mrEntity.height() ⇒ number
+
Calculates the height of the Entity based on the viewPort’s shape. If in Mixed Reality, adjusts the value appropriately.
+
Kind: instance method of MREntity
+ Returns: number - - the resolved height
+
+
mrEntity.contentHeight() ⇒ number
+
The actual 3D value of the content’s height.
+
Kind: instance method of MREntity
+ Returns: number - - height of the 3D object.
+
+
mrEntity.alwaysNeedsGeometryUpdate() ⇒ boolean
+
Checks if the system is setup to always run instead of being in a state that allows for toggling on and off. Useful for readability and to not need to check against undefined often.
+
Kind: instance method of MREntity
+ Returns: boolean - true if the internal _needsSystemUpdate is set to ‘undefined’, false otherwise.
+
+
mrEntity.alwaysNeedsGeometryUpdate()
+
Sets the system ito always run (true) or to be in a state that allows for toggling on and off (false). Useful for readability and to not need to check against undefined often.
+
Kind: instance method of MREntity
+
+
mrEntity.needsGeometryUpdate() ⇒ boolean
+
Getter to checks if we need the StyleSystem to run on this entity during the current iteration. Default implementation returns true if the needsSystemUpdate flag has been set to true or is in the alwaysNeedsSystemUpdate state. Allows subclasses to override with their own implementation.
+
Kind: instance method of MREntity
+ Returns: boolean - true if the system is in a state where this system is needed to update, false otherwise
+
+
mrEntity.needsGeometryUpdate()
+
Set the needsStyleUpdate parameter. undefined - means the StyleSystem will update this entity’s style every time the application loops. true/false - means the StyleSystem will update this entity’s style only running one iteration when set to true and then reset back to false waiting for the next trigger.
+
Kind: instance method of MREntity
+
+
mrEntity.alwaysNeedsStyleUpdate() ⇒ boolean
+
Checks if the system is setup to always run instead of being in a state that allows for toggling on and off. Useful for readability and to not need to check against undefined often.
+
Kind: instance method of MREntity
+ Returns: boolean - true if the internal _needsSystemUpdate is set to ‘undefined’, false otherwise.
+
+
mrEntity.alwaysNeedsStyleUpdate()
+
Sets the system ito always run (true) or to be in a state that allows for toggling on and off (false). Useful for readability and to not need to check against undefined often.
+
Kind: instance method of MREntity
+
+
mrEntity.needsStyleUpdate() ⇒ boolean
+
Getter to checks if we need the StyleSystem to run on this entity during the current iteration. Default implementation returns true if the needsSystemUpdate flag has been set to true or is in the alwaysNeedsSystemUpdate state. Allows subclasses to override with their own implementation.
+
Kind: instance method of MREntity
+ Returns: boolean - true if the system is in a state where this system is needed to update, false otherwise
+
+
mrEntity.needsStyleUpdate()
+
Set the needsStyleUpdate parameter. undefined - means the StyleSystem will update this entity’s style every time the application loops. true/false - means the StyleSystem will update this entity’s style only running one iteration when set to true and then reset back to false waiting for the next trigger.
+
Kind: instance method of MREntity
+
+
mrEntity.updateMaterialStyle()
+
Inside the engine’s ECS these arent filled in, theyre directly in the system themselves - but they can be overwritten by others when they create new entities
+
Kind: instance method of MREntity
+
+
mrEntity.updateGeometryStyle()
+
Inside the engine’s ECS these arent filled in, theyre directly in the system themselves - but they can be overwritten by others when they create new entities
+
Kind: instance method of MREntity
+
+
mrEntity.onHover(event)
+
Handles the hover event
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | event |
+ object |
+ the hover event |
+
+
+
+
+
mrEntity.onTouch(event)
+
Handles the touch event
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | event |
+ object |
+ the touch event |
+
+
+
+
+
+
Handles the scroll event
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | event |
+ object |
+ the scroll event |
+
+
+
+
+
mrEntity.connectedCallback()
+
The connectedCallback function that runs whenever this entity component becomes connected to something else.
+
Kind: instance method of MREntity
+
+
mrEntity.loadAttributes()
+
Loads all attributes of this entity’s stored dataset including components, attaching them, and their associated rotations and positions.
+
Kind: instance method of MREntity
+
+
mrEntity.connected()
+
Callback function of MREntity - does nothing. Is called by the connectedCallback.
+
Kind: instance method of MREntity
+
+
mrEntity.disconnected()
+
Callback function of MREntity - does nothing. Is called by the disconnectedCallback.
+
Kind: instance method of MREntity
+
+
mrEntity.disconnectedCallback()
+
The disconnectedCallback function that runs whenever this entity component becomes disconnected from something else.
+
Kind: instance method of MREntity
+
+
mrEntity.mutated(mutation)
+
Callback function of MREntity - does nothing. Is called by mutation Callback.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | mutation |
+ object |
+ the update/change/mutation to be handled. |
+
+
+
+
+
mrEntity.mutationCallback(mutationList, observer)
+
The mutationCallback function that runs whenever this entity component should be mutated.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | mutationList |
+ object |
+ the list of update/change/mutation(s) to be handled. |
+
+
+ | observer |
+ object |
+ w3 standard object that watches for changes on the HTMLElement |
+
+
+
+
+
mrEntity.componentMutated(mutation)
+
Helper function for the mutationCallback. Handles actually updating this entity component with all the associated dispatchEvents.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | mutation |
+ object |
+ the update/change/mutation to be handled. |
+
+
+
+
+
mrEntity.add(entity)
+
Adding an entity as a sub-object of this entity.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | entity |
+ MREntity |
+ the entity to be added. |
+
+
+
+
+
mrEntity.remove(entity)
+
Removing an entity as a sub-object of this entity.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | entity |
+ MREntity |
+ the entity to be removed. |
+
+
+
+
+
mrEntity.traverse(callBack)
+
Runs the passed through function on this object and every child of this object.
+
Kind: instance method of MREntity
+
+
+
+
+
+
+ | callBack |
+ function |
+ the function to run recursively. |
+
+
+
+
+
+
+
+