Quellcode durchsuchen

Editor: Use THREE namespace.

Mugen87 vor 5 Jahren
Ursprung
Commit
1499ef3bca
39 geänderte Dateien mit 247 neuen und 389 gelöschten Zeilen
  1. 2 2
      editor/index.html
  2. 17 33
      editor/js/Editor.js
  3. 13 21
      editor/js/EditorControls.js
  4. 23 34
      editor/js/Loader.js
  5. 56 86
      editor/js/Menubar.Add.js
  6. 2 4
      editor/js/Menubar.Examples.js
  7. 3 6
      editor/js/Menubar.File.js
  8. 1 1
      editor/js/Menubar.Help.js
  9. 2 4
      editor/js/Menubar.Status.js
  10. 2 2
      editor/js/Sidebar.Geometry.BoxGeometry.js
  11. 6 9
      editor/js/Sidebar.Geometry.CircleGeometry.js
  12. 2 4
      editor/js/Sidebar.Geometry.CylinderGeometry.js
  13. 2 4
      editor/js/Sidebar.Geometry.DodecahedronGeometry.js
  14. 3 6
      editor/js/Sidebar.Geometry.ExtrudeGeometry.js
  15. 2 4
      editor/js/Sidebar.Geometry.IcosahedronGeometry.js
  16. 2 4
      editor/js/Sidebar.Geometry.LatheGeometry.js
  17. 2 4
      editor/js/Sidebar.Geometry.OctahedronGeometry.js
  18. 2 4
      editor/js/Sidebar.Geometry.PlaneGeometry.js
  19. 2 4
      editor/js/Sidebar.Geometry.RingGeometry.js
  20. 3 6
      editor/js/Sidebar.Geometry.ShapeGeometry.js
  21. 10 13
      editor/js/Sidebar.Geometry.SphereGeometry.js
  22. 2 4
      editor/js/Sidebar.Geometry.TetrahedronGeometry.js
  23. 4 7
      editor/js/Sidebar.Geometry.TorusGeometry.js
  24. 2 4
      editor/js/Sidebar.Geometry.TorusKnotGeometry.js
  25. 3 6
      editor/js/Sidebar.Geometry.TubeGeometry.js
  26. 2 2
      editor/js/Sidebar.Geometry.js
  27. 22 43
      editor/js/Sidebar.Material.js
  28. 8 12
      editor/js/Sidebar.Object.js
  29. 2 2
      editor/js/Sidebar.Project.js
  30. 12 21
      editor/js/Viewport.js
  31. 2 2
      editor/js/commands/AddObjectCommand.js
  32. 3 2
      editor/js/commands/RemoveObjectCommand.js
  33. 3 2
      editor/js/commands/SetGeometryCommand.js
  34. 3 2
      editor/js/commands/SetMaterialCommand.js
  35. 4 3
      editor/js/commands/SetMaterialMapCommand.js
  36. 4 3
      editor/js/commands/SetPositionCommand.js
  37. 4 3
      editor/js/commands/SetRotationCommand.js
  38. 4 3
      editor/js/commands/SetScaleCommand.js
  39. 6 13
      editor/js/libs/ui.three.js

+ 2 - 2
editor/index.html

@@ -46,7 +46,7 @@
 
 
 		<script type="module">
 		<script type="module">
 
 
-			import { FileLoader } from '../build/three.module.js';
+			import * as THREE from '../build/three.module.js';
 
 
 			import { Editor } from './js/Editor.js';
 			import { Editor } from './js/Editor.js';
 			import { Viewport } from './js/Viewport.js';
 			import { Viewport } from './js/Viewport.js';
