Table of Contents
SpaceJS is a small collection of js script for creating visual effect, background image and more.
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
);
<script src="https://cdn.jsdelivr.net/gh/alasdiablo/spacejs@2.0.0/dist/space.min.js"></script>
If you want to contribute you can to it via:
- Bug report
- Feature request
- Bug fix
- Any useful code change
- If you want to give a donation you can't because we don't have a Patreon(or anything like this).
- The source code is under MIT
- AlasDiablo / lIotaMiu - Original author, main contributor
- Any Contributor - Bug report, bug fix
- And people who use my lib!