# three-gltf-loader

> three.js GLTFLoader wrapped as a module for easy importing

Latest version **1.111.0** (published 2019-12-04) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install three-gltf-loader
pnpm add three-gltf-loader
yarn add three-gltf-loader
bun add three-gltf-loader
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.111.0 |
| Published | 2019-12-04 |
| First published | 2018-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 82.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | JohH |
| Maintainers | johh |
| Keywords | three, three.js, gltf, gltf2, loader, webgl, es6, ts, typescript |

## Links

- npm: https://www.npmjs.com/package/three-gltf-loader
- Repository: https://github.com/johh/three-gltf-loader
- Homepage: https://github.com/johh/three-gltf-loader#readme
- npm.io page: https://npm.io/package/three-gltf-loader

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.111.0 (latest) — 2019-12-04
- 1.110.0 — 2019-11-08
- 1.109.0 — 2019-10-04
- 1.108.0 — 2019-08-30
- 1.107.0 — 2019-07-31
- 1.106.0 — 2019-06-27
- 1.105.0 — 2019-05-30
- 1.104.0 — 2019-04-24
- 1.103.0 — 2019-03-29
- 1.102.0 — 2019-03-02
- 1.101.0 — 2019-02-01
- 1.100.0 — 2018-12-31
- 1.99.1 — 2018-12-19
- 1.99.0 — 2018-12-01
- 1.98.0 — 2018-11-03
- … 17 more at https://npm.io/package/three-gltf-loader/versions

## README

# three.js glTF loader
![three.js version](https://img.shields.io/badge/three.js-v0.111.0-green.svg?style=flat-square)
![license](https://img.shields.io/npm/l/three-gltf-loader.svg?style=flat-square)
[![GitHub issues](https://img.shields.io/github/issues/johh/three-gltf-loader.svg?style=flat-square)](https://github.com/johh/three-gltf-loader/issues)


## Note for `three` >= v0.103.0
Please note, that starting with three.js r103, `GLTFLoader` is included in the `three` package itself and installing `three-gltf-loader` is no longer necessary.

It can be accessed via

```javascript
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
```
However, this package will still be maintained.


## Installation
```
yarn add three-gltf-loader
```
```
npm i --save three-gltf-loader
```

## Description
three.js's r111 [GLTFLoader](https://threejs.org/docs/#examples/loaders/GLTFLoader) wrapped as a module for easy importing, TypeScript type definitions included.

## Usage
```javascript
import * as THREE from 'three';
import GLTFLoader from 'three-gltf-loader';

const loader = new GLTFLoader();
loader.load(
	'path/to/your/file.gltf',
	( gltf ) => {
		// called when the resource is loaded
		scene.add( gltf.scene );
	},
	( xhr ) => {
		// called while loading is progressing
		console.log( `${( xhr.loaded / xhr.total * 100 )}% loaded` );
	},
	( error ) => {
		// called when loading has errors
		console.error( 'An error happened', error );
	},
);
```
For further documentation, see [the GLTFLoader docs](https://threejs.org/docs/#examples/loaders/GLTFLoader).

## Reporting Issues
Please note that this is just a wrapper for the [glTF loader provided by three.js](https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js). Therefore, any issues regarding the loader should be reported directly via the [three.js issue tracker](https://github.com/mrdoob/three.js/issues/).

For issues directly related to the wrapper or this package specifically, feel free to contact me.

---
_Source: https://npm.io/package/three-gltf-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
