Highlighted

## Using trim paths to animate in two directions

New Here ,
Jun 23, 2020

Copied

I am trying to animate a line using trim paths. I want the line to animate from the centre out i.e. from the centre animating both left and right. Is there anyway to do this?

TOPICS
How to

Views

178

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## Using trim paths to animate in two directions

New Here ,
Jun 23, 2020

Copied

I am trying to animate a line using trim paths. I want the line to animate from the centre out i.e. from the centre animating both left and right. Is there anyway to do this?

TOPICS
How to

Views

179

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 23, 2020 0
2 Replies 2
Most Valuable Participant ,
Jun 23, 2020

Copied

Split the path at the center and apply two separate strokes and trim operators. Everything else would be a nightmare, since there's no easy way to calculate the percentages.

Mylenium

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 23, 2020 0
LATEST
Jun 23, 2020

Copied

Trim Paths give you the ability to animate the start and end of a line as well as the offset. The start and end values are percentages so the math is easy. An offset of - 180º makes the start or end animation begin exactly halfway through the line.

By far the easiest way to have a line form from both ends and meet in the exact middle or grow from the middle is to animate the End from zero to 100% and the offset from 0º to -180º to make a line start at the end or animate the Start from 100% to 0% and the Offset from 0º to -180º.

The other way would be to animate the Start from 50% to 0% and the End from 50% to 100%. Either one of these techniques will do what you ask and you can offset the meeting point or starting point by simply adjusting the percentages.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 23, 2020 0