Claude Opus Generates Three.js Code for Lord of the Rings Scene
Claude Opus produced the procedural Three.js animation from the book's opening paragraph.
Andrej Karpathy posted a playable Three.js version of a Lord of the Rings scene at karpathy.ai/lotr-movie. Multiple replies describe prompting Claude Opus with the novel's first paragraph plus a large token budget, after which the model spent roughly two hours writing code that places objects and renders an animated scene. The work is presented as forkable browser code. Participants link the test to Simon Willison's pelican-on-bicycle example and discuss using game or scene building to evaluate long-horizon reasoning, planning, and library use in frontier models. One reply notes that state exploration remains harder than initial generation.
We're starting to leave the territory where you'd test an LLM by e.g. "create an svg of pelican on a bicycle". As one idea to generalize it, I was interested what Opus 5 would do if I gave it the first paragraph of the Lord of the Rings, a 1M token budget (~$10) and asked for…