ember-useragent
An Ember addon for Fastboot-enabled UserAgent parsing via UAParser.js.
- 37
- JavaScript
- MIT
- 4 y ago
Build immersive, media driven web experiences - the easy way.
Repo willviles/immerse, read from GitHub 1 min ago. willviles has not joined Take My Repo.
willviles/immerse is a public repo on GitHub by willviles. Build immersive, media driven web experiences - the easy way. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in JavaScript, has 0 stars and last changed on 2015-10-12. It is archived: its maker no longer maintains it. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Immerse.js offers a javascript framework for building complex, media-driven web experiences.
Checkout the official plugin website, the Learn to Surf example or the full documentation.
Download the zip or install Immerse.js via NPM.
npm install immersejs
Include dependencies:
<!-- JQuery --> <script src="jquery/jquery.min.js"></script> <!-- GSAP TweenMax --> <script src="gsap/src/minified/TweenMax.min.js"></script> <!-- GSAP ScrollTo Plugin --> <script src="gsap/src/minified/plugins/ScrollToPlugin.min.js"></script>
Include Immerse.js:
<!-- Immerse.js --> <script src="immersejs/dist/js/immerse.js"></script> <!-- Immerse.css --> <link rel="stylesheet" type="text/css" href="immersejs/dist/css/immerse.css">
At its most basic configuration, Immerse.js will build your section based page from simple HTML markup. It will automatically handle scrolling, navigation and loading with just the following code:
<body> <!-- Wrap your page content so it can be hidden before loading --> <main data-imm-page="page"> <!-- Build your page structure with Immerse sections. --> <section data-imm-section="foo"></section> <section data-imm-section="bar"></section> <!-- Navigation will be injected here. --> <nav data-imm-nav="side"></nav> </main> <!-- Loading overlay displays until the page's assets have fully loaded --> <div data-imm-loading="fade"></div> </body>
// Get a handle on the Immerse setup object inside a variable. var page = new Immerse().setup(); // Add section configuration ... // Initialize the page page.init();
Sections can be configured through registering one on the page variable. The following markup is the most basic configuration:
page.section('foo', { // Name to show in navigation. If not set, will capitalize section id. name: 'Custom Foo Name' });
Immerse requires all media assets to be registered in the Immerse setup object, so the plugin can properly inject them into the DOM and allow easy manipulation of them through the Immerse API.
Define your assets in Immerse setup:
new Immerse().setup({ assets: { 'audioName': { type: 'audio', path: 'assets/audio/audio-name', loop: true }, 'videoName': { type: 'video', path: 'assets/video/video-name', fileTypes: ['mp4', 'ogv', 'webm'], loop: true }, 'imageName': { type: 'image', path: 'assets/image/image-name', fileTypes: ['jpg', 'png'] } }, ... });
Video file types default to mp4, ogv and webm. Loop defaults to true.
Adding the wait key to any asset will add it to the asset queue for preloading. Immerse will display a loading overlay until all required assets are loaded. Images will be loaded into the browser cache and audio/video will be considered loaded when the HTML5 canplaythrough event is returned.
'videoName': { type: 'video', path: 'assets/audio/gnossienne', loop: true, wait: true }, ...
Once a video asset is registered, it can be easily used as a video background for a page section. It's this simple:
<section data-imm-section="foo"> <!-- The imm-video element will stretch to any div positioned relatively --> <div data-imm-video="videoName"></div> </section>
Immerse.js will manage initialisation, pausing/playing on scroll and resizing of the HTML5 video without the need for any custom code.
Immerse easily enables the building of complex layered HTML5 audio soundtracks for each section of your page.
Add a default soundtrack by defining the audio layers in Immerse setup. The volume of each individual audio layer can be controlled, along with the length of time it takes for the track to fade out/in when the soundtrack changes.
new Immerse().setup({ audio: { 'mainAudio': { volume: 1, changeDuration: 1 }, 'subtleAudio': { volume: .5, changeDuration: .5 } }, ... });
If no default soundtrack is defined, sections without specific audio defined will be silent.
Soundtracks can also be defined for each section of the page. Inside your Immerse section, just define a new soundtrack and the audio will change to your new soundtrack when the section is scrolled to.
page.section('foo', { audio: { 'differentMainAudio': { volume: .8, changeDuration: 1.5 }, 'differentSubtleAudio': { volume: .3, changeDuration: .25 } }, ... });
Immerse automatically manages any mute buttons with the imm-mute class attached:
<button class="imm-mute"></button>
The default content of the button is a string - 'Audio On' and 'Audio Off'. However, custom strings can be added in Immerse setup options. For example, a popular setup is using icon font Fontawesome to graphically illustrate audio state:
new Immerse().setup({ options: { muteButton: { unmuted: '<i class="fa fa-volume-up"></i>', muted: '<i class="fa fa-volume-off"></i>', }, ... }, ... });
By default, Immerse uses cookies to set the audio to the state the user last left the page.
It's also possible to programmatically control audio state:
page.audio(); // Get current state page.audio('mute'); // Mutes audio page.audio('unmute'); // Unmutes audio
One of Immerse's key features is offering a clean, easy to read interface for creating animations and targeting them at devices, breakpoints and runtimes.
Multiple animations can be set on a single DOM element and each animation will be appropriately registered/removed by Immerse.js when its breakpoint declaration is met on window resize.
Below is the most verbose example of defining and executing one GSAP Timeline in Immerse:
page.section('foo', { animations: { // Name the timeline 'timelineOne': { // Define which devices to target. Defaults to both. devices: ['touch', 'desktop'], // Define which breakpoints to target. Defaults to all. breakpoints: ['mobile', 'tablet', 'mdDesktop', 'lgDesktop'], // Define runtime. Defaults to when the section is enteringDown & enteringUp. // All runtimes: ['init', 'enteringDown', 'enteringUp', 'enteredDown', 'enteredUp', 'exitingDown', 'exitingUp'] runtime: ['enteringDown', 'enteringUp'], // Define reset runtime. Defaults to when the section has exitedDown, exitedUp. reset: ['exitedDown', 'exitedUp'], // Add a delay to the start of the timeline delay: 1, // Repeat the timeline animation. Default is no repeat, but 'true' or integer can be passed. repeat: true, // Can define any further GSAP timeline settings in settings object. settings: { onComplete: function() { // }, ... }, // Timeline. Add content of a GreenSock Timeline here. // The jQuery object of the section is available to use to specifically find section elements to animate. timeline: function($section) { return [ TweenMax.from($section.find('.thing-to-animate'), 2, { opacity: 0, x: -70, delay: .5, ease: Power4.easeIn }), TweenMax.from($section.find('.another-thing-to-animate'), 2, { ... }) ] } }, ... },... }
For most animations (which run when the section is scrolled to and reset when the section is removed from view), only the timeline function need be defined. Every other value may be left to default.
For more information about using GSAP, visit the official GreenSock Animation Platform website.
Section attributes allow for individual values to be changed on a per-section basis and trigger a listenable event when changed. The following example will demonstrate how easy it is to change navigation colour through each section of your site, with just one attribute.
Add the default attribute value to the Immerse setup:
new Immerse().setup({ attributes: { // Name the attribute 'navColor': { // Device, breakpoint and runtime targeting available in attributes too! devices: ['touch', 'desktop'], breakpoints: ['mobile', 'tablet', 'mdDesktop', 'lgDesktop'], runtime: ['enteringDown', 'enteringUp'], // Define the default value value: 'white' }, ... },... });
In your chosen section, define the new attribute value.
page.section('foo', { attributes: { 'navColor': { value: 'blue' } }, ... });
When the page is scrolled to the chosen section, an event will be triggered. Listen to it and execute your desired code. For example, add a class to your navigation so its CSS styles will change to the desired color.
$('body').on('navColor', function(e, value) { var $nav = $('[data-imm-nav]'); var currentColor = $nav.data('color'); $nav.removeClass(currentColor).addClass(value).data('color', value); });
Immerse also allows for any custom code to be triggered using device and runtime targeting.
page.section('foo', { actions: { // Name the action 'actionName': { // Device, breakpoint and runtime targeting available in actions too! devices: ['touch', 'desktop'], breakpoints: ['mobile', 'tablet', 'mdDesktop', 'lgDesktop'], runtime: ['enteringDown', 'enteringUp'], reset: ['exitedDown', 'exitedUp'], fire: function($section) { // Execute your custom code here. }, clear: function($section) { // Code to clear action on reset. } } }, ... });
Immerse solves many problematic issues related to scrolling with elegant solutions.
Immerse infers which sections should be fixed height and which should be free scrolling simply by observing your HTML markup:
<!-- By default, sections are fullscreen fixed scrolling sections --> <section data-imm-section="foo"></section> <!-- However, free scrolling sections can be defined in the markup --> <section data-imm-section="foo" data-imm-unbound="true"></section>
Not sure what we mean by fixed vs free scroll? Check out the official plugin website for examples.
It's possible to create responsive solutions for fixed scrolling sections by unbinding the scroll at certain breakpoints.
page.section('foo', { options: { // The section will be free scrolling on mobile & tablet, but fixed scrolling for all larger screen sizes. unbindScroll: ['mobile', 'tablet'], ... }, ... });
For more information on Immerse breakpoints, click here.
Adding buttons which link to other Immerse page sections can be achieved through data tags:
<!-- Pass the id of the section --> <button data-imm-scroll-to="foo">Scroll to foo</button> <!-- You can also add either UP or DOWN to go to the next/prev sections. Must be in caps. --> <button data-imm-scroll-to="DOWN">Go down a section</button>
It's also possible to control scrolling programmatically:
page.changeSection('foo'); page.changeSection('DOWN');
Immerse offers support for modal overlays out-of-the-box.
<section> <!-- Open modal button --> <button data-imm-modal-open="modal-name"></button> <!-- Modal markup --> <div data-imm-modal-id="modal-name"> <!-- Button will fire the onConfirm function --> <button data-imm-modal-action="confirm">Confirm</button> <!-- Button will fire the onCancel function --> <button data-imm-modal-action="cancel">Cancel</button> <!-- Button will fire the onClose function --> <button data-imm-modal-action="close">Close</button> </div> </section>
All modal actions can be overridden on a per-modal basis inside a specific Immerse section:
page.section('foo', { components: { modals: { // Set a default for all modals in this section 'default': { transitions: { open: 'push-up', close: 'bounce-down', // Will set animation for each close action unless defined confirm: { animation: 'flip-y-left', speed: 'slow', blur: true } }, actions: { cancel: function(modal) { /* Custom function */ }, confirm: function(modal) { /* Custom function */ }, close: function(modal) { /* Custom function */ }, open: function(modal) { /* Custom function */ } } }, // Will set specific settings on modal 'modalName': { ... }, ... }, ... }, ... });
Or globally inside Immerse setup to set defaults for the whole page:
new Immerse().setup({ components: { modals: { 'default': { ... }, 'modalName': { ... }, ... }, ... }, ... });
It's easy to add YouTube modals to your Immerse page. Simply paste a YouTube URL into the imm-modal-open data tag and a YouTube modal will be generated.
<button data-imm-modal-open="https://www.youtube.com/watch?v=XXXXXXXXXXX"></button>
The YouTube modal automatically includes the YouTube iFrame API and handles playing, pausing and restarting of the video on open/close of the modal and at the end of the video.
The following options are configured in Immerse setup.
Immerse.js uses the GSAP ScrollTo Plugin to animate between sections. Therefore, it is possible to tweak the default scroll animation using buttery smooth GreenSock easing.
// new Immerse().setup.options scroll: { duration: 1, easing: Power4.easeOut }, ...
For more information about GSAP easing, click here.
By default, Immerse uses history.replaceState to enable hash navigation between page sections. If you don't wish to track state:
// new Immerse().setup.options hashChange: false, ...
Immerse uses breakpoints to allow animations, actions and attributes to be targeted at certain responsive screen sizes. To overwrite the default breakpoints, define a new breakpoints object in Immerse setup:
// new Immerse().setup.options breakpoints: { newBreakpoint: 300, mobile: 480, tablet: 768, mdDesktop: 992, lgDesktop: 1200 }, ...
The default breakpoints are set to match the breakpoint sizes for popular front end framework Bootstrap.
Before Immerse's asset queue promise is satisfied, a loading overlay is displayed. This is particularly useful for users on slow connections, but users on fast connections, the loading overlay may only appear for a split section and be perceived as bad UI.
Setting minLoadingTime ensures the loading overlay is displayed for at least x seconds before the page animates in.
// new Immerse().setup.options minLoadingTime: 1000, ...
Changing all classes and data tags from using 'imm-' is available:
// new Immerse().setup.options namespace: 'foo', ...
This will ensure, for example:
<section data-foo-section="foo" class="foo-fullscreen"> <div data-foo-video="videoName"></div> </section>
Warning: All styles defined by Immerse MUST be prepended with the new namespace for Immerse to function. This can be done through find and replace, however Immerse's scss files can be included before minification and the $prefix value changed in style.scss
Development mode logs all changes to animations, attributes and actions. It also logs breakpoint changes on resize. It is turned off by default, but can be turned on using:
// new Immerse().setup.options devMode: true, ...
It's easy to kill all events attached to an Immerse page. You may need to do this when managing multiple Immerse instances on an asynchronously delivered website.
// Your page variable reference page.kill();
Custom Immerse.js components will be available for anyone to develop in the near future once the API is locked down and documentation is up to speed! Follow @willviles for updates.
✔ Section hash state management.
✔ Set of easily-attachable modal window open/close animations. Inspiration here.
☐ Allow state tracking using history.pushState as well as history.replaceState.
☐ Set of easily-attachable section transitions. Inspiration here.
☐ In time, the project will be moved away from a dependency on jQuery toward pure ECMAScript 6 and be restructured to follow UMD patterns.
Got a feature request? Tweet @willviles or open an issue.
Immerse.js aims to support all major browsers in recent versions:
Firefox 26+, Chrome 30+, Safari 5.1+, Opera 10+, IE 9+
I'm Will Viles, a digital creative from Birmingham, UK.
With a degree in marketing and design/development skills, I specialise in developing creative, effective one page scrolling websites. I can offer help, guidance & custom site builds using Immerse.js. Feel free to get in contact.
Check out my website or contact me on Twitter.
Immerse.js is dual licensed under the MIT license and GPL. For more information click here.
willviles/immerse is a public repo on GitHub by willviles. Build immersive, media driven web experiences - the easy way.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
No. It is archived on GitHub: its maker no longer maintains it.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
An Ember addon for Fastboot-enabled UserAgent parsing via UAParser.js.

An Ember Addon for adding analytics visualizations using the Google Analytics Embed API.
Ember CLI addon for resolving markdown files and trees of md files.
Fast & organized 3D WebGL scene creation in Ember CLI using Three.js.
An Ember addon for building magical scroll interactions using ScrollMagic.js
Yarn workspaces + Firebase deployments made easy