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
const note = dv.current(); | |
function checkEmpty(field) { | |
return field ? field : ""; | |
} | |
let wounds = checkEmpty(note.wounds); | |
let maxWounds = checkEmpty(note.max_wounds); | |
let health = note.health ? `(${note.health})` : "(-)"; | |
let maxHealth = note.max_health ? `(${note.max_health})` : "(-)"; |
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
anim = value + time * -30; // regular offset animation | |
st = thisProperty.propertyGroup(4).content("Trim Paths 1").start/100; // Trim Path animation | |
p = thisProperty.propertyGroup(4).content("Path 1").path.points(); // Vector Path (no tangent) | |
n=0; | |
for(i=0;i<p.length-1;i++){ | |
n += length( p[i],p[i+1]); | |
} | |
smartStart = n*st; |
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
n = 0; | |
if (numKeys > 0) { | |
n = nearestKey(time).index; | |
if (key(n).time > time) { | |
n--; | |
} | |
} | |
if (n == 0) { | |
time - inPoint; | |
} else { |
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
t = -inPoint + time; //to start at 0 | |
d = comp(name).duration; | |
n = Math.round( t % d*100 )/100; //get rid of the floating | |
( n == d ) ? 0 : n; |
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
n = 0; | |
if (marker.numKeys > 0) { | |
n = marker.nearestKey(time).index; | |
if (marker.key(n).time > time) { | |
n--; | |
} | |
} | |
if (n == 0) { | |
value; | |
} else { |
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
rec = thisProperty.propertyGroup(4).content("Rectangle Path 1"); | |
corner = rec.roundness; | |
x = rec.size[0]; | |
y = rec.size[1]; | |
myGaps = thisProperty.propertyGroup(1).gap; | |
diametre = Math.min(corner, Math.min(Math.max(0, x), y) / 2) * 2; // get the corrected curvature | |
perimetre = (x + y - diametre * 2) * 2 + diametre * Math.PI; | |
perimetre / Math.round(value) - myGaps; |
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++) { |
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
/* 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
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]; | |
} |
NewerOlder