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 🙏

© 2024 – Pkg Stats / Ryan Hefner

primitivo-svg

v0.1.1-alpha.1

Published

JS SVG library, which generates and animates SVG shapes. Create spinners, transition, and illustrations

Downloads

7

Readme

Primitivo-SVG (Alpha) - JavaScript library for SVG

Primitivo is a JavaScript library for SVG. That means it prepares data for the SVG and doesn't manipulate the DOM. Think about it as the SVG assistant. With it, you can create spinners, transitions effects, or elements for illustrations.

What makes it unique

  1. Morph paths via animate tag;
  2. Powerful timing and spacing controls;
  3. Phased animation;
  4. Animate with SSR and turned off JS (except for interactive cases).

Examples:

CodeSandboxes:

  1. Sequence of polygons
  2. Smart round
  3. Noise of distance
  4. Phased transition
  5. Blobby Spinner

Collections of examples:

  • Project on Dribbble: https://dribbble.com/Guandjoy/projects/1539697-Primitivo-SVG
  • Article on Dev.to: https://dev.to/guandjoy/primitivo-the-js-library-for-svg-set-of-examples-27g6

Collections of design concepts:

  1. Dribbble: https://dribbble.com/Guandjoy/buckets/1504217-primitivo
  2. Pinterest: https://www.pinterest.com/yurko_turskiy/primitivo/

Buy me a coffee :coffee:

Coffee will help me to develop Primitivo faster.

Bitcoin wallet: 19fxW81ApuCbAu2tW8WebxRQqaoje6YbhJ

Install:

npm install --save primitivo-svg

Backlog:

  1. Corners rounding and smoothing

Path Layer

Draw a figure

base parameters:

| Name | Description | | --------------------------- | ----------- | | numOfSegments?: number; | | | depth?: number; | | | x?: number; | | | y?: number; | | | width?: number; | | | height?: number; | | | centerX?: number; | | | centerY?: number; | | | rotate?: number; | | | numOfGroups?: number; | | | groups?: GroupParameters[]; | |

Group Parameters

| Name | Description | | ---------------- | ---------------------------------------------------------------- | | type | linear or radial | | incircle | | distance | | round | | smartRound | Able to create perfect circle from a polygon with custom radians | | lengthBasedRound | The longer distance from center the bigger round factor is | | adaptArms | Keep arms always perpendicular to center | | radius | | radians | Custom radians for each point of a group |

Morping Layer

Draw a sequence of paths

parameters:

| Name | Description | | ------------- | ---------------------------- | | numOfKeyPaths | Number of key paths (frames) | | loop | Loop the animation |

keyPathsParameters:

| Name | Description | | ------------- | ------------------------------------ | | numOfSegments | Number of segments of the path frame | | depth | Pow the number of segments | | x | X coordinate of the top left corner | | y | Y coordinate of the top left corner | | width | The width of the frame | | height | The height of the frame | | centerX | X coordinate of the center point | | centerY | Y coordinate of the center point | | rotate | Rotate the figure | | numOfGroups | Limit the number of groups | | groups: | Array of groups settings | | - type | Linear of radial | | - distance | Distance from center | | - round | Value of the round strength | | - incircle | Keep points in circle's boundaries |

Spacing Layer

Calculate keySplines for a defined timing and spacing.

Phases Layer

Make complex sequence of paths based on input parameters

Parameters:

| Name | Description | | ------------- | ------------------------------------ | | numOfSegments | Number of segments of the path frame | | depth | Pow the number of segments | | x | X coordinate of the top left corner | | y | Y coordinate of the top left corner | | width | The width of the frame | | height | The height of the frame | | centerX | X coordinate of the center point | | centerY | Y coordinate of the center point | | rotate | Rotate the figure | | numOfGroups | Limit the number of groups |