Skip to content

AlasDiablo/SpaceJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaceJS

Table of Contents
  1. About The Project
  2. Contributing
  3. License
  4. Acknowledgements

About The Project

SpaceJS is a small collection of js script for creating visual effect, background image and more.

Stars

Stars is a small script for adding a background star on a specific dom element.

Add a star background to body:

SpaceJS.createStars(
    'id-of-an-element',// Required: Target dom element
    0.25,              // Required: Density of star
    { red: true,       // Optional: Enable red star
      blue: true,      // Optional: Enable blue star
      white: true,     // Optional: Enable white star
      width: 600,      // Optional: Size of the canvas use as background
      height: 600,     // Optional: Size of the canvas use as background
      size: 1 }        // Optional: Size of a star
);

Download | Mirror

<script src="https://cdn.jsdelivr.net/gh/alasdiablo/spacejs@2.0.0/dist/space.min.js"></script>

Contributing

If you want to contribute you can to it via:

License

  • The source code is under MIT

Acknowledgements

About

A collection of js file who use canvas for creating space background

Resources

License

Stars

Watchers

Forks

Packages

No packages published