Skip to content

A simple JavaScript plugin that creates beautiful, interactive canvas backgrounds

Notifications You must be signed in to change notification settings

ngr900/constellation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constellation.js

Constellation is a simple JavaScript plugin that can draw beautiful HTML5 Canvas backgrounds, resembling star constellations. A demo is available here.

Usage

There are 6 different constructors you can use. The first argument is always the target element ID.

constellation(elementID)

Uses the default preset.

constellationPreset(elementID,presetName)

Uses the specified preset; you can view all included presets in the demo

constellationHue(elementID,hue)

Uses the default preset with specified hue for both back and foreground.

constellationHSL(elementID,bhue,bsat,blig,fhue,fsat,flig)

Uses the default preset with specified full HSL colors for both back and foreground.

constellationFull(elementID,starDensity,starRadius,starRadiusJitter,starVelocity,starVelocityJitter,connectionRadius,connectionWidth,connectionOpacity,revealRadius,backgroundHue,backgroundSaturation,backgroundLightness,foregroundHue,foregroundSaturation,foregroundLightness,foregroundHueJitter,foregroundSaturationJitter,foregroundLightnessJitter,responsive)

Uses all the specified parameters.

About

A simple JavaScript plugin that creates beautiful, interactive canvas backgrounds

Resources

Stars

Watchers

Forks

Packages

No packages published