Skip to content

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.

ParameterTypeDescription
tagstringThe tag to search for.
funcstringThe name of the common function to call.
argsany[]A variable-length list of arguments to pass to the given functions.

An array of the return values from each function call performed.

// 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