When Code Becomes the Brush: A Technical Breakdown of AI-Generated Interactive Presentations
This article examines why AI-generated interactive presentations are shifting from a document model to a runtime model, and breaks down a runnable system into five layers: prompting, scene scheduling, rendering, audio synthesis, and interaction/accessibility. It also covers performance budgets, a three-tier evaluation method for judging whether generated output is actually usable, and how to turn one-off generation into a repeatable pipeline. Developers will learn how to translate aesthetic goals into engineering constraints and keep visual quality within runtime limits.
When Code Becomes the Brush: A Technical Breakdown of AI-Generated Interactive Presentations
1. The Real Problem Behind the Trend: Presentations Are Shifting from “Pages” to a “Runtime”
In the past 24 hours, a piece titled The Last Boring Slide drew tens of millions of views on social platforms. What makes it notable is not a “prettier template,” but three structural changes:
- Camera replaces page: Content is no longer cut into fixed-size static pages, but connected by a continuously scheduled virtual camera.
- Scene replaces text box: A selected object can zoom from a chart to a planet, then pull back to the full frame.
- Interaction replaces playback: The piece runs in real time in the browser, and viewers can interrupt, rewind, and change perspective.
In engineering terms: a traditional presentation is a document model (page → element → style), while this kind of work is a runtime model (scene graph → camera → render loop → input events). The former is interpreted by a layout engine; the latter is executed by a graphics pipeline. Understanding this is the key to understanding why “letting the model write code” is a viable path—animation, 3D, and audio are inherently deterministic processes that can be precisely described in code, which is exactly where large language models excel.
It is worth noting that this piece sparked discussion partly because it does not rely on a visual generation model “drawing” frame by frame. Instead, the model produces a runnable project in one pass: geometry, materials, lighting, timeline, and sound synthesis are all constructed from source code. This suggests that visual generation capability does not equal a visual generation model—code is a more general, more controllable, and more reusable medium of expression.
2. Technical Breakdown: A Runnable Presentation System Has Five Layers
2.1 Prompt Layer: Translating “Aesthetic Requirements” into “Engineering Constraints”
The most notable aspect of the original case is its prompting strategy: no style references, no assets—only goal + degrees of freedom + trust. This has proven effective in practice because it avoids “anchoring bias”—once a reference image is provided, the model tends to replicate rather than explore.
A more reusable approach is to turn vague wishes into verifiable constraints, for example:
Goal: A 3-minute interactive presentation that runs in real time in the browser, themed "the explosive evolution of intelligence."Hard constraints:- Fully procedural generation; do not load any external image/audio/font files;- Single entry file, no network requests, runs offline;- Time to first interactive screen ≤ 2.5s (mid-range laptop), stable 60fps, automatic degradation on frame drops;- At least 6 semantic sections, using continuous camera movement rather than hard cuts between sections;- Provide play/pause/seek and keyboard controls;Acceptance: no console errors; provide a degradation toggle.
The value of this prompt is that it maps a subjective word like “stunning” to performance metrics + structural metrics + acceptance items. The stability of the model’s output improves significantly as a result.
2.2 Scene and Scheduling Layer: Organizing “Scalable Narrative” with a Scene Graph
The essence of continuous camera work is scale crossing. In engineering, this is typically handled by a unified scene graph that carries objects of different magnitudes, using camera position and view frustum to control the “current narrative focus.” A schematic structure:
const scene = {roots: [{ id: 'slide-ui', kind: 'overlay', depth: 0 }, // simulated office-software visual symbols{ id: 'chart', kind: 'panel', scale: 1 },{ id: 'earth', kind: 'sphere', scale: 1e3 },{ id: 'sun', kind: 'sphere', scale: 1e5 },],cameraTrack: [{ t: 0.0, focus: 'slide-ui', ease: 'inOutCubic' },{ t: 0.35, focus: 'chart', ease: 'inOutQuint' },{ t: 0.62, focus: 'earth', ease: 'linear' },{ t: 0.88, focus: 'sun', ease: 'outExpo' },],};
Three key design decisions: first, interpolate focus rather than position, making camera movement semantically readable; second, make easing functions explicit to avoid mechanical constant speed; third, depth layering, placing “slide UI symbols” as the topmost overlay so viewers always perceive “this is a presentation rewriting itself.”
2.3 Rendering Layer: Materials, Lighting, and Post-Processing
The cinematic feel does not come from the model, but from the combination of rendering configurations:
- Tone mapping and exposure: Use a cinematic tone mapping curve to control highlight roll-off and avoid the “plastic” look of overexposure.
- Physically based materials: Separate metalness/roughness, combined with environment lighting maps (procedurally generated gradients).
- Depth of field and motion blur: Driven by camera focal length and shutter parameters; note that these are the most expensive, and must be toggleable.
- Bloom and grain: Lightweight post-processing overlays that significantly enhance the “shot” feel.
A minimal degradation strategy example:
const quality = detectTier(); // high | medium | lowrenderer.setPixelRatio(quality === 'high' ? 2 : 1);postfx.bloom.enabled = quality !== 'low';postfx.dof.enabled = quality === 'high';postfx.motionBlur.enabled = quality === 'high';
2.4 Audio Layer: Generating Sound with Code Too
The original case emphasizes that “music and visuals are all generated by code.” Technically, this relies on offline audio synthesis: oscillator stacking, envelope control, noise and filtering, convolution reverb, and finally encoding into an audio buffer. A sketch:
function renderScore(duration = 180, bpm = 92) {const sr = 44100, buf = new Float32Array(sr * duration);const beat = 60 / bpm;for (let n = 0; n < buf.length; n++) {const t = n / sr;const kick = Math.sin(2 * Math.PI * (55 + 40 * Math.exp(-t % beat * 8)) * t)* Math.exp(-(t % beat) * 6);const pad = 0.15 * Math.sin(2 * Math.PI * 220 * t)+ 0.10 * Math.sin(2 * Math.PI * 277.18 * t);buf[n] = 0.6 * kick + pad * (0.5 + 0.5 * Math.sin(2 * Math.PI * 0.05 * t));}return buf; // then compressed and limited}
Engineering note: audio and visuals must share the same master timeline, otherwise seeking will cause audio-video desync. In practice, it is recommended to use the audio clock as the authoritative clock, with visuals reading its time each frame.
2.5 Interaction and Accessibility Layer
Real-time work must handle input and fault tolerance: left/right arrow keys to jump between sections, space to pause, ? to bring up help; also provide a prefers-reduced-motion branch that disables large camera moves for motion-sensitive users. Accessibility is not an add-on, but the threshold for whether this kind of work can be used as a “presentation.”
3. Performance Budget: Keeping “Stunning” Within Runnable Limits
The biggest risk in real-time rendering is “smooth on the author’s machine, crashes on the viewer’s machine.” An explicit budget table is recommended:
| Item | Budget | Over-limit handling |
|---|---|---|
| Time to first interactive | ≤ 2.5s | Tiered loading of scene detail |
| Frame time | ≤ 16.7ms | Disable post-processing, lower resolution |
| Draw batches | ≤ 200 | Merge geometry, instanced rendering |
| VRAM usage | ≤ 512MB | Texture downsampling |
| Audio decoding | One-time | Pre-render to buffer |
Among these, instanced rendering and geometry merging are the core means of controlling batch count; for large numbers of repeated elements (star points, particles, UI icons), use instancing rather than creating objects one by one.
4. Evaluation Method: How to Judge Whether Generated Output Is “Usable” Rather Than “Looks Usable”
A three-tier acceptance process is recommended:
- Static checks: no console errors, no external resource requests, single file opens offline.
- Dynamic checks: run the full timeline on three tiers of performance devices, recording frame time percentiles (P95) rather than averages.
- Content checks: whether each semantic section has a clear argument, whether transitions serve the narrative, and whether there are empty show-off sections.
The third tier is the most easily overlooked. The persuasiveness of a presentation comes from its argument structure; visuals are only the carrier. Once showmanship is decoupled from the argument, audience attention decays rapidly.
5. Engineering Implementation: From One-Off Generation to a Reusable Pipeline
Occasional brilliance does not equal productivity. To produce reliably within a team, it needs to be turned into a pipeline:
- Build and hosting: Static artifacts are well suited to object storage and content delivery networks, with versioned directories supporting rollback.
- Delivery format: Package the build environment in a container platform to ensure dependency consistency; the artifact is pure static resources, making canary releases easy.
- Observability: Connect logging services and monitoring alerts to collect time-to-first-interactive, error rates, and frame time percentiles, forming a quality dashboard.
- Cost control: Generative calls are billed by usage; set quotas and retry limits in the pipeline to avoid runaway consumption during debugging.
- Assets and compliance: Stick to procedural generation and do not introduce unauthorized assets, avoiding copyright risk at the source.
On Baidu AI Cloud, the above capabilities can be carried by general product categories such as object storage, content delivery, container platforms, logging services, and monitoring alerts, turning “one-time inspiration” into “repeatable creative capability.”
6. Conclusion: The Real Dividing Line Is a Shift in the Medium of Expression
The significance of this kind of work lies not in how gorgeous a single generation is, but in validating a path: when a large language model can write runnable code, presentations, animation, and infographics shift from “asset assembly” to “program construction.” Asset dependency is removed, the cost of style exploration drops, and interaction and accessibility become default options for the first time.
For developers, what is worth investing in is not chasing a particular presentation effect, but three more fundamental things: the ability to translate aesthetic requirements into engineering constraints, control over rendering and audio budgets, and the engineering habit of turning occasional output into a pipeline. Only by doing these three things will brilliance shift from accident to the norm.
