MRModelEntity

MRModelEntity ⇐ MRDivEntity

Loads in any supported 3D model type to the requested location. mr-model

Kind: global class
Extends: MRDivEntity

mrModelEntity.MRModelEntity

Kind: instance class of MRModelEntity

new exports.MRModelEntity()

Constructor for the Model entity, does the default.

mrModelEntity.src() ⇒ string

Pair getter for the src property of . Important so that when a user tries to run modelObject.src = ... or perform something on modelObject.src it properly gets the html attribute as expected instead of the pure js one.

note: we can do this because only htmlimageelement has a src property by default, not htmlimagelement, and none of the above class extensions for Model have it as a defined property.

Kind: instance method of MRModelEntity
Returns: string - the value of the src html attribute

mrModelEntity.src()

Setter for the src property of . Important so that when a user tries to run modelObject.src = ... it properly sets the html attribute as expected instead of the pure js one.

note: we can do this because only htmlimageelement has a src property by default, not htmlimagelement, and none of the above class extensions for Model have it as a defined property.

Kind: instance method of MRModelEntity

mrModelEntity.mutated(mutation)

Callback function of MREntity - Updates the media’s cover,fill,etc based on the mutation request.

Kind: instance method of MRModelEntity

Param Type Description
mutation object the update/change/mutation to be handled.

mrModelEntity.loadModel()

Async function that fills in this Model object based on src file information

Kind: instance method of MRModelEntity

mrModelEntity.connected()

(async) Callback function of MREntity - handles setting up this Model once it is connected to run as an entity component. Includes loading up the model and associated data.

Kind: instance method of MRModelEntity

mrModelEntity.onLoad()

On load event function - right now defaults to do nothing.

Kind: instance method of MRModelEntity