Open-source project
layabox/LayaAir avatar
layabox/LayaAir

LayaAir: a TypeScript engine aimed squarely at Chinese mini-game platforms

LayaAir is a fully platform rendering engine with rich 2D/3D rendering capabilities and a mature integrated development platform

2,145 stars537 forksTypeScriptMIT

At a glance

What is it?
An MIT-licensed 2D and 3D engine with an integrated IDE, one-click export to native apps and a long list of mini-game runtimes, built around WebGL, WebGPU, OpenGL and Vulkan.
Who is it for?
LayaAir's real differentiator is not the renderer, it is the export matrix. Engine code written in TypeScript, shipped as HTML5, native binaries for five desktop and mobile platforms, and a specific list of mini-game runtimes including WeChat, ByteDance, Alipay, OPPO, vivo and Xiaomi is a distribution story that most Western engines do not attempt at all.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 22 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Rendering across four graphics APIs and three pipeline styles

The README describes LayaAir as a 3D engine supporting full-platform publishing, under the Layabox brand, and applies it to a range far wider than games: games, education, advertising, marketing, digital twins, metaverse, AR guides, VR scenes, architectural design and industrial design. That breadth in the marketing copy is worth holding loosely, but the graphics list underneath it is concrete.

The engine has adapted to WebGL, WebGPU, OpenGL and Vulkan, and the specific feature claims are named rather than vague: programmable rendering pipelines, next-generation PBR rendering streams, ClusterLighting for multiple lights, and a Forward+ rendering pipeline. ClusterLighting and Forward+ are both approaches to avoiding per-object light loops at scale, so having both named suggests the engine is designed to be configured for the hardware you actually have rather than locked to one technique.

Topics confirm the direction: webgl, webgl2, webgpu, 2d-game-engine, 3d-engine, html5 and physics. The repository language is TypeScript, which is unusual for a 3D engine of this size and means the engine source and the code you write against it share a language.

One click, many targets, and a specific list of mini-game runtimes

The export claim is the part that makes LayaAir different from Cocos Creator or Godot. Beyond HTML5 web, it publishes native apps for Android, iOS, Mac, Windows and Linux, and mini games for a named set of Chinese platforms: WeChat mini-games, ByteDance mini-games, Alipay mini-games, OPPO mini-games, vivo mini-games and Xiaomi Quick Games.

That list is a roadmap of where the mobile web audience is in that market, and supporting it is not free. Each runtime has its own module system, its own asset loading constraints and its own release process, which is why the recent release notes contain fixes as narrow as subpackage names containing path separators that Taobao Mini Games does not support. Getting to that level of platform-specific detail is the actual work behind the marketing sentence.

The IDE is part of the same product rather than a separate tool. It includes a 3D scene editor, material editor, particle editor, blueprint editor, animation editor, physics editor and UI editor, and the README notes that developers can upload plugins to the resource store for sharing and sale. There is also a built-in AIGC framework covering AI content generation, AI control of the IDE and AI customer service.

Building the engine from source is three npm commands

The build instructions are unusually short for an engine of this class. Install, run, build, each one a single command in the repository root.

bash
npm install
bash
npm run start

Running the tests is described as running the npm script and then opening bin/index.html with live server. Building produces a build folder in the root directory containing the compiled engine.

bash
npm run build

The package.json explains what start actually does, which is more useful than the README's label. The start script chains clean, copyShaders and copyJsLibs in parallel, then runs watchShaders and watchSamples. It is a watch-mode pipeline, not a test suite, which the README's own wording gets wrong by calling it Run tests. The build script runs node scripts/buildEngine.mjs, and there are separate scripts for building samples, and for each of the WebGL and WebGPU targets individually.

Wiring a self-compiled engine into the IDE is a file copy. You take the JavaScript files from the build/libs folder of the engine and copy them to the root of your project at engine/libs, and the README is explicit that you need not copy all of them, only the ones you want to overwrite.

Three development lines, and the default branch is one of them

The branch guidance in the README is the thing to read before you clone anything. LayaAir_3.x, with examples like LayaAir_3.1, are stable versions of the LayaAir3 engine where each sub-version number corresponds to a branch. LayaAir_2.x, with examples like LayaAir_2.13.3, are stable versions of the LayaAir2 engine where each revision corresponds to a branch. Master3.0 is the active development version of LayaAir3, and the README warns against using it in production.

Two things do not line up with that description. The repository default branch is LayaAir_3.4, which is a specific patch line rather than any of the three categories the README names, so the guidance is written for a slightly older branch scheme than the one the repository currently defaults to. And the version history is genuinely parallel: v3.4.1 was published on 2026-08-31 while v3.3.13 was published on 2026-09-17, meaning the older-numbered line received a release after the newer-numbered one.

