Mr.doob 5 years ago
parent
commit
9d5e8359c0
100 changed files with 1162 additions and 1558 deletions
  1. 45 293
      build/three.js
  2. 535 533
      build/three.min.js
  3. 57 267
      build/three.module.js
  4. 0 10
      docs/api/en/constants/Renderer.html
  5. 7 2
      docs/api/en/core/InterleavedBufferAttribute.html
  6. 2 2
      docs/api/en/extras/core/CurvePath.html
  7. 13 7
      docs/api/en/materials/MeshPhysicalMaterial.html
  8. 0 3
      docs/api/en/materials/SpriteMaterial.html
  9. 3 0
      docs/api/en/math/MathUtils.html
  10. 5 0
      docs/api/en/math/Quaternion.html
  11. 0 10
      docs/api/zh/constants/Renderer.html
  12. 7 2
      docs/api/zh/core/InterleavedBufferAttribute.html
  13. 2 2
      docs/api/zh/extras/core/CurvePath.html
  14. 13 7
      docs/api/zh/materials/MeshPhysicalMaterial.html
  15. 0 3
      docs/api/zh/materials/SpriteMaterial.html
  16. 3 0
      docs/api/zh/math/MathUtils.html
  17. 5 0
      docs/api/zh/math/Quaternion.html
  18. 1 1
      docs/examples/en/controls/OrbitControls.html
  19. 3 1
      docs/examples/en/loaders/GLTFLoader.html
  20. 1 1
      docs/examples/en/math/convexhull/ConvexHull.html
  21. 5 0
      docs/examples/en/renderers/SVGRenderer.html
  22. 1 1
      docs/examples/zh/controls/OrbitControls.html
  23. 2 0
      docs/examples/zh/loaders/GLTFLoader.html
  24. 1 1
      docs/examples/zh/math/convexhull/ConvexHull.html
  25. 5 0
      docs/examples/zh/renderers/SVGRenderer.html
  26. 0 4
      docs/scenes/geometry-browser.html
  27. 0 4
      docs/scenes/material-browser.html
  28. 0 4
      editor/js/Command.js
  29. 0 4
      editor/js/Config.js
  30. 12 14
      editor/js/Editor.js
  31. 0 7
      editor/js/EditorControls.js
  32. 3 4
      editor/js/History.js
  33. 13 4
      editor/js/Loader.js
  34. 7 5
      editor/js/LoaderUtils.js
  35. 0 4
      editor/js/Menubar.Add.js
  36. 0 4
      editor/js/Menubar.Edit.js
  37. 0 4
      editor/js/Menubar.Examples.js
  38. 0 4
      editor/js/Menubar.File.js
  39. 0 4
      editor/js/Menubar.Help.js
  40. 0 4
      editor/js/Menubar.Play.js
  41. 0 4
      editor/js/Menubar.Status.js
  42. 0 4
      editor/js/Menubar.View.js
  43. 0 4
      editor/js/Menubar.js
  44. 0 4
      editor/js/Player.js
  45. 0 4
      editor/js/Script.js
  46. 0 4
      editor/js/Sidebar.Animation.js
  47. 0 4
      editor/js/Sidebar.Geometry.BoxGeometry.js
  48. 0 4
      editor/js/Sidebar.Geometry.BufferGeometry.js
  49. 0 4
      editor/js/Sidebar.Geometry.CircleGeometry.js
  50. 0 4
      editor/js/Sidebar.Geometry.CylinderGeometry.js
  51. 0 4
      editor/js/Sidebar.Geometry.DodecahedronGeometry.js
  52. 0 4
      editor/js/Sidebar.Geometry.ExtrudeGeometry.js
  53. 0 4
      editor/js/Sidebar.Geometry.Geometry.js
  54. 0 4
      editor/js/Sidebar.Geometry.IcosahedronGeometry.js
  55. 0 4
      editor/js/Sidebar.Geometry.LatheGeometry.js
  56. 0 4
      editor/js/Sidebar.Geometry.Modifiers.js
  57. 0 4
      editor/js/Sidebar.Geometry.OctahedronGeometry.js
  58. 0 4
      editor/js/Sidebar.Geometry.PlaneGeometry.js
  59. 0 4
      editor/js/Sidebar.Geometry.RingGeometry.js
  60. 0 4
      editor/js/Sidebar.Geometry.ShapeGeometry.js
  61. 0 4
      editor/js/Sidebar.Geometry.SphereGeometry.js
  62. 0 4
      editor/js/Sidebar.Geometry.TeapotBufferGeometry.js
  63. 0 4
      editor/js/Sidebar.Geometry.TetrahedronGeometry.js
  64. 0 4
      editor/js/Sidebar.Geometry.TorusGeometry.js
  65. 0 4
      editor/js/Sidebar.Geometry.TorusKnotGeometry.js
  66. 0 4
      editor/js/Sidebar.Geometry.TubeGeometry.js
  67. 0 4
      editor/js/Sidebar.Geometry.js
  68. 0 4
      editor/js/Sidebar.History.js
  69. 0 4
      editor/js/Sidebar.Material.js
  70. 3 60
      editor/js/Sidebar.Object.js
  71. 0 4
      editor/js/Sidebar.Project.js
  72. 0 4
      editor/js/Sidebar.Properties.js
  73. 0 4
      editor/js/Sidebar.Scene.js
  74. 0 4
      editor/js/Sidebar.Script.js
  75. 0 4
      editor/js/Sidebar.Settings.Shortcuts.js
  76. 21 19
      editor/js/Sidebar.Settings.Viewport.js
  77. 0 4
      editor/js/Sidebar.Settings.js
  78. 0 4
      editor/js/Sidebar.js
  79. 0 4
      editor/js/Storage.js
  80. 12 4
      editor/js/Strings.js
  81. 0 4
      editor/js/Toolbar.js
  82. 0 4
      editor/js/Viewport.Camera.js
  83. 0 4
      editor/js/Viewport.Info.js
  84. 317 0
      editor/js/Viewport.ViewHelper.js
  85. 52 22
      editor/js/Viewport.js
  86. 0 5
      editor/js/commands/AddObjectCommand.js
  87. 0 5
      editor/js/commands/AddScriptCommand.js
  88. 3 5
      editor/js/commands/MoveObjectCommand.js
  89. 1 5
      editor/js/commands/MultiCmdsCommand.js
  90. 0 4
      editor/js/commands/RemoveObjectCommand.js
  91. 0 5
      editor/js/commands/RemoveScriptCommand.js
  92. 0 5
      editor/js/commands/SetColorCommand.js
  93. 0 5
      editor/js/commands/SetGeometryCommand.js
  94. 0 5
      editor/js/commands/SetGeometryValueCommand.js
  95. 0 5
      editor/js/commands/SetMaterialColorCommand.js
  96. 0 5
      editor/js/commands/SetMaterialCommand.js
  97. 2 4
      editor/js/commands/SetMaterialMapCommand.js
  98. 0 5
      editor/js/commands/SetMaterialValueCommand.js
  99. 0 5
      editor/js/commands/SetMaterialVectorCommand.js
  100. 0 5
      editor/js/commands/SetPositionCommand.js

File diff suppressed because it is too large
+ 45 - 293
build/three.js


File diff suppressed because it is too large
+ 535 - 533
build/three.min.js


File diff suppressed because it is too large
+ 57 - 267
build/three.module.js


+ 0 - 10
docs/api/en/constants/Renderer.html

@@ -24,16 +24,6 @@
 		[page:constant CullFaceFrontBack] culls both front and back faces.
 		[page:constant CullFaceFrontBack] culls both front and back faces.
 		</p>
 		</p>
 
 
-		<h2>Front Face Direction</h2>
-		<code>
-		THREE.FrontFaceDirectionCW
-		THREE.FrontFaceDirectionCCW
-		</code>
-		<p>
-		[page:constant FrontFaceDirectionCW] sets the winding order for polygons to clockwise.<br />
-		[page:constant FrontFaceDirectionCCW] sets the winding order for polygons to counter-clockwise (default).
-		</p>
-
 		<h2>Shadow Types</h2>
 		<h2>Shadow Types</h2>
 		<code>
 		<code>
 		THREE.BasicShadowMap
 		THREE.BasicShadowMap

+ 7 - 2
docs/api/en/core/InterleavedBufferAttribute.html

@@ -50,9 +50,9 @@
 		Optional name for this attribute instance. Default is an empty string.
 		Optional name for this attribute instance. Default is an empty string.
 		</p>
 		</p>
 
 
-		<h3>[property:Integer offset]</h3>
+		<h3>[property:Boolean needsUpdate]</h3>
 		<p>
 		<p>
-			The offset in the underlying array buffer where an item starts.
+			Default is *false*. Setting this to *true* will send the entire interleaved buffer (not just the specific attribute data) to the GPU again.
 		</p>
 		</p>
 
 
 		<h3>[property:Boolean normalized]</h3>
 		<h3>[property:Boolean normalized]</h3>
@@ -60,6 +60,11 @@
 			Default is *false*.
 			Default is *false*.
 		</p>
 		</p>
 
 
+		<h3>[property:Integer offset]</h3>
+		<p>
+			The offset in the underlying array buffer where an item starts.
+		</p>
+
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
 		<h3>[method:this applyMatrix4]( [param:Matrix4 m] )</h3>
 		<h3>[method:this applyMatrix4]( [param:Matrix4 m] )</h3>

+ 2 - 2
docs/api/en/extras/core/CurvePath.html

@@ -49,8 +49,8 @@
 		<h3>[method:null closePath]()</h3>
 		<h3>[method:null closePath]()</h3>
 		<p>Adds a [page:LineCurve lineCurve] to close the path.</p>
 		<p>Adds a [page:LineCurve lineCurve] to close the path.</p>
 
 
