1.0.9 • Published 5 years ago

three-loaders v1.0.9

Weekly downloads
11
License
MIT
Repository
github
Last release
5 years ago

three-loaders

  • This Repository wraps the original three.js loaders to use it in modern javascript applications
  • Until now it only wraps the gltf loader and the draco loader with no additional needed draco files
  • It is important to make the files available in the draco folder.

Installation

  • To install use either npm
npm install three
npm install three-loaders
  • or yarn
yarn add three
yarn add three-loaders

Usage

All credit goes to DRACOLoader.js contributors and to GLTFLoader.js contributors.

import * as THREE from "three";
import { THREEGLTFLoader, THREEDracoLoader } from "three-loaders";

// Init THREE scene (add your code)
const loader = THREEGLTFLoader();
loader.setDRACOLoader(new THREEDRACOLoader("http://myServer.com/draco"));
loader.load("file.gltf", gltf => {
  const model = gltf.scene;
  scene.add(model);
});

License

License is the same as three.js, i.e. MIT.

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago