Animation

Animation

package js-html

extends EventTarget

extended by CSSAnimation, CSSTransition

Available on js

The Animation interface of the Web Animations API represents a single animation player and provides playback controls and a timeline for an animation node or source.

Documentation Animation by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (?effect:KeyframeEffectReadOnly, ?timeline:AnimationTimeline)

Throws:

null DOMError

Variables

currentTime:Float

The current time value of the animation in milliseconds, whether running or paused. If the animation lacks a AnimationTimeline, is inactive or hasn't been played yet, its value is null.

read only effect:AnimationEffectReadOnly

Gets and sets the AnimationEffectReadOnly associated with this animation. This will usually be a KeyframeEffect object.

read only finished:Promise<Animation>

Returns the current finished Promise for this animation.

id:String

Gets and sets the String used to identify the animation.

oncancel:Function

Gets and sets the event handler for the cancel event.

onfinish:Function

Gets and sets the event handler for the finish event.

read only playState:AnimationPlayState

Returns an enumerated value describing the playback state of an animation.

playbackRate:Float

Gets or sets the playback rate of the animation.

read only ready:Promise<Animation>

Returns the current ready Promise for this animation.

startTime:Float

Gets or sets the scheduled time when an animation's playback should begin.

read only timeline:AnimationTimeline

Gets or sets the AnimationTimeline associated with this animation.

Methods

cancel ():Void

Clears all KeyframeEffect caused by this animation and aborts its playback.

finish ():Void

Throws:

null DOMError

pause ():Void

Throws:

null DOMError

play ():Void

Throws:

null DOMError

reverse ():Void

Throws:

null DOMError

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/Animation.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部