That is not necessarily a mistake, since maintenance branches are normal, but it does mean the highest tag number is not the most recent tag. If you are pinning a version, pin the date of the release rather than assuming the highest number.

Release notes are bug fixes only, and they read as a real bug list

The three most recent engine library releases contain no new features at all. Every entry is a fix, and the fixes are specific enough to be useful when something goes wrong in your project.

Version 3.3.13 fixed a memory overflow when playing videos in Native Runtime VideoNode decoder mode, an async timing issue with stop and start when switching video sources in the native Windows VideoNode, a Spine 4.0 fast rendering issue where permanently transparent slots could be overwritten by attached textures and produce black artifacts, and a Shader Blueprint issue where connecting Color and Float to multiply incorrectly reduced the output to a one-dimensional value. It also fixed enabling ASTC_6X6 for automatic atlases incorrectly forcing texture dimensions to powers of two.

Version 3.4.1 concentrated on text rendering: GTextField clipping when using skew with auto-shrink, overlapping outlined text in single-character rendering mode because character spacing ignored stroke width, text overflow changes not taking effect immediately, and text shadows rendering inconsistently across fontScale values. Version 3.3.12 fixed a Trail renderer submitting drawArrays with a vertex count of zero, a crash from calling Animator.play() when the state machine was null, and InputManager.hasKeyDown retaining stale key states after the browser lost focus.

The pattern across all three is text layout and renderer edge cases on specific platforms. The repository was last pushed on 2026-09-20 and carries 2,145 stars, 537 forks and only 53 open issues, which is a low issue count relative to the star count for an engine with this many platform combinations.

MIT in the README, a different answer in package.json

The README ends with a License heading and the single word MIT. GitHub also reports MIT. The package.json in the root does not: its license field reads SEE LICENSE IN LICENSE.md. There is a LICENSE file in the tree, so the SPDX-style reference is pointing at a real file rather than being a placeholder, but it means the machine-readable metadata a package manager would read and the human-readable statement a reader sees are not the same value.

For anyone planning to ship a LayaAir title this is a small thing to verify yourself and a large thing to get wrong. The README also carries a Project Showcase Policy section that is worth reading before you publish anything. Using the engine constitutes agreement that Layabox may display, reference and promote your project for non-profit promotional purposes, through the website, documentation, presentations, social channels and community content. The authorization is described as non-exclusive and royalty-free, and limited to ecosystem promotion, with intellectual property remaining with its owners.

The Chinese-language README is linked directly from the English one as README.zh-CN.md, and the release notes themselves are written in Chinese with a pointer to the official site for the full changelog. Documentation lives at the LayaAir documentation and API reference URLs rather than in this repository, alongside a demo gallery and the engine download page.

Editorial conclusion

LayaAir's real differentiator is not the renderer, it is the export matrix. Engine code written in TypeScript, shipped as HTML5, native binaries for five desktop and mobile platforms, and a specific list of mini-game runtimes including WeChat, ByteDance, Alipay, OPPO, vivo and Xiaomi is a distribution story that most Western engines do not attempt at all. Start from the official site download rather than this repository, because the engine and the IDE ship together, and if you intend to compile your own, read the branch guidance carefully since three lines of development run in parallel.

Frequently asked questions

What platforms can LayaAir publish to?

HTML5 web, native apps for Android, iOS, Mac, Windows and Linux, and mini games for WeChat, ByteDance, Alipay, OPPO, vivo and Xiaomi Quick Games. The engine abstracts WebGL, WebGPU, OpenGL and Vulkan underneath those targets.

Do I need the LayaAir IDE to use the engine?

The engine and the IDE are distributed together from the official site, and the IDE is where the scene, material, particle, blueprint, animation, physics and UI editors live. You can also compile the engine from this repository and drop the JavaScript files into your project at engine/libs to replace only the parts you want to override.

Which branch of LayaAir should I use for a production project?

A stable 3.x or 2.x line. The README warns explicitly against Master3.0 for production because it is the active development branch. Note that the repository default branch is the specific patch line LayaAir_3.4, which does not match any of the three categories the README describes.

What graphics APIs and rendering features does the engine support?

WebGL, WebGL2, WebGPU, OpenGL and Vulkan, with programmable rendering pipelines, PBR rendering streams, ClusterLighting multi-light technology and a Forward+ pipeline named explicitly in the project description.

Is LayaAir free to use commercially?

The README states MIT, and GitHub agrees, though the package.json license field instead refers to LICENSE.md, so read that file rather than relying on a badge. The README also adds a promotion policy granting Layabox the right to display and advertise projects built with the engine for ecosystem purposes.

Official sources

  1. layabox/LayaAir on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/layabox-layaair.svg)](https://hysenlabs.com/projects/layabox-layaair)