Skip to content

Instantly share code, notes, and snippets.

View fgiering's full-sized avatar

Fabian fgiering

View GitHub Profile
@fgiering
fgiering / spreadVideosOverFrame.js
Created January 22, 2021 22:15
AfterEffectsExpressions
// For making a Videowall in After Effects
// Needs a Scale Layer ("scale") on top
var i = thisLayer.index - 2;
var videosInRow = 1920 / ((1920 / 100) * thisComp.layer("scale").transform.scale[0]);
var row = Math.floor(i / videosInRow);
if (row >= 1) {
var x = ((i - (videosInRow * row)) * 1920) * thisComp.layer("scale").transform.scale[0]/100;
var y = (Math.floor(i / videosInRow)*(1080*thisComp.layer("scale").transform.scale[0]/100));
@fgiering
fgiering / spreadObjectsInCircle.js
Last active January 23, 2021 16:09
AfterEffectsExpressions
// used for Adonia Herzschlag Animation to spread many hearts randomly over the Screen as a Circle
// needs a slider-control with name "Schieberegler" on a layer named "Null Crowd"
m = thisComp.layer("Null Crowd").effect("Spread")("Schieberegler")*100;
circleCentre = [960,540+m];
seedRandom(index,true);
circleRadius = random(90,m);
tRnd = degreesToRadians(random(thisComp.layer("Null Crowd").effect("Anordnung im Kreis")("Winkel")));
circleCentre + circleRadius*[Math.cos(tRnd)*2, Math.sin(tRnd)];