three/examples
files are patched to support ES6 import
.
To patch Three.js examples add file path in Array filesExamples
in file ./threeExamples.js
;
module.exports = {
patchedPath: './ThreeExtended/',
filesExamples: [
'./loaders/GLTFLoader.js',
'./loaders/deprecated/LegacyGLTFLoader.js',
'./loaders/DDSLoader.js',
'./loaders/DRACOLoader.js',
'./utils/BufferGeometryUtils.js',
/// Add your file to patch here.
],
};
threeExamples
is alias path to import three examples.
By example, you could be imported in itowns by:
import GLTFLoader from './ThreeExtended/loaders/GLTFLoader';