![]() || 0.001: The || is a logical operator that means "or." This part is a safety net.If the layer is scaled up or down, the length will change, and thus the stroke width will adjust to maintain its visual thickness. By dividing the original stroke width by the length we just calculated, we're adjusting the stroke width based on the layer's scaling. value / length(.): Here's where the magic happens. ![]() So in this expression, it's finding the distance between the layer's anchor point and the diagonal point in composition space. length(): This function calculates the distance between two points.The numbers are the x and y coordinates of a point that's at a 45-degree angle from the anchor point, assuming the anchor point is at. toComp(): This is similar to the above but for a point that is diagonally offset from the anchor point.toComp(): This part gets the position of the layer's anchor point and translates it to the composition's space, which is basically the main working area in After Effects.value: This refers to the current value of the Stroke Width property before the expression is applied. How does this expression work? value / length(toComp(), toComp()) || 0.001
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |