Z.byTag(...)
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
byTag(t: string): Z.Base[];
Gets an array of nodes with the given tag.
Tags can be set in the Properties panel of a node or using the pushTag(…) function.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
t | string | The tag to search for. |
Returns
Section titled “Returns”An array of nodes with the given tag.
Example
Section titled “Example”// Populate the redArray variable with an array of nodes that have the 'RED' tag assigned to them.var redArray = Z.byTag("RED");
// Store the number of red objects within a 'count' variablevar count = redArray.length;