galacean /engine
A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF.
★ 5,922⑂ 413👁 70⑃ 2,137● 935▤ 329
+0
日增长
5,922
stars
413
forks
70
watchers
2,137
prs
935
issues
329
releases
README
Galacean Engine
!npm-size
!npm-download
Galacean Engine is a high-performance, real-time interactive engine designed primarily for web and mobile platforms. It employs a component system architecture and emphasizes ease of use and lightweight design. Developers can create projects using either editor or pure code.
!image
Features
- 🖥 Platform - Support HTML5 and wechat minigame
- 🔮 Graphics - Advanced 2D + 3D graphics engine
- 🏃 Animation - Powerful animation system
- 🧱 Physics - Powerful and easy-to-use physical features
- 🎨 GUI - Flexible UI system with drag-and-drop and dynamic interactions
- 👆 Input - Easy-to-use interactive capabilities
- 📑 Scripts - Use TypeScript to write logic efficiently
Usage
Using Editor
We recommend using Editor for a streamlined workflow that enables seamless integration between artists and developers. Its intuitive visual tools allow artists to quickly create scenes and enable developers to write custom logic, with convenient platform export. You can even create projects based on pre-built case templates.
!image
Using Pure Code
If you want to build your project using pure code via runtime, install the engine from npm:
sh
npm install @galacean/engine
Create a simple scene:
typescript
import { BlinnPhongMaterial, Camera, DirectLight, MeshRenderer, WebGLEngine, PrimitiveMesh } from "@galacean/engine";
// Create engine by passing in the HTMLCanvasElement id and adjust canvas size
const engine = await WebGLEngine.create({ canvas: "canvas-id" });
engine.canvas.resizeByClientSize();
// Get scene and create root entity
const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity("Root");
// Create light
const lightEntity = rootEntity.createChild("Light");
const directLight = lightEntity.addComponent(DirectLight);
lightEntity.transform.setRotation(-45, -45, 0);
directLight.intensity = 0.4;
// Create camera
const cameraEntity = rootEntity.createChild("Camera");
cameraEntity.addComponent(Camera);
cameraEntity.transform.setPosition(0, 0, 12);
// Create sphere
const meshEntity = rootEntity.createChild("Sphere");
const meshRenderer = meshEntity.addComponent(MeshRenderer);
const material = new BlinnPhongMaterial(engine);
meshRenderer.setMaterial(material);
meshRenderer.mesh = PrimitiveMesh.createSphere(engine, 1);
// Run engine
engine.run();
Contributing
This repository contains the runtime's source code and documentation. Everyone is welcome to contribute—whether you find a bug, have a feature request, or want to tackle a task from our roadmap, please get in touch.
Make sure to read the Contributing Guide / 贡献指南 before submitting changes.
Clone
Prerequisites:
- git-lfs (Install by official website)
Clone this repository:
sh
git clone [email protected]:galacean/engine.git
Build
Prerequisites:
- Node.js v15.0.0+ and NPM (Install by official website)
- PNPM (Install globally by npm install -g pnpm)
In the folder where you hTop issues
#1665 Refactored setting engine frame rate.6 comments · 2023-07-27#1388数学库中相对其他引擎缺少的 API4 comments · 2023-03-02#2550Support FSR3 comments · 2025-02-12#2985Support WebGPU2 comments · 2026-05-11#2852绘制文字的时候,估算的高度不准确2 comments · 2025-09-29#2806Provide more sugar API on ResourceManager2 comments · 2025-08-25#25752D 材质缺少与 Unlit 类似的 tilingOffset 功能2 comments · 2025-03-03#2514Get real effect state in local Post-Processing2 comments · 2025-01-16
Latest release
v1.6.13 v1.6.13 2025-12-29What's Changed Fixed 🐞 Fix iOS 26.2 audio play bug by @GuoLei1990 in https://github.com/galacean/engine/pull/2874 Full Changelog: https://github.com/galacean/engine/compare/v1.6.12...v1.6.13