@tweenjs/tween.js
Advanced tools
Comparing version 18.1.0 to 18.1.2
{ | ||
"name": "@tweenjs/tween.js", | ||
"description": "Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.", | ||
"version": "18.1.0", | ||
"version": "18.1.2", | ||
"main": "dist/tween.cjs.js", | ||
@@ -23,12 +23,9 @@ "module": "dist/tween.esm.js", | ||
"build": "rollup -c ./rollup.config.js", | ||
"test": "npm run build && npm run test-unit && npm run test-correctness && npm run test-style", | ||
"test": "npm run build && npm run test-unit && npm run test-lint", | ||
"test-unit": "nodeunit test/unit/nodeunitheadless.js", | ||
"test-correctness": "jshint --config test/jshintrc src/Tween.js", | ||
"test-style": "jscs --config test/jscs.json src/Tween.js", | ||
"semantic-release": "semantic-release" | ||
"test-lint": "eslint src/Tween.js" | ||
}, | ||
"author": "tween.js contributors (https://github.com/tweenjs/tween.js/graphs/contributors)", | ||
"devDependencies": { | ||
"jscs": "^2.11.0", | ||
"jshint": "^2.9.4", | ||
"eslint": "^6.3.0", | ||
"nodeunit": "^0.9.5", | ||
@@ -35,0 +32,0 @@ "rollup": "^0.57.1" |
@@ -11,3 +11,3 @@ # tween.js | ||
**Update Note** In v18.0.0 the script you should include has moved from `src/Tween.js` to `dist/tween.umd.js`. | ||
**Update Note** In v18 the script you should include has moved from `src/Tween.js` to `dist/tween.umd.js`. See the [installation section](#Installation) below. | ||
@@ -43,26 +43,34 @@ ```javascript | ||
Download one of the builds of the library and include it in your code. For example: | ||
Currently npm is required to build the project. | ||
```html | ||
<script src="js/tween.umd.js"></script> | ||
```bash | ||
git clone https://github.com/tweenjs/tween.js | ||
cd tween.js | ||
npm i . | ||
npm run build | ||
``` | ||
There are currently four different builds of the library: | ||
This will create some builds in the `dist` directory. There are currently four different builds of the library: | ||
- [UMD : tween.umd.js](https://raw.githubusercontent.com/tweenjs/tween.js/master/dist/tween.umd.js) | ||
- [AMD : tween.amd.js](https://raw.githubusercontent.com/tweenjs/tween.js/master/dist/tween.amd.js) | ||
- [CommonJS : tween.cjs.js](https://raw.githubusercontent.com/tweenjs/tween.js/master/dist/tween.cjs.js) | ||
- [ES6 Module : tween.es.js](https://raw.githubusercontent.com/tweenjs/tween.js/master/dist/tween.es.js) | ||
- UMD : tween.umd.js | ||
- AMD : tween.amd.js | ||
- CommonJS : tween.cjs.js | ||
- ES6 Module : tween.es.js | ||
This library is available on [cdnjs](https://cdnjs.com/libraries/tween.js/). | ||
You are now able to copy tween.umd.js into your project, then include it with | ||
a script tag. This will add TWEEN to the global scope. | ||
### More advanced users might want to... | ||
```html | ||
<script src="js/tween.umd.js"></script> | ||
``` | ||
#### Use `npm` | ||
### With `require('@tweenjs/tween.js')` | ||
You can add tween.js as an npm dependency: | ||
```bash | ||
npm install @tweenjs/tween.js | ||
npm i @tweenjs/tween.js@^18 | ||
``` | ||
Then include the Tween.js module with the standard node.js `require`: | ||
If you are using Node, Webpack, or Browserify, then you can now use the following to include tween.js: | ||
@@ -73,11 +81,2 @@ ```javascript | ||
And you can use Tween.js as in all other examples--for example: | ||
```javascript | ||
const t = new TWEEN.Tween( /* etc */ ); | ||
t.start(); | ||
``` | ||
You will need to use a tool such as `browserify` to convert code using this style into something that can be run in the browser (browsers don't know about `require`). | ||
## Features | ||
@@ -84,0 +83,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
104635
3
13
3012
0
280