NF.anim.clip
(
styleAnim
,
config
)
- Parameters:
-
styleAnim <Object Literal | Anim Object | Anim Object Array>Object literal with NF.anim.styleAnim configuration properties. - or - A single styleAnim object or an array of styleAnim objects. -
config <Object>Object literal containing the configuration properties for the clip...
- {frames:int} - The number of frames for the clip.
- {node:Node} - The Node to play the clip on. If using a hook the Node will be dynamically set by the widget based on the clips hook property.
- {hook:string} - The optional hook property is used to connect the clips styleAnim objects with a widget event. See below for more details. Options for the menu widget include... ("NFplayOnSubShow", "NFplayOnSubHide", "NFplayOnLinkActiveShow", "NFplayOnLinkActiveHide", "NFplayOnLinkHoverShow", "NFplayOnLinkHoverHide", "NFplayOnLinkFocusShow", "NFplayOnLinkFocusHide")
- {targetClass:string} - Searches the clip Nodes descendants for a Node with a matching class name. styleAnim objects belonging to the clip will render effects on the matching Node when playing. This property works with Nodes set dynamically by a widget through a hook or a Node specified with the Node property.
- {reset:boolean} - After playing the clip, inline style animations applied by the styleAnim objects are reset to the original values.
- {startStyles:Object} - Object literal of script style name properties and value pairs to be applied at the beginning of the clip. e.g. {visibility:visible, backgroundColor:#f00} Use script style names, not CSS names (valid: backgroundColor - invalid: background-color)
- {endStyles:Object} - Object literal of script style name properties and value pairs to be applied at the end of the clip. e.g. {visibility:hidden, backgroundColor:#fff} Use script style names, not CSS names (valid: backgroundColor - invalid: background-color)
- {frameAnchorPos:int} - Anchors the clip to a specific frame position within its track. By default the clip is added to the beginning of the track or after any existing clips that the track contains.
- {ease:string} - Determines the animation easing effect (decelerates or acelerates), options include... 'quad-in, quad-out, cubic-in, cubic-out, quart-in, quart-out, quint-in, quint-out.
- {gpuBoost:boolean} - Applies hardware aceleration to the animation effects using transform:translateZ(0), improves animation performance in some browsers.
- {applytype:string} - 'stylesheet' or 'inline' - determines how each animation frames styles are applied. 'Inline' is quicker, however 'stylesheet' may be desirable in certain situations where initial settings across multiple clips must be preserved.
The hook property is optional and allows the clip to be dynamically applied to widget nodes during certain events. The widget processes the animations through the transition and playerSynchronizer classes. This produces smooth and sequenced animations by using a single delay timer for multiple timelines and players.
The menu widget manages multiple animations running concurrently and auomatically changes play direction when other events are triggered. The following hook values may be used with a clip...- {"NFplayOnSubShow"} - Plays on the sub Node ('nfSubC') when made visible.
- {"NFplayOnSubHide"} - Plays on the sub Node ('nfSubC') before hiding.
- {"NFplayOnLinkActiveShow"} - Plays on a link Node ('nfLink') when it's associated child sub is made visible.
- {"NFplayOnLinkActiveHide"} - Plays on a link Node ('nfLink') before it's associated child sub is hidden.
- {"NFplayOnLinkHoverShow"} - Plays on a link Node ('nfLink') when hovered over with the mouse.
- {"NFplayOnLinkHoverHide"} - Plays on a link Node ('nfLink') when the mouse leaves the Node.
- {"NFplayOnLinkFocusShow"} - Plays on a link Node ('nfLink') when receiving focus through a click or keyboard event.
- {"NFplayOnLinkFocusHide"} - Plays on a link Node ('nfLink') when focus is lost through a click or keyboard event..