Code-Generated Presentations: A Technical Guide to Building a Real-Time Presentation Engine
This article breaks down the engineering behind code-generated, cinematic presentations that move beyond static slides. It explains a four-layer architecture (scene, timeline, interaction, renderer), how to create visuals and audio procedurally without external assets, reusable transition and camera patterns, accessibility requirements, and performance budgeting for a steady 60 fps. It also covers how to use large language models as architecture partners with constraints, interface contracts, incremental validation, and automated acceptance checks.
1. The Technical Problem Behind the Hype: Presentations Are Moving from Layout to Runtime
A recent, widely discussed piece broke the traditional shape of a presentation entirely. It had no fixed page boundaries; the camera moved continuously through 3D space; the “selected” objects evolved from text and charts to planets and stars, and finally to the whole frame. Most importantly, every visual, transition, and sound was generated in real time by code, with no external images, video, or audio assets.
Setting aside the buzz, what deserves a developer’s attention is the question it puts on the table: when a large language model has strong code generation and debugging ability, is the bottleneck for complex visual work still the “visual generation model”? The answer is most likely no. A presentation is essentially a deterministic rendering program. It needs scene organization, timing control, state management, and resource scheduling—exactly the areas where code excels and where models have improved most noticeably in recent years.
So this article discusses no specific product. Instead, it abstracts this kind of work into a general engineering problem: how to build a code-driven, interactive, real-time presentation engine.
2. Layered Architecture: Redefining the “Slide” as a “Scene”
The mental model of traditional tools is “static canvases, one page at a time.” Cinematic presentations need a minimal model of four layers:
- Scene layer: A scene can be a camera shot, a 3D space, or a full frame. Scenes connect through camera and state, not hard cuts.
- Timeline layer: All animation, transitions, and audio hang on a unified timeline that supports play, pause, seek, and speed changes.
- Interaction layer: Scrolling, clicking, keyboard input, and pointer position can change timeline progress or scene state, making the deck interactive.
- Renderer layer: Responsible for 2D vector drawing, the 3D pipeline, post-processing, and audio synthesis.
A sketch of the scene description structure (pseudocode):
const deck = new Deck({ fps: 60, duration: 42 });deck.addScene('intro', {camera: { path: ['orbit', 'dolly-in'], easing: 'cubic-in-out' },layers: [grid(), typography('The Future Is Compute')],transitionTo: 'planet', transition: { type: 'match-cut', duration: 0.8 }});deck.addScene('planet', {layers: [sphere({ radius: 1, segments: 128 }), atmosphere(), starfield(2000)],onEnter: (s) => s.timeline.seek(0)});deck.on('scroll', (p) => deck.timeline.seek(p * deck.duration));deck.mount(document.body);
The key design point: a scene is a state, and the timeline is the single source of truth. Any interaction only changes the timeline position, and the frame is determined entirely by time. This keeps pause, replay, and recording/export consistent.
3. Pure-Code Visuals: Four Ways to Create Without Assets
Not using external assets does not mean a barren screen; constraints can drive creativity. Four common approaches in the industry:
- Procedural geometry: Spheres, particle clouds, noise terrain, and ray-marched volumetric fog are all generated from parameters and can scale indefinitely without blurring.
- Vector and typography: Text, charts, and axes are drawn as vectors, staying sharp at any resolution and making it easy to build “office symbol” visual motifs.
- Shader effects: Glow, chromatic aberration, depth of field, scanlines, and glitch transitions are layered through a post-processing chain at a far lower cost than live-action footage.
- Procedural audio: Oscillators and envelopes synthesize drum hits, pads, and transition sounds, aligned to the visual beat on the timeline.
A minimal example of procedural audio:
function kick(t, ctx) {const osc = ctx.createOscillator(), gain = ctx.createGain();osc.frequency.setValueAtTime(120, t);osc.frequency.exponentialRampToValueAtTime(40, t + 0.12);gain.gain.setValueAtTime(0.9, t);gain.gain.exponentialRampToValueAtTime(0.001, t + 0.25);osc.connect(gain).connect(ctx.destination);osc.start(t); osc.stop(t + 0.3);}
4. Transitions and Camera Work: Making Slides Rewrite Themselves
What makes this kind of work most compelling is that transitions are not stacked effects but semantic continuity. Reusable patterns include:
- Match cut: A circle in the previous scene and a planet in the next share the same center and radius, producing a seamless visual.
- Selection-box migration: Using the selection box from office software as a recurring motif, letting it “grow” from a text box into a planetary orbit.
- Camera handoff: Keeping the camera’s velocity vector continuous across a scene change to avoid the jarring feel of a sudden speed shift.
- Time remapping: Applying non-linear stretching to the timeline during a transition to create a “bullet-time” rhythm.
In engineering terms, it is better to abstract transitions as composable functions rather than scattered conditionals across scenes:
const cut = (a, b, d = 0.8) => ({duration: d,apply: (t) => ({ cameraLerp: ease(t), blur: Math.sin(t * Math.PI) * 8 })});
5. Interaction and Accessibility: Don’t Let Showmanship Make It Unusable
The biggest risk of a real-time presentation is “viewable but not usable.” At minimum, aim to:
- Complete the full flow by keyboard (left/right arrows, space, Home/End to jump);
- Provide a progress indicator and chapter index for non-linear navigation;
- Respect the system’s “reduce motion” preference and offer a low-motion fallback;
- Provide text equivalents for animated content to support screen readers.
6. Performance and Engineering: Holding the 60 fps Line
- Budgeting: Set per-frame caps on draw calls and triangle counts, and automatically reduce particle counts and post-processing layers when over budget.
- Resource reuse: Cache and reuse geometry, materials, and textures to avoid garbage-collection jitter from per-frame creation.
- Timeline precomputation: Sample easing curves and keyframes offline into lookup tables, doing only interpolation at runtime.
- Layered degradation: On low-end devices, disable depth of field and volumetric fog while preserving composition and rhythm.
- Observability: Connect logging and monitoring/alerting to collect frame rate, dropped-frame rate, and first-screen time, forming a regression baseline.
To ship a piece online, general cloud capabilities are enough: object storage for static artifacts, a content delivery network for acceleration, a container platform to host build and rendering tasks, and a message queue to smooth out batch export requests.
7. The Right Way to Use AI: Treat the Model as an Architecture Partner, Not a One-Click Generator
From an engineering perspective, the model’s value in this kind of task concentrates in three areas: providing a runnable initial architecture, generating many replaceable visual and audio snippets, and quickly locating problems when errors occur. To get stable output, prompts and acceptance mechanisms matter just as much:
- Constraints first: Specify frame rate, duration, resolution, no external assets, and required interactivity.
- Interface contracts: Define the scene and timeline interfaces first, then let the model fill in the implementation to avoid structural drift.
- Small-step validation: First get a runnable minimal version of 10 seconds, then extend it section by section.
- Automated acceptance: Use headless-browser screenshot comparison and frame-rate sampling for regression, turning “looks good” into measurable metrics.
It is worth noting that this kind of task demands high reasoning and long context, often with significant compute and time costs. In real projects, plan quotas and costs, and prioritize runnable, maintainable results before pursuing visual impact.
8. Conclusion
The discussion around the “best presentation ever” will pass, but the technical path it validated will remain: presentations are becoming interactive, real-time programs. For developers, what is worth retaining is not a single work but the whole methodology of scene graphs, timelines, procedural visuals and audio, and performance budgets. Master it, and what you deliver is not just a presentation, but a reusable, measurable, continuously iterable visual runtime.
