Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

2.0.0

Latest
Compare
Choose a tag to compare
@cecilemuller cecilemuller released this 22 Jun 13:06
· 64 commits to master since this release
a81a5ce

Named exports

Classes are now named exports instead of default because some "examples" files (like EffectComposer) define more than one class.

Before, in 1.0.0:

import OrbitControls from 'three/examples/js/controls/OrbitControls';

Now, in 2.0.0:

import {OrbitControls} from 'three/examples/js/controls/OrbitControls';

For Typescript users, this means the following declaration for Intellisense:

declare module 'three/examples/js/controls/OrbitControls' {
	export const OrbitControls: typeof THREE.OrbitControls;
}

For code-splitting users:

import('three/examples/js/controls/OrbitControls')
.then(asyncModule => {
	controls = new asyncModule.OrbitControls(camera, renderer.domElement);
});

THREE.Pass

Classes from three/examples/js/postprocessing automatically import THREE.Pass from EffectComposer.js.