All Projects → coderitual → Bounty

coderitual / Bounty

Licence: mit
Javascript and SVG odometer effect library with motion blur

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Bounty

Gerbolyze
Render high-resolution bitmap images to PCB gerber files
Stars: ✭ 169 (-76.66%)
Mutual labels:  graphics, svg
Rough
Create graphics with a hand-drawn, sketchy, appearance
Stars: ✭ 16,472 (+2175.14%)
Mutual labels:  graphics, svg
Oshmi
SCADA HMI for substations and automation applications.
Stars: ✭ 180 (-75.14%)
Mutual labels:  graphics, svg
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (-80.8%)
Mutual labels:  graphics, svg
Scour
Scour - An SVG Optimizer / Cleaner
Stars: ✭ 443 (-38.81%)
Mutual labels:  graphics, svg
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (-80.52%)
Mutual labels:  graphics, svg
Gooey React
The gooey effect for React, used for shape blobbing / metaballs (0.5 KB) 🧽
Stars: ✭ 219 (-69.75%)
Mutual labels:  graphics, svg
Svg.skia
An SVG rendering library.
Stars: ✭ 122 (-83.15%)
Mutual labels:  graphics, svg
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+539.23%)
Mutual labels:  graphics, svg
Oblivion
The language of Art
Stars: ✭ 414 (-42.82%)
Mutual labels:  graphics, svg
Svgo
Go Language Library for SVG generation
Stars: ✭ 1,779 (+145.72%)
Mutual labels:  graphics, svg
React Svg Pan Zoom
👀 A React component that adds pan and zoom features to SVG
Stars: ✭ 569 (-21.41%)
Mutual labels:  svg, webcomponents
Urdf Loaders
URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files
Stars: ✭ 129 (-82.18%)
Mutual labels:  graphics, webcomponents
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-79.01%)
Mutual labels:  graphics, svg
G2
📊 A highly interactive data-driven visualization grammar for statistical charts.
Stars: ✭ 11,020 (+1422.1%)
Mutual labels:  graphics, svg
Picasso
Picasso is a high quality 2D vector graphic rendering library. It support path , matrix , gradient , pattern , image and truetype font.
Stars: ✭ 205 (-71.69%)
Mutual labels:  graphics, svg
C3
📊 A D3-based reusable chart library
Stars: ✭ 9,163 (+1165.61%)
Mutual labels:  graphics, svg
Bgrabitmap
📜 BGRABitmap graphics library made with Lazarus (Free Pascal).
Stars: ✭ 112 (-84.53%)
Mutual labels:  graphics, svg
Mojs
The motion graphics toolbelt for the web
Stars: ✭ 17,189 (+2274.17%)
Mutual labels:  graphics, svg
Philter
Philter is a JS plugin giving you the power to control CSS filters with HTML attributes.
Stars: ✭ 445 (-38.54%)
Mutual labels:  svg, filters

SVG library for transitioning numbers with motion blur

npm version Dependencies npm downloads

JavaScript odometer or slot machine effect library for smoothly transitioning numbers with motion blur. Library uses functional approach and ES7 Function Bind Syntax. Internally based on SVG.

See the live version.

Installation

To install the stable version:

npm install --save bounty

Examples

The API is really simple and straigthforward:

import bounty from `bounty`;

bounty({ el: '.js-bounty', value: '£42,000,000' });

You can use it with other options:

import bounty from `bounty`;

bounty({
  el: '.js-bounty',
  value: '£42,000,000',
  initialValue: '£900,000',
  lineHeight: 1.35,
  letterSpacing: 1,
  animationDelay: 100,
  letterAnimationDelay: 100,
  duration: 3000
});

If you want to control ongoing animation just use methods from returned object:

import bounty from `bounty`;

const { cancel, pause, resume } = bounty({ el: '.js-bounty', value: '£42,000,000' });

const wait = (delay) => new Promise((resolve) => setTimeout(resolve, delay));

const pasueAndRun = async () => {
  await wait(1500);
  pause();
  await wait(2000);
  resume();
  await wait(2000);
  cancel();
};

pasueAndRun();

Library is built using UMD thus the following usage in HTML is possible.

<div class="js-bounty"></div>
<script src="/bounty.js"></script>
<script>
  bounty.default({ el: ".js-bounty", value: "£42,000,000" });
</script>

The UMD build is also available on unpkg:

<script src="https://unpkg.com/[email protected]/lib/bounty.js"></script>

You can find the library on window.bounty.

That's it?

Yea! That's it. Other options like font-family and font-size are taken from computed styles so you can just style it like the other layers.

.js-bounty {
  font-size: 60px;
  font-family: Roboto;
  fill: #fff;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

How?

If you're interested how it's made, see the presentation.

Roadmap

There is a work in progress to implement additional features:

  • [ ] from to API.
  • [ ] Full ASCII transition support.
  • [ ] Control animation.
  • [ ] Introduce Webcomponents API <svg-bounty>

License

The library is available under the MIT license. For more info, see the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].