Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
es6-tween
Advanced tools
ES6 implementation of tween.js
let coords = { x: 0, y: 0 };
let tween = new TWEEN.Tween(coords)
.to({ x: 100, y: 100 }, 1000)
.onUpdate(object => {
console.log(object.x, object.y);
})
.start();
requestAnimationFrame(animate);
function animate(time) {
requestAnimationFrame(animate);
TWEEN.update(time);
}
Download the library and include it in your code:
<script src="js/Tween.js"></script>
You can also reference a unpkg
-hosted version in your code, thanks to unpkg
. For example:
<script src="https://unpkg.com/es6-tween/dist/Tween.min.js"></script>
import
import TWEEN from 'Tween';
npm
npm install es6-tween
Then include the Tween.js module with the standard node.js require
:
var TWEEN = require('tween.js');
And you can use Tween.js as in all other examples--for example:
var 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
).
bower
bower install es6-tween --save
Then reference the library source:
<script src="bower_components/es6-tween/src/Tween.js"></script>
px
)source source source source source source source source source source source source source
You need to install npm
first--this comes with node.js, so install that one first. Then, cd to tween.js
's directory and run:
npm install
if running the tests for the first time, to install additional dependencies for running tests, and then run
npm test
every time you want to run the tests.
If you want to add any feature or change existing features, you must run the tests to make sure you didn't break anything else. If you send a PR to add something new and it doesn't have tests, or the tests don't pass, the PR won't be accepted. See contributing for more information.
Maintainers: mikebolt, sole, dalisoft.
FAQs
ES6 implementation of amazing tween.js
The npm package es6-tween receives a total of 2,693 weekly downloads. As such, es6-tween popularity was classified as popular.
We found that es6-tween demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.