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

jquery.awesomeclouds

v0.1.0

Published

Plugin jQuery pour générer des petits nuages en overlay qui se baladent sur l'écran...

Downloads

6

Readme

jQuery awesomeClouds

jQuery awesomeClouds est un plugin génial qui permet de gérérer tout plein de petits nuages (ou autres...) sur votre page HTML avec pein de paramètres.

Installation & utilisation type

On insére le script dans son HTML,

<script src="/path/to/jquery.awesomeClouds.min.js"></script>

On ajoute un petit peu de CSS pour notre bôoo nuage,

.cloud {
	display: block;
	position: absolute;
	width: 73px;
	height: 36px;
	background-image: url('cloud.png');
	background-repeat: no-repeat;
	z-index: 1000;
}

Et on initialise le script !

$('body').awesomeClouds({
	frequency: 5, // 5% de chance d'apparition à chaque 'tick'
	ticks: 5, // Nombre de tick par seconde, ici toutes les 200ms
	html: '<div class="cloud" />' // Le HTML à insérer pour former le nuage
});

Utilisation avancée

var $clouds = $('body').awesomeClouds({
	autoInit: false,
	frequency: 10, // 10% de chance d'apparition à chaque 'tick'
	ticks: 10, // Nombre de tick par seconde, ici toutes les 200ms
	html: '<div class="cloud" />', // Le HTML à insérer pour former le nuage
	afterAdd: function(parent, cloud) {
		cloud.css('background-color': 'red');
	}
});

// Lance le plugin
$clouds.start();

Paramètres

autoInit (bool)

Le plugin doit-il démarrer automatiquement

Par défaut : true

verbose (bool)

Le plugin doit-il afficher son debug dans la console ?

Par défaut : false

frequency (int)

Fréquence ou "chance" d'apparition d'un nuage

Par défaut : 5

ticks (int),

Nombre de ticks par seconde. Nombre de fois par seconde ou le plugin va tenter d'afficher un nuage

Par défaut : 5

html (string)

Le HTML à utiliser pour la gération du nuage

Par défaut : ''

paddingTop (int)

Padding haut ou aucun nuage n'apparaitra. Sorte d'offset.

Par défaut : 20

paddingBottom (int)

Padding bas ou aucun nuage n'apparaitra. Sorte d'offset.

Par défaut : 20

minScale (float|int),

Coef maximum de réduction du nuage

Par défaut : 0.8

maxScale (float|int)

Coef maximum d'agrandissement du nuage

Par défaut : 1.2

minDuration (int)

Durée minimale de transition

Par défaut : 6000

maxDuration (int)

Durée maximale de transition

Par défaut : 12000

easingOpacity (string)

Easing pour le fondu d'opacité

Par défaut : 'linear'

easingLeft (string)

Easing pour le déplacement

Par défaut : 'swing'

disableMobile (bool)

Désactive le plugin pour les navigateurs mobiles

Par défaut : false

Callbacks

beforeAdd (callable),

CALLBACK : Appelé lors de la création d'un nouveau nuage.

Signature : parent, cloud (l'élement html nouvellement créé)

afterAdd (callable)

CALLBACK : Appelé après l'insertion d'un nuage dans le parent

Signature : parent, cloud (l'élément html nouvellement inséré dans le DOM)

afterAnimated (callable)

CALLBACK : Appelé à la fin de l'animation d'un nuage

Signature : parent, cloud (l'élément html dont l'animation vient de se terminer et qui sera supprimé du DOM)

Méthodes

start (void)

Lance la boucle.

stop (void)

Arrête le script.

A propos

Un script vraiment fait à la va-vite pour le fun. Attention niveau performance, cela reste de l'animation via jQuery et ça peut vite devenir lourd...

Réalisé par Marceau Casals.

Licence

WTFPL - Do What The Fuck You Want To Public License.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004

Copyright (C) 2004 Sam Hocevar [email protected]

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

You just DO WHAT THE FUCK YOU WANT TO.