You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Using Pure Code
If you want to build your project using pure code via runtime, install the engine from npm:
npm install @galacean/engine
Create a simple scene:
import{BlinnPhongMaterial,Camera,DirectLight,MeshRenderer,WebGLEngine,PrimitiveMesh}from"@galacean/engine";// Create engine by passing in the HTMLCanvasElement id and adjust canvas sizeconstengine=awaitWebGLEngine.create({canvas: "canvas-id"});engine.canvas.resizeByClientSize();// Get scene and create root entityconstscene=engine.sceneManager.activeScene;constrootEntity=scene.createRootEntity("Root");// Create lightconstlightEntity=rootEntity.createChild("Light");constdirectLight=lightEntity.addComponent(DirectLight);lightEntity.transform.setRotation(-45,-45,0);directLight.intensity=0.4;// Create cameraconstcameraEntity=rootEntity.createChild("Camera");cameraEntity.addComponent(Camera);cameraEntity.transform.setPosition(0,0,12);// Create sphereconstmeshEntity=rootEntity.createChild("Sphere");constmeshRenderer=meshEntity.addComponent(MeshRenderer);constmaterial=newBlinnPhongMaterial(engine);meshRenderer.setMaterial(material);meshRenderer.mesh=PrimitiveMesh.createSphere(engine,1);// Run engineengine.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.