@@ -194,7 +194,7 @@
 
 
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {
 
 
-					var loader = new FileLoader();
+					var loader = new THREE.FileLoader();
 					loader.crossOrigin = '';
 					loader.crossOrigin = '';
 					loader.load( file, function ( text ) {
 					loader.load( file, function ( text ) {
 
 

+ 17 - 33
editor/js/Editor.js

@@ -2,23 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	AnimationMixer,
-	CameraHelper,
-	Color,
-	DirectionalLightHelper,
-	HemisphereLightHelper,
-	Mesh,
-	MeshBasicMaterial,
-	ObjectLoader,
-	PerspectiveCamera,
-	PointLightHelper,
-	Scene,
-	SkeletonHelper,
-	SphereBufferGeometry,
-	SpotLightHelper,
-	Vector3
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { Config } from './Config.js';
 import { Config } from './Config.js';
 import { Loader } from './Loader.js';
 import { Loader } from './Loader.js';
@@ -28,10 +12,10 @@ import { Storage as _Storage } from './Storage.js';
 
 
 var Editor = function () {
 var Editor = function () {
 
 
-	this.DEFAULT_CAMERA = new PerspectiveCamera( 50, 1, 0.01, 1000 );
+	this.DEFAULT_CAMERA = new THREE.PerspectiveCamera( 50, 1, 0.01, 1000 );
 	this.DEFAULT_CAMERA.name = 'Camera';
 	this.DEFAULT_CAMERA.name = 'Camera';
 	this.DEFAULT_CAMERA.position.set( 0, 5, 10 );
 	this.DEFAULT_CAMERA.position.set( 0, 5, 10 );
-	this.DEFAULT_CAMERA.lookAt( new Vector3() );
+	this.DEFAULT_CAMERA.lookAt( new THREE.Vector3() );
 
 
 	var Signal = signals.Signal;
 	var Signal = signals.Signal;
 
 
@@ -106,11 +90,11 @@ var Editor = function () {
 
 
 	this.camera = this.DEFAULT_CAMERA.clone();
 	this.camera = this.DEFAULT_CAMERA.clone();
 
 
-	this.scene = new Scene();
+	this.scene = new THREE.Scene();
 	this.scene.name = 'Scene';
 	this.scene.name = 'Scene';
-	this.scene.background = new Color( 0xaaaaaa );
+	this.scene.background = new THREE.Color( 0xaaaaaa );
 
 
-	this.sceneHelpers = new Scene();
+	this.sceneHelpers = new THREE.Scene();
 
 
 	this.object = {};
 	this.object = {};
 	this.geometries = {};
 	this.geometries = {};
@@ -119,7 +103,7 @@ var Editor = function () {
 	this.scripts = {};
 	this.scripts = {};
 
 
 	this.animations = {};
 	this.animations = {};
-	this.mixer = new AnimationMixer( this.scene );
+	this.mixer = new THREE.AnimationMixer( this.scene );
 
 
 	this.selected = null;
 	this.selected = null;
 	this.helpers = {};
 	this.helpers = {};
@@ -332,8 +316,8 @@ Editor.prototype = {
 
 
 	addHelper: function () {
 	addHelper: function () {
 
 
-		var geometry = new SphereBufferGeometry( 2, 4, 2 );
-		var material = new MeshBasicMaterial( { color: 0xff0000, visible: false } );
+		var geometry = new THREE.SphereBufferGeometry( 2, 4, 2 );
+		var material = new THREE.MeshBasicMaterial( { color: 0xff0000, visible: false } );
 
 
 		return function ( object ) {
 		return function ( object ) {
 
 
@@ -341,27 +325,27 @@ Editor.prototype = {
 
 
 			if ( object.isCamera ) {
 			if ( object.isCamera ) {
 
 
-				helper = new CameraHelper( object );
+				helper = new THREE.CameraHelper( object );
 
 
 			} else if ( object.isPointLight ) {
 			} else if ( object.isPointLight ) {
 
 
-				helper = new PointLightHelper( object, 1 );
+				helper = new THREE.PointLightHelper( object, 1 );
 
 
 			} else if ( object.isDirectionalLight ) {
 			} else if ( object.isDirectionalLight ) {
 
 
-				helper = new DirectionalLightHelper( object, 1 );
+				helper = new THREE.DirectionalLightHelper( object, 1 );
 
 
 			} else if ( object.isSpotLight ) {
 			} else if ( object.isSpotLight ) {
 
 
-				helper = new SpotLightHelper( object, 1 );
+				helper = new THREE.SpotLightHelper( object, 1 );
 
 
 			} else if ( object.isHemisphereLight ) {
 			} else if ( object.isHemisphereLight ) {
 
 
-				helper = new HemisphereLightHelper( object, 1 );
+				helper = new THREE.HemisphereLightHelper( object, 1 );
 
 
 			} else if ( object.isSkinnedMesh ) {
 			} else if ( object.isSkinnedMesh ) {
 
 
-				helper = new SkeletonHelper( object.skeleton.bones[ 0 ] );
+				helper = new THREE.SkeletonHelper( object.skeleton.bones[ 0 ] );
 
 
 			} else {
 			} else {
 
 
@@ -370,7 +354,7 @@ Editor.prototype = {
 
 
 			}
 			}
 
 
-			var picker = new Mesh( geometry, material );
+			var picker = new THREE.Mesh( geometry, material );
 			picker.name = 'picker';
 			picker.name = 'picker';
 			picker.userData.object = object;
 			picker.userData.object = object;
 			helper.add( picker );
 			helper.add( picker );
@@ -575,7 +559,7 @@ Editor.prototype = {
 
 
 	fromJSON: function ( json ) {
 	fromJSON: function ( json ) {
 
 
-		var loader = new ObjectLoader();
+		var loader = new THREE.ObjectLoader();
 
 
 		// backwards
 		// backwards
 
 

+ 13 - 21
editor/js/EditorControls.js

@@ -5,22 +5,14 @@
  * @author WestLangley / http://github.com/WestLangley
  * @author WestLangley / http://github.com/WestLangley
  */
  */
 
 
-import {
-	Box3,
-	EventDispatcher,
-	Matrix3,
-	Sphere,
-	Spherical,
-	Vector2,
-	Vector3
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 var EditorControls = function ( object, domElement ) {
 var EditorControls = function ( object, domElement ) {
 
 
 	// API
 	// API
 
 
 	this.enabled = true;
 	this.enabled = true;
-	this.center = new Vector3();
+	this.center = new THREE.Vector3();
 	this.panSpeed = 0.002;
 	this.panSpeed = 0.002;
 	this.zoomSpeed = 0.1;
 	this.zoomSpeed = 0.1;
 	this.rotationSpeed = 0.005;
 	this.rotationSpeed = 0.005;
@@ -28,19 +20,19 @@ var EditorControls = function ( object, domElement ) {
 	// internals
 	// internals
 
 
 	var scope = this;
 	var scope = this;
-	var vector = new Vector3();
-	var delta = new Vector3();
-	var box = new Box3();
+	var vector = new THREE.Vector3();
+	var delta = new THREE.Vector3();
+	var box = new THREE.Box3();
 
 
 	var STATE = { NONE: - 1, ROTATE: 0, ZOOM: 1, PAN: 2 };
 	var STATE = { NONE: - 1, ROTATE: 0, ZOOM: 1, PAN: 2 };
 	var state = STATE.NONE;
 	var state = STATE.NONE;
 
 
 	var center = this.center;
 	var center = this.center;
-	var normalMatrix = new Matrix3();
-	var pointer = new Vector2();
-	var pointerOld = new Vector2();
-	var spherical = new Spherical();
-	var sphere = new Sphere();
+	var normalMatrix = new THREE.Matrix3();
+	var pointer = new THREE.Vector2();
+	var pointerOld = new THREE.Vector2();
+	var spherical = new THREE.Spherical();
+	var sphere = new THREE.Sphere();
 
 
 	// events
 	// events
 
 
@@ -231,8 +223,8 @@ var EditorControls = function ( object, domElement ) {
 
 
 	// touch
 	// touch
 
 
-	var touches = [ new Vector3(), new Vector3(), new Vector3() ];
-	var prevTouches = [ new Vector3(), new Vector3(), new Vector3() ];
+	var touches = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
+	var prevTouches = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
 
 
 	var prevDistance = null;
 	var prevDistance = null;
 
 
@@ -319,7 +311,7 @@ var EditorControls = function ( object, domElement ) {
 
 
 };
 };
 
 
-EditorControls.prototype = Object.create( EventDispatcher.prototype );
+EditorControls.prototype = Object.create( THREE.EventDispatcher.prototype );
 EditorControls.prototype.constructor = EditorControls;
 EditorControls.prototype.constructor = EditorControls;
 
 
 export { EditorControls };
 export { EditorControls };

+ 23 - 34
editor/js/Loader.js

@@ -2,18 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	AnimationMixer,
-	BufferGeometryLoader,
-	Group,
-	LoadingManager,
-	LoaderUtils,
-	Mesh,
-	MeshBasicMaterial,
-	MeshStandardMaterial,
-	ObjectLoader,
-	ShapeBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { AMFLoader } from '../../examples/jsm/loaders/AMFLoader.js';
 import { AMFLoader } from '../../examples/jsm/loaders/AMFLoader.js';
 import { ColladaLoader } from '../../examples/jsm/loaders/ColladaLoader.js';
 import { ColladaLoader } from '../../examples/jsm/loaders/ColladaLoader.js';
@@ -46,7 +35,7 @@ var Loader = function ( editor ) {
 
 
 			var filesMap = createFileMap( files );
 			var filesMap = createFileMap( files );
 
 
-			var manager = new LoadingManager();
+			var manager = new THREE.LoadingManager();
 			manager.setURLModifier( function ( url ) {
 			manager.setURLModifier( function ( url ) {
 
 
 				var file = filesMap[ url ];
 				var file = filesMap[ url ];
@@ -147,9 +136,9 @@ var Loader = function ( editor ) {
 					loader.setDecoderPath( '../examples/js/libs/draco/' );
 					loader.setDecoderPath( '../examples/js/libs/draco/' );
 					loader.decodeDracoFile( contents, function ( geometry ) {
 					loader.decodeDracoFile( contents, function ( geometry ) {
 
 
-						var material = new MeshStandardMaterial();
+						var material = new THREE.MeshStandardMaterial();
 
 
-						var mesh = new Mesh( geometry, material );
+						var mesh = new THREE.Mesh( geometry, material );
 						mesh.name = filename;
 						mesh.name = filename;
 
 
 						editor.execute( new AddObjectCommand( editor, mesh ) );
 						editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -317,13 +306,13 @@ var Loader = function ( editor ) {
 					var contents = event.target.result;
 					var contents = event.target.result;
 
 
 					var geometry = new MD2Loader().parse( contents );
 					var geometry = new MD2Loader().parse( contents );
-					var material = new MeshStandardMaterial( {
+					var material = new THREE.MeshStandardMaterial( {
 						morphTargets: true,
 						morphTargets: true,
 						morphNormals: true
 						morphNormals: true
 					} );
 					} );
 
 
-					var mesh = new Mesh( geometry, material );
-					mesh.mixer = new AnimationMixer( mesh );
+					var mesh = new THREE.Mesh( geometry, material );
+					mesh.mixer = new THREE.AnimationMixer( mesh );
 					mesh.name = filename;
 					mesh.name = filename;
 
 
 					editor.addAnimation( mesh, geometry.animations );
 					editor.addAnimation( mesh, geometry.animations );
@@ -360,9 +349,9 @@ var Loader = function ( editor ) {
 					geometry.sourceType = "ply";
 					geometry.sourceType = "ply";
 					geometry.sourceFile = file.name;
 					geometry.sourceFile = file.name;
 
 
-					var material = new MeshStandardMaterial();
+					var material = new THREE.MeshStandardMaterial();
 
 
-					var mesh = new Mesh( geometry, material );
+					var mesh = new THREE.Mesh( geometry, material );
 					mesh.name = filename;
 					mesh.name = filename;
 
 
 					editor.execute( new AddObjectCommand( editor, mesh ) );
 					editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -382,9 +371,9 @@ var Loader = function ( editor ) {
 					geometry.sourceType = "stl";
 					geometry.sourceType = "stl";
 					geometry.sourceFile = file.name;
 					geometry.sourceFile = file.name;
 
 
-					var material = new MeshStandardMaterial();
+					var material = new THREE.MeshStandardMaterial();
 
 
-					var mesh = new Mesh( geometry, material );
+					var mesh = new THREE.Mesh( geometry, material );
 					mesh.name = filename;
 					mesh.name = filename;
 
 
 					editor.execute( new AddObjectCommand( editor, mesh ) );
 					editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -414,7 +403,7 @@ var Loader = function ( editor ) {
 
 
 					//
 					//
 
 
-					var group = new Group();
+					var group = new THREE.Group();
 					group.scale.multiplyScalar( 0.1 );
 					group.scale.multiplyScalar( 0.1 );
 					group.scale.y *= - 1;
 					group.scale.y *= - 1;
 
 
@@ -422,7 +411,7 @@ var Loader = function ( editor ) {
 
 
 						var path = paths[ i ];
 						var path = paths[ i ];
 
 
-						var material = new MeshBasicMaterial( {
+						var material = new THREE.MeshBasicMaterial( {
 							color: path.color,
 							color: path.color,
 							depthWrite: false
 							depthWrite: false
 						} );
 						} );
@@ -433,8 +422,8 @@ var Loader = function ( editor ) {
 
 
 							var shape = shapes[ j ];
 							var shape = shapes[ j ];
 
 
-							var geometry = new ShapeBufferGeometry( shape );
-							var mesh = new Mesh( geometry, material );
+							var geometry = new THREE.ShapeBufferGeometry( shape );
+							var mesh = new THREE.Mesh( geometry, material );
 
 
 							group.add( mesh );
 							group.add( mesh );
 
 
@@ -459,9 +448,9 @@ var Loader = function ( editor ) {
 					geometry.sourceType = "vtk";
 					geometry.sourceType = "vtk";
 					geometry.sourceFile = file.name;
 					geometry.sourceFile = file.name;
 
 
-					var material = new MeshStandardMaterial();
+					var material = new THREE.MeshStandardMaterial();
 
 
-					var mesh = new Mesh( geometry, material );
+					var mesh = new THREE.Mesh( geometry, material );
 					mesh.name = filename;
 					mesh.name = filename;
 
 
 					editor.execute( new AddObjectCommand( editor, mesh ) );
 					editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -531,10 +520,10 @@ var Loader = function ( editor ) {
 
 
 			case 'buffergeometry':
 			case 'buffergeometry':
 
 
-				var loader = new BufferGeometryLoader();
+				var loader = new THREE.BufferGeometryLoader();
 				var result = loader.parse( data );
 				var result = loader.parse( data );
 
 
-				var mesh = new Mesh( result );
+				var mesh = new THREE.Mesh( result );
 
 
 				editor.execute( new AddObjectCommand( editor, mesh ) );
 				editor.execute( new AddObjectCommand( editor, mesh ) );
 
 
@@ -548,7 +537,7 @@ var Loader = function ( editor ) {
 
 
 			case 'object':
 			case 'object':
 
 
-				var loader = new ObjectLoader();
+				var loader = new THREE.ObjectLoader();
 				loader.setResourcePath( scope.texturePath );
 				loader.setResourcePath( scope.texturePath );
 
 
 				var result = loader.parse( data );
 				var result = loader.parse( data );
@@ -608,7 +597,7 @@ var Loader = function ( editor ) {
 
 
 		zip.filter( function ( path, file ) {
 		zip.filter( function ( path, file ) {
 
 
-			var manager = new LoadingManager();
+			var manager = new THREE.LoadingManager();
 			manager.setURLModifier( function ( url ) {
 			manager.setURLModifier( function ( url ) {
 
 
 				var file = zip.files[ url ];
 				var file = zip.files[ url ];
@@ -684,7 +673,7 @@ var Loader = function ( editor ) {
 
 
 		} else {
 		} else {
 
 
-			var magic = LoaderUtils.decodeText( new Uint8Array( contents, 0, 4 ) );
+			var magic = THREE.LoaderUtils.decodeText( new Uint8Array( contents, 0, 4 ) );
 
 
 			if ( magic === 'glTF' ) {
 			if ( magic === 'glTF' ) {
 
 
@@ -696,7 +685,7 @@ var Loader = function ( editor ) {
 			} else {
 			} else {
 
 
 				// contents is a .gltf file
 				// contents is a .gltf file
-				resultContent = LoaderUtils.decodeText( new Uint8Array( contents ) );
+				resultContent = THREE.LoaderUtils.decodeText( new Uint8Array( contents ) );
 
 
 			}
 			}
 
 

+ 56 - 86
editor/js/Menubar.Add.js

@@ -2,37 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	AmbientLight,
-	BoxBufferGeometry,
-	CatmullRomCurve3,
-	CircleBufferGeometry,
-	CylinderBufferGeometry,
-	DirectionalLight,
-	DodecahedronBufferGeometry,
-	DoubleSide,
-	HemisphereLight,
-	IcosahedronBufferGeometry,
-	LatheBufferGeometry,
-	Mesh,
-	MeshStandardMaterial,
-	OctahedronBufferGeometry,
-	OrthographicCamera,
-	PerspectiveCamera,
-	PlaneBufferGeometry,
-	PointLight,
-	RingBufferGeometry,
-	SphereBufferGeometry,
-	Sprite,
-	SpriteMaterial,
-	SpotLight,
-	TetrahedronBufferGeometry,
-	TorusBufferGeometry,
-	TorusKnotBufferGeometry,
-	TubeBufferGeometry,
-	Vector2,
-	Vector3
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 
 
@@ -80,8 +50,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/box' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/box' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new BoxBufferGeometry( 1, 1, 1, 1, 1, 1 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.BoxBufferGeometry( 1, 1, 1, 1, 1, 1 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Box';
 		mesh.name = 'Box';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -96,8 +66,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/circle' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/circle' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new CircleBufferGeometry( 1, 8, 0, Math.PI * 2 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.CircleBufferGeometry( 1, 8, 0, Math.PI * 2 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Circle';
 		mesh.name = 'Circle';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -112,8 +82,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/cylinder' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/cylinder' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new CylinderBufferGeometry( 1, 1, 1, 8, 1, false, 0, Math.PI * 2 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.CylinderBufferGeometry( 1, 1, 1, 8, 1, false, 0, Math.PI * 2 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Cylinder';
 		mesh.name = 'Cylinder';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -128,8 +98,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/dodecahedron' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/dodecahedron' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new DodecahedronBufferGeometry( 1, 0 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.DodecahedronBufferGeometry( 1, 0 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Dodecahedron';
 		mesh.name = 'Dodecahedron';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -144,8 +114,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/icosahedron' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/icosahedron' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new IcosahedronBufferGeometry( 1, 0 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.IcosahedronBufferGeometry( 1, 0 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Icosahedron';
 		mesh.name = 'Icosahedron';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -161,21 +131,21 @@ var MenubarAdd = function ( editor ) {
 	option.onClick( function () {
 	option.onClick( function () {
 
 
 		var points = [
 		var points = [
-			new Vector2( 0, 0 ),
-			new Vector2( 0.4, 0 ),
-			new Vector2( 0.35, 0.05 ),
-			new Vector2( 0.1, 0.075 ),
-			new Vector2( 0.08, 0.1 ),
-			new Vector2( 0.08, 0.4 ),
-			new Vector2( 0.1, 0.42 ),
-			new Vector2( 0.14, 0.48 ),
-			new Vector2( 0.2, 0.5 ),
-			new Vector2( 0.25, 0.54 ),
-			new Vector2( 0.3, 1.2 )
+			new THREE.Vector2( 0, 0 ),
+			new THREE.Vector2( 0.4, 0 ),
+			new THREE.Vector2( 0.35, 0.05 ),
+			new THREE.Vector2( 0.1, 0.075 ),
+			new THREE.Vector2( 0.08, 0.1 ),
+			new THREE.Vector2( 0.08, 0.4 ),
+			new THREE.Vector2( 0.1, 0.42 ),
+			new THREE.Vector2( 0.14, 0.48 ),
+			new THREE.Vector2( 0.2, 0.5 ),
+			new THREE.Vector2( 0.25, 0.54 ),
+			new THREE.Vector2( 0.3, 1.2 )
 		];
 		];
 
 
-		var geometry = new LatheBufferGeometry( points, 12, 0, Math.PI * 2 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial( { side: DoubleSide } ) );
+		var geometry = new THREE.LatheBufferGeometry( points, 12, 0, Math.PI * 2 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial( { side: THREE.DoubleSide } ) );
 		mesh.name = 'Lathe';
 		mesh.name = 'Lathe';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -190,8 +160,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/octahedron' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/octahedron' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new OctahedronBufferGeometry( 1, 0 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.OctahedronBufferGeometry( 1, 0 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Octahedron';
 		mesh.name = 'Octahedron';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -206,9 +176,9 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/plane' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/plane' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new PlaneBufferGeometry( 1, 1, 1, 1 );
-		var material = new MeshStandardMaterial();
-		var mesh = new Mesh( geometry, material );
+		var geometry = new THREE.PlaneBufferGeometry( 1, 1, 1, 1 );
+		var material = new THREE.MeshStandardMaterial();
+		var mesh = new THREE.Mesh( geometry, material );
 		mesh.name = 'Plane';
 		mesh.name = 'Plane';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -223,8 +193,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/ring' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/ring' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new RingBufferGeometry( 0.5, 1, 8, 1, 0, Math.PI * 2 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.RingBufferGeometry( 0.5, 1, 8, 1, 0, Math.PI * 2 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Ring';
 		mesh.name = 'Ring';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -239,8 +209,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/sphere' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/sphere' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new SphereBufferGeometry( 1, 8, 6, 0, Math.PI * 2, 0, Math.PI );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.SphereBufferGeometry( 1, 8, 6, 0, Math.PI * 2, 0, Math.PI );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Sphere';
 		mesh.name = 'Sphere';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -255,7 +225,7 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/sprite' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/sprite' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var sprite = new Sprite( new SpriteMaterial() );
+		var sprite = new THREE.Sprite( new THREE.SpriteMaterial() );
 		sprite.name = 'Sprite';
 		sprite.name = 'Sprite';
 
 
 		editor.execute( new AddObjectCommand( editor, sprite ) );
 		editor.execute( new AddObjectCommand( editor, sprite ) );
@@ -270,8 +240,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/tetrahedron' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/tetrahedron' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new TetrahedronBufferGeometry( 1, 0 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.TetrahedronBufferGeometry( 1, 0 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Tetrahedron';
 		mesh.name = 'Tetrahedron';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -286,8 +256,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/torus' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/torus' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new TorusBufferGeometry( 1, 0.4, 8, 6, Math.PI * 2 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.TorusBufferGeometry( 1, 0.4, 8, 6, Math.PI * 2 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Torus';
 		mesh.name = 'Torus';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -302,8 +272,8 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/torusknot' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/torusknot' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var geometry = new TorusKnotBufferGeometry( 1, 0.4, 64, 8, 2, 3 );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.TorusKnotBufferGeometry( 1, 0.4, 64, 8, 2, 3 );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'TorusKnot';
 		mesh.name = 'TorusKnot';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -318,15 +288,15 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/tube' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/tube' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var path = new CatmullRomCurve3( [
-			new Vector3( 2, 2, - 2 ),
-			new Vector3( 2, - 2, - 0.6666666666666667 ),
-			new Vector3( - 2, - 2, 0.6666666666666667 ),
-			new Vector3( - 2, 2, 2 )
+		var path = new THREE.CatmullRomCurve3( [
+			new THREE.Vector3( 2, 2, - 2 ),
+			new THREE.Vector3( 2, - 2, - 0.6666666666666667 ),
+			new THREE.Vector3( - 2, - 2, 0.6666666666666667 ),
+			new THREE.Vector3( - 2, 2, 2 )
 		] );
 		] );
 
 
-		var geometry = new TubeBufferGeometry( path, 64, 1, 8, false );
-		var mesh = new Mesh( geometry, new MeshStandardMaterial() );
+		var geometry = new THREE.TubeBufferGeometry( path, 64, 1, 8, false );
+		var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 		mesh.name = 'Tube';
 		mesh.name = 'Tube';
 
 
 		editor.execute( new AddObjectCommand( editor, mesh ) );
 		editor.execute( new AddObjectCommand( editor, mesh ) );
@@ -350,10 +320,10 @@ var MenubarAdd = function ( editor ) {
 		var fitLid = false;
 		var fitLid = false;
 		var blinnScale = true;
 		var blinnScale = true;
 
 
-		var material = new MeshStandardMaterial();
+		var material = new THREE.MeshStandardMaterial();
 
 
 		var geometry = new TeapotBufferGeometry( size, segments, bottom, lid, body, fitLid, blinnScale );
 		var geometry = new TeapotBufferGeometry( size, segments, bottom, lid, body, fitLid, blinnScale );
-		var mesh = new Mesh( geometry, material );
+		var mesh = new THREE.Mesh( geometry, material );
 		mesh.name = 'Teapot';
 		mesh.name = 'Teapot';
 
 
 		editor.addObject( mesh );
 		editor.addObject( mesh );
@@ -376,7 +346,7 @@ var MenubarAdd = function ( editor ) {
 
 
 		var color = 0x222222;
 		var color = 0x222222;
 
 
-		var light = new AmbientLight( color );
+		var light = new THREE.AmbientLight( color );
 		light.name = 'AmbientLight';
 		light.name = 'AmbientLight';
 
 
 		editor.execute( new AddObjectCommand( editor, light ) );
 		editor.execute( new AddObjectCommand( editor, light ) );
@@ -394,7 +364,7 @@ var MenubarAdd = function ( editor ) {
 		var color = 0xffffff;
 		var color = 0xffffff;
 		var intensity = 1;
 		var intensity = 1;
 
 
-		var light = new DirectionalLight( color, intensity );
+		var light = new THREE.DirectionalLight( color, intensity );
 		light.name = 'DirectionalLight';
 		light.name = 'DirectionalLight';
 		light.target.name = 'DirectionalLight Target';
 		light.target.name = 'DirectionalLight Target';
 
 
@@ -416,7 +386,7 @@ var MenubarAdd = function ( editor ) {
 		var groundColor = 0xffaa00;
 		var groundColor = 0xffaa00;
 		var intensity = 1;
 		var intensity = 1;
 
 
-		var light = new HemisphereLight( skyColor, groundColor, intensity );
+		var light = new THREE.HemisphereLight( skyColor, groundColor, intensity );
 		light.name = 'HemisphereLight';
 		light.name = 'HemisphereLight';
 
 
 		light.position.set( 0, 10, 0 );
 		light.position.set( 0, 10, 0 );
@@ -437,7 +407,7 @@ var MenubarAdd = function ( editor ) {
 		var intensity = 1;
 		var intensity = 1;
 		var distance = 0;
 		var distance = 0;
 
 
-		var light = new PointLight( color, intensity, distance );
+		var light = new THREE.PointLight( color, intensity, distance );
 		light.name = 'PointLight';
 		light.name = 'PointLight';
 
 
 		editor.execute( new AddObjectCommand( editor, light ) );
 		editor.execute( new AddObjectCommand( editor, light ) );
@@ -458,7 +428,7 @@ var MenubarAdd = function ( editor ) {
 		var angle = Math.PI * 0.1;
 		var angle = Math.PI * 0.1;
 		var penumbra = 0;
 		var penumbra = 0;
 
 
-		var light = new SpotLight( color, intensity, distance, angle, penumbra );
+		var light = new THREE.SpotLight( color, intensity, distance, angle, penumbra );
 		light.name = 'SpotLight';
 		light.name = 'SpotLight';
 		light.target.name = 'SpotLight Target';
 		light.target.name = 'SpotLight Target';
 
 
@@ -480,7 +450,7 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/orthographiccamera' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/orthographiccamera' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var camera = new OrthographicCamera();
+		var camera = new THREE.OrthographicCamera();
 		camera.name = 'OrthographicCamera';
 		camera.name = 'OrthographicCamera';
 
 
 		editor.execute( new AddObjectCommand( editor, camera ) );
 		editor.execute( new AddObjectCommand( editor, camera ) );
@@ -495,7 +465,7 @@ var MenubarAdd = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/add/perspectivecamera' ) );
 	option.setTextContent( strings.getKey( 'menubar/add/perspectivecamera' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		var camera = new PerspectiveCamera();
+		var camera = new THREE.PerspectiveCamera();
 		camera.name = 'PerspectiveCamera';
 		camera.name = 'PerspectiveCamera';
 
 
 		editor.execute( new AddObjectCommand( editor, camera ) );
 		editor.execute( new AddObjectCommand( editor, camera ) );

+ 2 - 4
editor/js/Menubar.Examples.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	FileLoader
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow } from './libs/ui.js';
 import { UIPanel, UIRow } from './libs/ui.js';
 
 
@@ -34,7 +32,7 @@ var MenubarExamples = function ( editor ) {
 		{ title: 'menubar/examples/Shaders', file: 'shaders.app.json' }
 		{ title: 'menubar/examples/Shaders', file: 'shaders.app.json' }
 	];
 	];
 
 
-	var loader = new FileLoader();
+	var loader = new THREE.FileLoader();
 
 
 	for ( var i = 0; i < items.length; i ++ ) {
 	for ( var i = 0; i < items.length; i ++ ) {
 
 

+ 3 - 6
editor/js/Menubar.File.js

@@ -2,10 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	FileLoader,
-	LoadingManager
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { ColladaExporter } from '../../examples/jsm/exporters/ColladaExporter.js';
 import { ColladaExporter } from '../../examples/jsm/exporters/ColladaExporter.js';
 import { GLTFExporter } from '../../examples/jsm/exporters/GLTFExporter.js';
 import { GLTFExporter } from '../../examples/jsm/exporters/GLTFExporter.js';
@@ -372,13 +369,13 @@ var MenubarFile = function ( editor ) {
 
 
 		var title = config.getKey( 'project/title' );
 		var title = config.getKey( 'project/title' );
 
 
-		var manager = new LoadingManager( function () {
+		var manager = new THREE.LoadingManager( function () {
 
 
 			save( zip.generate( { type: 'blob' } ), ( title !== '' ? title : 'untitled' ) + '.zip' );
 			save( zip.generate( { type: 'blob' } ), ( title !== '' ? title : 'untitled' ) + '.zip' );
 
 
 		} );
 		} );
 
 
-		var loader = new FileLoader( manager );
+		var loader = new THREE.FileLoader( manager );
 		loader.load( 'js/libs/app/index.html', function ( content ) {
 		loader.load( 'js/libs/app/index.html', function ( content ) {
 
 
 			content = content.replace( '<!-- title -->', title );
 			content = content.replace( '<!-- title -->', title );

+ 1 - 1
editor/js/Menubar.Help.js

@@ -27,7 +27,7 @@ var MenubarHelp = function ( editor ) {
 	option.setTextContent( strings.getKey( 'menubar/help/source_code' ) );
 	option.setTextContent( strings.getKey( 'menubar/help/source_code' ) );
 	option.onClick( function () {
 	option.onClick( function () {
 
 
-		window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' )
+		window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' );
 
 
 	} );
 	} );
 	options.add( option );
 	options.add( option );

+ 2 - 4
editor/js/Menubar.Status.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	REVISION
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIText } from './libs/ui.js';
 import { UIPanel, UIText } from './libs/ui.js';
 import { UIBoolean } from './libs/ui.three.js';
 import { UIBoolean } from './libs/ui.three.js';
@@ -45,7 +43,7 @@ var MenubarStatus = function ( editor ) {
 
 
 	} );
 	} );
 
 
-	var version = new UIText( 'r' + REVISION );
+	var version = new UIText( 'r' + THREE.REVISION );
 	version.setClass( 'title' );
 	version.setClass( 'title' );
 	version.setOpacity( 0.5 );
 	version.setOpacity( 0.5 );
 	container.add( version );
 	container.add( version );

+ 2 - 2
editor/js/Sidebar.Geometry.BoxGeometry.js

@@ -2,7 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import { BoxBufferGeometry } from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UINumber, UIInteger } from './libs/ui.js';
 import { UIRow, UIText, UINumber, UIInteger } from './libs/ui.js';
 
 
@@ -81,7 +81,7 @@ var SidebarGeometryBoxGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new BoxBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.BoxBufferGeometry(
 			width.getValue(),
 			width.getValue(),
 			height.getValue(),
 			height.getValue(),
 			depth.getValue(),
 			depth.getValue(),

+ 6 - 9
editor/js/Sidebar.Geometry.CircleGeometry.js

@@ -2,10 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	CircleBufferGeometry,
-	Math as _Math
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -43,7 +40,7 @@ var SidebarGeometryCircleGeometry = function ( editor, object ) {
 	// thetaStart
 	// thetaStart
 
 
 	var thetaStartRow = new UIRow();
 	var thetaStartRow = new UIRow();
-	var thetaStart = new UINumber( parameters.thetaStart * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var thetaStart = new UINumber( parameters.thetaStart * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetastart' ) ).setWidth( '90px' ) );
 	thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetastart' ) ).setWidth( '90px' ) );
 	thetaStartRow.add( thetaStart );
 	thetaStartRow.add( thetaStart );
@@ -53,7 +50,7 @@ var SidebarGeometryCircleGeometry = function ( editor, object ) {
 	// thetaLength
 	// thetaLength
 
 
 	var thetaLengthRow = new UIRow();
 	var thetaLengthRow = new UIRow();
-	var thetaLength = new UINumber( parameters.thetaLength * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var thetaLength = new UINumber( parameters.thetaLength * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetalength' ) ).setWidth( '90px' ) );
 	thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/circle_geometry/thetalength' ) ).setWidth( '90px' ) );
 	thetaLengthRow.add( thetaLength );
 	thetaLengthRow.add( thetaLength );
@@ -64,11 +61,11 @@ var SidebarGeometryCircleGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new CircleBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.CircleBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			segments.getValue(),
 			segments.getValue(),
-			thetaStart.getValue() * _Math.DEG2RAD,
-			thetaLength.getValue() * _Math.DEG2RAD
+			thetaStart.getValue() * THREE.Math.DEG2RAD,
+			thetaLength.getValue() * THREE.Math.DEG2RAD
 		) ) );
 		) ) );
 
 
 	}
 	}

+ 2 - 4
editor/js/Sidebar.Geometry.CylinderGeometry.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	CylinderBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
 
 
@@ -83,7 +81,7 @@ var SidebarGeometryCylinderGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new CylinderBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.CylinderBufferGeometry(
 			radiusTop.getValue(),
 			radiusTop.getValue(),
 			radiusBottom.getValue(),
 			radiusBottom.getValue(),
 			height.getValue(),
 			height.getValue(),

+ 2 - 4
editor/js/Sidebar.Geometry.DodecahedronGeometry.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	DodecahedronBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -43,7 +41,7 @@ var SidebarGeometryDodecahedronGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new DodecahedronBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.DodecahedronBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			detail.getValue()
 			detail.getValue()
 		) ) );
 		) ) );

+ 3 - 6
editor/js/Sidebar.Geometry.ExtrudeGeometry.js

@@ -2,10 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	ExtrudeBufferGeometry,
-	ShapeBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UICheckbox, UIButton, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UICheckbox, UIButton, UINumber } from './libs/ui.js';
 
 
@@ -120,7 +117,7 @@ var SidebarGeometryExtrudeGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new ExtrudeBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.ExtrudeBufferGeometry(
 			parameters.shapes,
 			parameters.shapes,
 			{
 			{
 				curveSegments: curveSegments.getValue(),
 				curveSegments: curveSegments.getValue(),
@@ -138,7 +135,7 @@ var SidebarGeometryExtrudeGeometry = function ( editor, object ) {
 
 
 	function toShape() {
 	function toShape() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new ShapeBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.ShapeBufferGeometry(
 			parameters.shapes,
 			parameters.shapes,
 			options.curveSegments
 			options.curveSegments
 		) ) );
 		) ) );

+ 2 - 4
editor/js/Sidebar.Geometry.IcosahedronGeometry.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	IcosahedronBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -45,7 +43,7 @@ var SidebarGeometryIcosahedronGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new IcosahedronBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.IcosahedronBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			detail.getValue()
 			detail.getValue()
 		) ) );
 		) ) );

+ 2 - 4
editor/js/Sidebar.Geometry.LatheGeometry.js

@@ -2,9 +2,7 @@
  * @author rfm1201
  * @author rfm1201
  */
  */
 
 
-import {
-	LatheBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIPoints2 } from './libs/ui.three.js';
 import { UIPoints2 } from './libs/ui.three.js';
@@ -62,7 +60,7 @@ var SidebarGeometryLatheGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new LatheBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.LatheBufferGeometry(
 			points.getValue(),
 			points.getValue(),
 			segments.getValue(),
 			segments.getValue(),
 			phiStart.getValue() / 180 * Math.PI,
 			phiStart.getValue() / 180 * Math.PI,

+ 2 - 4
editor/js/Sidebar.Geometry.OctahedronGeometry.js

@@ -2,9 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	OctahedronBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -46,7 +44,7 @@ var SidebarGeometryOctahedronGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new OctahedronBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.OctahedronBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			detail.getValue()
 			detail.getValue()
 		) ) );
 		) ) );

+ 2 - 4
editor/js/Sidebar.Geometry.PlaneGeometry.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	PlaneBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -64,7 +62,7 @@ var SidebarGeometryPlaneGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new PlaneBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.PlaneBufferGeometry(
 			width.getValue(),
 			width.getValue(),
 			height.getValue(),
 			height.getValue(),
 			widthSegments.getValue(),
 			widthSegments.getValue(),

+ 2 - 4
editor/js/Sidebar.Geometry.RingGeometry.js

@@ -2,9 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	RingBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -83,7 +81,7 @@ var SidebarGeometryRingGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new RingBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.RingBufferGeometry(
 			innerRadius.getValue(),
 			innerRadius.getValue(),
 			outerRadius.getValue(),
 			outerRadius.getValue(),
 			thetaSegments.getValue(),
 			thetaSegments.getValue(),

+ 3 - 6
editor/js/Sidebar.Geometry.ShapeGeometry.js

@@ -2,10 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	ExtrudeBufferGeometry,
-	ShapeBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UIButton } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UIButton } from './libs/ui.js';
 
 
@@ -38,7 +35,7 @@ var SidebarGeometryShapeGeometry = function ( editor, object ) {
 
 
 	function changeShape() {
 	function changeShape() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new ShapeBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.ShapeBufferGeometry(
 			parameters.shapes,
 			parameters.shapes,
 			curveSegments.getValue()
 			curveSegments.getValue()
 		) ) );
 		) ) );
@@ -47,7 +44,7 @@ var SidebarGeometryShapeGeometry = function ( editor, object ) {
 
 
 	function toExtrude() {
 	function toExtrude() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new ExtrudeBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.ExtrudeBufferGeometry(
 			parameters.shapes, {
 			parameters.shapes, {
 				curveSegments: curveSegments.getValue()
 				curveSegments: curveSegments.getValue()
 			}
 			}

+ 10 - 13
editor/js/Sidebar.Geometry.SphereGeometry.js

@@ -2,10 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	Math as _Math,
-	SphereBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -53,7 +50,7 @@ var SidebarGeometrySphereGeometry = function ( editor, object ) {
 	// phiStart
 	// phiStart
 
 
 	var phiStartRow = new UIRow();
 	var phiStartRow = new UIRow();
-	var phiStart = new UINumber( parameters.phiStart * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var phiStart = new UINumber( parameters.phiStart * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	phiStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/phistart' ) ).setWidth( '90px' ) );
 	phiStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/phistart' ) ).setWidth( '90px' ) );
 	phiStartRow.add( phiStart );
 	phiStartRow.add( phiStart );
@@ -63,7 +60,7 @@ var SidebarGeometrySphereGeometry = function ( editor, object ) {
 	// phiLength
 	// phiLength
 
 
 	var phiLengthRow = new UIRow();
 	var phiLengthRow = new UIRow();
-	var phiLength = new UINumber( parameters.phiLength * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var phiLength = new UINumber( parameters.phiLength * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	phiLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/philength' ) ).setWidth( '90px' ) );
 	phiLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/philength' ) ).setWidth( '90px' ) );
 	phiLengthRow.add( phiLength );
 	phiLengthRow.add( phiLength );
@@ -73,7 +70,7 @@ var SidebarGeometrySphereGeometry = function ( editor, object ) {
 	// thetaStart
 	// thetaStart
 
 
 	var thetaStartRow = new UIRow();
 	var thetaStartRow = new UIRow();
-	var thetaStart = new UINumber( parameters.thetaStart * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var thetaStart = new UINumber( parameters.thetaStart * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/thetastart' ) ).setWidth( '90px' ) );
 	thetaStartRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/thetastart' ) ).setWidth( '90px' ) );
 	thetaStartRow.add( thetaStart );
 	thetaStartRow.add( thetaStart );
@@ -83,7 +80,7 @@ var SidebarGeometrySphereGeometry = function ( editor, object ) {
 	// thetaLength
 	// thetaLength
 
 
 	var thetaLengthRow = new UIRow();
 	var thetaLengthRow = new UIRow();
-	var thetaLength = new UINumber( parameters.thetaLength * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var thetaLength = new UINumber( parameters.thetaLength * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/thetalength' ) ).setWidth( '90px' ) );
 	thetaLengthRow.add( new UIText( strings.getKey( 'sidebar/geometry/sphere_geometry/thetalength' ) ).setWidth( '90px' ) );
 	thetaLengthRow.add( thetaLength );
 	thetaLengthRow.add( thetaLength );
@@ -95,14 +92,14 @@ var SidebarGeometrySphereGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new SphereBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.SphereBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			widthSegments.getValue(),
 			widthSegments.getValue(),
 			heightSegments.getValue(),
 			heightSegments.getValue(),
-			phiStart.getValue() * _Math.DEG2RAD,
-			phiLength.getValue() * _Math.DEG2RAD,
-			thetaStart.getValue() * _Math.DEG2RAD,
-			thetaLength.getValue() * _Math.DEG2RAD
+			phiStart.getValue() * THREE.Math.DEG2RAD,
+			phiLength.getValue() * THREE.Math.DEG2RAD,
+			thetaStart.getValue() * THREE.Math.DEG2RAD,
+			thetaLength.getValue() * THREE.Math.DEG2RAD
 		) ) );
 		) ) );
 
 
 	}
 	}

+ 2 - 4
editor/js/Sidebar.Geometry.TetrahedronGeometry.js

@@ -2,9 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	TetrahedronBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -46,7 +44,7 @@ var SidebarGeometryTetrahedronGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new TetrahedronBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.TetrahedronBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			detail.getValue()
 			detail.getValue()
 		) ) );
 		) ) );

+ 4 - 7
editor/js/Sidebar.Geometry.TorusGeometry.js

@@ -2,10 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	Math as _Math,
-	TorusBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -63,7 +60,7 @@ var SidebarGeometryTorusGeometry = function ( editor, object ) {
 	// arc
 	// arc
 
 
 	var arcRow = new UIRow();
 	var arcRow = new UIRow();
-	var arc = new UINumber( parameters.arc * _Math.RAD2DEG ).setStep( 10 ).onChange( update );
+	var arc = new UINumber( parameters.arc * THREE.Math.RAD2DEG ).setStep( 10 ).onChange( update );
 
 
 	arcRow.add( new UIText( strings.getKey( 'sidebar/geometry/torus_geometry/arc' ) ).setWidth( '90px' ) );
 	arcRow.add( new UIText( strings.getKey( 'sidebar/geometry/torus_geometry/arc' ) ).setWidth( '90px' ) );
 	arcRow.add( arc );
 	arcRow.add( arc );
@@ -75,12 +72,12 @@ var SidebarGeometryTorusGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new TorusBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.TorusBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			tube.getValue(),
 			tube.getValue(),
 			radialSegments.getValue(),
 			radialSegments.getValue(),
 			tubularSegments.getValue(),
 			tubularSegments.getValue(),
-			arc.getValue() * _Math.DEG2RAD
+			arc.getValue() * THREE.Math.DEG2RAD
 		) ) );
 		) ) );
 
 
 	}
 	}

+ 2 - 4
editor/js/Sidebar.Geometry.TorusKnotGeometry.js

@@ -2,9 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	TorusKnotBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
 
 
@@ -84,7 +82,7 @@ var SidebarGeometryTorusKnotGeometry = function ( editor, object ) {
 
 
 	function update() {
 	function update() {
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new TorusKnotBufferGeometry(
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.TorusKnotBufferGeometry(
 			radius.getValue(),
 			radius.getValue(),
 			tube.getValue(),
 			tube.getValue(),
 			tubularSegments.getValue(),
 			tubularSegments.getValue(),

+ 3 - 6
editor/js/Sidebar.Geometry.TubeGeometry.js

@@ -2,10 +2,7 @@
  * @author Temdog007 / http://github.com/Temdog007
  * @author Temdog007 / http://github.com/Temdog007
  */
  */
 
 
-import {
-	CatmullRomCurve3,
-	TubeBufferGeometry
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIRow, UIText, UIInteger, UISelect, UICheckbox, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UISelect, UICheckbox, UINumber } from './libs/ui.js';
 import { UIPoints3 } from './libs/ui.three.js';
 import { UIPoints3 } from './libs/ui.three.js';
@@ -95,8 +92,8 @@ var SidebarGeometryTubeGeometry = function ( editor, object ) {
 
 
 		tensionRow.setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' );
 		tensionRow.setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' );
 
 
-		editor.execute( new SetGeometryCommand( editor, object, new TubeBufferGeometry(
-			new CatmullRomCurve3( points.getValue(), closed.getValue(), curveType.getValue(), tension.getValue() ),
+		editor.execute( new SetGeometryCommand( editor, object, new THREE.TubeBufferGeometry(
+			new THREE.CatmullRomCurve3( points.getValue(), closed.getValue(), curveType.getValue(), tension.getValue() ),
 			tubularSegments.getValue(),
 			tubularSegments.getValue(),
 			radius.getValue(),
 			radius.getValue(),
 			radialSegments.getValue(),
 			radialSegments.getValue(),

+ 2 - 2
editor/js/Sidebar.Geometry.js

@@ -2,7 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import { Math as _Math } from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow, UIText, UIInput, UIButton, UISpan } from './libs/ui.js';
 import { UIPanel, UIRow, UIText, UIInput, UIButton, UISpan } from './libs/ui.js';
 
 
@@ -150,7 +150,7 @@ var SidebarGeometry = function ( editor ) {
 	var geometryUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var geometryUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var geometryUUIDRenew = new UIButton( strings.getKey( 'sidebar/geometry/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 	var geometryUUIDRenew = new UIButton( strings.getKey( 'sidebar/geometry/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 
 
-		geometryUUID.setValue( _Math.generateUUID() );
+		geometryUUID.setValue( THREE.Math.generateUUID() );
 
 
 		editor.execute( new SetGeometryValueCommand( editor, editor.selected, 'uuid', geometryUUID.getValue() ) );
 		editor.execute( new SetGeometryValueCommand( editor, editor.selected, 'uuid', geometryUUID.getValue() ) );
 
 

+ 22 - 43
editor/js/Sidebar.Material.js

@@ -2,28 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	BasicDepthPacking,
-	LineBasicMaterial,
-	LineDashedMaterial,
-	Math as _Math,
-	MeshBasicMaterial,
-	MeshDepthMaterial,
-	MeshNormalMaterial,
-	MeshLambertMaterial,
-	MeshToonMaterial,
-	MeshPhongMaterial,
-	MeshMatcapMaterial,
-	ShaderMaterial,
-	RawShaderMaterial,
-	SpriteMaterial,
-	MeshPhysicalMaterial,
-	ShadowMaterial,
-	MeshStandardMaterial,
-	RGBADepthPacking,
-	SphericalReflectionMapping,
-	sRGBEncoding
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow, UIInput, UIButton, UIColor, UICheckbox, UISelect, UIText, UINumber } from './libs/ui.js';
 import { UIPanel, UIRow, UIInput, UIButton, UIColor, UICheckbox, UISelect, UIText, UINumber } from './libs/ui.js';
 import { UITexture } from './libs/ui.three.js';
 import { UITexture } from './libs/ui.three.js';
@@ -35,21 +14,21 @@ import { SetMaterialValueCommand } from './commands/SetMaterialValueCommand.js';
 import { SetMaterialVectorCommand } from './commands/SetMaterialVectorCommand.js';
 import { SetMaterialVectorCommand } from './commands/SetMaterialVectorCommand.js';
 
 
 var materialClasses = {
 var materialClasses = {
-	'LineBasicMaterial': LineBasicMaterial,
-	'LineDashedMaterial': LineDashedMaterial,
-	'MeshBasicMaterial': MeshBasicMaterial,
-	'MeshDepthMaterial': MeshDepthMaterial,
-	'MeshNormalMaterial': MeshNormalMaterial,
-	'MeshLambertMaterial': MeshLambertMaterial,
-	'MeshMatcapMaterial': MeshMatcapMaterial,
-	'MeshPhongMaterial': MeshPhongMaterial,
-	'MeshToonMaterial': MeshToonMaterial,
-	'MeshStandardMaterial': MeshStandardMaterial,
-	'MeshPhysicalMaterial': MeshPhysicalMaterial,
-	'RawShaderMaterial': RawShaderMaterial,
-	'ShaderMaterial': ShaderMaterial,
-	'ShadowMaterial': ShadowMaterial,
-	'SpriteMaterial': SpriteMaterial
+	'LineBasicMaterial': THREE.LineBasicMaterial,
+	'LineDashedMaterial': THREE.LineDashedMaterial,
+	'MeshBasicMaterial': THREE.MeshBasicMaterial,
+	'MeshDepthMaterial': THREE.MeshDepthMaterial,
+	'MeshNormalMaterial': THREE.MeshNormalMaterial,
+	'MeshLambertMaterial': THREE.MeshLambertMaterial,
+	'MeshMatcapMaterial': THREE.MeshMatcapMaterial,
+	'MeshPhongMaterial': THREE.MeshPhongMaterial,
+	'MeshToonMaterial': THREE.MeshToonMaterial,
+	'MeshStandardMaterial': THREE.MeshStandardMaterial,
+	'MeshPhysicalMaterial': THREE.MeshPhysicalMaterial,
+	'RawShaderMaterial': THREE.RawShaderMaterial,
+	'ShaderMaterial': THREE.ShaderMaterial,
+	'ShadowMaterial': THREE.ShadowMaterial,
+	'SpriteMaterial': THREE.SpriteMaterial
 };
 };
 
 
 var SidebarMaterial = function ( editor ) {
 var SidebarMaterial = function ( editor ) {
@@ -113,7 +92,7 @@ var SidebarMaterial = function ( editor ) {
 	var materialUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var materialUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var materialUUIDRenew = new UIButton( strings.getKey( 'sidebar/material/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 	var materialUUIDRenew = new UIButton( strings.getKey( 'sidebar/material/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 
 
-		materialUUID.setValue( _Math.generateUUID() );
+		materialUUID.setValue( THREE.Math.generateUUID() );
 		update();
 		update();
 
 
 	} );
 	} );
@@ -286,8 +265,8 @@ var SidebarMaterial = function ( editor ) {
 
 
 	var materialDepthPackingRow = new UIRow();
 	var materialDepthPackingRow = new UIRow();
 	var materialDepthPacking = new UISelect().setOptions( {
 	var materialDepthPacking = new UISelect().setOptions( {
-		[ BasicDepthPacking ]: 'BasicDepthPacking',
-		[ RGBADepthPacking ]: 'RGBADepthPacking'
+		[ THREE.BasicDepthPacking ]: 'BasicDepthPacking',
+		[ THREE.RGBADepthPacking ]: 'RGBADepthPacking'
 	} );
 	} );
 	materialDepthPacking.onChange( update );
 	materialDepthPacking.onChange( update );
 
 
@@ -442,7 +421,7 @@ var SidebarMaterial = function ( editor ) {
 
 
 	var materialEnvMapRow = new UIRow();
 	var materialEnvMapRow = new UIRow();
 	var materialEnvMapEnabled = new UICheckbox( false ).onChange( update );
 	var materialEnvMapEnabled = new UICheckbox( false ).onChange( update );
-	var materialEnvMap = new UITexture( SphericalReflectionMapping ).onChange( updateMaterial );
+	var materialEnvMap = new UITexture( THREE.SphericalReflectionMapping ).onChange( updateMaterial );
 	var materialReflectivity = new UINumber( 1 ).setWidth( '30px' ).onChange( update );
 	var materialReflectivity = new UINumber( 1 ).setWidth( '30px' ).onChange( update );
 
 
 	materialEnvMapRow.add( new UIText( strings.getKey( 'sidebar/material/envmap' ) ).setWidth( '90px' ) );
 	materialEnvMapRow.add( new UIText( strings.getKey( 'sidebar/material/envmap' ) ).setWidth( '90px' ) );
@@ -1168,9 +1147,9 @@ var SidebarMaterial = function ( editor ) {
 
 
 		if ( texture !== null ) {
 		if ( texture !== null ) {
 
 
-			if ( texture.encoding !== sRGBEncoding ) {
+			if ( texture.encoding !== THREE.sRGBEncoding ) {
 
 
-				texture.encoding = sRGBEncoding;
+				texture.encoding = THREE.sRGBEncoding;
 				var object = currentObject;
 				var object = currentObject;
 				if ( object !== null ) {
 				if ( object !== null ) {
 
 

+ 8 - 12
editor/js/Sidebar.Object.js

@@ -2,11 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	Euler,
-	Math as _Math,
-	Vector3
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow, UIInput, UIButton, UIColor, UICheckbox, UIInteger, UITextArea, UIText, UINumber } from './libs/ui.js';
 import { UIPanel, UIRow, UIInput, UIButton, UIColor, UICheckbox, UIInteger, UITextArea, UIText, UINumber } from './libs/ui.js';
 import { UIBoolean } from './libs/ui.three.js';
 import { UIBoolean } from './libs/ui.three.js';
@@ -88,7 +84,7 @@ var SidebarObject = function ( editor ) {
 	var objectUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var objectUUID = new UIInput().setWidth( '102px' ).setFontSize( '12px' ).setDisabled( true );
 	var objectUUIDRenew = new UIButton( strings.getKey( 'sidebar/object/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 	var objectUUIDRenew = new UIButton( strings.getKey( 'sidebar/object/new' ) ).setMarginLeft( '7px' ).onClick( function () {
 
 
-		objectUUID.setValue( _Math.generateUUID() );
+		objectUUID.setValue( THREE.Math.generateUUID() );
 
 
 		editor.execute( new SetUuidCommand( editor, editor.selected, objectUUID.getValue() ) );
 		editor.execute( new SetUuidCommand( editor, editor.selected, objectUUID.getValue() ) );
 
 
@@ -426,21 +422,21 @@ var SidebarObject = function ( editor ) {
 
 
 		if ( object !== null ) {
 		if ( object !== null ) {
 
 
-			var newPosition = new Vector3( objectPositionX.getValue(), objectPositionY.getValue(), objectPositionZ.getValue() );
+			var newPosition = new THREE.Vector3( objectPositionX.getValue(), objectPositionY.getValue(), objectPositionZ.getValue() );
 			if ( object.position.distanceTo( newPosition ) >= 0.01 ) {
 			if ( object.position.distanceTo( newPosition ) >= 0.01 ) {
 
 
 				editor.execute( new SetPositionCommand( editor, object, newPosition ) );
 				editor.execute( new SetPositionCommand( editor, object, newPosition ) );
 
 
 			}
 			}
 
 
-			var newRotation = new Euler( objectRotationX.getValue() * _Math.DEG2RAD, objectRotationY.getValue() * _Math.DEG2RAD, objectRotationZ.getValue() * _Math.DEG2RAD );
+			var newRotation = new THREE.Euler( objectRotationX.getValue() * THREE.Math.DEG2RAD, objectRotationY.getValue() * THREE.Math.DEG2RAD, objectRotationZ.getValue() * THREE.Math.DEG2RAD );
 			if ( object.rotation.toVector3().distanceTo( newRotation.toVector3() ) >= 0.01 ) {
 			if ( object.rotation.toVector3().distanceTo( newRotation.toVector3() ) >= 0.01 ) {
 
 
 				editor.execute( new SetRotationCommand( editor, object, newRotation ) );
 				editor.execute( new SetRotationCommand( editor, object, newRotation ) );
 
 
 			}
 			}
 
 
-			var newScale = new Vector3( objectScaleX.getValue(), objectScaleY.getValue(), objectScaleZ.getValue() );
+			var newScale = new THREE.Vector3( objectScaleX.getValue(), objectScaleY.getValue(), objectScaleZ.getValue() );
 			if ( object.scale.distanceTo( newScale ) >= 0.01 ) {
 			if ( object.scale.distanceTo( newScale ) >= 0.01 ) {
 
 
 				editor.execute( new SetScaleCommand( editor, object, newScale ) );
 				editor.execute( new SetScaleCommand( editor, object, newScale ) );
@@ -699,9 +695,9 @@ var SidebarObject = function ( editor ) {
 		objectPositionY.setValue( object.position.y );
 		objectPositionY.setValue( object.position.y );
 		objectPositionZ.setValue( object.position.z );
 		objectPositionZ.setValue( object.position.z );
 
 
-		objectRotationX.setValue( object.rotation.x * _Math.RAD2DEG );
-		objectRotationY.setValue( object.rotation.y * _Math.RAD2DEG );
-		objectRotationZ.setValue( object.rotation.z * _Math.RAD2DEG );
+		objectRotationX.setValue( object.rotation.x * THREE.Math.RAD2DEG );
+		objectRotationY.setValue( object.rotation.y * THREE.Math.RAD2DEG );
+		objectRotationZ.setValue( object.rotation.z * THREE.Math.RAD2DEG );
 
 
 		objectScaleX.setValue( object.scale.x );
 		objectScaleX.setValue( object.scale.x );
 		objectScaleY.setValue( object.scale.y );
 		objectScaleY.setValue( object.scale.y );

+ 2 - 2
editor/js/Sidebar.Project.js

@@ -2,7 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import { WebGLRenderer } from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { SVGRenderer } from '../../examples/jsm/renderers/SVGRenderer.js';
 import { SVGRenderer } from '../../examples/jsm/renderers/SVGRenderer.js';
 import { RaytracingRenderer } from '../../examples/jsm/renderers/RaytracingRenderer.js';
 import { RaytracingRenderer } from '../../examples/jsm/renderers/RaytracingRenderer.js';
@@ -20,7 +20,7 @@ var SidebarProject = function ( editor ) {
 
 
 	var rendererTypes = {
 	var rendererTypes = {
 
 
-		'WebGLRenderer': WebGLRenderer,
+		'WebGLRenderer': THREE.WebGLRenderer,
 		'SVGRenderer': SVGRenderer,
 		'SVGRenderer': SVGRenderer,
 		'RaytracingRenderer': RaytracingRenderer
 		'RaytracingRenderer': RaytracingRenderer
 
 

+ 12 - 21
editor/js/Viewport.js

@@ -2,16 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	Box3,
-	BoxHelper,
-	GridHelper,
-	Vector2,
-	Raycaster,
-	Fog,
-	FogExp2,
-	sRGBEncoding
-} from '../../build/three.module.js';
+import * as THREE from '../../build/three.module.js';
 
 
 import { TransformControls } from '../../examples/jsm/controls/TransformControls.js';
 import { TransformControls } from '../../examples/jsm/controls/TransformControls.js';
 import { RaytracingRenderer } from '../../examples/jsm/renderers/RaytracingRenderer.js';
 import { RaytracingRenderer } from '../../examples/jsm/renderers/RaytracingRenderer.js';
@@ -50,7 +41,7 @@ var Viewport = function ( editor ) {
 
 
 	// helpers
 	// helpers
 
 
-	var grid = new GridHelper( 30, 30, 0x444444, 0x888888 );
+	var grid = new THREE.GridHelper( 30, 30, 0x444444, 0x888888 );
 	sceneHelpers.add( grid );
 	sceneHelpers.add( grid );
 
 
 	var array = grid.geometry.attributes.color.array;
 	var array = grid.geometry.attributes.color.array;
@@ -67,9 +58,9 @@ var Viewport = function ( editor ) {
 
 
 	//
 	//
 
 
-	var box = new Box3();
+	var box = new THREE.Box3();
 
 
-	var selectionBox = new BoxHelper();
+	var selectionBox = new THREE.BoxHelper();
 	selectionBox.material.depthTest = false;
 	selectionBox.material.depthTest = false;
 	selectionBox.material.transparent = true;
 	selectionBox.material.transparent = true;
 	selectionBox.visible = false;
 	selectionBox.visible = false;
@@ -162,8 +153,8 @@ var Viewport = function ( editor ) {
 
 
 	// object picking
 	// object picking
 
 
-	var raycaster = new Raycaster();
-	var mouse = new Vector2();
+	var raycaster = new THREE.Raycaster();
+	var mouse = new THREE.Vector2();
 
 
 	// events
 	// events
 
 
@@ -177,9 +168,9 @@ var Viewport = function ( editor ) {
 
 
 	}
 	}
 
 
-	var onDownPosition = new Vector2();
-	var onUpPosition = new Vector2();
-	var onDoubleClickPosition = new Vector2();
+	var onDownPosition = new THREE.Vector2();
+	var onUpPosition = new THREE.Vector2();
+	var onDoubleClickPosition = new THREE.Vector2();
 
 
 	function getMousePosition( dom, x, y ) {
 	function getMousePosition( dom, x, y ) {
 
 
@@ -338,7 +329,7 @@ var Viewport = function ( editor ) {
 
 
 		renderer.autoClear = false;
 		renderer.autoClear = false;
 		renderer.autoUpdateScene = false;
 		renderer.autoUpdateScene = false;
-		renderer.outputEncoding = sRGBEncoding;
+		renderer.outputEncoding = THREE.sRGBEncoding;
 		renderer.setPixelRatio( window.devicePixelRatio );
 		renderer.setPixelRatio( window.devicePixelRatio );
 		renderer.setSize( container.dom.offsetWidth, container.dom.offsetHeight );
 		renderer.setSize( container.dom.offsetWidth, container.dom.offsetHeight );
 
 
@@ -493,10 +484,10 @@ var Viewport = function ( editor ) {
 					scene.fog = null;
 					scene.fog = null;
 					break;
 					break;
 				case 'Fog':
 				case 'Fog':
-					scene.fog = new Fog();
+					scene.fog = new THREE.Fog();
 					break;
 					break;
 				case 'FogExp2':
 				case 'FogExp2':
-					scene.fog = new FogExp2();
+					scene.fog = new THREE.FogExp2();
 					break;
 					break;
 
 
 			}
 			}

+ 2 - 2
editor/js/commands/AddObjectCommand.js

@@ -4,7 +4,7 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { ObjectLoader } from '../../../build/three.module.js';
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -59,7 +59,7 @@ AddObjectCommand.prototype = {
 
 
 		if ( this.object === undefined ) {
 		if ( this.object === undefined ) {
 
 
-			var loader = new ObjectLoader();
+			var loader = new THREE.ObjectLoader();
 			this.object = loader.parse( json.object );
 			this.object = loader.parse( json.object );
 
 
 		}
 		}

+ 3 - 2
editor/js/commands/RemoveObjectCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { ObjectLoader } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -96,7 +97,7 @@ RemoveObjectCommand.prototype = {
 		this.object = this.editor.objectByUuid( json.object.object.uuid );
 		this.object = this.editor.objectByUuid( json.object.object.uuid );
 		if ( this.object === undefined ) {
 		if ( this.object === undefined ) {
 
 
-			var loader = new ObjectLoader();
+			var loader = new THREE.ObjectLoader();
 			this.object = loader.parse( json.object );
 			this.object = loader.parse( json.object );
 
 
 		}
 		}

+ 3 - 2
editor/js/commands/SetGeometryCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { ObjectLoader } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -80,7 +81,7 @@ SetGeometryCommand.prototype = {
 
 
 		function parseGeometry( data ) {
 		function parseGeometry( data ) {
 
 
-			var loader = new ObjectLoader();
+			var loader = new THREE.ObjectLoader();
 			return loader.parseGeometries( [ data ] )[ data.uuid ];
 			return loader.parseGeometries( [ data ] )[ data.uuid ];
 
 
 		}
 		}

+ 3 - 2
editor/js/commands/SetMaterialCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { ObjectLoader } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -65,7 +66,7 @@ SetMaterialCommand.prototype = {
 
 
 		function parseMaterial( json ) {
 		function parseMaterial( json ) {
 
 
-			var loader = new ObjectLoader();
+			var loader = new THREE.ObjectLoader();
 			var images = loader.parseImages( json.images );
 			var images = loader.parseImages( json.images );
 			var textures = loader.parseTextures( json.textures, images );
 			var textures = loader.parseTextures( json.textures, images );
 			var materials = loader.parseMaterials( [ json ], textures );
 			var materials = loader.parseMaterials( [ json ], textures );

+ 4 - 3
editor/js/commands/SetMaterialMapCommand.js

@@ -3,8 +3,9 @@
  * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
  * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
  */
  */
 
 
- import { Command } from '../Command.js';
- import { ObjectLoader } from '../../../build/three.module.js';
+import { Command } from '../Command.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -118,7 +119,7 @@ SetMaterialMapCommand.prototype = {
 			var map = null;
 			var map = null;
 			if ( json !== null ) {
 			if ( json !== null ) {
 
 
-				var loader = new ObjectLoader();
+				var loader = new THREE.ObjectLoader();
 				var images = loader.parseImages( json.images );
 				var images = loader.parseImages( json.images );
 				var textures = loader.parseTextures( [ json ], images );
 				var textures = loader.parseTextures( [ json ], images );
 				map = textures[ json.uuid ];
 				map = textures[ json.uuid ];

+ 4 - 3
editor/js/commands/SetPositionCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { Vector3 } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -78,8 +79,8 @@ SetPositionCommand.prototype = {
 		Command.prototype.fromJSON.call( this, json );
 		Command.prototype.fromJSON.call( this, json );
 
 
 		this.object = this.editor.objectByUuid( json.objectUuid );
 		this.object = this.editor.objectByUuid( json.objectUuid );
-		this.oldPosition = new Vector3().fromArray( json.oldPosition );
-		this.newPosition = new Vector3().fromArray( json.newPosition );
+		this.oldPosition = new THREE.Vector3().fromArray( json.oldPosition );
+		this.newPosition = new THREE.Vector3().fromArray( json.newPosition );
 
 
 	}
 	}
 
 

+ 4 - 3
editor/js/commands/SetRotationCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { Euler } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -79,8 +80,8 @@ SetRotationCommand.prototype = {
 		Command.prototype.fromJSON.call( this, json );
 		Command.prototype.fromJSON.call( this, json );
 
 
 		this.object = this.editor.objectByUuid( json.objectUuid );
 		this.object = this.editor.objectByUuid( json.objectUuid );
-		this.oldRotation = new Euler().fromArray( json.oldRotation );
-		this.newRotation = new Euler().fromArray( json.newRotation );
+		this.oldRotation = new THREE.Euler().fromArray( json.oldRotation );
+		this.newRotation = new THREE.Euler().fromArray( json.newRotation );
 
 
 	}
 	}
 
 

+ 4 - 3
editor/js/commands/SetScaleCommand.js

@@ -4,7 +4,8 @@
  */
  */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
-import { Vector3 } from '../../../build/three.module.js';
+
+import * as THREE from '../../../build/three.module.js';
 
 
 /**
 /**
  * @param editor Editor
  * @param editor Editor
@@ -79,8 +80,8 @@ SetScaleCommand.prototype = {
 		Command.prototype.fromJSON.call( this, json );
 		Command.prototype.fromJSON.call( this, json );
 
 
 		this.object = this.editor.objectByUuid( json.objectUuid );
 		this.object = this.editor.objectByUuid( json.objectUuid );
-		this.oldScale = new Vector3().fromArray( json.oldScale );
-		this.newScale = new Vector3().fromArray( json.newScale );
+		this.oldScale = new THREE.Vector3().fromArray( json.oldScale );
+		this.newScale = new THREE.Vector3().fromArray( json.newScale );
 
 
 	}
 	}
 
 

+ 6 - 13
editor/js/libs/ui.three.js

@@ -2,14 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-import {
-	CanvasTexture,
-	RGBFormat,
-	RGBAFormat,
- 	Texture,
-	Vector2,
-	Vector3
-} from '../../../build/three.module.js';
+import * as THREE from '../../../build/three.module.js';
 
 
 import { TGALoader } from '../../../examples/jsm/loaders/TGALoader.js';
 import { TGALoader } from '../../../examples/jsm/loaders/TGALoader.js';
 
 
@@ -73,7 +66,7 @@ var UITexture = function ( mapping ) {
 
 
 					var canvas = new TGALoader().parse( event.target.result );
 					var canvas = new TGALoader().parse( event.target.result );
 
 
-					var texture = new CanvasTexture( canvas, mapping );
+					var texture = new THREE.CanvasTexture( canvas, mapping );
 					texture.sourceFile = file.name;
 					texture.sourceFile = file.name;
 
 
 					scope.setValue( texture );
 					scope.setValue( texture );
@@ -91,9 +84,9 @@ var UITexture = function ( mapping ) {
 					var image = document.createElement( 'img' );
 					var image = document.createElement( 'img' );
 					image.addEventListener( 'load', function () {
 					image.addEventListener( 'load', function () {
 
 
-						var texture = new Texture( this, mapping );
+						var texture = new THREE.Texture( this, mapping );
 						texture.sourceFile = file.name;
 						texture.sourceFile = file.name;
-						texture.format = file.type === 'image/jpeg' ? RGBFormat : RGBAFormat;
+						texture.format = file.type === 'image/jpeg' ? THREE.RGBFormat : THREE.RGBAFormat;
 						texture.needsUpdate = true;
 						texture.needsUpdate = true;
 
 
 						scope.setValue( texture );
 						scope.setValue( texture );
@@ -582,7 +575,7 @@ UIPoints2.prototype.getValue = function () {
 
 
 		if ( ! pointUI ) continue;
 		if ( ! pointUI ) continue;
 
 
-		points.push( new Vector2( pointUI.x.getValue(), pointUI.y.getValue() ) );
+		points.push( new THREE.Vector2( pointUI.x.getValue(), pointUI.y.getValue() ) );
 
 
 	}
 	}
 
 
@@ -669,7 +662,7 @@ UIPoints3.prototype.getValue = function () {
 
 
 		if ( ! pointUI ) continue;
 		if ( ! pointUI ) continue;
 
 
-		points.push( new Vector3( pointUI.x.getValue(), pointUI.y.getValue(), pointUI.z.getValue() ) );
+		points.push( new THREE.Vector3( pointUI.x.getValue(), pointUI.y.getValue(), pointUI.z.getValue() ) );
 
 
 	}
 	}