When Code Becomes the Brush: A Technical Breakdown of AI-Generated Interactive Presentations

    This article examines how AI can generate interactive, code-driven presentations in the browser, turning visual creation into a problem of code generation and real-time rendering. It explains the core scene-node-timeline abstraction, how to write layered prompts with executable constraints, how to set performance budgets for smooth playback on ordinary devices, and what accessibility and delivery practices make such demos reusable. It also outlines four criteria for evaluating whether an AI-generated presentation is genuinely robust rather than merely cinematic.

    Over the past period, a piece titled “The Last Boring Slide” attracted significant attention on social platforms. Its form is contradictory: it is called a slide deck, yet it feels like a film; it opens like an ordinary presentation, but during playback it “selects” and reconstructs charts, text, the Earth, and the Sun together. More importantly, every frame, transition, and soundtrack is generated in real time by code, with no external assets. The author gave only an open-ended goal: make a presentation about the intelligence explosion, with no style anchor, no provided assets, and freedom to improvise.

    Setting aside speculation about any unreleased model, the part that is genuinely valuable to developers is that it validated an engineering path: describe a presentation with a general-purpose programming language, use the browser as the runtime, and turn the problem of “visual generation” into a problem of “code generation plus real-time rendering.” The following sections cover the principles, prompting, engineering constraints, and evaluation.

    1. Why Writing Code for Presentations Breaks the Dependency on Assets

    The core abstraction of traditional presentation tools is the static page plus placeholder, and visual expression is bounded by templates and asset libraries. The code-driven approach changes the abstraction: a page is a Scene, an element is a Node, and change is property interpolation along a timeline. Anything that can be described numerically can be generated.

    A minimal usable scene description usually has four parts:

    1. const scene = {
    2. duration: 8000, // milliseconds
    3. camera: { path: ['wide', 'orbit', 'closeup'] },
    4. nodes: [
    5. { id: 'globe', type: 'mesh', material: 'wireframe' },
    6. { id: 'title', type: 'text', content: 'Intelligence Explosion' }
    7. ],
    8. timeline: [
    9. { at: 0, action: 'select', target: 'title' },
    10. { at: 2500, action: 'transform', target: 'title', to: 'globe' },
    11. { at: 6000, action: 'camera', to: 'closeup' }
    12. ]
    13. };

    The “selection box,” a visual symbol borrowed from office software, is critical because it provides narrative continuity: viewers can always recognize that “this is still a presentation,” so scenes can morph arbitrarily without losing an anchor for understanding.

    2. How to Write Prompts: From “Make It Amazing” to Executable Constraints

    The original case’s prompt contained almost no technical constraints, which relied on the model’s own taste and experience. In engineering practice, a more reliable approach is to layer the constraints:

    1. Goal and audience: topic, duration, and the audience’s technical background.
    2. Narrative skeleton: how many acts, and the single conclusion each act must convey.
    3. Tech stack boundaries: single file, no external resources, target frame rate.
    4. Visual grammar: number of colors, font hierarchy, and a whitelist of transition types.
    5. Acceptance criteria: interactive, pausable, able to go back, and does not break on narrow screens.

    Example:

    1. Create a 60-second interactive single-page presentation on the topic: exponential growth of intelligent capability.
    2. Constraints: a single HTML file, no external resources; use Canvas or WebGL for real-time rendering.
    3. Narrative: three acts—baseline, inflection point, loss of control; each act makes only one point.
    4. Visuals: no more than 3 primary colors; transitions limited to zoom, wipe, and camera push-in.
    5. Acceptance: supports spacebar to pause, arrow keys to jump, and a 4x degraded mode.

    3. Performance Budget: Making the “Cinematic Feel” Survive on Ordinary Devices

    The most common failure of code-generated animation is not that it looks bad, but that it cannot run. Set a budget before writing effects:

    • Frame budget: 60fps means about 16ms per frame; keep animation logic within 6ms and leave the rest for rendering.
    • Draw calls: merge geometry and reuse materials; avoid creating objects every frame.
    • Resolution strategy: cap the device pixel ratio (for example, at 2) and downsample dynamically when necessary.
    • Post-processing: bloom and depth of field are the most expensive; provide toggles.
    • Resource lifecycle: explicitly release textures and geometry to prevent memory growth during long presentations.
    1. const QUALITY = {
    2. high: { dpr: 2, post: true, particles: 4000 },
    3. medium: { dpr: 1.5, post: true, particles: 1500 },
    4. low: { dpr: 1, post: false, particles: 400 }
    5. };
    6. function pickQuality(fps) {
    7. return fps < 40 ? QUALITY.low : fps < 52 ? QUALITY.medium : QUALITY.high;
    8. }

    4. Accessibility and Engineered Delivery

    A showpiece that cannot be reused has limited value. Delivery should include keyboard accessibility and focus management, pause and reduced-motion preference (prefers-reduced-motion), text alternative descriptions, and decoupling scene data from the rendering layer so content can be replaced. If multi-person collaboration or version rollback is needed, you can store scene descriptions in object storage, distribute rendering tasks with a message queue, and use logging services and monitoring alerts to locate frame drops and memory issues; a container platform makes it easy to run the rendering service as elastically scalable, stateless instances.

    5. How to Tell Whether It Is Really Strong

    To avoid being misled by appearance, use four categories of metrics: functional completeness (whether interaction, jumping, and degradation are all in place), stability (ten minutes of continuous playback without leaks), maintainability (whether changing one line of copy requires rewriting all animations), and portability (whether it works on narrow screens, low-end devices, and without a network). These four predict its survival rate in real business better than “does it look like a film.”

    The conclusion is clear: large models have moved the bottleneck of presentation production from “asset and tool proficiency” to “the ability to express abstraction and constraints.” What developers really need to practice is translating aesthetic intent into executable scene structures and performance budgets. Baidu AI Cloud’s standard product categories in general computing power, containers, and observability are sufficient to support the launch and operation of such rendering services; whether the creativity can be realized still depends on how professionally the constraints are written.