Skip to content

Class: Animate โ€‹

Hierarchy โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Accessors โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new Animate(target, keyframe, options?, isTemp?): Animate

Parameters โ€‹

NameType
targetIUI
keyframeIUIInputData | IKeyframe[]
options?ITransition
isTemp?boolean

Returns โ€‹

Animate

Overrides โ€‹

Eventer.constructor

Defined in โ€‹

in/packages/animate/src/Animate.ts:102

Properties โ€‹

target โ€‹

โ€ข target: IUI

Implementation of โ€‹

IAnimate.target

Defined in โ€‹

in/packages/animate/src/Animate.ts:14


keyframes โ€‹

โ€ข keyframes: IKeyframe[]

Implementation of โ€‹

IAnimate.keyframes

Defined in โ€‹

in/packages/animate/src/Animate.ts:16


config โ€‹

โ€ข Optional config: IAnimateOptions

Implementation of โ€‹

IAnimate.config

Defined in โ€‹

in/packages/animate/src/Animate.ts:17


fromStyle โ€‹

โ€ข fromStyle: IUIInputData

Implementation of โ€‹

IAnimate.fromStyle

Defined in โ€‹

in/packages/animate/src/Animate.ts:19


toStyle โ€‹

โ€ข toStyle: IUIInputData

Implementation of โ€‹

IAnimate.toStyle

Defined in โ€‹

in/packages/animate/src/Animate.ts:20


running โ€‹

โ€ข running: boolean

Implementation of โ€‹

IAnimate.running

Defined in โ€‹

in/packages/animate/src/Animate.ts:24


destroyed โ€‹

โ€ข destroyed: boolean

Implementation of โ€‹

IAnimate.destroyed

Defined in โ€‹

in/packages/animate/src/Animate.ts:26


time โ€‹

โ€ข time: number

Implementation of โ€‹

IAnimate.time

Defined in โ€‹

in/packages/animate/src/Animate.ts:28


looped โ€‹

โ€ข looped: number

Implementation of โ€‹

IAnimate.looped

Defined in โ€‹

in/packages/animate/src/Animate.ts:29


easing โ€‹

โ€ข easing: IAnimateEasing

Implementation of โ€‹

IAnimate.easing

Defined in โ€‹

in/packages/animate/src/Animate.ts:33


delay โ€‹

โ€ข delay: number

Implementation of โ€‹

IAnimate.delay

Defined in โ€‹

in/packages/animate/src/Animate.ts:37


duration โ€‹

โ€ข duration: number

Implementation of โ€‹

IAnimate.duration

Defined in โ€‹

in/packages/animate/src/Animate.ts:40


ending โ€‹

โ€ข ending: IAnimateEnding

Implementation of โ€‹

IAnimate.ending

Defined in โ€‹

in/packages/animate/src/Animate.ts:43


reverse โ€‹

โ€ข Optional reverse: boolean

Implementation of โ€‹

IAnimate.reverse

Defined in โ€‹

in/packages/animate/src/Animate.ts:47


swing โ€‹

โ€ข Optional swing: boolean

Implementation of โ€‹

IAnimate.swing

Defined in โ€‹

in/packages/animate/src/Animate.ts:50


loop โ€‹

โ€ข loop: number | boolean

Implementation of โ€‹

IAnimate.loop

Defined in โ€‹

in/packages/animate/src/Animate.ts:53


loopDelay โ€‹

โ€ข loopDelay: number

Implementation of โ€‹

IAnimate.loopDelay

Defined in โ€‹

in/packages/animate/src/Animate.ts:56


speed โ€‹

โ€ข speed: number

Implementation of โ€‹

IAnimate.speed

Defined in โ€‹

in/packages/animate/src/Animate.ts:60


autoplay โ€‹

โ€ข autoplay: boolean

Implementation of โ€‹

IAnimate.autoplay

Defined in โ€‹

in/packages/animate/src/Animate.ts:63


join โ€‹

โ€ข join: boolean

Implementation of โ€‹

IAnimate.join

Defined in โ€‹

in/packages/animate/src/Animate.ts:66


attrs โ€‹

โ€ข attrs: string[]

Implementation of โ€‹

IAnimate.attrs

Defined in โ€‹

in/packages/animate/src/Animate.ts:69


isTemp โ€‹

โ€ข isTemp: boolean

Defined in โ€‹

in/packages/animate/src/Animate.ts:72


frames โ€‹

โ€ข frames: IComputedKeyframe[]

Implementation of โ€‹

IAnimate.frames

Defined in โ€‹

in/packages/animate/src/Animate.ts:74


nowIndex โ€‹

โ€ข Protected nowIndex: number

