1.0.8 • Published 2 years ago

@deadlyjack/trails v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

TRAILS.js

Create trails like effect for text and svg image using JavaScript canvas.

Usage

How to import?

import Trails from 'trails';

How to use it for text

const $canvas = document.getElementById('canvas');
(async ()=>{
  const trails = await Trails.fromText(
    'foxdebug',
    './Lobster/Lobster-Regular.ttf',
    $canvas
  );
  animation();
})();

window.addEventListener('resize', trails.resize);

function animation() {
  trails.update();
  requestAnimationFrame(animation);
}

Docs

Methods

fromText: Use this method to render text on canvas

fromSVG: Use this method to render svg file on canvas

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago