Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gladeye/aframe-preloader-component

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gladeye/aframe-preloader-component

A preloading animation that automatically displays while scene assets load.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by166.67%
Maintainers
4
Weekly downloads
 
Created
Source

aframe-preloader-component

Version License

A preloading bar that automatically displays while scene assets load.

For A-Frame.

API

PropertyDescriptionDefault Value
typetype of CSS framework to use - acceptable values are: 'bootstrap' or 'custom'bootstrap
idID of the auto injected preloader modalpreloader-modal
autoInjectwhether or not to auto-inject the preloader html into the pagetrue
targetthe html target selector#preloader-modal
progressValueAttran attribute of the progress bar to set when progress is updatedaria-valuenow
barProgressStyletarget css style to set as a percentage on the barwidth
bartarget css style to set as a percentage on the barwidth
labelhtml class of label in preloader - used to set the percentage#preloader-modal .progress-label
labelTextloading text format {0} will be replaced with the percent progress e.g. 30%{0}% Complete
autoCloseautomatically close preloader by default - not supported if clickToClose is set to 'true'true
clickToClosewhether the user must click a button to close the modal when preloading is finishedfalse
closeLabelTextdefault label text of click to close buttonContinue
titletitle of preloader modal. Blank by default
debugwhether or not to enable logging to consolefalse
disableVRModeUIwhether or not to disable VR Mode UI when preloadingtrue
slowLoaddeliberately 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 productionslowLoad
doneLabelTexttext to set on label when loading is completeDone

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.

Keywords

FAQs

Package last updated on 17 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc