Kinetic usage notes-animation

Source: Internet
Author: User

New Animation (func, layers)
Parameters:
Func: This function is called once every frame. This function receives a parameter object containing four elements, in milliseconds.

{TimeDiff: "time difference between the previous frame and the current frame", lastTime: "time Difference Between the animation start and the previous frame", time: "time Difference Between the animation start and the current frame", frameRate: "animation execution frequency FPS "}

Layers: layer to be repainted for each animation frame. It can be a layer, a layer group, or null.
Method:
AddLayer: adds a layer to the current animation. If the layer is successfully added, true is returned. Otherwise, false is returned.
GetLayers (): Get all layers of the current animation.
IsRunning (): Check whether the current animation is being executed. If true is returned, false is returned.
SetLayers (layers): adds a batch of layers to the current animation. The addition method is the same as the layers parameter of the instantiation function.
Start (): starts an animation.
Stop (): stop the animation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.