LittleJS is 2D and 3D now

Hacker News Top Tools

Summary

LittleJS 发布了自推出以来的最大更新,新增完整的 3D 渲染器、内置关卡编辑器、粒子效果库、性能大幅提升,并加入了面向 AI 编码助手的工具包和 Claude Code 插件。

No content available
Original Article
View Cached Full Text

Cached at: 10/14/26, 07:05 PM

# LittleJS is 2D and 3D now Source: [https://frankforce.com/littlejs-is-2d-and-3d-now/](https://frankforce.com/littlejs-is-2d-and-3d-now/) ![](https://frankforce.com/wp-content/uploads/2026/10/site-train-sunset.png)LittleJS just got the biggest update since it launched\! It is still the small, fast, dependency\-free HTML5 game engine it always was\. Now it also has a full 3D renderer sharing the canvas with your 2D game, built\-in level editors, a library of ready\-made particle effects, a much faster core, and new tools for making games with AI\. ## 2D and 3D in the same engine This is the big one\! Meshes and shape builders, terrain and voxel maps with collision, shadow maps, colored lights and spotlights, fog, reflections, particles, trails, cameras, and custom shaders on any object\. 3D objects are regular LittleJS objects with the same physics, children and timers as 2D, so the two mix freely: a 2D UI over a 3D scene, or a 2D game inside a 3D world\. Prefer Three\.js for rendering? There is a plugin for that too\! 2D got plenty as well: a new dynamic lighting system, one\-way platforms, swept bullet collision, parallax layers, and improved object collision performance\. [![](https://frankforce.com/wp-content/uploads/2026/10/engine-screenshot-2.jpg)](https://frankforce.com/wp-content/uploads/2026/10/engine-screenshot-2.jpg)## New Tools **Level editors**, 2D and 3D, built into the engine\. Press Escape in a debug build to pause the game, edit the level in place with undo, autosave and prefabs, then play on\. The[editor guide](https://github.com/KilledByAPixel/LittleJS/blob/main/EDITOR.md)shows how to make them an editor for your own game\. 2D levels load and save as Tiled JSON\. **Particle effects library\.**Fire, smoke, sparks, explosions, rain and more, each one line:`particleEffect\('fire', pos\)`, in 2D or 3D\. Every effect takes scale, hue and saturation, and the[particle designer](https://killedbyapixel.github.io/LittleJS/examples/particles/)tweaks them or builds new ones\. Most games will not need anything else\. **The example browser**has over 100 short examples, each a single file that explains what it shows and how it works, with live editing and a Share button that puts your edited code in a link\. It is the best place to learn the engine\. [![](https://frankforce.com/wp-content/uploads/2026/10/2026-10-04-14_26_59-LittleJS-Example-Browser-1024x576.png)](https://frankforce.com/wp-content/uploads/2026/10/2026-10-04-14_26_59-LittleJS-Example-Browser.png)## Even Faster The rendering core was reworked: batched 2D sprites on WebGL2, instanced 3D drawing, and far less per\-draw overhead\. To measure it I built a[WebGL Engine Bench](https://github.com/KilledByAPixel/webgl-engine-bench): the same two scenes, moving sprites and lit cubes, through LittleJS, PixiJS, Three\.js, PlayCanvas, Phaser and Babylon\.js, reporting how many objects each holds at 60 fps\. On my machine LittleJS matched the fastest paths of the other engines and beat them in several\. That is one machine and two workloads, so run it on yours: it works in the browser with nothing to install, and results and scene improvements from other engine maintainers are welcome\. [![](https://frankforce.com/wp-content/uploads/2026/10/ljsfast-1024x576.png)](https://frankforce.com/wp-content/uploads/2026/10/ljsfast.png)## Made for AI LittleJS has a small, well documented API, with the whole thing in[one reference file](https://github.com/KilledByAPixel/LittleJS/blob/main/REFERENCE.md)\. That is exactly what coding AIs are good at, and it is the same thing that makes it readable for people\. So it is now a first\-class goal: - The[LittleJS AI toolkit](https://github.com/KilledByAPixel/LittleJS-AI): starter templates, helper modules and agent instructions for any coding AI, Claude Code, Copilot, Codex or Cursor\. - The**Claude Code plugin**installs with two commands\. Ask for a game and you get a complete, playable project, engine included, that opens from a file with no server and no npm install\. Because the engine already does the rendering, input, physics and audio, the AI’s effort goes into your game\. - The[LittleJS GPT](https://chatgpt.com/g/g-67c7c080b5bc81919736bc8815836be6-littlejs-game-maker)builds games inside ChatGPT with no code at all\. - The[LittleJS Arcade](https://killedbyapixel.github.io/LittleJSArcade/): 50\+ small games made this way, all open source, all usable as starters\. ## Why? LittleJS was always meant to be a general purpose engine, that I could use for all my games\. I started it small on purpose, with js13k as the proving ground, because keeping the core tiny and simple from day one is what makes an engine easy to learn and fast to run\. Everything since has built on that core: people wanted to make more and more ambitious things with it, and what they asked for most was 3D and tools\. I wanted the 3D side to feel exactly like the 2D side, same objects, same loop, same small API, not a separate framework bolted on\. The other reason is the community\. LittleJS is not a one\-person project any more: engine fixes, plugins, examples and a lot of games have come from other people, and the best way to push an engine forward is for people to make things with it\. The[third LittleJS Game Jam](https://itch.io/jam/littlejs-jam)is running right now, October 2 to November 2\. Come make something\! [![](https://frankforce.com/wp-content/uploads/2026/10/arcade-games-collage-1024x929.jpg)](https://frankforce.com/wp-content/uploads/2026/10/arcade-games-collage.jpg)## Try it\! - [Examples](https://killedbyapixel.github.io/LittleJS/examples) - [Docs](https://killedbyapixel.github.io/LittleJS/docs) - [GitHub](https://github.com/KilledByAPixel/LittleJS) - [Discord](https://discord.gg/zb7hcGkyZe) The new website[littlejsengine\.com](https://littlejsengine.com/)is a demo of all of this: a train ride through every feature, running on the engine\. Thanks for reading\! Give us a star oh GitHub if you like the project\. 🚂 --- ---

