Skip to content

gablaxian/starfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

starfield

Funky little script that creates a flickering starfield. Currently in use as the header for my site, gablaxian.com

Usage

Create a canvas element on your page with an id of 'starfield':

<canvas id="starfield"></canvas>

Load in the script:

<script src="starfield.js"></script>

Run it:

<script>
    StarField();
</script>

Configuration

Currently, the starfield accepts a few options:

StarField({
    width:          window.innerWidth
    height:         150
    star_density:   10  // Number of stars per 100x100 block, mathematically speaking. Positions are all random.
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published