JS
object
js : Useful namespace for helping with common needed JS quick functions
object
js.isInstanceOfBaseClassOnly(instance, BaseClass) ⇒ Given the parent, grabs either the parent’s direct material or (in the case of a group) the material of the first child hit.
Kind: static method of js
Returns: object
- material - the grabbed material
Param | Type | Description |
---|---|---|
instance | object |
the object whose class is being checked |
BaseClass | object |
the given name of the BaseClass being checked against. Not in quotes. |
Example
.isInstanceOfBaseClassOnly(entity, MRDivEntity) would return true only on <mr-div> entities. JS