All our expressions are written for the newer JavaScript Expressions Engine

Blog

How to use the JavaScript expression engine

Photo of Tim Haywood
Tim Haywood

|

July 24, 2020

With the release of After Effects version 16 (October 15, 2018), a new engine for running expressions was added, called the JavaScript engine.

The JavaScript engine is available in After Effects CC2019 and later.

Previous versions of After Effects used the ExtendScript engine, which ran code written in a version of JavaScript released in 1999, known as ECMAScript 3.

JavaScript is an evolving language, with features added since 1999 that greatly improve the coding experience. These new features aren't available in the ExtendScript engine, as it can only interpret the older version of the language.

Setting the engine of your project

You can make sure that your project is using the JavaScript engine by going to File > Project Settings > Expressions and setting the Expressions Engine to JavaScript.

Expressions Panel of After Effects Project Settings

Differences in the JavaScript engine

When you set your project to the JavaScript Engine, your expressions pre-processed by After Effects, then executed using third party tools that can interpret all the modern features built into the language.

The tool used depends on your operating system:

  • On macOS: Apple's JavaScriptCore framework
  • On Windows: Google's open source V8 Engine

These tools are updated to match the new features added into the ECMAScript Specification, as they are approved by the governing committee TC39.

Some of the new features available in modern versions of JavaScript include:

For a list of differences between using the JavaScript and ExtendScript engines, see this article from Adobe

Why we use the JavaScript engine

The expressions on Motion Developer are all built to run in the JavaScript engine, and they will not work in the ExtendScript engine.

This is due to the features available in modern versions of JavaScript making writing expressions faster, more powerful, and more enjoyable.

motion developer loves javascript

We believe learning to write expressions with these new features is worthwhile, and teaching After Effects users modern JavaScript is a large part of what we do.

To learn the basics of writing expressions in the JavaScript engine, see our Expression Basics course.

Blog

For enquiries contact us at hey@motiondeveloper.com