
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@casualbot/tweenjs
Advanced tools
A derivative of the TweenJS from https://github.com/tweenjs/tween.js library that incorporates play and pause methods
This is a derivative of the Tween.JS library by Sole on Github.com. For more documentation head over to their repository.
JavaScript tweening engine for easy animations, incorporating optimised Robert Penner's equations.
// Start position coordinates
var coords = { x: 0, y: 0 };
//Time tween will animate from start point to end point in milliseconds
var duration = 1000;
// End coordinates
// End Position coords can also be an array of positions
// var endX = [0, 100, 200, 300]; var endY = [0, 100, 200, 300];
// Ex: .to({ x: endX, y: endY }, duration) ...
var endCoords = { x: 100, y: 100 };
var tween = new TWEEN.Tween(coords)
.to(endCoords, duration)
.onUpdate(function() {
//Show position of Tween
console.log(this.x, this.y);
//Animate the coords using x and y passed through
coords.x = this.x;
coords.y = this.y;
})
.start();
requestAnimationFrame(animate);
function animate(time) {
requestAnimationFrame(animate);
TWEEN.update(time);
}
//Play Tween
tween.play();
//Pause Tween
tween.pause();
Download the library and include it in your code:
<script src="js/Tween.js"></script>
npm
npm install tween-play-pause
FAQs
A derivative of the TweenJS from https://github.com/tweenjs/tween.js library that incorporates play and pause methods
The npm package @casualbot/tweenjs receives a total of 0 weekly downloads. As such, @casualbot/tweenjs popularity was classified as not popular.
We found that @casualbot/tweenjs 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.