Skip to content

Commit

Permalink
resolve conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
liyangyang0901 committed May 26, 2023
2 parents cb89932 + 2b3e031 commit dbdc202
Show file tree
Hide file tree
Showing 2,482 changed files with 209,162 additions and 204,869 deletions.
31 changes: 11 additions & 20 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contribution
## Introduction

It is assumed that you know a little about node.js and git. If not, [here's some help to get started with git](https://help.github.com/en/github/using-git) and [here’s some help to get started with node.js.](https://nodejs.org/en/docs/guides/getting-started-guide/)
It is assumed that you know a little about Node.js and Git. If not, [here's some help to get started with Git](https://help.github.com/en/github/using-git) and [here’s some help to get started with Node.js.](https://nodejs.org/en/docs/guides/getting-started-guide/)

* Install [Node.js](https://nodejs.org/)
* Install [Git](https://git-scm.com/)
Expand All @@ -26,25 +26,20 @@ As per the npm standard, ‘start’ is the place to begin the package.

npm start

This script will start a local server similar to [threejs.org](https://threejs.org/), but instead will be hosted on your local machine. Browse to http://localhost:8080/ to check it out. It also automatically creates the build/three.js’ and ‘build/three.module.js’ scripts anytime there is a change within your three.js directory.
This script will start a local server similar to [threejs.org](https://threejs.org/), but instead will be hosted on your local machine. Browse to https://localhost:8080/ to check it out. It also automatically creates the `build/three.module.js` script anytime there is a change `src` directory.

The next most important script runs all the appropriate testing. The E-2-E testing is intended to be run by github actions.
Next scripts run all the appropriate testing.

Run this command from the root folder to install test dependencies.

npm install --prefix test

And run tests.

npm test
- `npm run test` - Lint testing and unit testing (individually being `npm run lint` and `npm run test-unit`)
- `npm run test-e2e` - E2E testing. This one can take quite a long time and installs ~200 MB Chromium browser - it is primarily intended to be run only by GitHub Actions

The linting is there to keep a consistent code style across all of the code and the testing is there to help catch bugs and check that the code behaves as expected. It is important that neither of these steps comes up with any errors due to your changes.

Many linting errors can be fixed automatically by running
Most linting errors can be fixed automatically by running

npm lint-fix
npm run lint-fix

If you’d like to make a minified version of the build files i.e. ‘build/three.min.js run:
If you’d like to make a build of the source files (e.g. `build/three.module.js`) run:

npm run build

Expand Down Expand Up @@ -72,16 +67,12 @@ When you’ve decided to make changes, start with the following:
* Don't include any build files in your commit.
* Not all new features will need a new example. Simpler features could be incorporated into an existing example. Bigger features may be asked to add an example demonstrating the feature.
* Making changes may require changes to the documentation. To update the docs in other languages, simply copy the English to begin with.
* it's good to also add an example and screenshot for it, for showing how it's used and for end-to-end testing.
* It's good to also add an example and screenshot for it, for showing how it's used and for end-to-end testing.
* If you modify existing code, run relevant examples to check they didn't break and there wasn't performance regress.
* If you add some assets for the examples (models, textures, sounds, etc), make sure they have a proper license allowing for their use here, less restrictive the better. It is unlikely for large assets to be accepted.
* If some issue is relevant to the patch/feature, please mention it with a hash (e.g. #2774) in a commit message to get cross-reference in GitHub.
* If you modify files in `examples/jsm` directory, then don't perform any changes in the `examples/js`, non-module files are auto-generated by running `npm run build-examples`.
* If the end-to-end test failed in Travis and you are sure that all is correct, make a new screenshot with

npm run make-screenshot <example_1_name> ...<example_N_name>

* Once done with a patch/feature do not add more commits to a feature branch
* If the end-to-end test failed and you are sure that all is correct, follow the instructions it outputs.
* Once done with a patch/feature do not add more commits to a feature branch.
* Create separate branches per patch or feature.
* If you make a PR but it is not actually ready to be pulled into the dev branch then please [convert it to a draft PR](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).

Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

github: [mrdoob, HumanInteractive, donmccurdy]
github: [mrdoob, HumanInteractive, donmccurdy, gkjohnson, WestLangley]
47 changes: 0 additions & 47 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug Report
description: File a reproducible bug or regression.
body:
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Reproduction steps
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1.
2.
3.
validations:
required: true
- type: textarea
id: code
attributes:
label: Code
value: |
```js
// code goes here
```
validations:
required: true
- type: textarea
id: example
attributes:
label: Live example
value: |
* [jsfiddle-latest-release](https://jsfiddle.net/g3atw6k5/)
* [jsfiddle-dev](https://jsfiddle.net/hjqw94c5/)
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem (drag and drop the image).
validations:
required: false
- type: input
id: version
attributes:
label: Version
description: What version of the library are you using?
placeholder: r
validations:
required: true
- type: dropdown
id: device
attributes:
label: Device
multiple: true
options:
- Desktop
- Mobile
- Headset
- type: dropdown
id: browser
attributes:
label: Browser
multiple: true
options:
- Chrome
- Firefox
- Safari
- Edge
- type: dropdown
id: os
attributes:
label: OS
multiple: true
options:
- Windows
- MacOS
- Linux
- Android
- iOS
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature request
description: Suggest an idea for the project.
body:
- type: textarea
id: description
attributes:
label: Description
description: Is your feature request related to a problem? Please describe.
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution
description: Describe the solution you'd like.
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives
description: Describe alternatives you've considered.
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the feature request here.
validations:
required: false
7 changes: 7 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
paths-ignore:
- "docs/prettify/**/*.*"
- "editor/js/libs/**/*.*"
- "examples/jsm/libs/**/*.*"
- "examples/jsm/loaders/ifc/**/*.*"
- "build/*.*"
- "manual/3rdparty/**/*.*"
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ on:
- 'docs/**'
- 'files/**'

jobs:
permissions:
contents: read

jobs:
lint:
name: "Linting"
name: "Lint testing"
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- name: Install packages
run: npm ci

- name: === Linting ===
- name: === Lint testing ===
run: npm run lint

unit:
Expand All @@ -37,15 +39,13 @@ jobs:
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- name: Install packages
run: |
npm ci
npm ci --prefix test
run: npm ci
- name: Build
run: npm run build

Expand All @@ -54,45 +54,44 @@ jobs:

e2e:
name: "E2E testing"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest ]
CI: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
env:
CI: ${{ matrix.CI }}
FORCE_COLOR: 1
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- name: Install packages
run: |
npm ci
npm ci --prefix test
sudo apt-get install xvfb
run: npm ci
- name: Build
run: npm run build

- name: === E2E testing ===
run: xvfb-run --auto-servernum npm run test-e2e
run: npm run test-e2e

e2e-cov:
name: "Ready for release"
name: "Examples ready for release"
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- name: Install packages
run: npm ci

- name: === Ready for release ===
- name: === Examples ready for release ===
run: npm run test-e2e-cov
Loading

0 comments on commit dbdc202

Please sign in to comment.