<< Click to Display Table of Contents >>

 

sg.fx

 

 

Description

Contains classes and methods related to animations.

 

Position

fx.js

 

 

Methods

 

Method

Type

Description

createAnimation(param)

param:Object

Returns:Object

parameters for creating the animation object:

Name

Type

Description

easing

function        

(optional)easing function.

Default:

sg.fx.easing.linear

duration

Number

(optional)animation duration time in ms.

Default:350

onAnimation

function        

(optional)returned function when animation is playing.

onEnd

function        

(optional)returned function when animation ends.

onStart

function        

(optional)returned function when animation starts.

type

String

(optional)method of animation. The requestAnimation method may not be supported by earlier versions of browsers.

Default:setTimeout

repeat

Boolean

(optional)whether to repeat animation.

Default:        false

rate

Number

(optional)only works when type is setTimeout. The play rate in ms.

Default:20

delay

Number

(optional) play the animation after a delay time.

Default:0

Returns:

Type

Description

Object

The returns parameters Include play() and stop(). The former is to start the animation and the later is to stop animation.

 

 

 


©2015 Supergeo Technologies Inc.