DOCUMENTATION PIU Using After Effects Motion Data
Overview
Getting Started
BASE
Reference
Worker
Setup modules
COMMODETTO
Reference
Poco Renderer
Outlines
Creating Fonts
Crypt
Data
DEVICES
Moddable One
Moddable Two
Moddable Three
Moddable Four
Moddable Six
ESP32
ESP8266
nRF52
nRF52 Low Power Notes
Raspberry Pi Pico
M5Core Ink
M5Paper
Wasm
Zephyr
SiLabs Gecko
QCA4020
Moddable Zero
Moddable Display Developer Guide
DISPLAYS
Overview
Adafruit 1.8" ST7735
Adafruit OLED Display
BuyDisplay 2.8" CTP - ESP8266
Crystalfontz ePaper
DotStar
Generic 1.44"
Generic 2.4" & 2.8" (Resistive Touch) - ESP32
Generic 2.4" & 2.8" (Resistive Touch) - ESP8266
Generic 2.4" & 2.8" (Resistive Touch) - Pico
Sharp Memory
Sharp Memory Screen 1.3"
SparkFun TeensyView
Switch Science Reflective LCD
DRIVERS
DESTM32S display
DotStar display
ILI9341 display
LPM013M126A display
LS013B4DN04 display
MCP230XX GPIO expander
NeoStrand
SSD1306 display
SSD1351 display
ST7735 display
Files
IO
TC53 IO
Firmata
NETWORK
Reference
TLS (SecureSocket)
BLE
Ethernet
Web Things
PINS
Reference
Audio Output
PIU
Reference
Localization
Keyboard
Expanding Keyboard
Die Cut
Using After Effects Motion Data
TOOLS
Reference
Manifest
Defines in Manifests
Testing
XS
Handle
JavaScript language considerations on embedded devices using the XS engine
Mods – User Installed Extensions
ROM Colors
Using XS Preload to Optimize Applications
XS Conformance
XS Marshalling
XS Platforms
XS in C
XS linker warnings
xsbug
xst
XS Compartment
XS FFI
XS Profiler
XS Scopes

Using Adobe After Effects to export Moddable motion data

Copyright 2017 Moddable Tech, Inc.
Revised: September 26, 2017

Introduction

Adobe After Effects can be used to export motion data into a Moddable sample app for use in development.

Moddable motion control only supports position.

In AE only layers with assets are exported and only positions are exported. Scaling, rotation, transparency, etc. are not exported.

Piu interpolates linearly between values in the array. You can reduce the frame rate in After Effects to reduce the size of the arrays. Piu will animate between values based on defined time length of the motion effect.

Installing the export script in After Effects

Install the ae2piu.jsx script in the "scripts" folder within your After Effects application folder.

Exporting motion data

To run the script select "ae2piu.jsx" from the File -> Scripts menu.

When you run the export script in After Effects, it displays a dialog box to select a folder. Create a new folder the first time. The export script copies the assets and creates the manifest.json and main.js files for a complete Moddable application. To build the project and run in the Moddable Simulator use the following command.

cd <the folder you selected>
mcconfig -m

Notes

The length of the total animation is taken from the AE composition.

Time values are exported as milliseconds.

AE easing is not exported but Moddable easing can be added to the exported code.

Example: (null replaced by Math.quadEaseOut)

this.steps(ball, { x:ballX, y:ballY }, 2333, null, 0, 0);

this.steps(ball, { x:ballX, y:ballY }, 2333, Math.quadEaseOut, 0, 0);