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 🙏

© 2026 – Pkg Stats / Ryan Hefner

super-loader

v1.0.2

Published

The model loader for the three.js

Readme

super-loader

Latest NPM release License Dependencies Dev Dependencies

  • The model loader for the three.js
  • Currently Support STL, OBJ

Installation

  • Npm
    npm i super-loader --save

  • Download the minified library and include it in your html.
    <script src="assets/three.min.js"></script>
    <script src="assets/super-loader.min.js"></script>

Usage

  • Module Require
var loader = require('super-loader');
var load = loader('assets/models/example.stl');
load.on('parse.load', function ( event, mesh ){
	//scene.add( mesh );
});
load.on('parse.error', function ( event, stack ){
	//console.log( stack );
});
  • Use window
var load = window.superLoader('assets/models/example.stl');
load.on ...

Note: If you need to load the stl model, must be require the THREE.STLLoader
Note: We have modified some of the source code for *-loader, You can download it in example / javascripts / loaders

Constructor

var loader = require('super-loader');

loader( URLs, configure );

URLs

URLs support 4 types

  • File or FileList
    If you upload a model from the local, you can use it like this:
loader( event.target.files[ 0 ], /* configure */ );

or

loader( event.target.files );
  • String or Array
    You can also use the http link
loader( 'https://royjang.github.io/super-loader/model/aircraft.stl', /* configure */ );

or

loader([
	{
		url: 'https://royjang.github.io/super-loader/model/aircraft.stl',
		alias: 'aircraft'	// not required, default is path
	},	
	{
		url: 'https://royjang.github.io/super-loader/model/car.stl',
		alias: 'car'
	}
], /* configure */);	

Configure

  • type
    If the url can't reflect the type of model, the parameter is required
{
	type: 'stl' // not case sensitive
}
  • worker Use a separate thread resolution model
{
	worker: true
}

Will Support

  • timeout

Note: If the Browser support WebWorker, defaut is true

Hooks - Listener

  • parse.before
loader.on('parse.before', ( event, { name, bufferGeometry } ) => {});
  • parse.load
loader.on('parse.load', ( event, { name, mesh } ) => {});
  • parse.error
loader.on('parse.error', ( event, { name, stack, message } ) => {});
  • upload.finish
loader.on('upload.finish', ( event, { name, buffer } ) => {});
  • upload.error
loader.on('upload.error', ( event, { name, stack, message } ) => {});
  • upload.progress
loader.on('upload.progress', ( event, { name, loaded, total, timeStamp } ) => {});
  • compatible.error
    If the browser not support WebGL, FileReader or ArrayBuffer
loader.on('compatible.error', ( event, message ) => {});

Hooks - Emit

  • upload.abort
    abort the file upload
loader.emit('upload.abort');

Example

Load-STL
Load-STL-Multiple
Load-OBJ
Load-OBJ-With-STL
Upload-OBJ-With-STL