Skip to content

Commit

Permalink
Merge pull request #102 from ant-galaxy/dev/0.9
Browse files Browse the repository at this point in the history
Main merge dev/0.9
  • Loading branch information
yangfengzzz authored Nov 3, 2022
2 parents f54d4e0 + 3190b58 commit 958297c
Show file tree
Hide file tree
Showing 75 changed files with 4,421 additions and 1,780 deletions.
47 changes: 35 additions & 12 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
- run: npm run ci
- run: npm install codecov
- name: Upload coverage to Codecov
run: ./node_modules/.bin/codecov
- run: curl -s https://codecov.io/bash
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- 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: pnpm install codecov -w
- name: Upload coverage to Codecov
run: ./node_modules/.bin/codecov
- run: curl -s https://codecov.io/bash
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pnpm-lock.yaml
.DS_Store
.nyc_output
tmp
Expand All @@ -23,4 +24,4 @@ AUTHORS
stats.html
tsconfig.tsbuildinfo
oasis-npm
api
api
5 changes: 3 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
registry=https://registry.npm.taobao.org
chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver/
electron_mirror=http://npm.taobao.org/mirrors/electron/
electron_mirror=http://npm.taobao.org/mirrors/electron/
hoist=true
auto-install-peers=true
43 changes: 26 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# Engine Toolkit

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