-		<h3>[method:Float getCurveLengths]()</h3>
-		<p>Adds together the lengths of the curves in the [page:.curves] array.</p>
+		<h3>[method:Array getCurveLengths]()</h3>
+		<p>Get list of cumulative curve lengths of the curves in the [page:.curves] array.</p>
 
 
 		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
 		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
 		<p>
 		<p>

+ 13 - 7
docs/api/en/materials/MeshPhysicalMaterial.html

@@ -24,7 +24,7 @@
 			</li>
 			</li>
 			<li>
 			<li>
 				<b>Physically-based transparency:</b> One limitation of [page:Material.opacity .opacity] is
 				<b>Physically-based transparency:</b> One limitation of [page:Material.opacity .opacity] is
-				that highly transparent materials are less reflective. Physically-based [page:.transparency]
+				that highly transparent materials are less reflective. Physically-based [page:.transmission]
 				provides a more realistic option for thin, transparent surfaces like glass.
 				provides a more realistic option for thin, transparent surfaces like glass.
 			</li>
 			</li>
 			<li>
 			<li>
@@ -62,7 +62,7 @@
 			[example:webgl_materials_variations_physical materials / variations / physical]<br />
 			[example:webgl_materials_variations_physical materials / variations / physical]<br />
 			[example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
 			[example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
 			[example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
 			[example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
-			[example:webgl_materials_physical_transparency materials / physical / transparency]
+			[example:webgl_materials_physical_transmission materials / physical / transmission]
 		</p>
 		</p>
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
@@ -128,15 +128,21 @@
 		This models the reflectivity of non-metallic materials. It has no effect when [page:MeshStandardMaterial.metalness metalness] is *1.0*
 		This models the reflectivity of non-metallic materials. It has no effect when [page:MeshStandardMaterial.metalness metalness] is *1.0*
 		</p>
 		</p>
 
 
-		<h3>[property:Float transparency]</h3>
+		<h3>[property:Float transmission]</h3>
 		<p>
 		<p>
-		Degree of transparency, from *0.0* to *1.0*. Default is *0.0*.<br />
+		Degree of transmission (or optical transparency), from *0.0* to *1.0*. Default is *0.0*.<br />
 
 
-		Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are mostly transparent.
+		Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are fully transmissive.
 
 
-		The transparency property can be used to model these materials.<br />
+		The transmission property can be used to model these materials.<br />
 
 
-		When transparency is non-zero, [page:Material.opacity opacity] should be set to *1*.
+		When transmission is non-zero, [page:Material.opacity opacity] should be set to *1*.
+		</p>
+
+		<h3>[property:Texture transmissionMap]</h3>
+		<p>
+			The red channel of this texture is multiplied against [page:.transmission], for per-pixel control
+			over optical transparency. Default is *null*.
 		</p>
 		</p>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>

+ 0 - 3
docs/api/en/materials/SpriteMaterial.html

@@ -66,9 +66,6 @@
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
 		<p>[page:Color] of the material, by default set to white (0xffffff). The [page:.map] is mutiplied by the color.</p>
 		<p>[page:Color] of the material, by default set to white (0xffffff). The [page:.map] is mutiplied by the color.</p>
 
 
-		<h3>[property:boolean fog]</h3>
-		<p>Whether or not this material affected by the scene's fog. Default is false</p>
-
 		<h3>[property:Texture map]</h3>
 		<h3>[property:Texture map]</h3>
 		<p>The texture map. Default is null.</p>
 		<p>The texture map. Default is null.</p>
 
 

+ 3 - 0
docs/api/en/math/MathUtils.html

@@ -83,6 +83,9 @@
 		<h3>[method:Integer randInt]( [param:Integer low], [param:Integer high] )</h3>
 		<h3>[method:Integer randInt]( [param:Integer low], [param:Integer high] )</h3>
 		<p>Random integer in the interval [page:Float low] to [page:Float high].</p>
 		<p>Random integer in the interval [page:Float low] to [page:Float high].</p>
 
 
+		<h3>[method:Float seededRandom]( [param:Integer seed] )</h3>
+		<p>Deterministic pseudo-random float in the interval [ 0, 1 ]. The integer [page:Integer seed] is optional.</p>
+
 		<h3>[method:Float smoothstep]( [param:Float x], [param:Float min], [param:Float max] )</h3>
 		<h3>[method:Float smoothstep]( [param:Float x], [param:Float min], [param:Float max] )</h3>
 		<p>
 		<p>
 		[page:Float x] - The value to evaluate based on its position between min and max. <br />
 		[page:Float x] - The value to evaluate based on its position between min and max. <br />

+ 5 - 0
docs/api/en/math/Quaternion.html

@@ -98,6 +98,11 @@
 		from an array.
 		from an array.
 		</p>
 		</p>
 
 
+		<h3>[method:Quaternion identity]()</h3>
+		<p>
+			Sets this quaternion to the identity quaternion; that is, to the quaternion that represents "no rotation".
+		</p>
+
 		<h3>[method:Quaternion inverse]()</h3>
 		<h3>[method:Quaternion inverse]()</h3>
 		<p>
 		<p>
 			Inverts this quaternion - calculates the [page:.conjugate conjugate]. The quaternion is assumed to have unit length.
 			Inverts this quaternion - calculates the [page:.conjugate conjugate]. The quaternion is assumed to have unit length.

+ 0 - 10
docs/api/zh/constants/Renderer.html

@@ -24,16 +24,6 @@
 		[page:constant CullFaceFrontBack] 剔除正面和背面。
 		[page:constant CullFaceFrontBack] 剔除正面和背面。
 		</p>
 		</p>
 
 
-		<h2>正面方向</h2>
-		<code>
-		THREE.FrontFaceDirectionCW
-		THREE.FrontFaceDirectionCCW
-		</code>
-		<p>
-		[page:constant FrontFaceDirectionCW] 将多边形的缠绕顺序设置为顺时针方向。 <br />
-		[page:constant FrontFaceDirectionCCW] 为默认值,将多边形的缠绕顺序设置为逆时针方向。
-		</p>
-
 		<h2>阴影类型</h2>
 		<h2>阴影类型</h2>
 		<code>
 		<code>
 		THREE.BasicShadowMap
 		THREE.BasicShadowMap

+ 7 - 2
docs/api/zh/core/InterleavedBufferAttribute.html

@@ -49,9 +49,9 @@
 		Optional name for this attribute instance. Default is an empty string.
 		Optional name for this attribute instance. Default is an empty string.
 		</p>
 		</p>
 
 
-		<h3>[property:Integer offset]</h3>
+		<h3>[property:Boolean needsUpdate]</h3>
 		<p>
 		<p>
-			缓存队列中每个元素的起始位置的偏移量。
+			Default is *false*. Setting this to *true* will send the entire interleaved buffer (not just the specific attribute data) to the GPU again.
 		</p>
 		</p>
 
 
 		<h3>[property:Boolean normalized]</h3>
 		<h3>[property:Boolean normalized]</h3>
@@ -59,6 +59,11 @@
 			默认值为 *false*。
 			默认值为 *false*。
 		</p>
 		</p>
 
 
+		<h3>[property:Integer offset]</h3>
+		<p>
+			缓存队列中每个元素的起始位置的偏移量。
+		</p>
+
 		<h2>方法</h2>
 		<h2>方法</h2>
 
 
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>

+ 2 - 2
docs/api/zh/extras/core/CurvePath.html

@@ -49,8 +49,8 @@
 		<h3>[method:null closePath]()</h3>
 		<h3>[method:null closePath]()</h3>
 		<p>添加一条[page:LineCurve lineCurve]用于闭合路径。</p>
 		<p>添加一条[page:LineCurve lineCurve]用于闭合路径。</p>
 
 
-		<h3>[method:Float getCurveLengths]()</h3>
-		<p>将[page:.curves]数组中曲线的长度相加。</p>
+		<h3>[method:Array getCurveLengths]()</h3>
+		<p>Get list of cumulative curve lengths of the curves in the [page:.curves] array.</p>
 
 
 		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
 		<h3>[method:Vector getPoint]( [param:Float t] )</h3>
 		<p>
 		<p>

+ 13 - 7
docs/api/zh/materials/MeshPhysicalMaterial.html

@@ -24,7 +24,7 @@
 			</li>
 			</li>
 			<li>
 			<li>
 				<b>Physically-based transparency:</b> One limitation of [page:Material.opacity .opacity] is
 				<b>Physically-based transparency:</b> One limitation of [page:Material.opacity .opacity] is
-				that highly transparent materials are less reflective. Physically-based [page:.transparency]
+				that highly transparent materials are less reflective. Physically-based [page:.transmission]
 				provides a more realistic option for thin, transparent surfaces like glass.
 				provides a more realistic option for thin, transparent surfaces like glass.
 			</li>
 			</li>
 			<li>
 			<li>
@@ -63,7 +63,7 @@
 			[example:webgl_materials_variations_physical materials / variations / physical]<br />
 			[example:webgl_materials_variations_physical materials / variations / physical]<br />
 			[example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
 			[example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
 			[example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
 			[example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
-			[example:webgl_materials_physical_transparency materials / physical / transparency]
+			[example:webgl_materials_physical_transmission materials / physical / transmission]
 		</p>
 		</p>
 
 
 		<h2>构造函数(Constructor)</h2>
 		<h2>构造函数(Constructor)</h2>
@@ -123,15 +123,21 @@
 			这模拟了非金属材质的反射率。当[page:MeshStandardMaterial]为*1.0*时,此属性无效。
 			这模拟了非金属材质的反射率。当[page:MeshStandardMaterial]为*1.0*时,此属性无效。
 		</p>
 		</p>
 
 
-		<h3>[property:Float transparency]</h3>
+		<h3>[property:Float transmission]</h3>
 		<p>
 		<p>
-		Degree of transparency, from *0.0* to *1.0*. Default is *0.0*.<br />
+		Degree of transmission (or optical transparency), from *0.0* to *1.0*. Default is *0.0*.<br />
 
 
-		Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are mostly transparent.
+		Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are fully transmissive.
 
 
-		The transparency property can be used to model these materials.<br />
+		The transmission property can be used to model these materials.<br />
 
 
-		When transparency is non-zero, [page:Material.opacity opacity] should be set to *1*.
+		When transmission is non-zero, [page:Material.opacity opacity] should be set to *1*.
+		</p>
+
+		<h3>[property:Texture transmissionMap]</h3>
+		<p>
+			The red channel of this texture is multiplied against [page:.transmission], for per-pixel control
+			over optical transparency. Default is *null*.
 		</p>
 		</p>
 
 
 		<h2>方法(Methods)</h2>
 		<h2>方法(Methods)</h2>

+ 0 - 3
docs/api/zh/materials/SpriteMaterial.html

@@ -64,9 +64,6 @@
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
 		<p>材质的颜色([page:Color]),默认值为白色 (0xffffff)。 [page:.map]会和 color 相乘。</p>
 		<p>材质的颜色([page:Color]),默认值为白色 (0xffffff)。 [page:.map]会和 color 相乘。</p>
 
 
-		<h3>[property:boolean fog]</h3>
-		<p>材质是否受场景雾的影响。默认值为*false*。</p>
-
 		<h3>[property:Texture map]</h3>
 		<h3>[property:Texture map]</h3>
 		<p>颜色贴图。默认为null。</p>
 		<p>颜色贴图。默认为null。</p>
 
 

+ 3 - 0
docs/api/zh/math/MathUtils.html

@@ -80,6 +80,9 @@
 		<h3>[method:Integer randInt]( [param:Integer low], [param:Integer high] )</h3>
 		<h3>[method:Integer randInt]( [param:Integer low], [param:Integer high] )</h3>
 		<p>在区间[page:Float low] 到 [page:Float high]随机一个整数。</p>
 		<p>在区间[page:Float low] 到 [page:Float high]随机一个整数。</p>
 
 
+		<h3>[method:Float seededRandom]( [param:Integer seed] )</h3>
+		<p>Deterministic pseudo-random float in the interval [ 0, 1 ]. The integer [page:Integer seed] is optional.</p>
+
 		<h3>[method:Float smoothstep]( [param:Float x], [param:Float min], [param:Float max] )</h3>
 		<h3>[method:Float smoothstep]( [param:Float x], [param:Float min], [param:Float max] )</h3>
 		<p>
 		<p>
 		[page:Float x] - 根据其在最小值和最大值之间的位置来计算的值。 <br />
 		[page:Float x] - 根据其在最小值和最大值之间的位置来计算的值。 <br />

+ 5 - 0
docs/api/zh/math/Quaternion.html

@@ -98,6 +98,11 @@
 		from an array.
 		from an array.
 		</p>
 		</p>
 
 
+		<h3>[method:Quaternion identity]()</h3>
+		<p>
+			Sets this quaternion to the identity quaternion; that is, to the quaternion that represents "no rotation".
+		</p>
+
 		<h3>[method:Quaternion inverse]()</h3>
 		<h3>[method:Quaternion inverse]()</h3>
 		<p>
 		<p>
 			Inverts this quaternion - calculates the [page:.conjugate conjugate]. The quaternion is assumed to have unit length.
 			Inverts this quaternion - calculates the [page:.conjugate conjugate]. The quaternion is assumed to have unit length.

+ 1 - 1
docs/examples/en/controls/OrbitControls.html

@@ -107,7 +107,7 @@
 
 
 		<h3>[property:Boolean enabled]</h3>
 		<h3>[property:Boolean enabled]</h3>
 		<p>
 		<p>
-			Whether or not the controls are enabled.
+			When set to *false*, the controls will not respond to user input. Default is *true*.
 		</p>
 		</p>
 
 
 		<h3>[property:Boolean enableDamping]</h3>
 		<h3>[property:Boolean enableDamping]</h3>

+ 3 - 1
docs/examples/en/loaders/GLTFLoader.html

@@ -30,10 +30,12 @@
 
 
 		<ul>
 		<ul>
 			<li>KHR_draco_mesh_compression</li>
 			<li>KHR_draco_mesh_compression</li>
+			<li>KHR_materials_clearcoat</li>
 			<li>KHR_materials_pbrSpecularGlossiness</li>
 			<li>KHR_materials_pbrSpecularGlossiness</li>
 			<li>KHR_materials_unlit</li>
 			<li>KHR_materials_unlit</li>
 			<li>KHR_mesh_quantization</li>
 			<li>KHR_mesh_quantization</li>
 			<li>KHR_lights_punctual<sup>1</sup></li>
 			<li>KHR_lights_punctual<sup>1</sup></li>
+			<li>KHR_texture_basisu <i>(experimental)</i></li>
 			<li>KHR_texture_transform<sup>2</sup></li>
 			<li>KHR_texture_transform<sup>2</sup></li>
 			<li>MSFT_texture_dds</li>
 			<li>MSFT_texture_dds</li>
 		</ul>
 		</ul>
@@ -44,7 +46,7 @@
 		<p><i>
 		<p><i>
 			<sup>2</sup>UV transforms are supported, with several key limitations. Transforms applied to
 			<sup>2</sup>UV transforms are supported, with several key limitations. Transforms applied to
 			a texture using the first UV slot (all textures except aoMap and lightMap) must share the same
 			a texture using the first UV slot (all textures except aoMap and lightMap) must share the same
-			transform, or no transfor at all. The aoMap and lightMap textures cannot be transformed. No
+			transform, or no transform at all. The aoMap and lightMap textures cannot be transformed. No
 			more than one transform may be used per material. Each use of a texture with a unique
 			more than one transform may be used per material. Each use of a texture with a unique
 			transform will result in an additional GPU texture upload. See
 			transform will result in an additional GPU texture upload. See
 			#[link:https://github.com/mrdoob/three.js/pull/13831 13831] and
 			#[link:https://github.com/mrdoob/three.js/pull/13831 13831] and

+ 1 - 1
docs/examples/en/math/convexhull/ConvexHull.html

@@ -213,7 +213,7 @@
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		<p>
 		<p>
-			[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/ConvexHull.js]
+			[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]
 		</p>
 		</p>
 	</body>
 	</body>
 </html>
 </html>

+ 5 - 0
docs/examples/en/renderers/SVGRenderer.html

@@ -59,6 +59,11 @@
 			Tells the renderer to clear its drawing surface.
 			Tells the renderer to clear its drawing surface.
 		</p>
 		</p>
 
 
+		<h3>[method:Object getSize]()</h3>
+		<p>
+			Returns an object containing the width and height of the renderer.
+		</p>
+
 		<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
 		<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
 		<p>
 		<p>
 			Renders a [page:Scene scene] using a [page:Camera camera].
 			Renders a [page:Scene scene] using a [page:Camera camera].

+ 1 - 1
docs/examples/zh/controls/OrbitControls.html

@@ -106,7 +106,7 @@
 
 
 		<h3>[property:Boolean enabled]</h3>
 		<h3>[property:Boolean enabled]</h3>
 		<p>
 		<p>
-			控制器是否被启用。
+			When set to *false*, the controls will not respond to user input. Default is *true*.
 		</p>
 		</p>
 
 
 		<h3>[property:Boolean enableDamping]</h3>
 		<h3>[property:Boolean enableDamping]</h3>

+ 2 - 0
docs/examples/zh/loaders/GLTFLoader.html

@@ -28,10 +28,12 @@
 
 
 		<ul>
 		<ul>
 			<li>KHR_draco_mesh_compression</li>
 			<li>KHR_draco_mesh_compression</li>
+			<li>KHR_materials_clearcoat</li>
 			<li>KHR_materials_pbrSpecularGlossiness</li>
 			<li>KHR_materials_pbrSpecularGlossiness</li>
 			<li>KHR_materials_unlit</li>
 			<li>KHR_materials_unlit</li>
 			<li>KHR_mesh_quantization</li>
 			<li>KHR_mesh_quantization</li>
 			<li>KHR_lights_punctual<sup>1</sup></li>
 			<li>KHR_lights_punctual<sup>1</sup></li>
+			<li>KHR_texture_basisu <i>(experimental)</i></li>
 			<li>KHR_texture_transform<sup>2</sup></li>
 			<li>KHR_texture_transform<sup>2</sup></li>
 			<li>MSFT_texture_dds</li>
 			<li>MSFT_texture_dds</li>
 		</ul>
 		</ul>

+ 1 - 1
docs/examples/zh/math/convexhull/ConvexHull.html

@@ -213,7 +213,7 @@
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		<p>
 		<p>
-			[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/ConvexHull.js]
+			[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]
 		</p>
 		</p>
 	</body>
 	</body>
 </html>
 </html>

+ 5 - 0
docs/examples/zh/renderers/SVGRenderer.html

@@ -52,6 +52,11 @@
 			告诉渲染器来清除其绘图表面。
 			告诉渲染器来清除其绘图表面。
 		</p>
 		</p>
 
 
+		<h3>[method:Object getSize]()</h3>
+		<p>
+			返回一个包含有渲染器宽和高的对象。
+		</p>
+
 		<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
 		<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
 		<p>
 		<p>
 			使用[page:Camera camera]来渲染一个[page:Scene scene]。
 			使用[page:Camera camera]来渲染一个[page:Scene scene]。

+ 0 - 4
docs/scenes/geometry-browser.html

@@ -71,10 +71,6 @@
 			import { OrbitControls } from '../../examples/jsm/controls/OrbitControls.js';
 			import { OrbitControls } from '../../examples/jsm/controls/OrbitControls.js';
 			import { ParametricGeometries } from '../../examples/jsm/geometries/ParametricGeometries.js';
 			import { ParametricGeometries } from '../../examples/jsm/geometries/ParametricGeometries.js';
 
 
-			/**
-			 * @author TatumCreative (Greg Tatum) / http://gregtatum.com/
-			 */
-
 			var twoPi = Math.PI * 2;
 			var twoPi = Math.PI * 2;
 
 
 			function updateGroupGeometry( mesh, geometry ) {
 			function updateGroupGeometry( mesh, geometry ) {

+ 0 - 4
docs/scenes/material-browser.html

@@ -62,10 +62,6 @@
 
 
 			import { GUI } from '../../examples/jsm/libs/dat.gui.module.js';
 			import { GUI } from '../../examples/jsm/libs/dat.gui.module.js';
 
 
-			/**
-			 * @author TatumCreative (Greg Tatum) / http://gregtatum.com/
-			 */
-
 			var constants = {
 			var constants = {
 
 
 				combine: {
 				combine: {

+ 0 - 4
editor/js/Command.js

@@ -1,7 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
 
 
 /**
 /**
  * @param editor pointer to main editor object used to initialize
  * @param editor pointer to main editor object used to initialize

+ 0 - 4
editor/js/Config.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 function Config() {
 function Config() {
 
 
 	var name = 'threejs-editor';
 	var name = 'threejs-editor';

+ 12 - 14
editor/js/Editor.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE from '../../build/three.module.js';
 import * as THREE from '../../build/three.module.js';
 
 
 import { Config } from './Config.js';
 import { Config } from './Config.js';
@@ -10,12 +6,12 @@ import { History as _History } from './History.js';
 import { Strings } from './Strings.js';
 import { Strings } from './Strings.js';
 import { Storage as _Storage } from './Storage.js';
 import { Storage as _Storage } from './Storage.js';
 
 
-function Editor() {
+var _DEFAULT_CAMERA = new THREE.PerspectiveCamera( 50, 1, 0.01, 1000 );
+_DEFAULT_CAMERA.name = 'Camera';
+_DEFAULT_CAMERA.position.set( 0, 5, 10 );
+_DEFAULT_CAMERA.lookAt( new THREE.Vector3() );
 
 
-	this.DEFAULT_CAMERA = new THREE.PerspectiveCamera( 50, 1, 0.01, 1000 );
-	this.DEFAULT_CAMERA.name = 'Camera';
-	this.DEFAULT_CAMERA.position.set( 0, 5, 10 );
-	this.DEFAULT_CAMERA.lookAt( new THREE.Vector3() );
+function Editor() {
 
 
 	var Signal = signals.Signal;
 	var Signal = signals.Signal;
 
 
@@ -51,6 +47,7 @@ function Editor() {
 		sceneRendered: new Signal(),
 		sceneRendered: new Signal(),
 
 
 		cameraChanged: new Signal(),
 		cameraChanged: new Signal(),
+		cameraResetted: new Signal(),
 
 
 		geometryChanged: new Signal(),
 		geometryChanged: new Signal(),
 
 
@@ -78,6 +75,7 @@ function Editor() {
 		windowResize: new Signal(),
 		windowResize: new Signal(),
 
 
 		showGridChanged: new Signal(),
 		showGridChanged: new Signal(),
+		showHelpersChanged: new Signal(),
 		refreshSidebarObject3D: new Signal(),
 		refreshSidebarObject3D: new Signal(),
 		historyChanged: new Signal(),
 		historyChanged: new Signal(),
 
 
@@ -92,7 +90,7 @@ function Editor() {
 
 
 	this.loader = new Loader( this );
 	this.loader = new Loader( this );
 
 
-	this.camera = this.DEFAULT_CAMERA.clone();
+	this.camera = _DEFAULT_CAMERA.clone();
 
 
 	this.scene = new THREE.Scene();
 	this.scene = new THREE.Scene();
 	this.scene.name = 'Scene';
 	this.scene.name = 'Scene';
@@ -531,7 +529,7 @@ Editor.prototype = {
 	setViewportCamera: function ( uuid ) {
 	setViewportCamera: function ( uuid ) {
 
 
 		this.viewportCamera = this.cameras[ uuid ];
 		this.viewportCamera = this.cameras[ uuid ];
-		this.signals.viewportCameraChanged.dispatch( this.viewportCamera );
+		this.signals.viewportCameraChanged.dispatch();
 
 
 	},
 	},
 
 
@@ -612,7 +610,8 @@ Editor.prototype = {
 		this.history.clear();
 		this.history.clear();
 		this.storage.clear();
 		this.storage.clear();
 
 
-		this.camera.copy( this.DEFAULT_CAMERA );
+		this.camera.copy( _DEFAULT_CAMERA );
+		this.signals.cameraResetted.dispatch();
 
 
 		this.scene.name = "Scene";
 		this.scene.name = "Scene";
 		this.scene.userData = {};
 		this.scene.userData = {};
@@ -654,8 +653,7 @@ Editor.prototype = {
 		var camera = loader.parse( json.camera );
 		var camera = loader.parse( json.camera );
 
 
 		this.camera.copy( camera );
 		this.camera.copy( camera );
-		this.camera.aspect = this.DEFAULT_CAMERA.aspect;
-		this.camera.updateProjectionMatrix();
+		this.signals.cameraResetted.dispatch();
 
 
 		this.history.fromJSON( json.history );
 		this.history.fromJSON( json.history );
 		this.scripts = json.scripts;
 		this.scripts = json.scripts;

+ 0 - 7
editor/js/EditorControls.js

@@ -1,10 +1,3 @@
-/**
- * @author qiao / https://github.com/qiao
- * @author mrdoob / http://mrdoob.com
- * @author alteredq / http://alteredqualia.com/
- * @author WestLangley / http://github.com/WestLangley
- */
-
 import * as THREE from '../../build/three.module.js';
 import * as THREE from '../../build/three.module.js';
 
 
 function EditorControls( object, domElement ) {
 function EditorControls( object, domElement ) {

+ 3 - 4
editor/js/History.js

@@ -1,7 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
 
 
 import * as Commands from './commands/Commands.js';
 import * as Commands from './commands/Commands.js';
 
 
@@ -69,6 +65,7 @@ History.prototype = {
 			cmd.id = ++ this.idCounter;
 			cmd.id = ++ this.idCounter;
 
 
 		}
 		}
+
 		cmd.name = ( optionalName !== undefined ) ? optionalName : cmd.name;
 		cmd.name = ( optionalName !== undefined ) ? optionalName : cmd.name;
 		cmd.execute();
 		cmd.execute();
 		cmd.inMemory = true;
 		cmd.inMemory = true;
@@ -78,6 +75,7 @@ History.prototype = {
 			cmd.json = cmd.toJSON();	// serialize the cmd immediately after execution and append the json to the cmd
 			cmd.json = cmd.toJSON();	// serialize the cmd immediately after execution and append the json to the cmd
 
 
 		}
 		}
+
 		this.lastCmdTime = new Date();
 		this.lastCmdTime = new Date();
 
 
 		// clearing all the redo-commands
 		// clearing all the redo-commands
@@ -307,6 +305,7 @@ History.prototype = {
 				cmd.json = cmd.toJSON();
 				cmd.json = cmd.toJSON();
 
 
 			}
 			}
+
 			cmd = this.redo();
 			cmd = this.redo();
 
 
 		}
 		}

+ 13 - 4
editor/js/Loader.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE from '../../build/three.module.js';
 import * as THREE from '../../build/three.module.js';
 
 
 import { ThreeMFLoader } from '../../examples/jsm/loaders/3MFLoader.js';
 import { ThreeMFLoader } from '../../examples/jsm/loaders/3MFLoader.js';
@@ -21,6 +17,8 @@ import { TDSLoader } from '../../examples/jsm/loaders/TDSLoader.js';
 import { VTKLoader } from '../../examples/jsm/loaders/VTKLoader.js';
 import { VTKLoader } from '../../examples/jsm/loaders/VTKLoader.js';
 import { VRMLLoader } from '../../examples/jsm/loaders/VRMLLoader.js';
 import { VRMLLoader } from '../../examples/jsm/loaders/VRMLLoader.js';
 
 
+import { TGALoader } from '../../examples/jsm/loaders/TGALoader.js';
+
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { SetSceneCommand } from './commands/SetSceneCommand.js';
 import { SetSceneCommand } from './commands/SetSceneCommand.js';
 
 
@@ -67,6 +65,8 @@ function Loader( editor ) {
 
 
 			} );
 			} );
 
 
+			manager.addHandler( /\.tga$/i, new TGALoader() );
+
 			for ( var i = 0; i < files.length; i ++ ) {
 			for ( var i = 0; i < files.length; i ++ ) {
 
 
 				scope.loadFile( files[ i ], manager );
 				scope.loadFile( files[ i ], manager );
@@ -650,7 +650,12 @@ function Loader( editor ) {
 
 
 				case 'glb':
 				case 'glb':
 
 
+					var dracoLoader = new DRACOLoader();
+					dracoLoader.setDecoderPath( '../examples/js/libs/draco/gltf/' );
+
 					var loader = new GLTFLoader();
 					var loader = new GLTFLoader();
+					loader.setDRACOLoader( dracoLoader );
+
 					loader.parse( file.asArrayBuffer(), '', function ( result ) {
 					loader.parse( file.asArrayBuffer(), '', function ( result ) {
 
 
 						var scene = result.scene;
 						var scene = result.scene;
@@ -664,7 +669,11 @@ function Loader( editor ) {
 
 
 				case 'gltf':
 				case 'gltf':
 
 
+					var dracoLoader = new DRACOLoader();
+					dracoLoader.setDecoderPath( '../examples/js/libs/draco/gltf/' );
+
 					var loader = new GLTFLoader( manager );
 					var loader = new GLTFLoader( manager );
+					loader.setDRACOLoader( dracoLoader );
 					loader.parse( file.asText(), '', function ( result ) {
 					loader.parse( file.asText(), '', function ( result ) {
 
 
 						var scene = result.scene;
 						var scene = result.scene;

+ 7 - 5
editor/js/LoaderUtils.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 var LoaderUtils = {
 var LoaderUtils = {
 
 
 	createFilesMap: function ( files ) {
 	createFilesMap: function ( files ) {
@@ -77,7 +73,13 @@ var LoaderUtils = {
 
 
 		for ( var i = 0; i < items.length; i ++ ) {
 		for ( var i = 0; i < items.length; i ++ ) {
 
 
-			handleEntry( items[ i ].webkitGetAsEntry() );
+			var item = items[ i ];
+
+			if ( item.kind === 'file' ) {
+
+				handleEntry( item.webkitGetAsEntry() );
+
+			}
 
 
 		}
 		}
 
 

+ 0 - 4
editor/js/Menubar.Add.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Menubar.Edit.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 
 
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { AddObjectCommand } from './commands/AddObjectCommand.js';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Menubar.File.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Menubar.Help.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIRow } from './libs/ui.js';
 import { UIPanel, UIRow } from './libs/ui.js';
 
 
 function MenubarHelp( editor ) {
 function MenubarHelp( editor ) {

+ 0 - 4
editor/js/Menubar.Play.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel } from './libs/ui.js';
 import { UIPanel } from './libs/ui.js';
 
 
 function MenubarPlay( editor ) {
 function MenubarPlay( editor ) {

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Menubar.View.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIRow } from './libs/ui.js';
 import { UIPanel, UIRow } from './libs/ui.js';
 
 
 function MenubarView( editor ) {
 function MenubarView( editor ) {

+ 0 - 4
editor/js/Menubar.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel } from './libs/ui.js';
 import { UIPanel } from './libs/ui.js';
 
 
 import { MenubarAdd } from './Menubar.Add.js';
 import { MenubarAdd } from './Menubar.Add.js';

+ 0 - 4
editor/js/Player.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel } from './libs/ui.js';
 import { UIPanel } from './libs/ui.js';
 import { APP } from './libs/app.js';
 import { APP } from './libs/app.js';
 
 

+ 0 - 4
editor/js/Script.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIElement, UIPanel, UIText } from './libs/ui.js';
 import { UIElement, UIPanel, UIText } from './libs/ui.js';
 
 
 import { SetScriptValueCommand } from './commands/SetScriptValueCommand.js';
 import { SetScriptValueCommand } from './commands/SetScriptValueCommand.js';

+ 0 - 4
editor/js/Sidebar.Animation.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIDiv, UIBreak, UISelect, UIButton, UIText } from './libs/ui.js';
 import { UIPanel, UIDiv, UIBreak, UISelect, UIButton, UIText } from './libs/ui.js';
 
 
 function SidebarAnimation( editor ) {
 function SidebarAnimation( editor ) {

+ 0 - 4
editor/js/Sidebar.Geometry.BoxGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.BufferGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIRow, UIText, UISpan, UIBreak } from './libs/ui.js';
 import { UIRow, UIText, UISpan, UIBreak } from './libs/ui.js';
 
 
 function SidebarGeometryBufferGeometry( editor ) {
 function SidebarGeometryBufferGeometry( editor ) {

+ 0 - 4
editor/js/Sidebar.Geometry.CircleGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.ExtrudeGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.Geometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIRow, UIText } from './libs/ui.js';
 import { UIRow, UIText } from './libs/ui.js';
 
 
 function SidebarGeometryGeometry( editor ) {
 function SidebarGeometryGeometry( editor ) {

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author rfm1201
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.Modifiers.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIRow, UIButton } from './libs/ui.js';
 import { UIRow, UIButton } from './libs/ui.js';
 
 
 function SidebarGeometryModifiers( editor, object ) {
 function SidebarGeometryModifiers( editor, object ) {

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

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.ShapeGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.SphereGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.TeapotBufferGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author tschw
- */
-
 import { UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
 import { UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
 
 
 import { TeapotBufferGeometry } from '../../examples/jsm/geometries/TeapotBufferGeometry.js';
 import { TeapotBufferGeometry } from '../../examples/jsm/geometries/TeapotBufferGeometry.js';

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

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

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

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.TubeGeometry.js

@@ -1,7 +1,3 @@
-/**
- * @author Temdog007 / http://github.com/Temdog007
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.Geometry.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 0 - 4
editor/js/Sidebar.History.js

@@ -1,7 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
 
 
 import { UIPanel, UIBreak, UIText } from './libs/ui.js';
 import { UIPanel, UIBreak, UIText } from './libs/ui.js';
 import { UIBoolean, UIOutliner } from './libs/ui.three.js';
 import { UIBoolean, UIOutliner } from './libs/ui.three.js';

+ 0 - 4
editor/js/Sidebar.Material.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';

+ 3 - 60
editor/js/Sidebar.Object.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';
@@ -137,13 +133,11 @@ function SidebarObject( editor ) {
 	// scale
 	// scale
 
 
 	var objectScaleRow = new UIRow();
 	var objectScaleRow = new UIRow();
-	var objectScaleLock = new UICheckbox( true ).setPosition( 'absolute' ).setLeft( '75px' );
-	var objectScaleX = new UINumber( 1 ).setPrecision( 3 ).setRange( 0.001, Infinity ).setWidth( '50px' ).onChange( updateScaleX );
-	var objectScaleY = new UINumber( 1 ).setPrecision( 3 ).setRange( 0.001, Infinity ).setWidth( '50px' ).onChange( updateScaleY );
-	var objectScaleZ = new UINumber( 1 ).setPrecision( 3 ).setRange( 0.001, Infinity ).setWidth( '50px' ).onChange( updateScaleZ );
+	var objectScaleX = new UINumber( 1 ).setPrecision( 3 ).setWidth( '50px' ).onChange( update );
+	var objectScaleY = new UINumber( 1 ).setPrecision( 3 ).setWidth( '50px' ).onChange( update );
+	var objectScaleZ = new UINumber( 1 ).setPrecision( 3 ).setWidth( '50px' ).onChange( update );
 
 
 	objectScaleRow.add( new UIText( strings.getKey( 'sidebar/object/scale' ) ).setWidth( '90px' ) );
 	objectScaleRow.add( new UIText( strings.getKey( 'sidebar/object/scale' ) ).setWidth( '90px' ) );
-	objectScaleRow.add( objectScaleLock );
 	objectScaleRow.add( objectScaleX, objectScaleY, objectScaleZ );
 	objectScaleRow.add( objectScaleX, objectScaleY, objectScaleZ );
 
 
 	container.add( objectScaleRow );
 	container.add( objectScaleRow );
@@ -395,57 +389,6 @@ function SidebarObject( editor ) {
 
 
 	//
 	//
 
 
-	function updateScaleX() {
-
-		var object = editor.selected;
-
-		if ( objectScaleLock.getValue() === true ) {
-
-			var scale = objectScaleX.getValue() / object.scale.x;
-
-			objectScaleY.setValue( objectScaleY.getValue() * scale );
-			objectScaleZ.setValue( objectScaleZ.getValue() * scale );
-
-		}
-
-		update();
-
-	}
-
-	function updateScaleY() {
-
-		var object = editor.selected;
-
-		if ( objectScaleLock.getValue() === true ) {
-
-			var scale = objectScaleY.getValue() / object.scale.y;
-
-			objectScaleX.setValue( objectScaleX.getValue() * scale );
-			objectScaleZ.setValue( objectScaleZ.getValue() * scale );
-
-		}
-
-		update();
-
-	}
-
-	function updateScaleZ() {
-
-		var object = editor.selected;
-
-		if ( objectScaleLock.getValue() === true ) {
-
-			var scale = objectScaleZ.getValue() / object.scale.z;
-
-			objectScaleX.setValue( objectScaleX.getValue() * scale );
-			objectScaleY.setValue( objectScaleY.getValue() * scale );
-
-		}
-
-		update();
-
-	}
-
 	function update() {
 	function update() {
 
 
 		var object = editor.selected;
 		var object = editor.selected;

+ 0 - 4
editor/js/Sidebar.Project.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE from '../../build/three.module.js';
 import * as THREE from '../../build/three.module.js';
 
 
 import { UIPanel, UIRow, UIInput, UICheckbox, UIText, UIListbox, UISpan, UIButton, UISelect, UINumber } from './libs/ui.js';
 import { UIPanel, UIRow, UIInput, UICheckbox, UIText, UIListbox, UISpan, UIButton, UISelect, UINumber } from './libs/ui.js';

+ 0 - 4
editor/js/Sidebar.Properties.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UITabbedPanel } from './libs/ui.js';
 import { UITabbedPanel } from './libs/ui.js';
 
 
 import { SidebarObject } from './Sidebar.Object.js';
 import { SidebarObject } from './Sidebar.Object.js';

+ 0 - 4
editor/js/Sidebar.Scene.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIBreak, UIRow, UIColor, UISelect, UIText, UINumber } from './libs/ui.js';
 import { UIPanel, UIBreak, UIRow, UIColor, UISelect, UIText, UINumber } from './libs/ui.js';
 import { UIOutliner, UITexture } from './libs/ui.three.js';
 import { UIOutliner, UITexture } from './libs/ui.three.js';
 
 

+ 0 - 4
editor/js/Sidebar.Script.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIBreak, UIText, UIButton, UIRow, UIInput } from './libs/ui.js';
 import { UIPanel, UIBreak, UIText, UIButton, UIRow, UIInput } from './libs/ui.js';
 
 
 import { AddScriptCommand } from './commands/AddScriptCommand.js';
 import { AddScriptCommand } from './commands/AddScriptCommand.js';

+ 0 - 4
editor/js/Sidebar.Settings.Shortcuts.js

@@ -1,7 +1,3 @@
-/**
- * @author TyLindberg / https://github.com/TyLindberg
- */
-
 import { UIDiv, UIBreak, UIText, UIRow, UIInput } from './libs/ui.js';
 import { UIDiv, UIBreak, UIText, UIRow, UIInput } from './libs/ui.js';
 
 
 import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js';
 import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js';

+ 21 - 19
editor/js/Sidebar.Settings.Viewport.js

@@ -1,8 +1,4 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
-import { UIDiv, UIBreak, UIText } from './libs/ui.js';
+import { UIDiv, UIText, UIRow } from './libs/ui.js';
 import { UIBoolean } from './libs/ui.three.js';
 import { UIBoolean } from './libs/ui.three.js';
 
 
 
 
@@ -12,28 +8,34 @@ function SidebarSettingsViewport( editor ) {
 	var strings = editor.strings;
 	var strings = editor.strings;
 
 
 	var container = new UIDiv();
 	var container = new UIDiv();
-	container.add( new UIBreak() );
 
 
-	container.add( new UIText( strings.getKey( 'sidebar/settings/viewport/grid' ) ).setWidth( '90px' ) );
+	// grid
+
+	var showGridRow = new UIRow();
+
+	showGridRow.add( new UIText( strings.getKey( 'sidebar/settings/viewport/grid' ) ).setWidth( '90px' ) );
+
+	var showGrid = new UIBoolean( true ).onChange( function () {
+
+		signals.showGridChanged.dispatch( showGrid.getValue() );
 
 
-	var show = new UIBoolean( true ).onChange( update );
-	container.add( show );
+	} );
+	showGridRow.add( showGrid );
+	container.add( showGridRow );
 
 
-	/*
-	var snapSize = new UI.Number( 25 ).setWidth( '40px' ).onChange( update );
-	container.add( snapSize );
+	// helpers
 
 
-	var snap = new UI.THREE.Boolean( false, 'snap' ).onChange( update );
-	container.add( snap );
-	*/
+	var showHelpersRow = new UIRow();
 
 
-	function update() {
+	showHelpersRow.add( new UIText( strings.getKey( 'sidebar/settings/viewport/helpers' ) ).setWidth( '90px' ) );
 
 
-		signals.showGridChanged.dispatch( show.getValue() );
+	var showHelpers = new UIBoolean( true ).onChange( function () {
 
 
-		// signals.snapChanged.dispatch( snap.getValue() === true ? snapSize.getValue() : null );
+		signals.showHelpersChanged.dispatch( showHelpers.getValue() );
 
 
-	}
+	} );
+	showHelpersRow.add( showHelpers );
+	container.add( showHelpersRow );
 
 
 	return container;
 	return container;
 
 

+ 0 - 4
editor/js/Sidebar.Settings.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIRow, UISelect, UIText, UIInteger } from './libs/ui.js';
 import { UIPanel, UIRow, UISelect, UIText, UIInteger } from './libs/ui.js';
 
 
 import { SidebarSettingsViewport } from './Sidebar.Settings.Viewport.js';
 import { SidebarSettingsViewport } from './Sidebar.Settings.Viewport.js';

+ 0 - 4
editor/js/Sidebar.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UITabbedPanel, UISpan } from './libs/ui.js';
 import { UITabbedPanel, UISpan } from './libs/ui.js';
 
 
 import { SidebarScene } from './Sidebar.Scene.js';
 import { SidebarScene } from './Sidebar.Scene.js';

+ 0 - 4
editor/js/Storage.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 function Storage() {
 function Storage() {
 
 
 	var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
 	var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;

+ 12 - 4
editor/js/Strings.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 function Strings( config ) {
 function Strings( config ) {
 
 
 	var language = config.getKey( 'language' );
 	var language = config.getKey( 'language' );
@@ -310,6 +306,7 @@ function Strings( config ) {
 			'sidebar/settings/shortcuts/focus': 'Focus',
 			'sidebar/settings/shortcuts/focus': 'Focus',
 
 
 			'sidebar/settings/viewport/grid': 'Grid',
 			'sidebar/settings/viewport/grid': 'Grid',
+			'sidebar/settings/viewport/helpers': 'Helpers',
 
 
 			'sidebar/history': 'History',
 			'sidebar/history': 'History',
 			'sidebar/history/persistent': 'persistent',
 			'sidebar/history/persistent': 'persistent',
@@ -628,6 +625,7 @@ function Strings( config ) {
 			'sidebar/settings/shortcuts/focus': 'Focus',
 			'sidebar/settings/shortcuts/focus': 'Focus',
 
 
 			'sidebar/settings/viewport/grid': 'Grille',
 			'sidebar/settings/viewport/grid': 'Grille',
+			'sidebar/settings/viewport/helpers': 'Helpers',
 
 
 			'sidebar/history': 'Historique',
 			'sidebar/history': 'Historique',
 			'sidebar/history/persistent': 'permanent',
 			'sidebar/history/persistent': 'permanent',
@@ -839,6 +837,15 @@ function Strings( config ) {
 			'sidebar/geometry/torusKnot_geometry/p': '管长弧度',
 			'sidebar/geometry/torusKnot_geometry/p': '管长弧度',
 			'sidebar/geometry/torusKnot_geometry/q': '扭曲弧度',
 			'sidebar/geometry/torusKnot_geometry/q': '扭曲弧度',
 
 
+			'sidebar/geometry/tube_geometry/path': '路径',
+			'sidebar/geometry/tube_geometry/radius': '半径',
+			'sidebar/geometry/tube_geometry/tube': '管厚',
+			'sidebar/geometry/tube_geometry/tubularsegments': '管厚分段',
+			'sidebar/geometry/tube_geometry/radialsegments': '半径分段',
+			'sidebar/geometry/tube_geometry/closed': '闭合',
+			'sidebar/geometry/tube_geometry/curvetype': '曲线类型',
+			'sidebar/geometry/tube_geometry/tension': '张力',
+
 			'sidebar/material/new': '更新',
 			'sidebar/material/new': '更新',
 			'sidebar/material/copy': '复制',
 			'sidebar/material/copy': '复制',
 			'sidebar/material/paste': '粘贴',
 			'sidebar/material/paste': '粘贴',
@@ -920,6 +927,7 @@ function Strings( config ) {
 			'sidebar/settings/shortcuts/focus': '聚焦',
 			'sidebar/settings/shortcuts/focus': '聚焦',
 
 
 			'sidebar/settings/viewport/grid': '网格',
 			'sidebar/settings/viewport/grid': '网格',
+			'sidebar/settings/viewport/helpers': '辅助',
 
 
 			'sidebar/history': '历史记录',
 			'sidebar/history': '历史记录',
 			'sidebar/history/persistent': '本地存储',
 			'sidebar/history/persistent': '本地存储',

+ 0 - 4
editor/js/Toolbar.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIButton, UICheckbox } from './libs/ui.js';
 import { UIPanel, UIButton, UICheckbox } from './libs/ui.js';
 
 
 function Toolbar( editor ) {
 function Toolbar( editor ) {

+ 0 - 4
editor/js/Viewport.Camera.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UISelect } from './libs/ui.js';
 import { UISelect } from './libs/ui.js';
 
 
 function ViewportCamera( editor ) {
 function ViewportCamera( editor ) {

+ 0 - 4
editor/js/Viewport.Info.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import { UIPanel, UIBreak, UIText } from './libs/ui.js';
 import { UIPanel, UIBreak, UIText } from './libs/ui.js';
 
 
 function ViewportInfo( editor ) {
 function ViewportInfo( editor ) {

+ 317 - 0
editor/js/Viewport.ViewHelper.js

@@ -0,0 +1,317 @@
+import { UIPanel } from './libs/ui.js';
+
+import * as THREE from '../../build/three.module.js';
+
+function ViewHelper( editorCamera, container ) {
+
+	THREE.Object3D.call( this );
+
+	this.animating = false;
+	this.controls = null;
+
+	var panel = new UIPanel();
+	panel.setId( 'viewHelper' );
+	panel.setPosition( 'absolute' );
+	panel.setRight( '0px' );
+	panel.setBottom( '0px' );
+	panel.setHeight( '128px' );
+	panel.setWidth( '128px' );
+
+	var scope = this;
+
+	panel.dom.addEventListener( 'mouseup', function ( event ) {
+
+		event.stopPropagation();
+
+		scope.handleClick( event );
+
+	} );
+
+	panel.dom.addEventListener( 'mousedown', function ( event ) {
+
+		event.stopPropagation();
+
+	} );
+
+	container.add( panel );
+
+	var color1 = new THREE.Color( '#ff3653' );
+	var color2 = new THREE.Color( '#8adb00' );
+	var color3 = new THREE.Color( '#2c8fff' );
+
+	var interactiveObjects = [];
+	var raycaster = new THREE.Raycaster();
+	var mouse = new THREE.Vector2();
+	var dummy = new THREE.Object3D();
+
+	var camera = new THREE.OrthographicCamera( - 2, 2, 2, - 2, 0, 4 );
+	camera.position.set( 0, 0, 2 );
+
+	var geometry = new THREE.BoxBufferGeometry( 0.8, 0.05, 0.05 ).translate( 0.4, 0, 0 );
+
+	var xAxis = new THREE.Mesh( geometry, getAxisMaterial( color1 ) );
+	var yAxis = new THREE.Mesh( geometry, getAxisMaterial( color2 ) );
+	var zAxis = new THREE.Mesh( geometry, getAxisMaterial( color3 ) );
+
+	yAxis.rotation.z = Math.PI / 2;
+	zAxis.rotation.y = - Math.PI / 2;
+
+	this.add( xAxis );
+	this.add( zAxis );
+	this.add( yAxis );
+
+	var posXAxisHelper = new THREE.Sprite( getSpriteMaterial( color1, 'X' ) );
+	posXAxisHelper.userData.type = 'posX';
+	var posYAxisHelper = new THREE.Sprite( getSpriteMaterial( color2, 'Y' ) );
+	posYAxisHelper.userData.type = 'posY';
+	var posZAxisHelper = new THREE.Sprite( getSpriteMaterial( color3, 'Z' ) );
+	posZAxisHelper.userData.type = 'posZ';
+	var negXAxisHelper = new THREE.Sprite( getSpriteMaterial( color1 ) );
+	negXAxisHelper.userData.type = 'negX';
+	var negYAxisHelper = new THREE.Sprite( getSpriteMaterial( color2 ) );
+	negYAxisHelper.userData.type = 'negY';
+	var negZAxisHelper = new THREE.Sprite( getSpriteMaterial( color3 ) );
+	negZAxisHelper.userData.type = 'negZ';
+
+	posXAxisHelper.position.x = 1;
+	posYAxisHelper.position.y = 1;
+	posZAxisHelper.position.z = 1;
+	negXAxisHelper.position.x = - 1;
+	negXAxisHelper.scale.setScalar( 0.8 );
+	negYAxisHelper.position.y = - 1;
+	negYAxisHelper.scale.setScalar( 0.8 );
+	negZAxisHelper.position.z = - 1;
+	negZAxisHelper.scale.setScalar( 0.8 );
+
+	this.add( posXAxisHelper );
+	this.add( posYAxisHelper );
+	this.add( posZAxisHelper );
+	this.add( negXAxisHelper );
+	this.add( negYAxisHelper );
+	this.add( negZAxisHelper );
+
+	interactiveObjects.push( posXAxisHelper );
+	interactiveObjects.push( posYAxisHelper );
+	interactiveObjects.push( posZAxisHelper );
+	interactiveObjects.push( negXAxisHelper );
+	interactiveObjects.push( negYAxisHelper );
+	interactiveObjects.push( negZAxisHelper );
+
+	var point = new THREE.Vector3();
+	var dim = 128;
+	var turnRate = 2 * Math.PI; // turn rate in angles per second
+
+	this.render = function ( renderer ) {
+
+		this.quaternion.copy( editorCamera.quaternion ).inverse();
+		this.updateMatrixWorld();
+
+		point.set( 0, 0, 1 );
+		point.applyQuaternion( editorCamera.quaternion );
+
+		if ( point.x >= 0 ) {
+
+			posXAxisHelper.material.opacity = 1;
+			negXAxisHelper.material.opacity = 0.5;
+
+		} else {
+
+			posXAxisHelper.material.opacity = 0.5;
+			negXAxisHelper.material.opacity = 1;
+
+		}
+
+		if ( point.y >= 0 ) {
+
+			posYAxisHelper.material.opacity = 1;
+			negYAxisHelper.material.opacity = 0.5;
+
+		} else {
+
+			posYAxisHelper.material.opacity = 0.5;
+			negYAxisHelper.material.opacity = 1;
+
+		}
+
+		if ( point.z >= 0 ) {
+
+			posZAxisHelper.material.opacity = 1;
+			negZAxisHelper.material.opacity = 0.5;
+
+		} else {
+
+			posZAxisHelper.material.opacity = 0.5;
+			negZAxisHelper.material.opacity = 1;
+
+		}
+
+		//
+
+		var x = container.dom.offsetWidth - dim;
+
+		renderer.clearDepth();
+		renderer.setViewport( x, 0, dim, dim );
+		renderer.render( this, camera );
+
+	};
+
+	var targetPosition = new THREE.Vector3();
+	var targetQuaternion = new THREE.Quaternion();
+
+	var q1 = new THREE.Quaternion();
+	var q2 = new THREE.Quaternion();
+	var radius = 0;
+
+	this.handleClick = function ( event ) {
+
+		if ( this.animating === true ) return false;
+
+		var rect = container.dom.getBoundingClientRect();
+		var offsetX = rect.left + ( container.dom.offsetWidth - dim );
+		var offsetY = rect.top + ( container.dom.offsetHeight - dim );
+		mouse.x = ( ( event.clientX - offsetX ) / ( rect.width - offsetX ) ) * 2 - 1;
+		mouse.y = - ( ( event.clientY - offsetY ) / ( rect.bottom - offsetY ) ) * 2 + 1;
+
+		raycaster.setFromCamera( mouse, camera );
+
+		var intersects = raycaster.intersectObjects( interactiveObjects );
+
+		if ( intersects.length > 0 ) {
+
+			var intersection = intersects[ 0 ];
+			var object = intersection.object;
+
+			prepareAnimationData( object, this.controls.center );
+
+			this.animating = true;
+
+			return true;
+
+		} else {
+
+			return false;
+
+		}
+
+	};
+
+	this.update = function ( delta ) {
+
+		var step = delta * turnRate;
+
+		// animate position by doing a slerp and then scaling the position on the unit sphere
+
+		q1.rotateTowards( q2, step );
+		editorCamera.position.set( 0, 0, 1 ).applyQuaternion( q1 ).multiplyScalar( radius );
+
+		// animate orientation
+
+		editorCamera.quaternion.rotateTowards( targetQuaternion, step );
+
+		if ( q1.angleTo( q2 ) === 0 ) {
+
+			this.animating = false;
+
+		}
+
+	};
+
+	function prepareAnimationData( object, focusPoint ) {
+
+		switch ( object.userData.type ) {
+
+			case 'posX':
+				targetPosition.set( 1, 0, 0 );
+				targetQuaternion.setFromEuler( new THREE.Euler( 0, Math.PI * 0.5, 0 ) );
+				break;
+
+			case 'posY':
+				targetPosition.set( 0, 1, 0 );
+				targetQuaternion.setFromEuler( new THREE.Euler( - Math.PI * 0.5, 0, 0 ) );
+				break;
+
+			case 'posZ':
+				targetPosition.set( 0, 0, 1 );
+				targetQuaternion.setFromEuler( new THREE.Euler() );
+				break;
+
+			case 'negX':
+				targetPosition.set( - 1, 0, 0 );
+				targetQuaternion.setFromEuler( new THREE.Euler( 0, - Math.PI * 0.5, 0 ) );
+				break;
+
+			case 'negY':
+				targetPosition.set( 0, - 1, 0 );
+				targetQuaternion.setFromEuler( new THREE.Euler( Math.PI * 0.5, 0, 0 ) );
+				break;
+
+			case 'negZ':
+				targetPosition.set( 0, 0, - 1 );
+				targetQuaternion.setFromEuler( new THREE.Euler( 0, Math.PI, 0 ) );
+				break;
+
+			default:
+				console.error( 'ViewHelper: Invalid axis.' );
+
+		}
+
+		//
+
+		radius = editorCamera.position.distanceTo( focusPoint );
+		targetPosition.multiplyScalar( radius );
+
+		dummy.position.copy( focusPoint );
+
+		dummy.lookAt( editorCamera.position );
+		q1.copy( dummy.quaternion );
+
+		dummy.lookAt( targetPosition );
+		q2.copy( dummy.quaternion );
+
+	}
+
+	function getAxisMaterial( color ) {
+
+		return new THREE.MeshBasicMaterial( { color: color, toneMapped: false } );
+
+	}
+
+	function getSpriteMaterial( color, text = null ) {
+
+		var canvas = document.createElement( 'canvas' );
+		canvas.width = 64;
+		canvas.height = 64;
+
+		var context = canvas.getContext( '2d' );
+		context.beginPath();
+		context.arc( 32, 32, 16, 0, 2 * Math.PI );
+		context.closePath();
+		context.fillStyle = color.getStyle();
+		context.fill();
+
+		if ( text !== null ) {
+
+			context.font = '24px Arial';
+			context.textAlign = 'center';
+			context.fillStyle = '#000000';
+			context.fillText( text, 32, 41 );
+
+		}
+
+		var texture = new THREE.CanvasTexture( canvas );
+
+		return new THREE.SpriteMaterial( { map: texture, toneMapped: false } );
+
+	}
+
+}
+
+ViewHelper.prototype = Object.assign( Object.create( THREE.Object3D.prototype ), {
+
+	constructor: ViewHelper,
+
+	isViewHelper: true
+
+} );
+
+export { ViewHelper };

+ 52 - 22
editor/js/Viewport.js

@@ -1,7 +1,3 @@
-/**
- * @author mrdoob / http://mrdoob.com/
- */
-
 import * as THREE 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';
@@ -12,6 +8,7 @@ import { EditorControls } from './EditorControls.js';
 
 
 import { ViewportCamera } from './Viewport.Camera.js';
 import { ViewportCamera } from './Viewport.Camera.js';
 import { ViewportInfo } from './Viewport.Info.js';
 import { ViewportInfo } from './Viewport.Info.js';
+import { ViewHelper } from './Viewport.ViewHelper.js';
 
 
 import { SetPositionCommand } from './commands/SetPositionCommand.js';
 import { SetPositionCommand } from './commands/SetPositionCommand.js';
 import { SetRotationCommand } from './commands/SetRotationCommand.js';
 import { SetRotationCommand } from './commands/SetRotationCommand.js';
@@ -37,6 +34,7 @@ function Viewport( editor ) {
 	var camera = editor.camera;
 	var camera = editor.camera;
 	var scene = editor.scene;
 	var scene = editor.scene;
 	var sceneHelpers = editor.sceneHelpers;
 	var sceneHelpers = editor.sceneHelpers;
+	var showSceneHelpers = true;
 
 
 	var objects = [];
 	var objects = [];
 
 
@@ -58,6 +56,10 @@ function Viewport( editor ) {
 
 
 	//
 	//
 
 
+	var viewHelper = new ViewHelper( camera, container );
+
+	//
+
 	var box = new THREE.Box3();
 	var box = new THREE.Box3();
 
 
 	var selectionBox = new THREE.BoxHelper();
 	var selectionBox = new THREE.BoxHelper();
@@ -160,6 +162,13 @@ function Viewport( editor ) {
 
 
 	// events
 	// events
 
 
+	function updateAspectRatio() {
+
+		camera.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
+		camera.updateProjectionMatrix();
+
+	}
+
 	function getIntersects( point, objects ) {
 	function getIntersects( point, objects ) {
 
 
 		mouse.set( ( point.x * 2 ) - 1, - ( point.y * 2 ) + 1 );
 		mouse.set( ( point.x * 2 ) - 1, - ( point.y * 2 ) + 1 );
@@ -292,6 +301,7 @@ function Viewport( editor ) {
 		signals.refreshSidebarObject3D.dispatch( camera );
 		signals.refreshSidebarObject3D.dispatch( camera );
 
 
 	} );
 	} );
+	viewHelper.controls = controls;
 
 
 	// signals
 	// signals
 
 
@@ -633,23 +643,24 @@ function Viewport( editor ) {
 
 
 	} );
 	} );
 
 
-	signals.viewportCameraChanged.add( function ( viewportCamera ) {
+	signals.viewportCameraChanged.add( function () {
+
+		var viewportCamera = editor.viewportCamera;
 
 
 		if ( viewportCamera.isPerspectiveCamera ) {
 		if ( viewportCamera.isPerspectiveCamera ) {
 
 
 			viewportCamera.aspect = editor.camera.aspect;
 			viewportCamera.aspect = editor.camera.aspect;
 			viewportCamera.projectionMatrix.copy( editor.camera.projectionMatrix );
 			viewportCamera.projectionMatrix.copy( editor.camera.projectionMatrix );
 
 
-		} else if ( ! viewportCamera.isOrthographicCamera ) {
+		} else if ( viewportCamera.isOrthographicCamera ) {
 
 
-			throw "Invalid camera set as viewport";
+			// TODO
 
 
 		}
 		}
 
 
-		// Disable EditorControls when setting a user camera
-		controls.enabled = viewportCamera === editor.camera;
+		// disable EditorControls when setting a user camera
 
 
-		camera = viewportCamera;
+		controls.enabled = ( viewportCamera === editor.camera );
 
 
 		render();
 		render();
 
 
@@ -659,13 +670,7 @@ function Viewport( editor ) {
 
 
 	signals.windowResize.add( function () {
 	signals.windowResize.add( function () {
 
 
-		// TODO: Move this out?
-
-		editor.DEFAULT_CAMERA.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
-		editor.DEFAULT_CAMERA.updateProjectionMatrix();
-
-		camera.aspect = container.dom.offsetWidth / container.dom.offsetHeight;
-		camera.updateProjectionMatrix();
+		updateAspectRatio();
 
 
 		renderer.setSize( container.dom.offsetWidth, container.dom.offsetHeight );
 		renderer.setSize( container.dom.offsetWidth, container.dom.offsetHeight );
 
 
@@ -680,6 +685,17 @@ function Viewport( editor ) {
 
 
 	} );
 	} );
 
 
+	signals.showHelpersChanged.add( function ( showHelpers ) {
+
+		showSceneHelpers = showHelpers;
+		transformControls.enabled = showHelpers;
+
+		render();
+
+	} );
+
+	signals.cameraResetted.add( updateAspectRatio );
+
 	// animations
 	// animations
 
 
 	var clock = new THREE.Clock(); // only used for animations
 	var clock = new THREE.Clock(); // only used for animations
@@ -689,14 +705,26 @@ function Viewport( editor ) {
 		requestAnimationFrame( animate );
 		requestAnimationFrame( animate );
 
 
 		var mixer = editor.mixer;
 		var mixer = editor.mixer;
+		var delta = clock.getDelta();
+
+		var needsUpdate = false;
 
 
 		if ( mixer.stats.actions.inUse > 0 ) {
 		if ( mixer.stats.actions.inUse > 0 ) {
 
 
-			mixer.update( clock.getDelta() );
-			render();
+			mixer.update( delta );
+			needsUpdate = true;
 
 
 		}
 		}
 
 
+		if ( viewHelper.animating === true ) {
+
+			viewHelper.update( delta );
+			needsUpdate = true;
+
+		}
+
+		if ( needsUpdate === true ) render();
+
 	}
 	}
 
 
 	requestAnimationFrame( animate );
 	requestAnimationFrame( animate );
@@ -714,13 +742,15 @@ function Viewport( editor ) {
 		// don't render under the grid.
 		// don't render under the grid.
 
 
 		scene.add( grid );
 		scene.add( grid );
-		renderer.render( scene, camera );
+		renderer.setViewport( 0, 0, container.dom.offsetWidth, container.dom.offsetHeight );
+		renderer.render( scene, editor.viewportCamera );
 		scene.remove( grid );
 		scene.remove( grid );
 
 
-		if ( camera === editor.camera ) {
+		if ( camera === editor.viewportCamera ) {
 
 
 			renderer.autoClear = false;
 			renderer.autoClear = false;
-			renderer.render( sceneHelpers, camera );
+			if ( showSceneHelpers === true ) renderer.render( sceneHelpers, camera );
+			viewHelper.render( renderer );
 			renderer.autoClear = true;
 			renderer.autoClear = true;
 
 
 		}
 		}

+ 0 - 5
editor/js/commands/AddObjectCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 import * as THREE from '../../../build/three.module.js';
 import * as THREE from '../../../build/three.module.js';
 
 

+ 0 - 5
editor/js/commands/AddScriptCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 3 - 5
editor/js/commands/MoveObjectCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**
@@ -95,12 +90,15 @@ MoveObjectCommand.prototype = {
 			this.oldParent = this.editor.scene;
 			this.oldParent = this.editor.scene;
 
 
 		}
 		}
+
 		this.newParent = this.editor.objectByUuid( json.newParentUuid );
 		this.newParent = this.editor.objectByUuid( json.newParentUuid );
+
 		if ( this.newParent === undefined ) {
 		if ( this.newParent === undefined ) {
 
 
 			this.newParent = this.editor.scene;
 			this.newParent = this.editor.scene;
 
 
 		}
 		}
+
 		this.newIndex = json.newIndex;
 		this.newIndex = json.newIndex;
 		this.oldIndex = json.oldIndex;
 		this.oldIndex = json.oldIndex;
 
 

+ 1 - 5
editor/js/commands/MultiCmdsCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**
@@ -63,6 +58,7 @@ MultiCmdsCommand.prototype = {
 			cmds.push( this.cmdArray[ i ].toJSON() );
 			cmds.push( this.cmdArray[ i ].toJSON() );
 
 
 		}
 		}
+
 		output.cmds = cmds;
 		output.cmds = cmds;
 
 
 		return output;
 		return output;

+ 0 - 4
editor/js/commands/RemoveObjectCommand.js

@@ -1,7 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 

+ 0 - 5
editor/js/commands/RemoveScriptCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 0 - 5
editor/js/commands/SetColorCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 0 - 5
editor/js/commands/SetGeometryCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 import * as THREE from '../../../build/three.module.js';
 import * as THREE from '../../../build/three.module.js';

+ 0 - 5
editor/js/commands/SetGeometryValueCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 0 - 5
editor/js/commands/SetMaterialColorCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 0 - 5
editor/js/commands/SetMaterialCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 import * as THREE from '../../../build/three.module.js';
 import * as THREE from '../../../build/three.module.js';

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

@@ -1,7 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
 
 
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
@@ -99,6 +95,7 @@ SetMaterialMapCommand.prototype = {
 				values.push( data );
 				values.push( data );
 
 
 			}
 			}
+
 			return values;
 			return values;
 
 
 		}
 		}
@@ -126,6 +123,7 @@ SetMaterialMapCommand.prototype = {
 				map.sourceFile = json.sourceFile;
 				map.sourceFile = json.sourceFile;
 
 
 			}
 			}
+
 			return map;
 			return map;
 
 
 		}
 		}

+ 0 - 5
editor/js/commands/SetMaterialValueCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 /**
 /**

+ 0 - 5
editor/js/commands/SetMaterialVectorCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 function SetMaterialVectorCommand( editor, object, attributeName, newValue, materialSlot ) {
 function SetMaterialVectorCommand( editor, object, attributeName, newValue, materialSlot ) {

+ 0 - 5
editor/js/commands/SetPositionCommand.js

@@ -1,8 +1,3 @@
-/**
- * @author dforrer / https://github.com/dforrer
- * Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
- */
-
 import { Command } from '../Command.js';
 import { Command } from '../Command.js';
 
 
 import * as THREE from '../../../build/three.module.js';
 import * as THREE from '../../../build/three.module.js';

Some files were not shown because too many files changed in this diff