How Large Language Models Build Striking Presentations Entirely in Code
A community demo built only from a natural-language prompt shows that large language models can produce cinematic, interactive presentations by writing structured front-end code instead of generating pixels. This article explains the rendering model, planning and verification loop, a reusable project architecture, cost and performance tradeoffs, and practical engineering guidance.
How Large Language Models Build Striking Presentations Entirely in Code
1. Behind the Demo: Visualization Built Entirely in Code
A presentation written entirely by a large language model recently drew wide attention in the developer community. Its distinguishing feature is that it uses no image, video, or audio assets. Every visual effect—animation, 3D scenes, transitions, and even background music and sound effects—is implemented in code. The creator supplied only a natural-language prompt. Within tens of minutes, the model produced an interactive web demo with cinematic camera moves, complex 3D scenes, and smooth transitions.
Technically, this points to an important trend: high-quality visual content does not have to come from a dedicated image or video generation model. A large language model can produce dynamic, interactive visual work by writing structured front-end code. The underlying shift is from pixel-level generation to compositional generation. Instead of painting the frame pixel by pixel, the model orchestrates a mature, precise graphics stack—WebGL, Canvas, SVG, and CSS animation—to construct the scene.
2. Why Writing Code Can Replace Drawing the Frame
2.1 Code is a deterministic rendering instruction
A traditional slide deck is a sequence of static slides. A code-generated piece treats each page as an independent scene or virtual space. Those scenes can be:
- 2D vector scenes: charts, shapes, and animated infographics drawn with SVG and Canvas
- 3D scenes: virtual spaces with controllable lighting and cameras, built from WebGL shaders and matrix transforms
- Transition systems: seamless handoffs between elements using keyframe animation, easing functions, and a state machine
2.2 The capabilities a large model is good at coordinating
To see why a model can do this, it helps to split the capability into three layers:
Knowledge. Training exposes the model to a large body of front-end code and graphics knowledge, so it has patterned familiarity with common animation curves, rendering patterns, and performance pitfalls.
Planning. Given an open instruction such as “make it striking,” the model first plans the narrative structure—chapters, pacing, and visual motifs—then generates scene code section by section. That decomposition closely matches how human creative work is broken down.
Verification. Modern coding tools often use agent-style workflows. The model can trigger a render, read error output, and iterate, forming a generate–verify–fix loop.
3. A Reusable Architecture
A typical project layout for reproducing this approach looks like this:
project/├── index.html # Main stage container├── scenes/ # Independent render module per scene│ ├── scene1.js│ ├── scene2.js│ └── ...├── transitions.js # Shared transition engine├── audio.js # Procedural sound and score via the Web Audio API└── timeline.js # Global timeline scheduler
The core design points are:
1. State-machine-driven scene changes
// Scene scheduling pseudocodeconst scenes = [intro, chart, globe, finale];const machine = new StateMachine(scenes, {transitionDuration: 1200, // Transition duration in millisecondseasing: easeInOutQuart, // Easing function});function goTo(index) {const current = machine.current;const next = scenes[index];// Crossfade: the old scene fades out, the new scene fades in,// and shared elements move smoothly between themtransition(current, next, sharedElements);}
2. Continuity through shared elements
The most striking technique in this kind of work is an element that travels from one role to another—for example, a number leaving a table and becoming a planet in a star field. Implementation usually relies on reusing the same DOM node across scenes, interpolating coordinate systems, and visually bridging CSS 3D transforms and a WebGL scene so the handoff looks continuous.
3. Procedural audio
Audio does not depend on external files. Oscillators, envelopes, and filters synthesize melody in real time. That keeps the piece “all code” and also avoids asset licensing issues.
4. Cost and Performance: The Engineering Ledger
- Compute cost. Iterating a large front-end project across a long session consumes a substantial amount of inference compute. Community cases of this kind of task are not cheap. How refined the prompt is, and how clear the acceptance criteria are, materially affect cost.
- Choosing an inference tier. Higher reasoning intensity—more thinking and self-checking—clearly improves output quality on complex visual tasks, at the cost of longer runtimes. In practice, the tier should match task complexity.
- Runtime performance. The quality of the generated code directly affects browser behavior. Poor code can drop frames or leak memory. Best practice is to require rendering discipline at generation time: do not rebuild objects every frame, use offscreen caches, and keep particle counts under control.
5. Engineering Recommendations
- Leave the prompt room to invent. The best prompt for this kind of task does not enumerate every detail. It states the goal (striking, original) and the constraints (credible, runnable), and leaves taste to the model.
- Accept work scene by scene. Split a long task into modules that can be verified independently, and review them one by one, so a large rewrite is not deferred to the end.
- Set a performance baseline up front. Writing frame-rate targets and rendering constraints into the requirements is far cheaper than fixing them later.
- Cache and reuse structure. Turn the shared transition engine, color system, and typography into a project template. Later tasks only need to generate the scenes that differ, which cuts cost sharply.
- Review for harm and accessibility. Generated visuals can be hard to read (insufficient contrast) or uncomfortable (motion that is too strong). A human review is still required, along with accessibility support.
6. Beyond Slide Decks
The real significance of this path is that a large language model can act as a general front-end creation engine. Beyond presentations, the same approach has already been shown in the community for short animations, interactive 3D worlds, and procedurally scored trailers. Directions worth attention for companies and developers include:
- Dynamic data briefings: turning static reports into interactive data stories with narrative pacing
- Product interaction prototypes: generating high-fidelity motion demos at the prototype stage and shortening the design–development loop
- Education and marketing: producing interactive lessons and marketing pages at very low asset cost
The trend can be summarized this way: once code generation moves past functional code into visual and experiential code, large language models shift from tools toward creators. For technical teams, this is a good window to establish the related engineering process and practices.
