Motion Corporation
Developer Section

This documents the full API of Motion Corporation App object.

<!-- Import Motion Corporation services -->
<script type="text/javascript" src=""></script>
var APPID = "your_app_id_goes_here";
var app =; = function () {

run() is invoked when all the motions are ready to use. Application specific code should be kicked off from this method.

init() starts app initialisation process.

app.motions is a dictory containing motions. Use motion names as key.


The App object has its own readystate property

app.STATE = Object.freeze({
    INIT: "init",
    CTX: "context",
    OPEN: "open",
    CLOSED: "closed"

app.readyState // getter
app.on("readystatechange", handler);

// example
if (app.readyState === app.STATE["OPEN"]) {
  // app ready to use

run() is invoked when app reaches the OPEN state.

In CTX state, motion objects are available in app.motions, but they are not ready to use at this point. Instead of waiting for the run method to execute, it is possible to start earlier in the CTX state.