JS parallax utility for positioning html layers in response to mouse position

This is a simple project that I put together while playing with parallax layers. The instantiation parameters take a minimum offset, a maximum offset, and an array of DOM element ids that will have their offsets distributed between the min and max offsets.

<div> <div id="layer1">parallax</div> <div id="layer2">parallax</div> <div id="layer3">parallax</div> <div id="layer4">parallax</div> <div id="layer5">parallax</div> </div> <script> parallax.create({ min : 30, max : -500, elements : [ 'layer1', 'layer2', 'layer3', 'layer4', 'layer5' ] }); </script>

fig 1. Text layers with parallax positioning View example

fig 2. Large .gif files with stars simulating the infinite depths of the cosmos. View example

View Adam Portilla's portfolio website