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
type RGBA = [number, number, number, number]; | |
const rgb255 = (v: number) => (v < 255 ? (v > 0 ? v : 0) : 255); | |
const b1 = (v: number) => (v > 0.0031308 ? v ** (1 / 2.4) * 269.025 - 14.025 : v * 3294.6); | |
const b2 = (v: number) => (v > 0.2068965 ? v ** 3 : (v - 4 / 29) * (108 / 841)); | |
const a1 = (v: number) => (v > 10.314724 ? ((v + 14.025) / 269.025) ** 2.4 : v / 3294.6); | |
const a2 = (v: number) => (v > 0.0088564 ? v ** (1 / 3) : v / (108 / 841) + 4 / 29); | |
function fromHCL(h: number, c: number, l: number): RGB { | |
const y = b2((l = (l + 16) / 116)); | |
const x = b2(l + (c / 500) * Math.cos((h *= Math.PI / 180))); |
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
/** MIT License github.com/pushkine/ */ | |
function cubicBezier(x1: number, y1: number, x2: number, y2: number) { | |
if (!(x1 >= 0 && x1 <= 1 && x2 >= 0 && x2 <= 1)) | |
throw new Error(`CubicBezier x1 & x2 values must be { 0 < x < 1 }, got { x1 : ${x1}, x2: ${x2} }`); | |
const ax = 1.0 - (x2 = 3.0 * (x2 - x1) - (x1 *= 3.0)) - x1, | |
ay = 1.0 - (y2 = 3.0 * (y2 - y1) - (y1 *= 3.0)) - y1; | |
let i = 0, r = 0.0, s = 0.0, d = 0.0, x = 0.0; | |
return (t: number) => { | |
for (r = t, i = 0; 32 > i; i++) | |
if (1e-5 > Math.abs((x = r * (r * (r * ax + x2) + x1) - t))) return r * (r * (r * ay + y2) + y1); |
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
/** | |
* Generates a Key Byte | |
* @param {32bit integer} seed e.g. 0xA2791717 | |
* @param {8bit integer} a | |
* @param {8bit integer} b | |
* @param {8bit integer} c | |
* @return {8bit hex string} | |
*/ | |
function PKV_GetKeyByte(seed, a, b, c) { | |
var result; |
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
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// opensimplexnoise code in another tab might be necessary | |
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
int[][] result; | |
float t, c; | |
float ease(float p) { |
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
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<AfterEffectsProject xmlns="http://www.adobe.com/products/aftereffects" majorVersion="1" minorVersion="0"> | |
<svap bdata="077886a6"/> | |
<head bdata="005c000e077886a680000000000000f400007485"/> | |
<nhed bdata="0000000000000000000100001e10020000000000006cee80000060000089a9f0"/> | |
<nnhd bdata="0000000000000000000100000000001e000000100200000000000000006cee80000060000089a9f0"/> | |
<adfr bdata="40e7700000000000"/> | |
<Pefl> | |
</Pefl> | |
<qtlg bdata="00"/> |
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
// Marker Sync Expression | |
// Modified expression based on Dan Ebbert's Marker Sync Expression | |
// Original Version: http://www.motionscript.com/design-guide/marker-sync.html | |
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM&t=698s | |
src = comp(name).layer("Markers"); | |
n = 0; | |
if (marker.numKeys > 0) { | |
n = marker.nearestKey(time).index; | |
if (marker.key(n).time > time) { |
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
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
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
//dynamic parenting for 3d layers | |
//from Dan Ebberts on forums I think.. | |
//Position | |
L=thisComp.layer("Object center"); | |
L.toWorld(L.effect(name)("3D Point")); | |
//Scale | |
L =thisComp.layer("Object center"); | |
[L.transform.scale[0]/100*value[0],L.transform.scale[1]/100*value[1],L.transform.scale[2]/100*value[2]]; |
NewerOlder