npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gladeye/aframe-preloader-component

v1.0.2

Published

A preloading animation that automatically displays while scene assets load.

Downloads

29

Readme

aframe-preloader-component

Version License

A preloading bar that automatically displays while scene assets load.

For A-Frame.

API

| Property | Description | Default Value | | ----------------- | ----------------------------------------------------------------------------- | ------------- | | type | type of CSS framework to use - acceptable values are: 'bootstrap' or 'custom' | bootstrap | | id | ID of the auto injected preloader modal | preloader-modal | | autoInject | whether or not to auto-inject the preloader html into the page | true | | target | the html target selector | #preloader-modal | | progressValueAttr | an attribute of the progress bar to set when progress is updated | aria-valuenow | | barProgressStyle | target css style to set as a percentage on the bar | width | | bar | target css style to set as a percentage on the bar | width | | label | html class of label in preloader - used to set the percentage | #preloader-modal .progress-label | | labelText | loading text format {0} will be replaced with the percent progress e.g. 30% | {0}% Complete | | autoClose | automatically close preloader by default - not supported if clickToClose is set to 'true' | true | | clickToClose | whether the user must click a button to close the modal when preloading is finished | false | | closeLabelText | default label text of click to close button | Continue | | title | title of preloader modal. Blank by default | | | debug | whether or not to enable logging to console | false | | disableVRModeUI | whether or not to disable VR Mode UI when preloading | true | | slowLoad | deliberately slow down the load progress by adding 2 second delays before updating progress - used to showcase loader on fast connections and should not be enabled in production | slowLoad | | doneLabelText | text to set on label when loading is complete | Done |

Installation

Browser

Install and use by directly including the browser files as well as Bootstrap CSS and JS as well as jQuery 1.12.x:

<head>
  <title>My A-Frame Scene</title>
  
  <!-- Bootstrap Bootswatch theme CSS - other themes available here: https://bootswatch.com -->
  <link rel="stylesheet" href="https://cdn.rawgit.com/thomaspark/bootswatch/gh-pages/slate/bootstrap.min.css" />
  
  <!-- Bootstrap JS Dependencies -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

  <!-- A-Frame JS Dependencies -->
  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
  <script src="https://cdn.rawgit.com/gladeye/aframe-preloader-component/1.0.0/dist/aframe-preloader-component.min.js"></script>
</head>

<body>
  <a-scene preloader>
    <a-assets>
        <a-asset-item id="model" src="model.obj" preload="true"></a-asset-item>
        <img id="texture1" src="texture1.jpg" crossorigin="anonymous" preload="true">
        <img id="texture2" src="texture2.jpg" crossorigin="anonymous" preload="true">
      </a-assets>
  </a-scene>
</body>

npm

Install via npm:

npm install @gladeye/aframe-preloader-component

Then require and use.

require('aframe');
require('bootstrap');
require('@gladeye/aframe-preloader-component');

Make sure that Bootstrap's CSS classes are included in your HTML.