Skip to content

codeyad/starscroll

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

STARSCROLL

Create a div with purpose as your background .. activate plugin; animated or reactive as the user scrolls. The plugin automatically will fix the div so it works 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
);

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

usage example

```javascript $('#starfield').starscroll(16,3,50,5); ```

About

Because everyone needs a starfield on their website

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%