* commit 'b391c7441fc934139bf74d997424627b33ea9779': Fix physics lite raycast bug (#999) (#1104) fix: resource parser error (#1105) v0.8.0-beta.31 feat: add release action (#1102) Fix `Compoment`/`Script` `onDisable` and `onEnable` bug (#1087) Revert "fix: onDisable() call back scene is null bug (#1098)" (#1101) fix: onDisable() call back scene is null bug (#1098) Add AnimatorController loader for AniamtorController Editor (#1078) v0.8.0-beta.30 fix: pointer moving delta bug (#1083) v0.8.0-beta.29 fix: texture load bug in miniprogram (#1077) v0.8.0-beta.28 v0.8.0-beta.27 Fix Material Resolved with Texture References (#1076) Support glTF materials remap (#1034) Fix wrong word recieveShadow to receiveShadow (#1065) # Conflicts: # lerna.json # packages/core/package.json # packages/core/src/shadow/Extension.ts # packages/core/src/shadow/ShadowFeature.ts # packages/design/package.json # packages/draco/package.json # packages/loader/package.json # packages/loader/src/index.ts # packages/loader/src/resource-deserialize/index.ts # packages/loader/src/resource-deserialize/resources/animatorController/type.ts # packages/math/package.json # packages/oasis-engine/package.json # packages/physics-lite/package.json # packages/physics-physx/package.json # packages/rhi-webgl/package.json # tests/package.json
Ant Graphics Engine
This 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.
Features
- 🖥 Platform - Suppport 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
Usage
// Create engine by passing in the HTMLCanvasElement id and adjust canvas size.
const engine = new WebGLEngine("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();
npm
The engine is published on npm with full typing support. To install, use:
npm install oasis-engine
This will allow you to import 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
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.