Defined in โ€‹

in/packages/animate/src/Animate.ts:76


easingFn โ€‹

โ€ข Protected easingFn: IFunction

Defined in โ€‹

in/packages/animate/src/Animate.ts:80


requestAnimateTime โ€‹

โ€ข Protected requestAnimateTime: number

Defined in โ€‹

in/packages/animate/src/Animate.ts:82


playedTotalTime โ€‹

โ€ข Protected playedTotalTime: number

Defined in โ€‹

in/packages/animate/src/Animate.ts:83


nowReverse โ€‹

โ€ข Protected nowReverse: boolean

Defined in โ€‹

in/packages/animate/src/Animate.ts:85


timer โ€‹

โ€ข Protected timer: any

Defined in โ€‹

in/packages/animate/src/Animate.ts:86


attrsMap โ€‹

โ€ข Protected attrsMap: IBooleanMap

Defined in โ€‹

in/packages/animate/src/Animate.ts:87


innerId โ€‹

โ€ข Readonly innerId: number

Implementation of โ€‹

IAnimate.innerId

Inherited from โ€‹

Eventer.innerId

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:9


__captureMap โ€‹

โ€ข Optional __captureMap: IEventListenerMap

Implementation of โ€‹

IAnimate.__captureMap

Inherited from โ€‹

Eventer.__captureMap

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:11


__bubbleMap โ€‹

โ€ข Optional __bubbleMap: IEventListenerMap

Implementation of โ€‹

IAnimate.__bubbleMap

Inherited from โ€‹

Eventer.__bubbleMap

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:13


syncEventer โ€‹

โ€ข Optional syncEventer: IEventer

Implementation of โ€‹

IAnimate.syncEventer

Inherited from โ€‹

Eventer.syncEventer

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:15

Accessors โ€‹

endingStyle โ€‹

โ€ข get endingStyle(): IUIInputData

Returns โ€‹

IUIInputData

Implementation of โ€‹

IAnimate.endingStyle

Defined in โ€‹

in/packages/animate/src/Animate.ts:21


started โ€‹

