Primary Format: Standalone JS Module (.js)
export default {
meta: {
id: 'unique-project-id',
title: 'Documentary Title',
duration: 24.0, // seconds
aspect: '16:9' // '16:9' or '9:16'
},
locations: [{
id: 'loc-1',
title: 'Scene 01 · Opening',
start: 0.0, end: 12.0,
build(ctx) {
// Full unrestricted Three.js access via ctx.THREE, ctx.scene, ctx.camera
// Optional helpers via ctx.kit (never mandatory)
const mesh = new ctx.THREE.Mesh(...);
ctx.scene.add(mesh);
return { mesh };
},
update(t, localT, ctx) { /* deterministic function of t */ },
dispose(ctx) { /* optional custom cleanup */ }
}],
shots: [{ locationId: 'loc-1', start: 0, end: 12, fromPos: [0,3,9], toPos: [3,2,7], fromTarget: [0,1,0], toTarget: [0,1,0], fov: 46 }],
transitions: [{ type: 'chapterCard', start: 11.4, end: 12.6, kicker: 'Chapter 2', title: 'NEXT', fromLocationId: 'loc-1', toLocationId: 'loc-2' }],
audio: {
tracks: [
{ id: 'narration', role: 'voiceover', label: 'Primary Narration', start: 0, volume: 1.0, fadeIn: 0.15, fadeOut: 0.3 },
{ id: 'music', role: 'bgm', label: 'Background Score', start: 0, volume: 0.45, fadeIn: 0.8, fadeOut: 1.2, loop: true }
],
ducking: { enabled: true, duckGain: 0.28, attackSec: 0.18, releaseSec: 0.45, thresholdRms: 0.015 },
sfx: [{ time: 5.8, type: 'whoosh', volume: 0.35 }]
}
};
Optional Declarative Format: JSON Schema (.json)
{
"meta": { "id": "json-sample", "title": "Declarative Scene", "duration": 10, "aspect": "16:9" },
"locations": [{
"id": "loc-a", "title": "Stage A", "start": 0, "end": 10, "mood": "studio",
"objects": [
{ "type": "octahedron", "size": [1.2], "pos": [0, 1.8, 0], "color": "#4f8cff", "animate": { "rotY": 0.8, "bobAmp": 0.2 } }
]
}],
"shots": [{ "start": 0, "end": 10, "fromPos": [-4, 3, 8], "toPos": [4, 2.5, 7], "fromTarget": [0, 1.5, 0] }],
"audio": { "tracks": [{ "id": "narration", "role": "voiceover", "label": "Narration" }] }
}