npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@donkeyclip/motorcortex-leonsans

v1.3.2

Published

LeonSans plugin for MotorCortex

Readme

MotorCortex-LeonSans

Table of Contents

Demo

Check it out here

Intro / Features

MotorCortex-LeonSans brings some capabilities of LeonSans library into MotorCortex. With LeonSans plugin you can render exquisite text anywhere in your clip.

This Plugin exposes two Incidents:

  • LeonSans Clip
  • LeonIncident

Getting Started

Installation

$ npm install --save @donkeyclip/motorcortex-leonsans
# OR
$ yarn add @donkeyclip/motorcortex-leonsans

Importing and loading

import { loadPlugin } from "@donkeyclip/motorcortex/";
import LeonPlugin from "@donkeyclip/motorcortex-leonsans";
const LeonSans = loadPlugin(LeonPlugin);

Creating Incidents

LeonSans Clip

By the use of the plugin's Clip you can render a canvas which will host your text.

The Clip takes a number of attributes (listed below) that define both the canvas and the rendered text characteristics and it can accept an unlimited number of LeonSans Incidents that can animate the rendered text.

Example

const clipName = new LeonSans.Clip(
  {
    canvasId: "leonObj",
    sw: 800,
    sh: 600,
    text: "abcdefghijklmn\nopqrstuvwxyz",
    weight: 100,
    round: true,
    multiply: true,
    drawing: "colorful",
    color: [["#64d3ce", "#2a92ce82", "#2a92ce40", "#2a92ce2e", "#2a92ce00"]],
    colorful: ["#64d3ce", "#2a92ce82", "#2a92ce40", "#2a92ce2e", "#2a92ce00"],
    pathGap: -1,
    patternWidth: 1,
    patternHeight: 10,
    speed: 1,
    tracking: 20,
    leading: 10,
    size: 80,
  },
  {
    selector: ".test",
  }
);

LeonSans Clip Attrs

| Name | Are | Values | | ------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------: | | canvasId | the id of the rendered canvas that contains the text. This id will be used by all LeonIncident Incidents, added to the Clip timeline, via their selector property | string | | sw | width of clip canvas (how many pixels) | all positive numbers | | sh | height of clip canvas (how many pixels) | all positive numbers | | text | the text to display | string | | weight | The weight of the font | number 1 - 900 | | round | round the corners of font if they are not path | boolean | | multiply | applying multiply effect when the font has more then 1 colors | boolean | | drawing | type of the font effect | one of: drawing, pattern, colorful, colorPattern | | color | The colors of the characters | array of arrays of colors | | colorful | The list of colors of each character. Only applicable if drawing property is colorfull | array of colors | | pathGap | The gap between each coordinate of the points on a line of each character | number | | patternWidth: | the width of the lines when drawing property is pattern | number | | patternHeight | the height of the lines when drawing property is pattern | number | | speed | speed of color changing when drawing property is colorPattern | number, from 0 to 10 | | tracking | The spacing between the characters of a block of text | number | | leading | The distance between each line of text | number | | size | size of text | number |

LeonIncident

Example

const nameOfIncident = new LeonSans.LeonIncident(
  {
    animatedAttrs: {
      LeonAtrs: {
        completion_rate: 1,
        weight: 600,
        // tracking: 20,
        leading: 10,
        // size: 90,
        // pathGap: 1,
        patternWidth: 100,
        // patternHeight: 90
      },
    },
    initialValues: {
      LeonAtrs: {
        completion_rate: 0,
        weight: 100,
        // tracking: 10,
        // leading: 1,
        size: 80,
        // pathGap: 0,
        patternWidth: 1,
        // patternHeight: 10
      },
    },
  },
  {
    duration: 2000,
    selector: "!#leonObj",
  }
);

LeonIncident Attrs

The LeonIncident attrs takes on the animatedAttrs object just one composite attribute: LeonAtrs. The supported attributes of this composite attribute are:

| Name | Are | Values | | --------------- | :-----------------------------------------------------------------------: | --------------: | | completion_rate | The rate of text completion | num from 0 to 1 | | weight | The weight of the font: 1 - 900 | number | | pathGap | The gap between each coordinate of the points on a line of each character | number | | patternWidth: | the width of the lines when drawing property is pattern | number | | patternHeight | the height of the lines when drawing property is pattern | number | | tracking | The spacing between the characters of a block of text | number | | leading | The distance between each line of text | number | | size | size of text | number |

IMPORTANT

Along with the attributes, all LeonIncident incidents must take on their props the selector key which targets the canvas id of their parent Clip via the convention: !#<canvasId>

Adding Incidents in your clip

clipName.addIncident(incidentName,startTime);

Contributing

In general, we follow the "fork-and-pull" Git workflow, so if you want to submit patches and additions you should follow the next steps:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

License

MIT License

Sponsored by