Skip to content

Wiggle API / SVGGroup

Interface: SVGGroup

An imported SVG, a group of vector path layers. Animate it as a whole through the group verbs, or reach individual shapes with find and child.

Extends

Properties

enter

readonly enter: GroupMotion

Entrance motion applied to the whole group.

Inherited from

Group.enter


exit

readonly exit: ExitMotion

Exit motion applied to the whole group.

Inherited from

Group.exit

Methods

add()

add<T>(node): T

Type Parameters

T

T extends Node | Group

Parameters

node

T

Returns

T

Inherited from

Group.add


at()

at(time): Group

Set when this group's entrance begins, in seconds from scene start.

Parameters

time

Duration

Returns

Group

Inherited from

Group.at


child()

child(index): PathLayer & SVGGroup

The direct child at index in document order: a sub-group when the drawing nests <g> elements, otherwise a shape.

Parameters

index

number

Returns

PathLayer & SVGGroup

Overrides

Group.child


find()

find(name): PathLayer & SVGGroup

The element whose SVG id matches name, searched through the whole drawing. A <g id="..."> group resolves to that sub-group (animatable as a unit, pivoting on its own center); a shape resolves to its path layer. Throws, listing the available ids, when nothing matches; a duplicate id resolves to the first in document order.

Parameters

name

string

Returns

PathLayer & SVGGroup

Overrides

Group.find


morph()

morph(targets, opts?): SVGGroup

Morph a single-shape SVG as a whole. A multi-shape SVG cannot morph as one outline; reach a specific shape with child(index).morph instead.

Parameters

targets

MorphTarget[]

opts?
at?

Duration

duration?

Duration

ease?

Easing

Returns

SVGGroup


morphTo()

morphTo(target, opts?): SVGGroup

Parameters

target

MorphTarget

opts?
at?

Duration

duration?

Duration

ease?

Easing

Returns

SVGGroup


moveTo()

moveTo(x, y, opts?): Group

Parameters

x

number

y

number

opts?
at?

Duration

duration?

Duration

ease?

Easing

Returns

Group

Inherited from

Group.moveTo


name()

name(label): Group

Name this group so a parent can reach it with find, and the studio shows it.

Parameters

label

string

Returns

Group

Inherited from

Group.name


rotateTo()

rotateTo(degrees, opts?): Group

Parameters

degrees

number

opts?
at?

Duration

duration?

Duration

ease?

Easing

Returns

Group

Inherited from

Group.rotateTo


scaleTo()

scaleTo(scale, opts?): Group

Parameters

scale

number

opts?
at?

Duration

duration?

Duration

ease?

Easing

Returns

Group

Inherited from

Group.scaleTo


x()

x(value): Group

Parameters

value

number

Returns

Group

Inherited from

Group.x


y()

y(value): Group

Parameters

value

number

Returns

Group

Inherited from

Group.y