Hu Song ebaa542496 Fix ci Error (#322)
* feat: add curl -s codecov
2021-06-08 12:01:42 +08:00
2021-06-08 12:01:42 +08:00
2021-02-08 11:37:52 +08:00
2021-01-26 11:23:36 +08:00
2021-01-26 11:23:36 +08:00
2021-01-25 18:40:22 +08:00
2021-04-27 13:52:00 +08:00
2021-04-02 15:22:20 +08:00
2021-04-27 13:52:00 +08:00
2021-01-27 11:27:19 +08:00
2021-06-08 11:29:46 +08:00
2021-05-10 18:26:18 +08:00
2021-01-25 14:13:04 +08:00

Oasis Engine (Ant Graphics Engine)

Oasis logo

npm-size npm-download

Oasis is a web-first and mobile-first high-performance real-time development platform. Use component system design and pursue ease of use and light weight. This repository is the core engine of Oasis. Developers can independently use and write Typescript scripts to develop projects using pure code.

Features

  • 🖥  Platform - Suppport HTML5 and Alipay miniprogram
  • 🔮  Graphics - Advanced 2D + 3D graphics engine
  • 🏃  Animation - Powerful animation system
  • 📑  Scripts - Use TypeScript to write logic efficiently

Usage

// Create engine by passing in the HTMLCanvasElement id and adjust canvas size.
const engine = new WebGLEngine("canvas-id");
engine.canvas.resizeByClientSize();

// Create root entity.
const rootEntity = engine.sceneManager.activeScene.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();

npm

Oasis Engine are published on npm with full typing support. To install, use:

npm install oasis-engine

This will allow you to import Oasis Engine entirely using:

import * as OASIS from "oasis-engine";

or individual classes using:

import { Engine, Scene, Entity } from "oasis-engine";

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.

Build

If you don't already have Node.js and NPM, go install them. Then, in the folder where you have cloned the repository, install the build dependencies using npm:

npm run bootstrap

Then, to build the source, using npm:

npm run build

The docs can be generated using npm:

npm run doc

License

The Oasis Engine is released under the MIT license. See LICENSE file.

Description
A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF. 游戏引擎
Readme MIT 209 MiB
Languages
JavaScript 66%
TypeScript 31%
GLSL 2.8%
Yacc 0.1%