API / geotoolkit / animation / effects / AbstractEffect / AbstractEffect
effects.AbstractEffect.AbstractEffect
Defines abstract animation effect, API is subset of SMIL animation with two extensions:
- Can accept param 'function' - like transition-timing-function in CSS
- Can accept value 'auto' as 'begin' parameter - animation will run automatically when animated attribute is changed.
Constructors
Methods
Constructors
• new AbstractEffect(options?)
Defines abstract animation effect
| Name | Type | Description |
|---|---|---|
Optional options | Options | object that contains effect options |
Accessors
• get _active(): boolean
Deprecated
since 5.0. Use getActive() instead
boolean
• set _active(active): void
Deprecated
since 5.0. Use setActive() instead
| Name | Type |
|---|---|
active | boolean |
void
• Protected get _attr(): string
Deprecated
since 5.0. Use getAttributeName() instead
string
• Protected set _attr(attr): void
Deprecated
since 5.0. Use setAttributeName() instead
| Name | Type |
|---|---|
attr | string |
void
• get _begin(): string | number
Deprecated
since 5.0. Use getBegin() instead
string | number
• set _begin(begin): void
Deprecated
since 5.0. Use setBegin() instead
| Name | Type |
|---|---|
begin | string | number |
void
• Protected get _processor(): AbstractProcessor<any>
Deprecated
since 5.0. Use getProcessor() instead
AbstractProcessor<any>
• Protected set _processor(processor): void
Deprecated
since 5.0. Use setProcessor() instead
| Name | Type |
|---|---|
processor | AbstractProcessor<any> |
void
• get _repeatCount(): number
Deprecated
since 5.0. Use getRepeatCount() instead
number
• set _repeatCount(repeatCount): void
Deprecated
since 5.0. Use setRepeatCount() instead
| Name | Type |
|---|---|
repeatCount | number |
void
• get _state(): Object
Deprecated
since 5.0. Use getState() instead
Object
| Name | Type |
|---|---|
current? | any |
repeat? | number |
start? | number |
• set _state(state): void
Deprecated
since 5.0. Use setState() instead
| Name | Type |
|---|---|
state | Object |
Optional state.current | any |
Optional state.repeat | number |
Optional state.start | number |
void
• get _style(): AnimationStyle
Deprecated
since 5.0. Use getStyle() instead
• set _style(style): void
Deprecated
since 5.0. Use setStyle() instead
| Name | Type |
|---|---|
style | AnimationStyle |
void
• get _timeOffset(): number
Deprecated
since 5.0. Use getTimeOffset() instead
number
• set _timeOffset(timeOffset): void
Deprecated
since 5.0. Use setTimeOffset() instead
| Name | Type |
|---|---|
timeOffset | number |
void
• get _to(): any
Deprecated
since 5.0. Use getTo() instead
any
• set _to(to): void
Deprecated
since 5.0. Use setTo() instead
| Name | Type |
|---|---|
to | any |
void
• Protected get _type(): string
Deprecated
since 5.0. Use getTo() instead
string
• Protected set _type(type): void
Deprecated
since 5.0. Use setTo() instead
| Name | Type |
|---|---|
type | string |
void
• Protected get _unit(): string
Deprecated
since 5.0. Use getTo() instead
string
• Protected set _unit(unit): void
Deprecated
since 5.0. Use setTo() instead
| Name | Type |
|---|---|
unit | string |
void
• get _values(): any[]
Deprecated
since 5.0. Use getTo() instead
any[]
• set _values(values): void
Deprecated
since 5.0. Use setTo() instead
| Name | Type |
|---|---|
values | any[] |
void
Methods
▸ apply(node): void
Applies effect to node and invalidate it To add animation support to target class create new Animation Effect by inherit from this class, and override method 'apply' to apply intermediate value to target class (for example with setters)
| Name | Type | Description |
|---|---|---|
node | AnimatedNode | target node |
void
▸ Protected ended(): void
Called immediately after the effect ends.
void
▸ getActive(): boolean
Returns active state
boolean
active state
▸ getAnimatedValue(node): any
Extracts value which can animated from node
| Name | Type | Description |
|---|---|---|
node | Node | animated node |
any
▸ getAttributeName(): string
Returns attribute name
string
attribute name
▸ getBegin(): string | number
Returns begin value
string | number
begin value
▸ getClassName(): string
string
▸ getCurrentValue(): any
Returns current value, which should be applied
any
▸ Protected getProcessor(): AbstractProcessor<any>
Get processor, which will be used for calculate intermediate values
AbstractProcessor<any>
▸ getRepeatCount(): number
Returns repeat count
number
▸ getState(): Object
Return state
Object
| Name | Type |
|---|---|
current? | any |
repeat? | number |
start? | number |
▸ getStyle(): AnimationStyle
Return style owner
style owner
▸ getTimeOffset(): number
Return time offset
number
time offset
▸ getTimeSegmentIndex(time): number
Gets the number of the time segment.
| Name | Type | Description |
|---|---|---|
time | number | time from effect's start |
number
result time segment
▸ getTo(): any
Return to value
any
to value
▸ Protected getTransformation(node): Transformation
Returns transformation, that will be applied to the node
| Name | Type | Description |
|---|---|---|
node | AnimatedNode | target node |
transformation
▸ Protected getType(): string
Returns effect type
string
effect type
▸ Protected getUnit(): string
Return effect unit
string
effect unit
▸ getValues(): any[]
return values
any[]
▸ isApplicable(effect, node): boolean
Returns true if this class can accept passed effect as a parameter
boolean
▸ run(owner): AbstractEffect
Runs effect after creation
| Name | Type | Description |
|---|---|---|
owner | AnimationStyle | owner style |
this
▸ setActive(active): AbstractEffect
Set active state
| Name | Type | Description |
|---|---|---|
active | boolean | active state |
this
▸ setAttributeName(attribute): AbstractEffect
Set attribute name
| Name | Type | Description |
|---|---|---|
attribute | string | attribute name |
this
▸ setBegin(begin): AbstractEffect
Set begin balue
| Name | Type | Description |
|---|---|---|
begin | string | number | begin value |
this
▸ Protected setProcessor(processor): AbstractEffect
Set processor, which will be used for calculate intermediate values
| Name | Type | Description |
|---|---|---|
processor | AbstractProcessor<any> | processor for calculate intermediate values |
▸ setState(state): AbstractEffect
Set State
| Name | Type | Description |
|---|---|---|
state | Object | state of effect |
Optional state.current | any | |
Optional state.repeat | number | |
Optional state.start | number |
this
▸ setStyle(style): AbstractEffect
Set style owner
| Name | Type | Description |
|---|---|---|
style | AnimationStyle | style owner |
this
▸ setTimeOffset(timeOffset): AbstractEffect
Set time offset
| Name | Type | Description |
|---|---|---|
timeOffset | number | time offset |
this
▸ setTo(to): AbstractEffect
Set to value
| Name | Type | Description |
|---|---|---|
to | any | to value |
this
▸ Protected setType(type): AbstractEffect
Set effect type
| Name | Type | Description |
|---|---|---|
type | string | effect type |
this
▸ Protected setUnit(unit): AbstractEffect
Set effect unit
| Name | Type |
|---|---|
unit | string |
this
▸ setValues(values): void
Sets a collection of values to the internal value list. After the values have been added, key times will be recalculated.
| Name | Type | Description |
|---|---|---|
values | any[] | Values to be added to the internal collection |
void
▸ Protected started(): void
Called immediately after the effect begins.
void
▸ stop(node): void
Stop effect
| Name | Type | Description |
|---|---|---|
node | AnimatedNode | target node |
void
▸ Static fromObject(object?): AbstractEffect
Create or get effect from object
| Name | Type | Description |
|---|---|---|
Optional object | AbstractEffect | Options | effect |
effect
▸ Static getClassName(): string
string