I’m trying to update to the latest version 131 from 126… Im getting an error though:
Uncaught TypeError: SceneUtils.createMultiMaterialObject is not a constructor
Here is my code. It works in v126, but not when updating to latest v131.
<script type="module">
import * as THREE from './build/three.module.js';
import {OBJLoader} from './examples/jsm/loaders/OBJLoader.js';
import {MTLLoader} from './examples/jsm/loaders/MTLLoader.js';
import {FBXLoader} from './examples/jsm/loaders/FBXLoader.js';
import {GLTFLoader} from './examples/jsm/loaders/GLTFLoader.js';
import {GLTFExporter} from './examples/jsm/exporters/GLTFExporter.js';
import {OrbitControls} from './examples/jsm/controls/OrbitControls.js';
import {TransformControls} from './examples/jsm/controls/TransformControls.js';
import {SceneUtils} from './examples/jsm/utils/SceneUtils.js';
import {BufferGeometryUtils} from './examples/jsm/utils/BufferGeometryUtils.js';
import * as easing from './js/easing.js';
window.THREE = THREE;
window.OBJLoader = OBJLoader;
window.MTLLoader = MTLLoader;
window.FBXLoader = FBXLoader;
window.GLTFLoader = GLTFLoader;
window.GLTFExporter = GLTFExporter;
window.OrbitControls = OrbitControls;
window.TransformControls = TransformControls;
window.SceneUtils = SceneUtils;
window.BufferGeometryUtils = BufferGeometryUtils;
window.easing = easing;
</script>
the error happens here:
this.mesh = new SceneUtils.createMultiMaterialObject( this.geometry,[material[0].texture,material[0].flat,material[0].wireframe,material[0].hoverWireframe]);
Why does it work in v126 and not v131… Is it because of the es6?
What do I need to change to my code to get it working?
I’m using NW.js, if that is important to mention.