Skip to content
forked from galacean/engine

Oasis Engine is a web-first and mobile-first high-performance real-time development platform.

License

Notifications You must be signed in to change notification settings

singlecoder/engine

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Jul 26, 2024
Dec 11, 2023
Aug 29, 2024
Aug 22, 2024
Aug 29, 2024
Aug 29, 2024
Aug 29, 2024
Sep 6, 2022
Jul 18, 2023
Dec 21, 2023
Jul 15, 2024
Apr 16, 2024
Jul 21, 2023
Jan 26, 2021
Apr 24, 2024
Aug 29, 2024
Dec 28, 2023
Jul 15, 2024
Jul 16, 2024
Dec 21, 2023
Jul 15, 2024
Nov 28, 2023
Jan 25, 2021
Mar 13, 2023

Repository files navigation

Galacean Engine

npm-size npm-download codecov

Galacean is a web-first and mobile-first high-performance real-time interactive engine. Use component system design and pursue ease of use and light weight. Developers can independently use and write Typescript scripts to develop projects using pure code.

image

Features

  • ๐Ÿ–ฅ  Platform - Support HTML5 and Alipay miniprogram
  • ๐Ÿ”ฎ  Graphics - Advanced 2D + 3D graphics engine
  • ๐Ÿƒ  Animation - Powerful animation system
  • ๐Ÿงฑ  Physics - Powerful and easy-to-use physical features
  • ๐Ÿ‘†  Input - Easy-to-use interactive capabilities
  • ๐Ÿ“‘  Scripts - Use TypeScript to write logic efficiently

npm

The engine is published on npm with full typing support. To install, use:

npm install @galacean/engine

This will allow you to import engine entirely using:

import * as GALACEAN from "@galacean/engine";

or individual classes using:

import { Engine, Scene, Entity } from "@galacean/engine";

Usage

// 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

Everyone is welcome to join us! Whether you find a bug, have a great feature request or you fancy owning a task from the road map feel free to get in touch.

Make sure to read the Contributing Guide / ่ดก็ŒฎๆŒ‡ๅ— before submitting changes.

Clone

Prerequisites:

  • git-lfs (Install by official website)

Clone this repository:

git clone git@github.com:galacean/runtime.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 have cloned the repository, install the build dependencies using pnpm:

pnpm install

Then, to build the source, using npm:

npm run b:all

Links

License

The engine is released under the MIT license. See LICENSE file.

About

Oasis Engine is a web-first and mobile-first high-performance real-time development platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 92.7%
  • GLSL 6.4%
  • JavaScript 0.9%