Skip to content

Commit

Permalink
Merge pull request mrdoob#3 from mrdoob/dev
Browse files Browse the repository at this point in the history
update
  • Loading branch information
wobushijiujiu authored May 5, 2020
2 parents df947a1 + bc29345 commit e680a47
Show file tree
Hide file tree
Showing 1,952 changed files with 52,451 additions and 31,669 deletions.
5 changes: 3 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Help
# Help
#### The issues section is for bug reports and feature requests only. If you need help, please use the [forum](http://discourse.threejs.org/) or [stackoverflow](http://stackoverflow.com/questions/tagged/three.js).
---
# Bugs
Expand All @@ -25,4 +25,5 @@
2. Fork the repository on GitHub.
3. Check the [Contribution Guidelines](https://github.com/mrdoob/three.js/wiki/How-to-contribute-to-three.js).
4. Make changes to your clone of the repository.
5. Submit a pull request. Don't include build files in the PR.
5. If your changes leads to a change in examples, make a new screenshot with `npm run make-screenshot <example_name>`.
6. Submit a pull request. Don't include build files in the PR.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please also include a live example if possible. You can start from these templat
##### Three.js version

- [ ] Dev
- [ ] r112
- [ ] r116
- [ ] ...

##### Browser
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI

on:
pull_request:
paths-ignore:
- 'build/**'
- 'docs/**'
- 'files/**'
push:
paths-ignore:
- 'build/**'
- 'docs/**'
- 'files/**'

jobs:

lint:
name: "Linting"
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Restore cache
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-ci-${{ env.cache-name }}-
- name: Install packages
run: npm ci

- name: === Linting ===
run: npm run test-lint

unit:
name: "Unit testing"
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Restore cache
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-ci-${{ env.cache-name }}-
- name: Install packages
run: npm ci && npm run build-test

- name: === Unit testing ===
run: npm run test-unit

e2e:
name: "E2E testing"
runs-on: ubuntu-latest
strategy:
matrix:
CI: [ 0, 1, 2, 3 ]
env:
CI: ${{ matrix.CI }}
FORCE_COLOR: 1
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Restore cache
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-ci-${{ env.cache-name }}-
- name: Install packages
run: npm ci && sudo apt-get install xvfb && npm run build

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

e2e-cov:
name: "Ready for release"
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Restore cache
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-ci-${{ env.cache-name }}-
- name: Install packages
run: npm ci

- name: === Ready for release ===
run: npm run test-e2e-cov
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ node_modules
npm-debug.log
.jshintrc
.vs/
test/unit/three.*.unit.js
test/unit/three.*.unit.js
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright © 2010-2019 three.js authors
Copyright © 2010-2020 three.js authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
three.js
========

[![NPM package][npm]][npm-url]
[![NPM Package][npm]][npm-url]
[![Build Size][build-size]][build-size-url]
[![Build Status][build-status]][build-status-url]
[![Dependencies][dependencies]][dependencies-url]
[![NPM Downloads][npm-downloads]][npmtrends-url]
[![Dev Dependencies][dev-dependencies]][dev-dependencies-url]
[![Language Grade][lgtm]][lgtm-url]

Expand All @@ -18,21 +17,16 @@ The aim of the project is to create an easy to use, lightweight, 3D library with
[Migrating](https://github.com/mrdoob/three.js/wiki/Migration-Guide) &mdash;
[Questions](http://stackoverflow.com/questions/tagged/three.js) &mdash;
[Forum](https://discourse.threejs.org/) &mdash;
[Gitter](https://gitter.im/mrdoob/three.js) &mdash;
[Slack](https://join.slack.com/t/threejs/shared_invite/enQtMzYxMzczODM2OTgxLTQ1YmY4YTQxOTFjNDAzYmQ4NjU2YzRhNzliY2RiNDEyYjU2MjhhODgyYWQ5Y2MyZTU3MWNkOGVmOGRhOTQzYTk)
[Slack](https://join.slack.com/t/threejs/shared_invite/enQtMzYxMzczODM2OTgxLTQ1YmY4YTQxOTFjNDAzYmQ4NjU2YzRhNzliY2RiNDEyYjU2MjhhODgyYWQ5Y2MyZTU3MWNkOGVmOGRhOTQzYTk) &mdash;
[Discord](https://discordapp.com/invite/HF4UdyF)

### Usage ###

Download the [minified library](http://threejs.org/build/three.min.js) and include it in your HTML, or install and import it as a [module](http://threejs.org/docs/#manual/introduction/Import-via-modules),
Alternatively, see [how to build the library yourself](https://github.com/mrdoob/three.js/wiki/Build-instructions).

```html
<script src="js/three.min.js"></script>
```

This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` renderer for the scene and camera, and it adds that viewport to the `document.body` element. Finally, it animates the cube within the scene for the camera.

```javascript
import * as THREE from 'js/three.module.js';

var camera, scene, renderer;
var geometry, material, mesh;

Expand Down Expand Up @@ -70,22 +64,20 @@ function animate() {
}
```

If everything went well you should see [this](https://jsfiddle.net/f2Lommf5/).
If everything went well, you should see [this](https://jsfiddle.net/8kubjpL5/).

### Change log ###

[Releases](https://github.com/mrdoob/three.js/releases)


[npm]: https://img.shields.io/npm/v/three.svg
[npm]: https://img.shields.io/npm/v/three
[npm-url]: https://www.npmjs.com/package/three
[build-size]: https://badgen.net/bundlephobia/minzip/three
[build-size-url]: https://bundlephobia.com/result?p=three
[build-status]: https://travis-ci.org/mrdoob/three.js.svg?branch=dev
[build-status-url]: https://travis-ci.org/mrdoob/three.js
[dependencies]: https://img.shields.io/david/mrdoob/three.js.svg
[dependencies-url]: https://david-dm.org/mrdoob/three.js
[dev-dependencies]: https://img.shields.io/david/dev/mrdoob/three.js.svg
[npm-downloads]: https://img.shields.io/npm/dw/three
[npmtrends-url]: https://www.npmtrends.com/three
[dev-dependencies]: https://img.shields.io/david/dev/mrdoob/three.js
[dev-dependencies-url]: https://david-dm.org/mrdoob/three.js#info=devDependencies
[lgtm]: https://img.shields.io/lgtm/grade/javascript/g/mrdoob/three.js.svg?label=code%20quality
[lgtm]: https://img.shields.io/lgtm/alerts/github/mrdoob/three.js
[lgtm-url]: https://lgtm.com/projects/g/mrdoob/three.js/
Loading

0 comments on commit e680a47

Please sign in to comment.