MRMediaEntity
MRDivEntity
MRMediaEntity ⇐ Base html media entity represented in 3D space. mr-media
Kind: global class
Extends: MRDivEntity
- MRMediaEntity ⇐
MRDivEntity
mrMediaEntity.MRMediaEntity
Kind: instance class of MRMediaEntity
new exports.MRMediaEntity()
Constructs a base media entity using a UIPlane and other 3D elements as necessary.
number
mrMediaEntity.width() ⇒ Calculates the width of the media based on the media tag in the shadow root
Kind: instance method of MRMediaEntity
Returns: number
- - the resolved width
number
mrMediaEntity.height() ⇒ Calculates the height of the media based on the media tag in the shadow root
Kind: instance method of MRMediaEntity
Returns: number
- - the resolved height
mrMediaEntity.connected()
Callback function of MREntity - handles setting up this media and associated 3D geometry style (from css) once it is connected to run as an entity component.
Kind: instance method of MRMediaEntity
mrMediaEntity.mutated(mutation)
Callback function of MREntity - Updates the media’s cover,fill,etc based on the mutation request.
Kind: instance method of MRMediaEntity
Param | Type | Description |
---|---|---|
mutation | object |
the update/change/mutation to be handled. |
mrMediaEntity.computeObjectFitDimensions()
computes the width and height values for the image considering the value of object-fit
Kind: instance method of MRMediaEntity