All Projects → chenyinkai → resloader

chenyinkai / resloader

Licence: MIT License
🎉A image preloaded plugin and can display the loaded image progress bar

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to resloader

Rsup Progress
❤️ A simple progress bar with promises support
Stars: ✭ 290 (+1350%)
Mutual labels:  promise, loader
Http Vue Loader
load .vue files from your html/js
Stars: ✭ 1,172 (+5760%)
Mutual labels:  promise, loader
react-nested-loader
The easiest way to manage loaders/errors inside a button. NOT an UI lib.
Stars: ✭ 62 (+210%)
Mutual labels:  promise, loader
StrafeAnalyzer
A tool that analyzes player inputs and tells the player how to improve player movement through statistics, realtime graphs, etc! :)
Stars: ✭ 20 (+0%)
Mutual labels:  loader
replace-in-files
Replace text in one or more files or globs.
Stars: ✭ 21 (+5%)
Mutual labels:  promise
android-promise
A Javascript style Promise library for Android JVM
Stars: ✭ 23 (+15%)
Mutual labels:  promise
typed-css-modules-loader
💠 Webpack loader for typed-css-modules auto-creation
Stars: ✭ 62 (+210%)
Mutual labels:  loader
gd-obj
Obj file parser for Godot
Stars: ✭ 32 (+60%)
Mutual labels:  loader
postcss-font-grabber
A postcss plugin, it grabs remote font files and update your CSS, just like that.
Stars: ✭ 26 (+30%)
Mutual labels:  loader
bitmex-orderbook
The fastest order book implementation for the BitMEX WebSocket API.
Stars: ✭ 73 (+265%)
Mutual labels:  promise
react-awesome-loaders
🚀 High quality, super responsive and completely customisable Loading Animations to insert into your website with single line of code.
Stars: ✭ 146 (+630%)
Mutual labels:  loader
Loader
Loader is an open source C++ cheat loader currently built for CS:GO
Stars: ✭ 49 (+145%)
Mutual labels:  loader
doasync
Promisify functions and objects immutably
Stars: ✭ 27 (+35%)
Mutual labels:  promise
queue-promise
A simple, dependency-free library for concurrent promise-based queues. Comes with with concurrency and timeout control.
Stars: ✭ 56 (+180%)
Mutual labels:  promise
executive
🕴Elegant command execution for Node.
Stars: ✭ 37 (+85%)
Mutual labels:  promise
purescript-promises
An alternative effect monad for PureScript.
Stars: ✭ 23 (+15%)
Mutual labels:  promise
ng-loader
Webpack loader for AngularJs components
Stars: ✭ 28 (+40%)
Mutual labels:  loader
Loaders
Process dialogs, loading bars, etc.
Stars: ✭ 23 (+15%)
Mutual labels:  loader
node-steamapi
A nice Steam API wrapper for nodejs
Stars: ✭ 112 (+460%)
Mutual labels:  promise
assetter
Assets manager for PHP. Allow manage CSS and JS files in website and its dependencies. Also allows refresh cache in browsers by adding revisions of loaded files. Builtin plugins to compile SASS and/or LESS styles to CSS just-in-time.
Stars: ✭ 14 (-30%)
Mutual labels:  loader

resloader

Build Status npm npm npm npm

English 中文文档

Overview

A image preloaded plugin and can display the loaded image progress bar

DEMO

Install

Install resloader

npm install resloader

Import resloader

ES6/commonjs import style is supported.

// ES6
import resloader from 'resloader';

// commonjs
var resloader = require("resloader");

or link as a script in an html file.

<script src="dist/resloader.js"></script>

Usage

// imageData expected a JSON
// url is required
let imageData = [{
    name: images1,
    url: imageUrl
},{
    name: images1,
    url: imageUrl
},{
    name: images1,
    url: imageUrl
}{
    name: audio,
    url: audioUrl
}]
// or imageData can be an Array
let imageData = [imageUrl, imageUrl, imageUrl, audioUrl]

const options = {
    resources: imageData, //imageData expected a JSON or Array
    onStart: function(total) {
        console.log('onStart:' + total)
    },
    onProgress: function(currentIndex, total) {
        console.log('onProgress:' + currentIndex + '/' + total)
    },
    onComplete: function(total,result) {
        console.log('onComplete:' + total)
        console.log(result)
    }
}

resloader(options);

options

Option Description default type Function Params Description
resources preload images/audio data - JSON, Array -
onStart callback when preload on started - Function total: preload images total
onProgress callback when preload on loading - Function currentIndex:loaded images number
total:preload images total
onComplete callback when preload on complete - Function total: preload images total
result: preload images data(the same as resources)

LICENSE

MIT@chenyinkai

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].