/genmotion:three-assetsfrom genmotion
Loads real assets into Three.js scenes: images, logos (SVG-extruded), screenshots, user footage (VP9 WebM), fonts, confetti, piles of identical objects, and resizable outlines. Use when a scene needs any file from assets/.
Ships in genmotion. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A scene may import only three and @genmotion/three-engine, so there are no addon loaders (no GLTFLoader, no SVGLoader) and no page globals. Everything here uses the core loaders, wired to ctx.manager: the host waits for that manager before it captures a frame, then draws again. Anything loaded around it ships as an empty plane in the frames that finish first.
The recipes were built against the real host and debugged by rendering. The thing you would not guess: the CLI's Chromium cannot decode H.264 MP4 at all, so footage must be VP9 WebM, seeked through ctx.manager. video-editing's references/footage-in-scene.md is the pack's one tested footage helper; references/footage-and-audio.md here has an equivalent for short inserts.
Code: references/images-and-logos.md (imports, picture(), logoPlane(), extrudedMark() with an SVG path parser, device frames), references/drawn-ui.md (components/ui.ts: app UI rebuilt as canvas-drawn planes when there are no screenshots), references/footage-and-audio.md (footage(), transcoding, continuity across a cut, fonts, audio), references/confetti.md (components/confetti.ts: a seeded burst from a number's edges), references/piles.md (components/pile.ts: many identical objects heaping up), references/outline.md (components/outline.ts: a resizable rounded-rectangle outline with gaps, a draw-on and a colour sweep).
save-asset something and then put it on screen.Not for: finding or generating material (stock-and-broll, screen-capture), editing user footage into a cut (video-editing), type layout (three-type), sound levels (sound-design).
save-asset the file into assets/ first. For a real brand mark, find the official file (the brand's press kit or site); never generate or redraw one. No file at all: the name as a wordmark; a mark the user only described may be built as a flagged stand-in (brand-sting's no-logo policy), never called the logo.import shotUrl from "../assets/dashboard.png";. The bundler turns it into a URL (small images become inline data URLs). Add components/assets.d.ts once so TypeScript accepts the import (references/images-and-logos.md §1).ctx.manager: new THREE.TextureLoader(ctx.manager), new THREE.ImageLoader(ctx.manager), or itemStart/itemEnd around anything else (a font, a video seek).dashboard-screenshot, hero-mark), so the editor can point at it.picture(ctx, url, widthPx, name): a plane widthPx composition px wide whose height comes from the image's real pixels when it lands, so it is never stretched.MeshBasicMaterial, toneMapped: false): lit UI looks wrong at once.A product with no screens to show is rebuilt as flat canvas-drawn planes: references/drawn-ui.md has components/ui.ts (tested) with screenPanel, statusBar, field, chip, button, listRow, textBars and softShadow, all drawn once at 2× inside withFonts, unlit and never tone mapped. Every glyph that is seen clears 28 px on screen (a panel shown at scale s draws its text at ≥ 28 / s); copy that cannot is grey bars. Grey bars are for incidental copy only. When the product's output is text (a writing tool, a summariser, a translator, a notes or email app), the words it produces are the proof: set them as real, legible text with the three-type kit (≥ 60 px at the payoff, push in rather than shrink), never as bars or as lorem ipsum. Anything that moves on its own (a chip that flies out, a field that fills) is its own plane in the panel's group. Generic chrome in the brand's colours, recorded in VIDEO.md as illustrative UI.
| Need | Build | Notes |
|---|---|---|
| Flat mark, any size | logoPlane(ctx, svgUrl, widthPx, aspect, name) | The SVG is rasterised at 2× the shown size: crisp at any size |
| 3D mark | extrudedMark(d, widthPx, depthPx, material, name) | From the file's path d copied verbatim into components/brand.ts; bevel 1.2% of width catches the light |
| Mark with gradient fill | Draw the path into a canvas with Path2D(d) and the gradient, or extrude and use a face material per tone | The Samsung Pay template draws its marks with Path2D |
| Flat mark built from layered facets (a stand-in) | One mesh per facet in one group, renderOrder on the meshes; or one Group per layer, each through onTop(layer, n) with rising n | three.js sorts by the parent Group's renderOrder before the mesh's, so an order set on a Group outranks every mesh in other groups (three-type type-kit.md §4) |
| Lockup (mark + wordmark) | Mark plane + a three-type label in the brand font, in one group; gap ≈ 0.25 × the symbol's height (0.75–1 × the cap height), cap height 0.3–0.4 × the symbol | Or the official lockup file as one plane. Move and centre it as one group |
The path parser handles M L H V C S Q T Z, absolute and relative. Arcs throw an error: flatten them in the SVG first, or use the flat plane. Light extruded marks with three-look's product setup and brand tone mapping so the brand colour holds.
references/confetti.md has components/confetti.ts (tested at 1080 × 1080): one InstancedMesh of ≤ 300 paper quads (120–180 for a hero land, 10–24 px), each launched from a hash1 seed, posed in closed form with gravity, linear drag and spin, so any frame renders alone. It spawns on the edges of the box you give it (the number at its punch peak plus its unit line), crowded toward the corners, and aims every piece outward, so none crosses the glyphs for the first 20 f and the burst reads as poppers rather than two columns in the gutters. Pieces live 44–60 f and shrink out; the burst is gone about 2 s after the land. Pass the film's palette as colors.
references/piles.md has components/pile.ts (tested at 1920 × 1080 with 120 coins): one InstancedMesh of real items; each has a rest slot computed once (rings per layer, each layer turned by the golden angle, slots jittered and tilted from hash1, filled in a hashed order so the surface is ragged) and a land frame from the film's event schedule. Falling is closed-form gravity that lands exactly on its frame, then one damped hop and a settling wobble, so any frame renders alone. set(frame) returns how many have landed: drive the counter from it. Never fake a heap with a texture of stacked edges (it reads as a ribbed can, and it snaps on); never leave a few dozen loose items scattered (it reads sparse). The land list is the same one sound-design's many-events stem is built from, so every sound lands on its item.
references/outline.md has components/outline.ts (tested): a rounded rectangle drawn by a signed-distance shader on one plane, with size, radius, two gaps (a doorway, a notch for a label), a draw-on from any point (one way or both), and a colour sweep along the path, all as per-frame uniforms placed by perimeter px so sweeps travel at even speed round the corners. Its stroke is in screen px: a 3 px border stays 3 px when it, or the group around it, shrinks into an end card. Lines must stay ≥ 2 px on screen on their smallest frame (thinner lines alias and flicker in the encode); for free-form paths use three-look's line-art stroke with its uScale set to the group's scale.
A phone or laptop is an extruded rounded rectangle (glossy dark MeshPhysicalMaterial, a small bevel) with the screenshot or footage plane just in front of its face; code in references/images-and-logos.md §4. Size the screen to the frame's inner area. Pushing through the screen into the UI is a match-push (three-camera, three-transitions).
For a phone with an app working inside it, use device-mockup: the full kit, tested. It builds a convincing generic phone from measured ratios (crisp antialiased ring and bezel at any scale, camera pill, status bar, home indicator, soft two-layer shadow), clips its screens to the rounded glass through a render target, and adds the app kit (sheets, typing inputs, a three-state button, toasts, streaming chat) and the motion on a beat grid. The extruded frame above is for laptops, tablets and a quick 3D prop.
ffmpeg: VP9 WebM, a keyframe every 15 frames, the project's fps, trimmed to the moment that matters, no audio track. The exact command is in references/footage-and-audio.md §1.video-editing's createFootage (references/footage-in-scene.md there) for edits and long clips; footage(ctx, url, { from, size }) here for short inserts. They are equivalent (pixel-identical in a render test). Both create the element through ctx.canvas.ownerDocument, seek it from the frame once per frame, register every seek on ctx.manager so the barrier waits for seeked, and mark the texture needsUpdate when the seek lands.play(): wall-clock playback cannot match an export.from = X − D_N / fps, scene N+1 from = X.clip.seek(time * 2) plays 2×, a constant freezes a frame; a ramp is clip.seek(s(time)), where s is the closed-form integral of the speed curve.The capture machine has almost no fonts installed, and a new project ships none. save-asset the brand's woff2, or Inter's variable woff2 (three-type's Fonts section names sources that work when font CDNs are blocked), into assets/ and load it with three-type's withFonts(), which waits for it inside the frame barrier and only then draws any type.
Audio never lives in a scene: an <audio> element or Web Audio in scene code is silent in the export. Music, voiceover and effects are files in assets/ placed on the timeline with place-audio, which writes them into project.json's audio with a start frame, duration, volume and fades; the render mixes exactly that, and the dev studio plays it under the picture. Levels, fades, ducking and loudness are sound-design's; take a bed's level from its ladder. Footage with its own sound: extract the audio with ffmpeg, place it at the picture's start frame and offset, and keep the picture file silent.
A flat logo, an app recording on a device and its continuation into the next scene; compiled and captured with a WebM test clip (frame-accurate timecodes on both sides of the cut).
import * as THREE from "three";
import type { ThreeSceneContext, ThreeSceneUpdate } from "@genmotion/three-engine";
import logoUrl from "../assets/logo.svg";
import demoUrl from "../assets/demo.webm";
import { fitCamera, PX } from "../components/stage";
import { colorPipeline, LOOK } from "../components/look";
import { footage } from "../components/media";
import { logoPlane } from "../components/logo";
export default function buildScene(ctx: ThreeSceneContext): ThreeSceneUpdate {
const { scene, camera, renderer, height, fps, durationInFrames: D } = ctx;
colorPipeline(renderer, "flat");
fitCamera(camera, height);
scene.background = new THREE.Color(LOOK.bg);
const logo = logoPlane(ctx, logoUrl, 160, 1, "logo"); // 160 px square mark
logo.position.set(-760 * PX, 420 * PX, 0);
// the next scene opens on this clip at 3.0 s, so this one ends on 3.0 s minus one frame
const clip = footage(ctx, demoUrl, { from: 3.0 - D / fps, size: [1920, 1080] });
const screen = new THREE.Mesh(new THREE.PlaneGeometry(12.8, 7.2), // 1280 x 720 px
new THREE.MeshBasicMaterial({ map: clip.texture, toneMapped: false }));
screen.name = "demo-recording";
scene.add(logo, screen);
return ({ time }) => {
clip.seek(time); // once per frame, never play()
};
}
| Symptom in a capture | Cause | Fix |
|---|---|---|
| Blank or transparent plane on the first frames | Loader not on ctx.manager | new THREE.TextureLoader(ctx.manager); itemStart/itemEnd around anything custom |
| Footage plane black | H.264 MP4 in the CLI renderer, or the file failed to load | Transcode to VP9 WebM; check the path |
| Footage frames stale or repeating | Texture not updated on seeked, or a seek not on ctx.manager | One of the two helpers as written |
| Footage one frame behind | Seek on an exact frame boundary | footage()'s quarter-frame offset; source at the project fps |
| Image stretched | Plane aspect guessed | picture() takes the aspect from the pixels |
| Logo soft | SVG rasterised small, then scaled | logoPlane() at the shown width |
| Logo colour shifted | Lit or tone mapped | Flat: toneMapped: false; 3D: brand tone mapping (three-look) |
| Wrong font in the export | Font named, not shipped | withFonts() with the woff2 in assets/ (three-type) |
| Silence in the export | Sound in scene code | place-audio |
| Confetti in two thin columns, or over the number | Launched from two points, or spawned inside the type | confetti() with box around everything being read |
save-asset every remote file into assets/; note pixel sizes, durations and the mark's viewBox.components/assets.d.ts, components/media.ts, components/logo.ts, components/ui.ts if the UI is drawn, and the brand path data in components/brand.ts.ctx.manager (or new Image()): frames that finish first ship blank.play(), or seeks outside ctx.manager: black or stale frames in the export.| Need | What | Fallback when it is missing |
|---|---|---|
| Remote files and fonts | save-asset | Ask the user to drop the files into assets/ |
| Transcoding and trimming footage, extracting its audio | ffmpeg | Ask for a WebM export of the clip; never ship MP4 into a scene |
| Music, narration, effects | place-audio | None: audio outside the manifest is silent in the export |
| Seeing it loaded | capture-frames | None |
capture-frames on the first frame each asset appears, and on the first frame of each scene: no blank, black or stretched planes; footage shows the right moment (compare a timecode or a recognisable frame).ctx.manager; every video is seeked (no play()), is WebM, and is seeked once per frame.http URL in any scene or component file; every mark comes from an official file in assets/, or is the name set as a wordmark, or is a stand-in flagged in VIDEO.md.project.json, none in scene code.capture-frames at its first land, mid-fill and full: single items visibly fall and settle, the surface is ragged, and a 100% crop of the full heap shows no rows, rings or stripes; the counter beside it equals the landed count. Every outline or thin line is ≥ 2 px on screen on its smallest frame (crop and look). If the product's output is text, the payoff frame shows that text legible at ≥ 60 px, not bars.capture-frames at land, +2, +10 and +20 shows no piece over the number or its label, and land +65 shows none left.validate passes.references/confetti.md (opens in a new tab)references/drawn-ui.md (opens in a new tab)references/footage-and-audio.md (opens in a new tab)references/images-and-logos.md (opens in a new tab)references/outline.md (opens in a new tab)references/piles.md (opens in a new tab)skill.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub haxzie/genmotion --plugin genmotion35 skills in this plugin
/ad-qaThe pre-ship QA pass for a short-form or social ad, run on captured frames and the exported file: the exact frames to capture, eleven tests with pass criteria and fixes (hook frame, brand timing, mute, safe zones with a drawn overlay, captions, text size and contrast, pacing, CTA and ending, audio and loudness, ad codes, claims), then direction's critique rubric as the ship bar and a short report for the user. Every UGC owner ends here. Load it before telling anyone an ad is finished./ai-presenterPutting a person on screen in an ad when there is no footage: the user's own clip first, or a generated portrait driven by a lipsync model. Covers when not to use a face at all, the lipsync input spec (portrait, audio, neutral mouth), framing and headroom for 9:16, one take length (four seconds), lip-sync tolerance in frames, matching voice to face, the uncanny tells and the edit patterns that hide them, the seek-safe build on each engine, and the line between a synthetic presenter and a fabricated customer. Load it alongside a UGC owner, never instead of one./announce-featureThe 15 to 45 second feature announcement or changelog video, in the manner of Linear, Notion and Slack: what changed, why it matters, show it, where to find it. Covers naming the feature in the first six words, frame-budgeted beat sheets for 15, 20, 30 and 45 seconds with VO word budgets, the cursor, before-and-after and focus-push patterns with house timings, the CTA that points at the toggle, sound per interaction, and recuts for an in-app loop, a changelog embed and a vertical social clip. Load it for one feature or a small set, not a whole-product launch.