โ€ข get started(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IAnimate.started

Defined in โ€‹

in/packages/animate/src/Animate.ts:23


completed โ€‹

โ€ข get completed(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IAnimate.completed

Defined in โ€‹

in/packages/animate/src/Animate.ts:25


frame โ€‹

โ€ข get frame(): IComputedKeyframe

Returns โ€‹

IComputedKeyframe

Defined in โ€‹

in/packages/animate/src/Animate.ts:77


frameTotalTime โ€‹

โ€ข get frameTotalTime(): number

Returns โ€‹

number

Defined in โ€‹

in/packages/animate/src/Animate.ts:78


realEnding โ€‹

โ€ข get realEnding(): IAnimateEnding

Returns โ€‹

IAnimateEnding

Implementation of โ€‹

IAnimate.realEnding

Defined in โ€‹

in/packages/animate/src/Animate.ts:89


event โ€‹

โ€ข set event(map): void

Parameters โ€‹

NameType
mapIEventMap

Returns โ€‹

void

Implementation of โ€‹

IAnimate.event

Inherited from โ€‹

Eventer.event

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:17

Methods โ€‹

init โ€‹

โ–ธ init(target, keyframe, options?, isTemp?): void

Parameters โ€‹

NameType
targetIUI
keyframeIUIInputData | IKeyframe[]
options?ITransition
isTemp?boolean

Returns โ€‹

void

Implementation of โ€‹

IAnimate.init

Defined in โ€‹

in/packages/animate/src/Animate.ts:108


play โ€‹

โ–ธ play(): void

Returns โ€‹

void

Implementation of โ€‹

IAnimate.play

Defined in โ€‹

in/packages/animate/src/Animate.ts:134


pause โ€‹

โ–ธ pause(): void

Returns โ€‹

void

Implementation of โ€‹

IAnimate.pause

Defined in โ€‹

in/packages/animate/src/Animate.ts:143


stop โ€‹

โ–ธ stop(): void

Returns โ€‹

void

Implementation of โ€‹

IAnimate.stop

Defined in โ€‹

in/packages/animate/src/Animate.ts:151


seek โ€‹

โ–ธ seek(time): void

Parameters โ€‹

NameType
timenumber | IPercentData

Returns โ€‹

void

Implementation of โ€‹

IAnimate.seek

Defined in โ€‹

in/packages/animate/src/Animate.ts:159


kill โ€‹

โ–ธ kill(): void

Returns โ€‹

void

Implementation of โ€‹

IAnimate.kill

Defined in โ€‹

in/packages/animate/src/Animate.ts:172


create โ€‹

โ–ธ create(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:177


changeDuration โ€‹

โ–ธ changeDuration(duration): void

Parameters โ€‹

NameType
durationnumber

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:237


setBefore โ€‹

โ–ธ setBefore(item, data, before): void

Parameters โ€‹

NameType
itemIComputedKeyframe
dataIObject
beforeIObject

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:242


allocateTime โ€‹

โ–ธ allocateTime(partTime): void

Parameters โ€‹

NameType
partTimenumber

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:251


requestAnimate โ€‹

โ–ธ requestAnimate(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:264


animate โ€‹

โ–ธ animate(_runtime?, seek?): void

Parameters โ€‹

NameType
_runtime?number
seek?boolean

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:269


start โ€‹

โ–ธ start(seek?): void

Parameters โ€‹

NameType
seek?boolean

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:330


begin โ€‹

โ–ธ begin(seek?): void

Parameters โ€‹

NameType
seek?boolean

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:348


end โ€‹

โ–ธ end(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:354


complete โ€‹

โ–ธ complete(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:358


setFrom โ€‹

โ–ธ setFrom(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:371


setTo โ€‹

โ–ธ setTo(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:376


nextFrame โ€‹

โ–ธ nextFrame(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:382


reverseNextFrame โ€‹

โ–ธ reverseNextFrame(): void

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:388


transition โ€‹

โ–ธ transition(t): void

Parameters โ€‹

NameType
tnumber

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:395


setStyle โ€‹

โ–ธ setStyle(style): void

Parameters โ€‹

NameType
styleIObject

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:424


clearTimer โ€‹

โ–ธ clearTimer(fn?): void

Parameters โ€‹

NameType
fn?IFunction

Returns โ€‹

void

Defined in โ€‹

in/packages/animate/src/Animate.ts:428


destroy โ€‹

โ–ธ destroy(complete?): void

Parameters โ€‹

NameType
complete?boolean

Returns โ€‹

void

Implementation of โ€‹

IAnimate.destroy

Overrides โ€‹

Eventer.destroy

Defined in โ€‹

in/packages/animate/src/Animate.ts:435


on โ€‹

โ–ธ on(type, listener?, options?): void

Parameters โ€‹

NameType
typestring | string[] | IEventMap
listener?IFunction
options?IEventOption

Returns โ€‹

void

Implementation of โ€‹

IAnimate.on

Inherited from โ€‹

Eventer.on

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:20


off โ€‹

โ–ธ off(type?, listener?, options?): void

Parameters โ€‹

NameType
type?string | string[]
listener?IFunction
options?IEventOption

Returns โ€‹

void

Implementation of โ€‹

IAnimate.off

Inherited from โ€‹

Eventer.off

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:57


on_ โ€‹

โ–ธ on_(type, listener, bind?, options?): IEventListenerId

Parameters โ€‹

NameType
typestring | string[]
listenerIFunction
bind?IObject
options?IEventOption

Returns โ€‹

IEventListenerId

Implementation of โ€‹

IAnimate.on_

Inherited from โ€‹

Eventer.on_

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:100


off_ โ€‹

โ–ธ off_(id): void

Parameters โ€‹

NameType
idIEventListenerId | IEventListenerId[]

Returns โ€‹

void

Implementation of โ€‹

IAnimate.off_

Inherited from โ€‹

Eventer.off_

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:106


once โ€‹

โ–ธ once(type, listener, capture?): void

Parameters โ€‹

NameType
typestring | string[]
listenerIFunction
capture?boolean

Returns โ€‹

void

Implementation of โ€‹

IAnimate.once

Inherited from โ€‹

Eventer.once

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:113


emit โ€‹

โ–ธ emit(type, event?, capture?): void

Parameters โ€‹

NameType
typestring
event?IObject | IEvent
capture?boolean

Returns โ€‹

void

Implementation of โ€‹

IAnimate.emit

Inherited from โ€‹

Eventer.emit

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:117


emitEvent โ€‹

โ–ธ emitEvent(event, capture?): void

Parameters โ€‹

NameType
eventIEvent
capture?boolean

Returns โ€‹

void

Implementation of โ€‹

IAnimate.emitEvent

Inherited from โ€‹

Eventer.emitEvent

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:138


hasEvent โ€‹

โ–ธ hasEvent(type, capture?): boolean

Parameters โ€‹

NameType
typestring
capture?boolean

Returns โ€‹

boolean

Implementation of โ€‹

IAnimate.hasEvent

Inherited from โ€‹

Eventer.hasEvent

Defined in โ€‹

leafer/packages/event/src/Eventer.ts:143

Released under the MIT License.