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

crazy.circles

v0.2.4

Published

Make your loading... window entertaining with Crazy Circles illusion effect

Downloads

7

Readme

Crazy Circles

Crazy Circles is a visual illusion which happens when different balls bouncing inside of a circle create the impression of a circular movement, where in reality, the movement of each ball is straight.

The CrazyCircles javascript class allows you to easily add this nice visual effect to your loading...'s page.

Index

Usage

To render the crazy circles, you need a container (i.e.: div). On the class intantiation, you pass the id of your container and optionally your options configuration.

HTML


<div id="cc"></div>

Script


new CrazyCircles("cc", {} );

Options

Following options are allowed:

  • backgroundColor - An HTML color for the container background.
  • circleSize - The diameter of each circle. If zero calculates it automatically
  • color - An HTML color code to be used by the circles. "multi" for having multiple rainbow colors.
  • cycleDuration - Cycle in milliseconds for a complete spin (ohhh, isn't the spinning just an illusion?)
  • fadeIn - When true, the circles will appear progressively
  • goCrazyCycle - Number of cycles for the balls to go completely crazy. 0 = never
  • goCrazyOnClick - When clicking on a circle, it goes crazy
  • image - Replaces the balls by an image from the url
  • imageHeight - Image height (when using an image)
  • imageWidth - Image width (when using an image)
  • path - Replaces the balls by an svg path
  • restartAfterCycle - Restarts after x cycles. Only relevant when using fadeIn or goCrazyCycle
  • size - The container size. If null or 0 uses the current container size.
  • shadow - Adds a shadow for each circle to give a movement effect. Doesn't work for images
  • totalCircles - The number of circles for the illusion. Minimum 1 (which is pretty stupid)

Example

new CrazyCircles(
  "ccGoCrazy", 
  { color: "multi", 
    goCrazyCycle: 5, 
    restartAfterCycle: 10 
  } );	

Implementation and Examples

To read more about how the effect was implemented and to see some examples, please check the blog article:

http://www.kopf.com.br/kaplof/crazy-circles-loading-using-javascript

Dependencies

Crazy Circles requires Raphael.js