Skip to content

Extension API

Every Ember Motion Studio plugin is registered through the dvEngine.register() technical interface. This page serves as the complete reference for building broadcast-ready, deterministic motion graphics that fully utilize the DVGE engine.

The entry point for any plugin or lower third. Call this once in your script.js with a lifecycle object to hook into the frame-rendering loop.

dvEngine.register({
awake: (ctx) => { /* ... */ },
start: (ctx) => { /* ... */ },
update: (ctx) => { /* ... */ }
});

Called once when the plugin is mounted. Use it to:

  • Cache DOM references in ctx.refs.
  • Apply base static styles.
  • Initialize persistent state variables in ctx.state.
awake: (ctx) => {
ctx.refs.title = ctx.root.getElementById('title');
ctx.refs.bar = ctx.root.getElementById('bar');
ctx.state.progress = 0;
}

Called every time the playhead resets to frame 0. Use it to:

  • Reset accumulated state.
  • Trigger “first frame” effects before the broadcast output starts.

Called on every single frame (60fps during real-time preview and ProRes rendering). Use it for:

  • All data binding (reading from ctx.props).
  • All animation logic (reading from ctx.timeline).

Every lifecycle hook receives the same ctx object, which provides the sandboxed environment required for transparent backgrounds and alpha channel rendering:

PropertyTypeDescription
ctx.framenumberCurrent animation frame (starts at 0).
ctx.timelineobjectNormalized timing helpers for precise motion design.
ctx.rootShadowRootThe isolated Shadow DOM root. Always use this instead of document.
ctx.propsobjectLive values from the inspector form, keyed by manifest.json schema IDs.
ctx.refsobjectYour personal DOM reference cache (persists across frames).
ctx.stateobjectYour personal persistent state store (persists across frames).
ctx.utilsobjectBuilt-in library of math and easing functions.
ctx.settingsobjectEngine metadata: fps, duration, width, height.

ctx.settings values:

ctx.settings.fps // number — frames per second (e.g. 60)
ctx.settings.duration // number — total duration in frames (e.g. 120 for 2s at 60fps)
ctx.settings.width // number — canvas width in pixels (e.g. 1920)
ctx.settings.height // number — canvas height in pixels (e.g. 1080)

Replaces raw frame arithmetic with intent-based normalized values. This is crucial for creating adaptive motion graphic templates.

PropertyTypeDescription
timeline.progressnumber [0–1]Overall clip progress (0 = start, 1 = end).
timeline.isIntrobooleantrue if the current frame is within the intro phase.
timeline.isOutrobooleantrue if the current frame is within the outro phase.
timeline.introProgressnumber [0–1]Local progress within the intro phase.
timeline.outroProgressnumber [0–1]Local progress within the outro phase.

Example — fade in during intro, fade out during outro:

update: (ctx) => {
const { timeline, refs } = ctx;
if (timeline.isIntro) refs.el.style.opacity = timeline.introProgress;
if (timeline.isOutro) refs.el.style.opacity = 1 - timeline.outroProgress;
}

Built specifically for high-end animation software needs:

FunctionSignatureDescription
lerp(a, b, t)Linear interpolation.
clamp(val, min, max)Clamps a value to a range.
spring(t)Spring-physics effect with bounce.
easeOutCubic(t)Smooth ease out for elegant stops.
easeInOutCubic(t)Symmetrical easing for organic movement.
easeOutBounce(t)Elastic bounce on entry.
easeOutElastic(t)Spring-like elastic effect.
hexToRgb(hex)Returns an "r, g, b" string for use in CSS rgba().
typewriter(text, frame, fps)Returns the visible substring for a typewriter text effect.
tickerOffset(frame, speed, cW, tW)Calculates the X offset for an infinite news ticker.

{
"id": "my-plugin",
"name": "My Plugin",
"version": "1.0.0",
"description": "A brief description of the broadcast graphic.",
"presets": ["branding", "motion", "layout"],
"schema": [
{ "type": "string", "id": "title", "label": "Main Title", "defaultValue": "Hello" },
{ "type": "color", "id": "accent", "label": "Accent Color", "defaultValue": "#E44C30" },
{ "type": "number", "id": "fontSize", "label": "Font Size (px)", "defaultValue": 48 },
{ "type": "image", "id": "logo", "label": "Logo Image" }
]
}
TypeInspector ControlNotes
stringText inputAlso used for multiline inputs.
colorColor pickerReturns a hex string.
numberNumeric sliderReturns a number.
imageFile uploadReturns a base64 data URL.
codeCode editorReturns a raw HTML string.
promptDraggable zone (PDF)v5.5.0 — Generates and exposes the engine rules PDF for drag-to-AI.
artifactUniversal paste zoneAccepts [[[HTML]]], [[[CSS]]], [[[JS]]] AI blocks and automatically distributes them.
infoRead-only textDisplays copyable information to the user (e.g. prompts, IDs).
PresetAuto-Injected Fields
brandinglogo (image), accentColor (color)
motionentryDuration (number), exitDuration (number)
layoutposition (select: TL, TR, BL, BR, Center)