Similar Articles

@servasyy_ai: The physics calculations that 3D developers have practiced for years can now be done with just a single sentence. A free tool has been released that generates complex 3D particle effects from English instructions and can immediately output React or three.js code. The barriers of math and physics engines have disappeared, ushering in an era of instantly transforming ideas into reality. Experience

X AI KOLs Timeline

A free tool has been released that can generate complex 3D particle effects from English instructions and directly output React or three.js code, lowering the barrier to 3D physics calculations.

@Saccc_c: To provide a more intuitive overview of my valuable AI outputs, I've pinned this long post for my followers and clients to view. It will be updated regularly. Current key outputs include: 1) 360-degree panoramic images created with Image 2.0 + Three.js; 2) Videos created with Image 2.0 + Seedance…

X AI KOLs Following

This post introduces a collection of AI outputs created by the author using tools such as Image 2.0, Three.js, Seedance 2.0, and Codex/Claude Code, aiming to showcase their current primary work.

@VincentLogic: A widely recognized animation tool in the frontend community, 68K stars are no exaggeration! anime.js – a lightweight but incredibly powerful JavaScript animation engine. Frontend devs, you're in for a treat; it's like the Swiss Army knife for animators: all-rounder, whether it's CSS…

X AI KOLs Timeline

Anime.js is a lightweight yet powerful JavaScript animation engine that supports CSS, SVG, DOM attributes, and JavaScript object animation. It features an intuitive API, timeline system, scroll observer, drag-and-drop, and responsive animations. With 68K stars on GitHub, it's a go-to tool for frontend developers and interaction designers.

@0xCheshire: Another open-source toolkit for converting photos to Three.js models: img2threejs. It continuously compares the rendering result with the original image to automatically calibrate reconstruction quality, especially suitable for hard-surface objects like machinery, equipment, and product casings. It seems everyone is working on similar directions. However, I'm more curious about when AI will be able to...

X AI KOLs Timeline

Introduces a new open-source toolkit, img2threejs, that converts photos into Three.js models and automatically compares the rendering result with the original image to calibrate reconstruction quality, especially suitable for hard-surface objects.

@ewind_dev: Excited to share that with the help of Fable, I've finally built the ultimate cross-platform UI framework I've envisioned for years – PocketJS! Porting QuickJS to the Sony PSP with only 32MB of memory, combined with standard SolidJS and Vue Vapor, …

X AI KOLs Timeline

With Fable, the author ported QuickJS to the Sony PSP, combined SolidJS, Vue Vapor, and a compile-time Tailwind style engine to achieve smooth 60fps animations with only 8MB of memory, releasing a minimalist cross-platform UI framework called PocketJS.