Search
Preparing search index...
The search index is not available
@yiwo/ycad
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@yiwo/ycad
Animation
Class Animation<TgtT, PropT>
Type parameters
TgtT
:
Partial
<
AnimationTarget
>
PropT
:
PropType
Hierarchy
Animation
CustomAnim
PropAnim
PositionAnim
RotationAnim
AlphaAnim
ColorAnim
PathAnim
ScaleAnim
Index
Constructors
constructor
Properties
_duration
_interpolator
_tgt
_tween
_update
Callback
Accessors
group
Methods
chain
ease
Func
get
Group
initialize
on
Complete
on
Start
on
Stop
on
Update
repeat
start
stop
update
Constructors
constructor
new
Animation
<
TgtT
,
PropT
>
(
tgt
:
TgtT
, duration
:
number
, interpolator
:
AnimInterpolator
)
:
Animation
<
TgtT
,
PropT
>
Type parameters
TgtT
:
Partial
<
AnimationTarget
>
PropT
:
PropType
Parameters
tgt:
TgtT
duration:
number
interpolator:
AnimInterpolator
Returns
Animation
<
TgtT
,
PropT
>
Properties
Protected
_duration
_duration
:
number
Protected
Readonly
_interpolator
_interpolator
:
AnimInterpolator
Protected
_tgt
_tgt
:
TgtT
Protected
Optional
_tween
_tween
?:
Tween
<
PropT
>
Protected
Optional
_update
Callback
_update
Callback
?:
(
tgt
:
TgtT
, prop
:
PropT
, elapsed
:
number
)
=>
void
Type declaration
(
tgt
:
TgtT
, prop
:
PropT
, elapsed
:
number
)
:
void
Parameters
tgt:
TgtT
prop:
PropT
elapsed:
number
Returns
void
Accessors
Protected
group
get
group
(
)
:
undefined
|
Group
Returns
undefined
|
Group
Methods
chain
chain
<
T2
,
P2
>
(
next
:
Animation
<
T2
,
P2
>
)
:
Animation
<
TgtT
,
PropT
>
Type parameters
T2
:
Partial
<
AnimationTarget
>
P2
:
PropType
Parameters
next:
Animation
<
T2
,
P2
>
Returns
Animation
<
TgtT
,
PropT
>
Protected
ease
Func
ease
Func
(
)
:
(
amount
:
number
)
=>
number
Returns
(
amount
:
number
)
=>
number
(
amount
:
number
)
:
number
Parameters
amount:
number
Returns
number
Protected
get
Group
get
Group
(
t
?:
null
|
Partial
<
AnimationTarget
>
)
:
undefined
|
Group
Parameters
Optional
t:
null
|
Partial
<
AnimationTarget
>
Returns
undefined
|
Group
Protected
initialize
initialize
(
from
:
PropT
, to
:
PropT
)
:
Tween
<
PropT
>
Parameters
from:
PropT
to:
PropT
Returns
Tween
<
PropT
>
on
Complete
on
Complete
(
callback
:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
)
:
Animation
<
TgtT
,
PropT
>
Parameters
callback:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
(
tgt
:
TgtT
, prop
:
PropT
)
:
void
Parameters
tgt:
TgtT
prop:
PropT
Returns
void
Returns
Animation
<
TgtT
,
PropT
>
on
Start
on
Start
(
callback
:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
)
:
Animation
<
TgtT
,
PropT
>
Parameters
callback:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
(
tgt
:
TgtT
, prop
:
PropT
)
:
void
Parameters
tgt:
TgtT
prop:
PropT
Returns
void
Returns
Animation
<
TgtT
,
PropT
>
on
Stop
on
Stop
(
callback
:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
)
:
Animation
<
TgtT
,
PropT
>
Parameters
callback:
(
tgt
:
TgtT
, prop
:
PropT
)
=>
void
(
tgt
:
TgtT
, prop
:
PropT
)
:
void
Parameters
tgt:
TgtT
prop:
PropT
Returns
void
Returns
Animation
<
TgtT
,
PropT
>
on
Update
on
Update
(
callback
:
(
tgt
:
TgtT
, prop
:
PropT
, elapsed
:
number
)
=>
void
)
:
Animation
<
TgtT
,
PropT
>
Parameters
callback:
(
tgt
:
TgtT
, prop
:
PropT
, elapsed
:
number
)
=>
void
(
tgt
:
TgtT
, prop
:
PropT
, elapsed
:
number
)
:
void
Parameters
tgt:
TgtT
prop:
PropT
elapsed:
number
Returns
void
Returns
Animation
<
TgtT
,
PropT
>
repeat
repeat
(
times
:
number
, reverse
?:
boolean
)
:
Animation
<
TgtT
,
PropT
>
Parameters
times:
number
reverse:
boolean
= true
Returns
Animation
<
TgtT
,
PropT
>
start
start
(
time
?:
number
)
:
Animation
<
TgtT
,
PropT
>
Parameters
Optional
time:
number
Returns
Animation
<
TgtT
,
PropT
>
stop
stop
(
)
:
Animation
<
TgtT
,
PropT
>
Returns
Animation
<
TgtT
,
PropT
>
Protected
Abstract
update
update
(
prop
:
PropT
, elapsed
:
number
)
:
any
Parameters
prop:
PropT
elapsed:
number
Returns
any
Exports
Animation
constructor
_duration
_interpolator
_tgt
_tween
_update
Callback
group
chain
ease
Func
get
Group
initialize
on
Complete
on
Start
on
Stop
on
Update
repeat
start
stop
update
Generated using
TypeDoc