This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Used to offset the dashes of a stroke while the trim start is animated. | |
start = thisProperty.propertyGroup(4).content("Trim Paths 1").start; // Path to the Trim Path's start slider | |
path = thisProperty.propertyGroup(4).content("Path 1").path; // Path to the vector path | |
n = 0; | |
for (i = 0; i < path.points().length - 1; i++) { | |
n += length(path.points()[i], path.points()[i + 1]); // Sum of all the length between two points | |
} | |
offset = start * n / 100; // offset the dashes to stay in place while start is animated | |
value + offset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poz = content("Group 1").transform.position; // Cicrle Position | |
centre= [0,0]; // PIVOT POINT | |
cx = poz[0]; | |
cy = poz[1]; | |
diametre = content("Group 1").content("Ellipse Path 1").size; | |
r = diametre[1] / 2; | |
P = length( centre , [Math.abs(cx), Math.abs(cy)]); | |
// ZEROED // | |
if ( P < r) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array = [1,3,4,2]; | |
// Output an array as a string separated with the argument's contents. | |
array.join(", ") | |
//1, 3, 4, 2 | |
// Outputs a string with elements separated by commas. | |
array.toString() | |
//1,3,4,2 | |
// Sort an array alphabetically or numerically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myString = "abcdef"; | |
// Outputs 2 characters, starting after the first character. | |
myString.substr(1, 2) | |
//"bc" | |
// Outputs everything after the first character, through the second character. | |
myString.substring(1) | |
//"bcdef | |
// Converts the string to all uppercase letters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
name convention: | |
[1,2,3,4] | |
["sin","cos","square","saw","tri"] | |
or | |
["sine","cosine","square",sawtooth","triangle"] | |
*/ | |
function oscillate(w,f,a,t) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Rename the Trim Path to the following: | |
left,l,LEFT,L | |
right,r,RIGHT,R | |
top,t,TOP,T | |
bottom,b,BOTTOM,B | |
*/ | |
// TO PLACE ON TRIM.END | |
Rectangle = thisProperty.propertyGroup(3).content("Rectangle Path 1").size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = effect("radius")(1); | |
vertex=[]; | |
iTang=[]; | |
oTang=[]; | |
for(i=0;i<4;i++){ | |
j= i+2; | |
vertex[i]= [ Math.cos(Math.PI/2 * (j+1) ) , Math.cos(Math.PI/2 * j ) ] * r; | |
iTang[i]=[ Math.cos(Math.PI/2 * j ) , Math.cos(Math.PI/2 * (j-1) ) ] * r * .5523 ; | |
oTang[i]= -iTang[i]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To keep the same scale */ | |
L=thisLayer; | |
s=transform.scale.value; | |
while(L.hasParent){ | |
L=L.parent; | |
for(i=0;i<s.length;i++) // Apply it on the array | |
s[i] *= 100/L.scale.value[i]; | |
} | |
s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//based on https://workbench.tv/tutorials/2019-05-10_LoopingNoise | |
amplitude = 100; | |
freq = .5; // loop/second | |
ofst = 0 ; //offset from 0 to 1 | |
sed = 0; // seed | |
s = .1 ; // complexity | |
a = (time + ofst/freq ) * 2 * Math.PI * freq ; | |
x = Math.cos(a) * s + sed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nCharac = 5; // How many characters / line | |
lines = 3; // How many lines | |
dur = 10; // frames holding | |
seed = 0; | |
r = ""; | |
i = seed + index; | |
seedRandom((dur == 0) ? i : i + Math.floor(time / dur / thisComp.frameDuration), 1); | |
for (j = 0; j < lines; j++) { | |
for (i = 0; i < nCharac; i++) { |
OlderNewer