Gareso

[CORRECTION]

Hi everyone!

Just wanted to give a heads up on a wrong information I gave on TUTORIAL #1
(This comment in pinned on the video as well)

There is a mistake on that video when I'm talking about looping the dashes (or dots)!
I was wrong when I told you to add the stroke width plus 1 for each property. I was tricked by the numbers :P
The loop has nothing to do with the stroke width.

What happens is that, If you have a straight line, you don't have to add or subtract anything. The numbers should add up to whatever your "sourceRectAtTime" gave you. However, when we add points to the line and change its shape, the actual length of the line changes... So, to find out what's the number you should add to one of the properties to make it loop properly, you can simply zoom to the last point of your line where the loop begins and scrub the OFFSET Value to the left (it will be a negative value) until the last dot (or the start of a dash) aligns to the last point of your line. Then, you add this value (not the stroke width + 1 for each property like I said) to one of your properties.

So, in short:

Let's say our SourceRectAtTime().width gave us 1600.
- After you divided this number between the properties, you have to find the OFFSET Value that aligns the start of the last dash to the last point of your line (let's say it's -54)... So you have...

dash:0
gap:800
dash:0
gap:800 (+ 54) = 854


And now it loops properly :D

Huge thanks to Jennifer Dzielo for bringing that up!


Sorry about my mistake :/

6 years ago (edited) | [YT] | 37



@BenMarriott 

Haha, thanks for the correction! This is so thorough. More information than most other channels tutorials.

6 years ago | 1  

@jaypathak13

Aah no worries mate... Your content is super dope....

6 years ago | 2