❄ — c h i l l a x — ❄
vertical parallax engine for beautiful web presentations
features
- view the live chillax demo
- parallax animation engine to create beautiful 3d-feeling scenes
- only works vertically by design — no horizontal parallaxing
- goal was to create the look of "3d sunken windows" on the web page
- scrolling activity actuates the parallax effects
- on android the parallax effect works via scrolling
- on ios, gyroscopic activity actuates the parallax effects
(experimental: currently, only works in landscape with home button on the right)
install chillax into your hip new app
npm install chillax
import Chillax from "chillax"
— (it's a commonjs module)- link in the stylesheet,
node_modules/chillax/dist/chillax-styles.css
- proceed to chillax usage instructions below
install chillax the old fashioned way
-
download the chillax "global bundle" script, and stylesheet (right-click save-as)
-
load the chillax script and stylesheet onto your html page
-
proceed to chillax usage instructions below
chillax usage instructions
-
prepare your png image layers — use the template or listen carefully
- by default, chillax assumes your parallax scenes are
16:9
in aspect ratio,
you are expected to author all of your layer images at double-height (16:18
).
this extra height provides 100% leeway for the parallax effects (otherwise your layers will look cut-off at some point) - you should probably use the
psd
template in the images folder —parallax-template.zip
- the template shows that the viewport is a
16:9
window centered within the16:18
image - the template is at 4k resolution, but you should save-for-web at half size (
1920x2160
)
- by default, chillax assumes your parallax scenes are
-
set up a chillax view on your html page
-
[data-chillax]
defaults to100
"leeway",
which is percentage of parallax sliding action allowable, relative to the height of the view -
[data-chillax-layer]
specifies thedepth
,
where0
is flush with the rest of the page,
10
is sunken "fully" into the background,
and anything negative is popping out of the view toward the user -
note that the chillax css styles define scenes with a display aspect ratio of
16:9
– if you want a different ratio, you must modify/overwrite these css styles
-
-
activate chillax on your views