js : object

Useful namespace for helping with common needed JS quick functions

Kind: global namespace

js.isInstanceOfBaseClassOnly(instance, BaseClass) ⇒ object

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.


JS.isInstanceOfBaseClassOnly(entity, MRDivEntity) would return true only on <mr-div> entities.