• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Because everyone needs a starfield on their website

STARSCROLL

Create a div with purpose as per your background .. activate plugin; animated or reactive as the user scrolls. The plugin automatically will fix the div so it will work seemlessly.

N.b the only css you might want to change is the z-index of your div. Also dont put anything in your starscroll div.

depends on jQuery 1.8.1+

Plugin Site

Features:

  • 8-bit or 16-bit mode! (how retro do you wanna go!?)
  • Animated or reactionary to scroll
  • Multiple layers of true parallax
  • Custom colours and complexities
  • Every websites dream
  • Forces static on mobile detection

BASIC USAGE:

$('.element').plugin(
	mode,
	parallax-layers,
	density,
	dimension,
	smoothness,
	colour,
	colour-varience,
	animate,
	scrollspeed
);

config options:

Option data type values Required bit mode Nb.
mode int boolean 8 / 16, true / false Yes n/a
parallax int max: 10 Yes both num of parallax levels
density int num of stars Yes both
dimension int max: 20 Yes both size of stars
smoothness int min: 0, max: 5 No both scroll smoothness speed
colour rgb array [255,255,255] No 16-bit
colour-varience boolean true/false No 16-bit subtle colour varience enabled
animate boolean true/false No both auto scrolling starfield
scrollspeed int min: 0, default: 2 No both scroll speed

usage example

Example: <title>Starfield</title> <style> #container { width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; } </style> ```javascript $('#starfield').starscroll(16,3,50,5); ```