@masatomakino/tween.js-ticker
v0.8.0
Published
Simple update loop module for tweenjs/tween.js.
Downloads
726
Readme
tween.js-ticker
[!WARNING] We do not recommend new installations of tween.js-ticker and tween.js v25 or later. manage tween instance creation/update manually.
This module is a simple Tween.js mainGroup substitute.
Demo
Getting Started
Install
npm install @masatomakino/tween.js-ticker -D
How to use
import { TWEENTicker } from "@masatomakino/tween.js-ticker";
const tween = new Tween({ x: 0 })
.to({ x: 100 }, 1000)
.start();
TWEENTicker.group.add(tween); // start updating
tween.remove(); // if you want to stop updating, call remove method.
Just import it, tween.js-ticker will start automatically.
In Tween.js v25 and later, completed tween instances are not automatically removed from a group. To remove a tween instance, you must manually call the remove function.