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
// "four cones" by dave :) | |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float 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]]; |
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
# Swap two Framer layers of different heights and reposition parent layers | |
# Special thanks to Niels http://stackoverflow.com/questions/39240373/framerjs-layer-with-dynamic-height-importing-layers-from-sketch (much cleaner than the original solution I wrote) | |
# Cowritten by Emily (https://github.com/xymostech) & Nick (https://github.com/mrnickbreen) at Khan Academy (https://github.com/khan) | |
stackLayers = (layerList, amountToReposition = 0) -> | |
for layer in layerList | |
layer.y = layer.y + amountToReposition | |
resizeParents = (layer, heightDifference) -> | |
if !layer.parent | |
return |
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
//JSON object | |
"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var r,n,o,u,f,a=gap,i=e[t];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(t)),"function"==typeof rep&&(i=rep.call(e,t,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?i+"":"null";case"boolean":case"null":return i+"";case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(u=i.length,r=0;u>r;r+=1)f[r]=str(r,i)||"null";return o=0===f.length?"[]":gap?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"["+f.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(u=rep.length,r=0;u>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,i),o&&f.push |
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
// Source: | |
// https://forums.adobe.com/thread/1471138 | |
function getCubicbeziers(){ | |
var curItem = app.project.activeItem; | |
var selectedLayers = curItem.selectedLayers; | |
var selectedProperties = app.project.activeItem.selectedProperties; | |
if (selectedLayers == 0){ | |
alert("Please Select at least one Layer"); | |
} else if(selectedLayers !=0){ |
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 comp = app.project.activeItem; | |
var layer = comp.selectedLayers[0]; | |
var numEffects = layer.Effects.numProperties; | |
var slider; | |
for(var i = 1; i<=numEffects; i++){ | |
var effectLayer = layer.Effects.property(i); | |
var matchName = effectLayer.matchName; | |
if(matchName == "ADBE Slider Control"){ |
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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |