Skip to content

pea3nut/starry-sky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

starry-sky

🌃 ⭐⭐ Draw a starry sky for you~ ❤️

view

It's dynamic!

Import

Import in html:

<script src="starry-sky.js"></script>
<script>
    new StarrySky(...);
</script>

Import in CommonJS:

npm install --save starry-sky
const StarrySky = require('starry-sky');
new StarrySky(...);

Props

new StarrySky(el, {
   starRatio = 1 / 800,
   starSize = 1.2,
   maxStarNumber = 10000,
   flickerBaseDuration = 2,
   flickerRandomDurationRange = 5,
   minStarOpacity = 0.1,
   maxStarOpacity = 0.75,
});

About

🌃 ⭐⭐ Draw a starry sky for you~ ❤️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages