Class AnimationGroupMask
Hierarchy
- AnimationGroupMask
Index
Constructors
constructor
Creates a new mask
Parameters
Optional names: string[]
The list of target names to add to the mask (optional)
Optional mode: AnimationGroupMaskMode
Defines the mode for the mask (default: AnimationGroupMaskMode.Include)
Returns AnimationGroupMask
Properties
modeSearch playground for mode
Defines the mode for the mask
Methods
add Target NameSearch playground for addTargetName
Adds one or several target names to the mask
Parameters
name: string | string[]
The name(s) to add to the mask
Returns void
has TargetSearch playground for hasTarget
Checks if the mask includes a target name. This method is intended to know if a given target name is included in the mask, not if the name is actually retained by the mask (see retainsTarget() instead).
Parameters
name: string
The name to check with the mask
Returns boolean
True if the mask includes the name, false otherwise
remove Target NameSearch playground for removeTargetName
Removes one or several target names from the mask
Parameters
name: string | string[]
The name(s) to remove from the mask
Returns void
retains TargetSearch playground for retainsTarget
Checks if the mask retains a target name. Note that in the "Exclude" mode, this will return false if the mask includes the name, and true otherwise! This method is intended to know if a given target name is retained by the mask, not if the name is in the list of target names.
Parameters
name: string
The name to check with the mask
Returns boolean
True if the mask retains the name, false otherwise
Defines a mask used to filter animation targets. If you apply a mask to an animation group (see the AnimationGroup.mask property), only the animations whose target names match the mask will play. Note that a target is defined by its name (string). This means that the same mask can be used for several animation groups, provided that their targets are named in the same way.