Some out-of-the-box utility features based on the [Oasis engine](https://github.com/oasis-engine/engine) `Script` and `Material`, welcome to enjoy!

## Features
- 📊 &nbsp;**Stats** - Statistics rendering data

- 🛸 &nbsp;**Controls** - Some camera controllers
- 🫧 &nbsp;**FrameBufferPicker** - Pixel-based object picking
- 📊 &nbsp;**Stats** - Statistics rendering data
- 🖇 &nbsp;**Auxiliary Lines** - Draw wireframe for entity and component
- 🗳 &nbsp;**Planar Shadow Material** - Two-pass shadow on the planar
- 🧍🏼 &nbsp;**Skeleton Helper** - Skeleton visualization
- ➡️ &nbsp;**Gizmo** - Operation tools for transforming (displacement, rotation, scaling)
- ⭕️ &nbsp;**Outline** - Show outline of mesh renderers
- 📐 &nbsp;**Lines** - 2D Solid Line & Dash Line
- 🛸 &nbsp;**Controls** - Some camera controllers
- 🫧 &nbsp;**FrameBufferPicker** - Pixel-based object picking
- ➡️ &nbsp;**Gizmo** - Operation tools for transforming (displacement, rotation, scaling)
- 🧭 &nbsp;**Navigation Gizmo** - Three-view & visualized operation for camera control

- 📐 &nbsp;**Lines** - 2D Solid Line & Dash Line
- 🖇 &nbsp;**Auxiliary Lines** - Draw wireframe for entity and component
- 🧍🏼 &nbsp;**Skeleton Helper** - Skeleton visualization
- ⭕️ &nbsp;**Outline** - Show outline of mesh renderers
- 🖼 &nbsp;**Geometry Sketch** - Convert geometry into texture && sketch normal and mesh wireframe

### Materials

- 🗳 &nbsp;**Planar Shadow Material** - Two-pass shadow on the planar
- ⚔️ &nbsp;**Grid Material** - Infinity grid material

## npm

Expand All @@ -36,7 +40,7 @@ import * as TOOLKIT from "oasis-engine-toolkit";
or individual classes using:

```javascript
import { OrbitControl, FramebufferPicker, Stats } from "oasis-engine-toolkit";
import { OrbitControl, FramebufferPicker } from "oasis-engine-toolkit";
```

## Contributing
Expand All @@ -47,10 +51,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 Node.js By official website)
- [PNPM](https://pnpm.io/) (Install Pnpm globally by `npm install -g pnpm`)

First, you need to install the dependencies:

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

Then, to build the source, using npm:
Expand All @@ -66,6 +75,6 @@ npm run b:all
- [Documentation](https://oasisengine.cn/0.6/docs/install-cn)
- [API References](https://oasisengine.cn/0.6/api/core/index)

## License

## License
The engine is released under the [MIT](https://opensource.org/licenses/MIT) license. See LICENSE file.
12 changes: 0 additions & 12 deletions lerna.json

This file was deleted.

75 changes: 37 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,63 @@
"packages/*"
],
"scripts": {
"bootstrap": "npm i && lerna bootstrap",
"preinstall": "npx only-allow pnpm",
"test": "cross-env TS_NODE_PROJECT=tsconfig.tests.json floss --path tests -r ts-node/register",
"test-debug": "cross-env TS_NODE_PROJECT=tsconfig.tests.json floss --path tests -r ts-node/register --debug",
"test-cov": "cross-env TS_NODE_PROJECT=tsconfig.tests.json nyc --reporter=lcov floss --path tests -r ts-node/register",
"ci": "lerna bootstrap && npm run b:module && npm run b:types && npm run test-cov",
"ci": "pnpm install && npm run b:module && npm run b:types && npm run test-cov",
"lint": "eslint packages/*/src --ext .ts",
"watch": "cross-env NODE_ENV=development BUILD_TYPE=MODULE rollup -cw -m inline",
"watch:umd": "cross-env NODE_ENV=development BUILD_TYPE=UMD rollup -cw -m inline",
"b:types": "lerna run b:types",
"b:types": "pnpm -r --filter='./packages/*' run b:types",
"b:module": "cross-env BUILD_TYPE=MODULE rollup -c",
"b:umd": "cross-env BUILD_TYPE=UMD rollup -c",
"b:miniprogram": "cross-env BUILD_TYPE=MINI rollup -c",
"b:all": "npm run b:types && cross-env BUILD_TYPE=ALL rollup -c",
"clean": "lerna exec -- rm -rf dist && lerna clean"
"clean": "pnpm -r exec rm -rf dist && pnpm -r exec rm -rf types"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.12",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/plugin-transform-object-assign": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@babel/core": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.19.1",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/plugin-transform-object-assign": "^7.18.6",
"@babel/preset-env": "^7.19.1",
"@babel/preset-typescript": "^7.18.6",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-inject": "^4.0.2",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.4",
"rollup-plugin-binary2base64": "1.0.3",
"@types/chai": "^4.3.1",
"@types/mocha": "^8.0.0",
"@types/offscreencanvas": "^2019.6.4",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"babel-loader": "^8.2.2",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-inject": "^4.0.4",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
"@types/chai": "^4.3.3",
"@types/mocha": "^8.2.3",
"@types/node": "^18.7.18",
"@types/offscreencanvas": "^2019.7.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"chai": "^4.3.6",
"cross-env": "^5.2.0",
"electron": "^13",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.1.1",
"cross-env": "^5.2.1",
"electron": "^13.6.9",
"eslint": "^7.32.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.4.1",
"floss": "^5.0.1",
"husky": "^4.3.7",
"lerna": "^3.22.1",
"lint-staged": "^10.5.3",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"nyc": "^15.1.0",
"oasis-engine": "^0.8.0-beta",
"prettier": "^2.2.1",
"rollup": "^2.36.1",
"rollup-plugin-glslify": "^1.2.0",
"oasis-engine": "^0.9.0-alpha",
"prettier": "^2.7.1",
"rollup": "^2.79.0",
"rollup-plugin-binary2base64": "1.0.3",
"rollup-plugin-glslify": "^1.3.1",
"rollup-plugin-modify": "^3.0.0",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"ts-node": "^9.1.1",
"typescript": "^4.4.3"
"ts-node": "^10",
"typescript": "^4.8.3"
},
"husky": {
"hooks": {
Expand Down
4 changes: 2 additions & 2 deletions packages/auxiliary-lines/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oasis-engine-toolkit/auxiliary-lines",
"version": "0.8.0-beta.8",
"version": "0.9.0-alpha.12",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
Expand All @@ -19,6 +19,6 @@
"types/**/*"
],
"peerDependencies": {
"oasis-engine": "^0.8.0-beta"
"oasis-engine": "^0.9.0-alpha"
}
}
Loading

0 comments on commit 958297c

Please sign in to comment.