• This repository has been archived on 18/Apr/2020
  • Stars
    star
    1,249
  • Rank 37,617 (Top 0.8 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Skycons

Skycons is a set of ten animated weather glyphs, procedurally generated by JavaScript using the HTML5 canvas tag. They're easy to use, and pretty lightweight, so they shouldn't rain on your parade:

<canvas id="icon1" width="128" height="128"></canvas>
<canvas id="icon2" width="128" height="128"></canvas>

<script>
  var skycons = new Skycons({"color": "pink"});
  // on Android, a nasty hack is needed: {"resizeClear": true}

  // you can add a canvas by it's ID...
  skycons.add("icon1", Skycons.PARTLY_CLOUDY_DAY);

  // ...or by the canvas DOM element itself.
  skycons.add(document.getElementById("icon2"), Skycons.RAIN);

  // if you're using the Forecast API, you can also supply
  // strings: "partly-cloudy-day" or "rain".

  // start animation!
  skycons.play();

  // you can also halt animation with skycons.pause()

  // want to change the icon? no problem:
  skycons.set("icon1", Skycons.PARTLY_CLOUDY_NIGHT);

  // want to remove one altogether? no problem:
  skycons.remove("icon2");
</script>

Skycons were designed for Forecast by those wacky folks at The Dark Sky Company, and were heavily inspired by Adam Whitcroft's excellent Climacons. The source code has been released into the public domain, so please do with it as you see fit! ♡

Variants

Dark Sky no longer actively maintains Skycons, but several kind folks have made variants that you might be interested in:

More Repositories

1

delaunay-fast

Fast Delaunay Triangulation in JavaScript.
JavaScript
778
star
2

string-hash

Fast string hashing function for Node.JS.
JavaScript
309
star
3

forecast-ruby

Ruby gem for retrieving data from the Forecast Weather API.
Ruby
240
star
4

tz-lookup-oss

JavaScript Library for Timezone Lookup by Location
JavaScript
208
star
5

translations

translate Dark Sky API summaries into any language
JavaScript
139
star
6

sphere-knn

Find the k nearest neighbors for points on a sphere.
JavaScript
121
star
7

binary-search

Tiny binary search library for Node.JS.
JavaScript
85
star
8

pngparse

100%-JavaScript PNG Parser for Node.JS
JavaScript
78
star
9

darksky-ruby

Ruby gem for retrieving data from the Dark Sky API
Ruby
48
star
10

astro

JavaScript
30
star
11

delaunay

Delaunay triangulation in arbitrary dimensions.
JavaScript
23
star
12

inhabited

quickly determine if a lat/lon may be inhabited or not
JavaScript
18
star
13

node-sarra

consume data from Environment and Climate Change Canada
JavaScript
13
star
14

metaregexp

A simple way to keep long regexes organized.
JavaScript
9
star
15

lowres-rgeo

low resolution reverse geocoder for Node.JS
JavaScript
9
star
16

elevation

Finds the elevation of a lat/lon with low-to-moderate resolution
JavaScript
7
star
17

pbj

tiny, stupid bitmap image format
JavaScript
6
star
18

cache

An in-memory, promise-backed cache
JavaScript
5
star
19

bounding

calculate bounding areas of points
JavaScript
4
star
20

zqueue

A little redis-backed queue dingus.
JavaScript
4
star
21

cache-helpers

Caching helper functions for Node.JS.
JavaScript
4
star
22

regression

A tiny Javascript toolkit for regression analysis.
JavaScript
4
star
23

shape

spherical geometry library
JavaScript
1
star