@twick/timeline / Exports / ImageElement
Class: ImageElement
Hierarchy
-
↳
ImageElement
Table of contents
Constructors
Properties
Methods
- accept
- addFrameEffect
- getAnimation
- getBackgroundColor
- getDuration
- getEnd
- getFrame
- getFrameEffects
- getId
- getName
- getObjectFit
- getParentSize
- getPosition
- getProps
- getStart
- getTrackId
- getType
- setAnimation
- setBackgroundColor
- setEnd
- setFrame
- setFrameEffects
- setId
- setMediaFilter
- setName
- setObjectFit
- setParentSize
- setPosition
- setProps
- setSrc
- setStart
- setTrackId
- setType
- updateImageMeta
Constructors
constructor
• new ImageElement(src, parentSize): ImageElement
Parameters
| Name | Type |
|---|---|
src | string |
parentSize | Size |
Returns
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:16
Properties
animation
• Protected Optional animation: ElementAnimation
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:13
backgroundColor
• Protected backgroundColor: string
Defined in
packages/timeline/src/core/elements/image.element.ts:9
e
• Protected e: number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:10
frame
• frame: Frame
Defined in
packages/timeline/src/core/elements/image.element.ts:13
frameEffects
• Optional frameEffects: ElementFrameEffect[]
Defined in
packages/timeline/src/core/elements/image.element.ts:12
id
• Protected id: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:7
name
• Protected name: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:12
objectFit
• Protected objectFit: ObjectFit
Defined in
packages/timeline/src/core/elements/image.element.ts:11
parentSize
• Protected parentSize: Size
Defined in
packages/timeline/src/core/elements/image.element.ts:10
props
• Protected props: ImageProps
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:14
s
• Protected s: number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:9
trackId
• Protected trackId: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:11
type
• Protected type: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:8
Methods
accept
▸ accept<T>(visitor): T
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
visitor | ElementVisitor<T> |
Returns
T
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:126
addFrameEffect
▸ addFrameEffect(frameEffect): ImageElement
Parameters
| Name | Type |
|---|---|
frameEffect | ElementFrameEffect |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:121
getAnimation
▸ getAnimation(): undefined | ElementAnimation
Returns
undefined | ElementAnimation
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:59
getBackgroundColor
▸ getBackgroundColor(): string
Returns
string
Defined in
packages/timeline/src/core/elements/image.element.ts:43
getDuration
▸ getDuration(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:43
getEnd
▸ getEnd(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:39
getFrame
▸ getFrame(): Frame
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:35
getFrameEffects
▸ getFrameEffects(): undefined | ElementFrameEffect[]
Returns
undefined | ElementFrameEffect[]
Defined in
packages/timeline/src/core/elements/image.element.ts:39
getId
▸ getId(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:27
getName
▸ getName(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:55
getObjectFit
▸ getObjectFit(): ObjectFit
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:47
getParentSize
▸ getParentSize(): Size
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:31
getPosition
▸ getPosition(): Position
Returns
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:51
getProps
▸ getProps(): Record<string, any>
Returns
Record<string, any>
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:51
getStart
▸ getStart(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:35
getTrackId
▸ getTrackId(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:47
getType
▸ getType(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:31
setAnimation
▸ setAnimation(animation?): ImageElement
Parameters
| Name | Type |
|---|---|
animation? | ElementAnimation |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:100
setBackgroundColor
▸ setBackgroundColor(backgroundColor): ImageElement
Parameters
| Name | Type |
|---|---|
backgroundColor | string |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:106
setEnd
▸ setEnd(e): ImageElement
Parameters
| Name | Type |
|---|---|
e | number |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:85
setFrame
▸ setFrame(frame): ImageElement
Parameters
| Name | Type |
|---|---|
frame | Frame |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:90
setFrameEffects
▸ setFrameEffects(frameEffects?): ImageElement
Parameters
| Name | Type |
|---|---|
frameEffects? | ElementFrameEffect[] |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:116
setId
▸ setId(id): ImageElement
Parameters
| Name | Type |
|---|---|
id | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:70
setMediaFilter
▸ setMediaFilter(mediaFilter): ImageElement
Parameters
| Name | Type |
|---|---|
mediaFilter | string |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:101
setName
▸ setName(name): ImageElement
Parameters
| Name | Type |
|---|---|
name | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:95
setObjectFit
▸ setObjectFit(objectFit): ImageElement
Parameters
| Name | Type |
|---|---|
objectFit | ObjectFit |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:85
setParentSize
▸ setParentSize(parentSize): ImageElement
Parameters
| Name | Type |
|---|---|
parentSize | Size |
Returns
Defined in
packages/timeline/src/core/elements/image.element.ts:96
setPosition
▸ setPosition(position): ImageElement
Parameters
| Name | Type |
|---|---|
position | Position |
Returns
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:73
setProps
▸ setProps(props): ImageElement
Parameters
| Name | Type |
|---|---|
props | Omit<any, "src"> |
Returns
Overrides
Defined in
packages/timeline/src/core/elements/image.element.ts:111
setSrc
▸ setSrc(src): Promise<ImageElement>
Parameters
| Name | Type |
|---|---|
src | string |
Returns
Promise<ImageElement>
Defined in
packages/timeline/src/core/elements/image.element.ts:79
setStart
▸ setStart(s): ImageElement
Parameters
| Name | Type |
|---|---|
s | number |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:80
setTrackId
▸ setTrackId(trackId): ImageElement
Parameters
| Name | Type |
|---|---|
trackId | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:90
setType
▸ setType(type): ImageElement
Parameters
| Name | Type |
|---|---|
type | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:75
updateImageMeta
▸ updateImageMeta(updateFrame?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
updateFrame | boolean | true |
Returns
Promise<void>