Skip to content

Commit

Permalink
Merge branch 'main' into cr/fix-vao
Browse files Browse the repository at this point in the history
* main: (514 commits)
  "v0.9.0-beta.73"
  fix: scene parser error (galacean#1426)
  Fix SpriteRenderer bounding box error (galacean#1425)
  Update README.md
  Update README.md
  "v0.9.0-beta.72"
  "v0.9.0-beta.71"
  Revert "fix: InputManager default listener target" (galacean#1414)
  "v0.9.0-beta.70"
  fix: add shadow parser (galacean#1411)
  Add `toJSON` in base math class (galacean#1380) (galacean#1409)
  refactor(particle): Add an infinite bounding box to the particle system and it will never be clipped (galacean#1410)
  "v0.9.0-beta.69"
  Fix glTF SkinnedMeshRenderer default local bounds (galacean#1405)
  Fix camera cull bug (galacean#1396)
  "v0.9.0-beta.68"
  fix: InputManager default listener target
  "v0.9.0-beta.67"
  Fix shader compile performance on some windows device (galacean#1390)
  "v0.9.0-beta.66"
  ...
  • Loading branch information
GuoLei1990 committed Mar 30, 2023
2 parents 71c0d66 + 9c922b3 commit 0726a72
Show file tree
Hide file tree
Showing 578 changed files with 21,889 additions and 17,657 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
"type-enum": [
2,
"always",
["feat", "fix", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "test", "types", "style", "revert"]
["feat", "fix", "build", "ci", "docs", "perf", "refactor", "test", "types", "style", "revert"]
]
}
};
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

github: [oasis-engine]
github: [ant-galaxy]
open_collective: oasis
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

changelog:
exclude:
labels:
- ignore for release
categories:
- title: Breaking Changes 🛠
labels:
- breaking
- title: Features 🎉
labels:
- feature
- enhancement
- title: Fixed 🐞
labels:
- bug
- title: Other Changes
labels:
- test
- "*"
29 changes: 26 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,40 @@ jobs:

strategy:
matrix:
node-version: [12.x, 15.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- run: npm run ci
- run: npm install codecov
- run: pnpm install codecov -w
- name: Upload coverage to Codecov
run: ./node_modules/.bin/codecov
- run: curl -s https://codecov.io/bash
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions

name: Release Note

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
message:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Dump Github context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Send notification to Dingding
if: success()
uses: mrkou47/action-dingding-webhook@main
env:
DINGDING_SECRET_TOKEN_MAP: ${{ secrets.DINGDING_SECRET_TOKEN_MAP }}
with:
title: Release Note ${{ github.event.release.tag_name }}
text: ${{ toJSON(github.event.release.body) }}

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tmp
/packages/*/node_modules
/packages/*/types
/packages/*/doc
/tests/node_modules
/playground/node_modules
types
/packages/*/test/fixtures/**/node_modules
Expand All @@ -23,4 +24,6 @@ AUTHORS
stats.html
tsconfig.tsbuildinfo
oasis-npm
api
api
pnpm-lock.yaml
yarn.lock
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver/
electron_mirror=http://npm.taobao.org/mirrors/electron/
hoist=true
auto-install-peers=true
58 changes: 0 additions & 58 deletions CHANGELOG.md

This file was deleted.

76 changes: 42 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
# Ant Graphics Engine
# Oasis Engine

<a href="https://www.npmjs.com/package/oasis-engine"><img src="https://img.shields.io/npm/v/oasis-engine"/></a>
![npm-size](https://img.shields.io/bundlephobia/minzip/oasis-engine)
![npm-download](https://img.shields.io/npm/dm/oasis-engine)
[![codecov](https://codecov.io/gh/oasis-engine/engine/branch/main/graph/badge.svg?token=KR2UBKE3OX)](https://codecov.io/gh/oasis-engine/engine)
[![codecov](https://codecov.io/gh/ant-galaxy/oasis-engine/branch/main/graph/badge.svg?token=KR2UBKE3OX)](https://codecov.io/gh/ant-galaxy/oasis-engine)

This 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. Developers can independently use and write Typescript scripts to develop projects using pure code.
Oasis 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

- 🖥 &nbsp;**Platform** - Suppport HTML5 and Alipay miniprogram
- 🔮 &nbsp;**Graphics** - Advanced 2D + 3D graphics engine
- 🏃 &nbsp;**Animation** - Powerful animation system
- 🧱 &nbsp;**Physics** - Powerful and easy-to-use physical features
- 👆 &nbsp;**Input** - Easy-to-use interactive capabilities
- 📑 &nbsp;**Scripts** - Use TypeScript to write logic efficiently

## npm

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

```sh
npm install oasis-engine
```

This will allow you to import engine entirely using:

```javascript
import * as OASIS from "oasis-engine";
```

or individual classes using:

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

## Usage

```typescript
// Create engine by passing in the HTMLCanvasElement id and adjust canvas size.
// 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.
// Get scene and create root entity
const scene = engine.sceneManager.activeScene;
const rootEntity = scene.createRootEntity("Root");

// Create light.
// Create light
const lightEntity = rootEntity.createChild("Light");
const directLight = lightEntity.addComponent(DirectLight);
lightEntity.transform.setRotation(-45, -45, 0);
directLight.intensity = 0.4;

// Create camera.
// Create camera
const cameraEntity = rootEntity.createChild("Camera");
cameraEntity.addComponent(Camera);
cameraEntity.transform.setPosition(0, 0, 12);

// Create sphere.
// 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.
// Run engine
engine.run();
```

## npm

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

```sh
npm install oasis-engine
```

This will allow you to import engine entirely using:

```javascript
import * as OASIS from "oasis-engine";
```

or individual classes using:

```javascript
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.
Expand All @@ -75,10 +77,15 @@ Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) / [贡

## 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:
Prerequisites:

- [Node.js v15.0.0+](https://nodejs.org/en/) and NPM (Install by official website)
- [PNPM](https://pnpm.io/) (Install globally by `npm install -g pnpm`)

In the folder where you have cloned the repository, install the build dependencies using pnpm:

```sh
npm run bootstrap
pnpm install
```

Then, to build the source, using npm:
Expand All @@ -90,10 +97,11 @@ npm run b:all
## Links

- [Official Site](https://oasisengine.cn)
- [Examples](https://oasisengine.cn/0.6/examples)
- [Documentation](https://oasisengine.cn/0.6/docs/install-cn)
- [API References](https://oasisengine.cn/0.6/api/core/index)
- [Examples](https://oasisengine.cn/#/examples/latest)
- [Documentation](https://oasisengine.cn/#/docs/latest/cn/install)
- [API References](https://oasisengine.cn/#/api/latest/core)


## License

The engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
21 changes: 0 additions & 21 deletions babel.config.js

This file was deleted.

Loading

0 comments on commit 0726a72

Please sign in to comment.