Skip to content

Instantly share code, notes, and snippets.

View juancabrera's full-sized avatar

Juan Cabrera juancabrera

View GitHub Profile
@juancabrera
juancabrera / README.md
Created September 6, 2018 17:05
Creating a JavaScript build for AR Studio with Webpack and Babel

Creating a JavaScript build for AR Studio with Webpack and Babel.

Scripting in AR Studio might be difficult sometimes, having all the code in one file is not ideal, hard for collaboration and quite likely to be messy. Here is a simple guide to have a super simple web-like JavaScript build that allows you to have the all files and the structure you want.

Sample project (or use your own)

Get the sample project from this page (Mug.zip), unzip it and go to the Mug Finished Effect folder. Or, use your own project.

JavaScript build

@juancabrera
juancabrera / deploy.js
Created November 17, 2016 21:06
Deploy a Node Lambda function
// deploy.js
// how to: http://code.juan.me/how-to-deploy-a-node-lambda-function/
//
const AWS = require('aws-sdk')
const fs = require('fs')
AWS.config.update({region: 'us-east-1'})
const lambda = new AWS.Lambda()
const lambdaFunctionName = 'yourFunctionName'
@juancabrera
juancabrera / getCubicBezier.jsx
Last active April 25, 2021 01:43
After Effect Script for getting the cubic-bezier (css friendly) of a specific layer's transition
// 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){