@masatomakino/particle-waypoint
v0.8.3
Published
Path module for calculating waypoints.
Downloads
514
Readme
particle-waypoint
Path module for calculating waypoints.
API Documents
Getting Started
Install
npm install @masatomakino/particle-waypoint --save-dev
Import
particle-waypoint is composed of ES6 modules and TypeScript d.ts files.
At first, import classes.
import {
ParticleWay,
Particle,
ParticleGenerator,
} from "@masatomakino/particle-waypoint";
Create particle way
const points = [
[100, 100],
[100, 200],
[200, 200],
[200, 300],
];
const wayPoint = new ParticleWay(points);
Create generator
const generator = new ParticleGenerator(wayPoint, {
generationMode: "loop",
});
generator.animator.setSpeed(600, 20);
generator.play();
Particles animate on wayPoint
.
Uninstall
npm uninstall @masatomakino/particle-waypoint --save-dev
License
particle-waypoint is MIT licensed.