Z.tagCall(...)
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.
function tagCall(tag: string, func: string, ...args: any[]): any[];
Used to call a common function on all the nodes with the given tag.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
tag | string | The tag to search for. |
func | string | The name of the common function to call. |
args | any[] | A variable-length list of arguments to pass to the given functions. |
Returns
Section titled “Returns”An array of the return values from each function call performed.
Example
Section titled “Example”// Search for objects with the tag 'RED' and call the 'color' function on them.Z.tagCall("RED","color",[1,0,0,1]);
// Same as calling symbol.nodes.myNode.color([1,0,0,1]); on a group of nodes