Mr.doob 2 years ago
parent
commit
914287ce5d
100 changed files with 988 additions and 415 deletions
  1. 36 9
      build/three.cjs
  2. 36 9
      build/three.js
  3. 0 0
      build/three.min.js
  4. 36 9
      build/three.module.js
  5. 0 0
      build/three.module.min.js
  6. 7 1
      docs/api/ar/core/BufferAttribute.html
  7. 1 1
      docs/api/ar/extras/core/ShapePath.html
  8. 0 1
      docs/api/ar/lights/Light.html
  9. 0 8
      docs/api/ar/lights/PointLight.html
  10. 0 2
      docs/api/ar/lights/RectAreaLight.html
  11. 2 12
      docs/api/ar/lights/SpotLight.html
  12. 0 3
      docs/api/ar/renderers/WebGLRenderer.html
  13. 80 0
      docs/api/ar/scenes/Fog.html
  14. 68 0
      docs/api/ar/scenes/FogExp2.html
  15. 92 0
      docs/api/ar/scenes/Scene.html
  16. 9 6
      docs/api/en/core/BufferAttribute.html
  17. 1 1
      docs/api/en/extras/core/ShapePath.html
  18. 1 2
      docs/api/en/lights/Light.html
  19. 3 13
      docs/api/en/lights/PointLight.html
  20. 3 6
      docs/api/en/lights/RectAreaLight.html
  21. 3 12
      docs/api/en/lights/SpotLight.html
  22. 0 3
      docs/api/en/renderers/WebGLRenderer.html
  23. 7 1
      docs/api/fr/core/BufferAttribute.html
  24. 7 1
      docs/api/it/core/BufferAttribute.html
  25. 1 1
      docs/api/it/extras/core/ShapePath.html
  26. 1 1
      docs/api/it/lights/Light.html
  27. 6 14
      docs/api/it/lights/PointLight.html
  28. 2 4
      docs/api/it/lights/RectAreaLight.html
  29. 3 11
      docs/api/it/lights/SpotLight.html
  30. 0 5
      docs/api/it/renderers/WebGLRenderer.html
  31. 7 1
      docs/api/ko/core/BufferAttribute.html
  32. 7 1
      docs/api/zh/core/BufferAttribute.html
  33. 1 1
      docs/api/zh/extras/core/ShapePath.html
  34. 1 1
      docs/api/zh/lights/Light.html
  35. 2 7
      docs/api/zh/lights/PointLight.html
  36. 2 2
      docs/api/zh/lights/RectAreaLight.html
  37. 2 7
      docs/api/zh/lights/SpotLight.html
  38. 0 5
      docs/api/zh/renderers/WebGLRenderer.html
  39. 4 1
      docs/examples/en/controls/OrbitControls.html
  40. 5 0
      docs/examples/en/controls/TrackballControls.html
  41. 0 4
      docs/examples/en/loaders/GLTFLoader.html
  42. 11 3
      docs/examples/en/utils/BufferGeometryUtils.html
  43. 4 1
      docs/examples/ko/controls/OrbitControls.html
  44. 4 1
      docs/examples/zh/controls/OrbitControls.html
  45. 0 3
      docs/examples/zh/loaders/GLTFLoader.html
  46. 10 3
      docs/examples/zh/utils/BufferGeometryUtils.html
  47. 6 0
      docs/list.json
  48. 4 2
      docs/manual/en/introduction/How-to-dispose-of-objects.html
  49. 8 4
      docs/manual/en/introduction/How-to-use-post-processing.html
  50. 8 4
      docs/manual/fr/introduction/How-to-use-post-processing.html
  51. 8 4
      docs/manual/it/introduction/How-to-use-post-processing.html
  52. 8 3
      docs/manual/ja/introduction/How-to-use-post-processing.html
  53. 9 4
      docs/manual/ko/introduction/How-to-use-post-processing.html
  54. 10 5
      docs/manual/pt-br/introduction/How-to-use-post-processing.html
  55. 8 3
      docs/manual/zh/introduction/How-to-use-post-processing.html
  56. 0 1
      docs/scenes/bones-browser.html
  57. 0 1
      docs/scenes/ccdiksolver-browser.html
  58. 0 1
      docs/scenes/geometry-browser.html
  59. 0 1
      docs/scenes/material-browser.html
  60. 0 1
      editor/js/Config.js
  61. 0 1
      editor/js/Editor.js
  62. 25 3
      editor/js/Loader.js
  63. 0 19
      editor/js/Sidebar.Project.Renderer.js
  64. 0 3
      editor/js/Strings.js
  65. 0 1
      editor/js/libs/app.js
  66. 0 1
      examples/css2d_label.html
  67. 0 1
      examples/css3d_orthographic.html
  68. 0 1
      examples/css3d_sandbox.html
  69. 2 0
      examples/files.json
  70. 0 1
      examples/games_fps.html
  71. 143 21
      examples/jsm/controls/OrbitControls.js
  72. 1 1
      examples/jsm/environments/RoomEnvironment.js
  73. 1 0
      examples/jsm/exporters/USDZExporter.js
  74. 7 0
      examples/jsm/interactive/SelectionHelper.js
  75. 1 1
      examples/jsm/loaders/FBXLoader.js
  76. 8 3
      examples/jsm/loaders/GLTFLoader.js
  77. 4 4
      examples/jsm/loaders/KTX2Loader.js
  78. 1 1
      examples/jsm/loaders/LDrawLoader.js
  79. 3 3
      examples/jsm/loaders/NRRDLoader.js
  80. 1 1
      examples/jsm/loaders/PLYLoader.js
  81. 10 10
      examples/jsm/loaders/TGALoader.js
  82. 1 1
      examples/jsm/loaders/VRMLLoader.js
  83. 0 9
      examples/jsm/misc/GPUComputationRenderer.js
  84. 4 6
      examples/jsm/misc/Volume.js
  85. 5 6
      examples/jsm/nodes/Nodes.js
  86. 1 1
      examples/jsm/nodes/accessors/BufferAttributeNode.js
  87. 2 0
      examples/jsm/nodes/accessors/CubeTextureNode.js
  88. 14 1
      examples/jsm/nodes/accessors/ExtendedMaterialNode.js
  89. 8 8
      examples/jsm/nodes/accessors/InstanceNode.js
  90. 34 44
      examples/jsm/nodes/accessors/MaterialNode.js
  91. 6 0
      examples/jsm/nodes/accessors/SceneNode.js
  92. 48 7
      examples/jsm/nodes/accessors/TextureNode.js
  93. 7 9
      examples/jsm/nodes/core/LightingModel.js
  94. 11 2
      examples/jsm/nodes/core/Node.js
  95. 4 0
      examples/jsm/nodes/core/PropertyNode.js
  96. 77 0
      examples/jsm/nodes/display/BumpMapNode.js
  97. 2 2
      examples/jsm/nodes/display/NormalMapNode.js
  98. 0 30
      examples/jsm/nodes/functions/BSDF/BRDF_BlinnPhong.js
  99. 10 2
      examples/jsm/nodes/functions/BSDF/BRDF_GGX.js
  100. 13 0
      examples/jsm/nodes/functions/BSDF/Schlick_to_F0.js

File diff suppressed because it is too large
+ 36 - 9
build/three.cjs


File diff suppressed because it is too large
+ 36 - 9
build/three.js


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


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


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


+ 7 - 1
docs/api/ar/core/BufferAttribute.html

@@ -56,7 +56,7 @@
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
 			يخزن طول [page:BufferAttribute.array array] مقسومًا على
 			يخزن طول [page:BufferAttribute.array array] مقسومًا على
-			[page:BufferAttribute.itemSize itemSize].<br /><br />
+			[page:BufferAttribute.itemSize itemSize]. Read-only property.<br /><br />
 
 
 			إذا كان المخزن يخزن متجهًا من 3 مكونات (مثل الموضع أو الطبيعي أو اللون) ، فسيحسب عدد هذه المتجهات المخزنة.
 			إذا كان المخزن يخزن متجهًا من 3 مكونات (مثل الموضع أو الطبيعي أو اللون) ، فسيحسب عدد هذه المتجهات المخزنة.
 		</p>
 		</p>
@@ -166,6 +166,9 @@
 		<h3>[method:this copyAt]([param:Integer index1]، [param:BufferAttribute bufferAttribute]، [param:Integer index2])</h3>
 		<h3>[method:this copyAt]([param:Integer index1]، [param:BufferAttribute bufferAttribute]، [param:Integer index2])</h3>
 		<p>انسخ متجهًا من bufferAttribute[index2] إلى [page:BufferAttribute.array array][index1].</p>
 		<p>انسخ متجهًا من bufferAttribute[index2] إلى [page:BufferAttribute.array array][index1].</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]([param:Integer index])</h3>
 		<h3>[method:Number getX]([param:Integer index])</h3>
 		<p>يعيد مكون x من المتجه في المؤشر المحدد.</p>
 		<p>يعيد مكون x من المتجه في المؤشر المحدد.</p>
 
 
@@ -211,6 +214,9 @@
 			بدلاً من ذلك ، قم بإنشاء نسخة جديدة وتعيين الاستخدام المطلوب قبل التالي
 			بدلاً من ذلك ، قم بإنشاء نسخة جديدة وتعيين الاستخدام المطلوب قبل التالي
 			جعل.
 			جعل.
 		</p>
 		</p>
+		
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
 
 
 		<h3>[method:this setX]([param:Integer index], [param:Float x])</h3>
 		<h3>[method:this setX]([param:Integer index], [param:Float x])</h3>
 		<p>تضبط مكون x من المتجه في المؤشر المحدد.</p>
 		<p>تضبط مكون x من المتجه في المؤشر المحدد.</p>

+ 1 - 1
docs/api/ar/extras/core/ShapePath.html

@@ -11,7 +11,7 @@
 	 
 	 
 		<p class="desc">
 		<p class="desc">
 			يتم استخدام هذه الفئة لتحويل سلسلة من الأشكال إلى مصفوفة من
 			يتم استخدام هذه الفئة لتحويل سلسلة من الأشكال إلى مصفوفة من
-			[page:Path]s، على سبيل المثال شكل SVG إلى مسار (انظر المثال أدناه).
+			[page:Path]s، على سبيل المثال شكل SVG إلى مسار.
 		</p>
 		</p>
 	 
 	 
 		<h2>المنشئ (Constructor)</h2>
 		<h2>المنشئ (Constructor)</h2>

+ 0 - 1
docs/api/ar/lights/Light.html

@@ -40,7 +40,6 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 		شدة الضوء ، أو قوته.<br />
 		شدة الضوء ، أو قوته.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode] ،
 		وحدات الشدة تعتمد على نوع الضوء.<br />
 		وحدات الشدة تعتمد على نوع الضوء.<br />
 		الافتراضي - `1.0`.
 		الافتراضي - `1.0`.
 		</p>
 		</p>

+ 0 - 8
docs/api/ar/lights/PointLight.html

@@ -71,12 +71,6 @@
 		
 		
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-		`الوضع الافتراضي` - عندما تكون المسافة صفرًا ، لا يتلاشى الضوء. عندما
-		تكون المسافة غير صفرية ، سيتلاشى الضوء بشكل خطي من أقصى شدة
-		عند موقع الضوء إلى الصفر على هذه المسافة من الضوء.
-		</p>
-		<p>
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode] -
 		عندما تكون المسافة صفرًا ، سيتلاشى الضوء وفقًا لقانون المربع المعكوس
 		عندما تكون المسافة صفرًا ، سيتلاشى الضوء وفقًا لقانون المربع المعكوس
 		إلى مسافة لانهائية. عندما تكون المسافة غير صفرية ، سيتلاشى الضوء
 		إلى مسافة لانهائية. عندما تكون المسافة غير صفرية ، سيتلاشى الضوء
 		وفقًا لقانون المربع المعكوس حتى قرب نقطة قطع المسافة ، حيث
 		وفقًا لقانون المربع المعكوس حتى قرب نقطة قطع المسافة ، حيث
@@ -87,7 +81,6 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
 		الشدة هي شدة إضاءة الضوء المقاسة بالشمعات
 		الشدة هي شدة إضاءة الضوء المقاسة بالشمعات
 		(cd).<br /><br />
 		(cd).<br /><br />
 		
 		
@@ -97,7 +90,6 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 		قوة الضوء.<br />
 		قوة الضوء.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
 		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).
 		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).
 		<br /><br />
 		<br /><br />
 		
 		

+ 0 - 2
docs/api/ar/lights/RectAreaLight.html

@@ -72,7 +72,6 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
 		الشدة هي الإضاءة (السطوع) للضوء المقاسة بالنيتات
 		الشدة هي الإضاءة (السطوع) للضوء المقاسة بالنيتات
 		(cd/m^2).<br /><br />
 		(cd/m^2).<br /><br />
 		
 		
@@ -85,7 +84,6 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 		قوة الضوء.<br />
 		قوة الضوء.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
 		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).
 		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).
 		<br /><br />
 		<br /><br />
 		
 		

+ 2 - 12
docs/api/ar/lights/SpotLight.html

@@ -89,12 +89,6 @@
 		
 		
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-		`الوضع الافتراضي` - عندما تكون المسافة صفرًا ، لا يتلاشى الضوء. عندما
-		تكون المسافة غير صفرية ، سيتلاشى الضوء بشكل خطي من أقصى شدة
-		عند موقع الضوء إلى الصفر على هذه المسافة من الضوء.
-		</p>
-		<p>
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode] -
 		عندما تكون المسافة صفرًا ، سيتلاشى الضوء وفقًا لقانون المربع المعكوس
 		عندما تكون المسافة صفرًا ، سيتلاشى الضوء وفقًا لقانون المربع المعكوس
 		إلى مسافة لانهائية. عندما تكون المسافة غير صفرية ، سيتلاشى الضوء
 		إلى مسافة لانهائية. عندما تكون المسافة غير صفرية ، سيتلاشى الضوء
 		وفقًا لقانون المربع المعكوس حتى قرب نقطة قطع المسافة ، حيث
 		وفقًا لقانون المربع المعكوس حتى قرب نقطة قطع المسافة ، حيث
@@ -105,9 +99,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
 		شدة الضوء. القيمة الافتراضية هي `1`.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
-		الشدة هى شدة إضاءة الضوء المقاسة بالشمعات
-		(cd).<br /><br />
+		الشدة هى شدة إضاءة الضوء المقاسة بالشمعات(cd).<br /><br />
 		تغيير الشدة سيغير أيضًا قوة الضوء.
 		تغيير الشدة سيغير أيضًا قوة الضوء.
 		</p>
 		</p>
 		
 		
@@ -129,9 +121,7 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 		قوة الضوء.<br />
 		قوة الضوء.<br />
-		عندما يتم تعطيل [page:WebGLRenderer.useLegacyLights legacy lighting mode]،
-		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).
-		<br /><br />
+		الطاقة هي قوة إضاءة الضوء المقاسة باللومن (lm).<br /><br />
 		تغيير الطاقة سيغير أيضًا شدة الضوء.
 		تغيير الطاقة سيغير أيضًا شدة الضوء.
 		</p>
 		</p>
 		
 		

+ 0 - 3
docs/api/ar/renderers/WebGLRenderer.html

@@ -256,9 +256,6 @@
 		الافتراضي هو `false`.
 		الافتراضي هو `false`.
 		</p>
 		</p>
 	 
 	 
-		<h3>[property:Boolean useLegacyLights]</h3>
-		<p>هل تستخدم وضع الإضاءة التقليدي أم لا. الافتراضي هو `true`.</p>
-	 
 		<h3>[property:Object properties]</h3>
 		<h3>[property:Object properties]</h3>
 		<p>
 		<p>
 		يستخدم داخليًا من قبل المُعالج لتتبع خصائص الكائنات الفرعية المختلفة
 		يستخدم داخليًا من قبل المُعالج لتتبع خصائص الكائنات الفرعية المختلفة

+ 80 - 0
docs/api/ar/scenes/Fog.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>[name]</h1>
+
+		<p class="desc">
+		تحتوي هذه الفئة على المعلمات التي تحدد الضباب الخطي ، أي
+		ينمو بشكل خطي أكثر كثافة مع المسافة.
+		</p>
+		 
+		<h2>مثال للكود</h2>
+		 
+		<code>
+		const scene = new THREE.Scene();
+		scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
+		</code>
+		 
+		<h2>المنشئ (Constructor)</h2>
+		 
+		<h3>
+		[name]( [param:Integer color], [param:Float near], [param:Float far] )
+		</h3>
+		<p>
+		يتم تمرير معلمة اللون إلى [page:Color] المنشئ لتعيين
+		خاصية اللون. يمكن أن يكون اللون عددًا صحيحًا سداسي عشريًا أو سلسلة على طراز CSS.
+		</p>
+		 
+		<h2>الخصائص (Properties)</h2>
+		 
+		<h3>[property:Boolean isFog]</h3>
+		<p>علامة للقراءة فقط للتحقق مما إذا كان كائنًا معطىً من نوع [name].</p>
+		 
+		<h3>[property:String name]</h3>
+		<p>
+		اسم اختياري للكائن (لا يحتاج إلى أن يكون فريدًا). الافتراضي هو
+		سلسلة فارغة.
+		</p>
+		 
+		<h3>[property:Color color]</h3>
+		<p>
+		لون الضباب. مثال: إذا تم تعيينه على الأسود ، سيتم عرض الأشياء البعيدة
+		أسود.
+		</p>
+		 
+		<h3>[property:Float near]</h3>
+		<p>
+		المسافة الدنيا لبدء تطبيق الضباب. الأشياء التي هي أقل من
+		'near' units from the active camera won't be affected by fog.
+		</p>
+		<p>الافتراضي هو `1`.</p>
+		 
+		<h3>[property:Float far]</h3>
+		<p>
+		المسافة القصوى التي يتوقف فيها حساب وتطبيق الضباب.
+		الأشياء التي تبعد أكثر من 'far' units away from the active camera won't
+		يتأثر بالضباب.
+		</p>
+		<p>الافتراضي هو `1000`.</p>
+		 
+		<h2>الطرق (Methods)</h2>
+		 
+		<h3>[method:Fog clone]()</h3>
+		<p>يرجع مثيل ضباب جديد بنفس المعلمات كهذا.</p>
+		 
+		<h3>[method:Object toJSON]()</h3>
+		<p>إرجاع بيانات الضباب في تنسيق JSON.</p>
+
+		<h2>المصدر (Source)</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 68 - 0
docs/api/ar/scenes/FogExp2.html

@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>[name]</h1>
+
+		<p class="desc">
+		تحتوي هذه الفئة على المعلمات التي تحدد الضباب المربع الأسي ،
+		الذي يعطي رؤية واضحة بالقرب من الكاميرا وأسرع من الضباب المتزايد بشكل أسي
+		بعيدًا عن الكاميرا.
+		</p>
+		 
+		<h2>مثال للكود</h2>
+		 
+		<code>
+		const scene = new THREE.Scene();
+		scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
+		</code>
+		 
+		<h2>المنشئ (Constructor)</h2>
+		 
+		<h3>[name]( [param:Integer color], [param:Float density] )</h3>
+		 
+		<p>
+		يتم تمرير معلمة اللون إلى [page:Color] المنشئ لتعيين
+		خاصية اللون. يمكن أن يكون اللون عددًا صحيحًا سداسي عشريًا أو سلسلة على طراز CSS.
+		</p>
+		<h2>الخصائص (Properties)</h2>
+		 
+		<h3>[property:Boolean isFogExp2]</h3>
+		<p>علامة للقراءة فقط للتحقق مما إذا كان كائنًا معطىً من نوع [name].</p>
+		 
+		<h3>[property:String name]</h3>
+		<p>
+		اسم اختياري للكائن (لا يحتاج إلى أن يكون فريدًا). الافتراضي هو
+		سلسلة فارغة.
+		</p>
+		 
+		<h3>[property:Color color]</h3>
+		<p>
+		لون الضباب. مثال: إذا تم تعيينه على الأسود ، سيتم عرض الأشياء البعيدة
+		أسود.
+		</p>
+		 
+		<h3>[property:Float density]</h3>
+		<p>يحدد مدى سرعة نمو الضباب.</p>
+		<p>الافتراضي هو `0.00025`.</p>
+		 
+		<h2>الطرق (Methods)</h2>
+		 
+		<h3>[method:FogExp2 clone]()</h3>
+		<p>يرجع مثيل FogExp2 جديد بنفس المعلمات كهذا.</p>
+		 
+		<h3>[method:Object toJSON]()</h3>
+		<p>إرجاع بيانات FogExp2 في تنسيق JSON.</p>
+		 
+		<h2>المصدر (Source)</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 92 - 0
docs/api/ar/scenes/Scene.html

@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		[page:Object3D] &rarr;
+		<h1>[name]</h1>
+
+		<p class="desc">
+		تسمح لك المشاهد بتحديد ما وأين يتم تجسيده بواسطة three.js.
+		هذا هو المكان الذي تضع فيه الأشياء والأضواء والكاميرات.
+		</p>
+		 
+		<h2>المنشئ (Constructor)</h2>
+		 
+		<h3>[name]()</h3>
+		<p>إنشاء كائن مشهد جديد.</p>
+		 
+		<h2>الخصائص (Properties)</h2>
+		 
+		<h3>[property:Object background]</h3>
+		<p>
+		يحدد خلفية المشهد. الافتراضي هو `null`. المدخلات الصالحة هي:
+		</p>
+		<ul>
+			<li>[page:Color] لتحديد خلفية ملونة موحدة.</li>
+			<li>[page:Texture] لتحديد خلفية ملمس (مسطح).</li>
+			<li>
+			مكعبات القوام ([page:CubeTexture]) أو القوام المستطيلة لـ
+			تحديد صندوق سماء.
+			</li>
+		</ul>
+		ملاحظة: يتم تجاهل أي تكوينات ذات صلة بالكاميرا مثل `zoom` أو `view`.
+		 
+		<h3>[property:Float backgroundBlurriness]</h3>
+		<p>
+		يحدد ضبابية الخلفية. يؤثر فقط على خرائط البيئة
+		المعينة إلى [page:Scene.background]. الإدخال الصالح هو عدد عشري بين `0`
+		و `1`. الافتراضي هو `0`.
+		</p>
+	 
+		<h3>[property:Float backgroundIntensity]</h3>
+		<p>
+		يضعف لون الخلفية. ينطبق فقط على خلفية
+		الملمس. الافتراضي هو `1`.
+		</p>
+	 
+		<h3>[property:Texture environment]</h3>
+		<p>
+		يحدد خريطة البيئة لجميع المواد الفعلية في المشهد. ومع ذلك ،
+		ليس من الممكن الكتابة فوق نسيج موجود معين إلى
+		[page:MeshStandardMaterial.envMap]. الافتراضي هو `null`.
+		</p>
+	 
+		<h3>[property:Fog fog]</h3>
+	 
+		<p>
+		مثيل [page:Fog fog] يحدد نوع الضباب الذي يؤثر على كل شيء
+		تم تجسيده في المشهد. الافتراضي هو `null`.
+		</p>
+	 
+		<h3>[property:Boolean isScene]</h3>
+		<p>علامة للقراءة فقط للتحقق مما إذا كان كائنًا معطىً من نوع [name].</p>
+	 
+		<h3>[property:Material overrideMaterial]</h3>
+	 
+		<p>
+		يجبر كل شيء في المشهد على التجسيم باستخدام المادة المحددة.
+		الافتراضي هو `null`.
+		</p>
+	 
+		<h2>الطرق (Methods)</h2>
+	 
+		<h3>[method:Object toJSON]( [param:Object meta] )</h3>
+		<p>
+		meta - كائن يحتوي على بيانات تعريفية مثل الملمس أو الصور لـ
+		scene. <br />
+		قم بتحويل المشهد إلى three.js
+		[link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
+		</p>
+	 
+		<h2>المصدر (Source)</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 9 - 6
docs/api/en/core/BufferAttribute.html

@@ -56,11 +56,8 @@
 
 
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
-			Stores the [page:BufferAttribute.array array]'s length divided by the
-			[page:BufferAttribute.itemSize itemSize].<br /><br />
-
-			If the buffer is storing a 3-component vector (such as a position, normal,
-			or color), then this will count the number of such vectors stored.
+			Represents the number of items this buffer attribute stores. It is internally computed by dividing the [page:BufferAttribute.array array]'s length by the
+			[page:BufferAttribute.itemSize itemSize]. Read-only property.
 		</p>
 		</p>
 
 
 		<h3>[property:Number gpuType]</h3>
 		<h3>[property:Number gpuType]</h3>
@@ -176,6 +173,9 @@
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] )</h3>
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] )</h3>
 		<p>Copy a vector from bufferAttribute[index2] to [page:BufferAttribute.array array][index1].</p>
 		<p>Copy a vector from bufferAttribute[index2] to [page:BufferAttribute.array array][index1].</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]( [param:Integer index] )</h3>
 		<h3>[method:Number getX]( [param:Integer index] )</h3>
 		<p>Returns the x component of the vector at the given index.</p>
 		<p>Returns the x component of the vector at the given index.</p>
 
 
@@ -221,7 +221,10 @@
 			Instead, instantiate a new one and set the desired usage before the next
 			Instead, instantiate a new one and set the desired usage before the next
 			render.
 			render.
 		</p>
 		</p>
-
+		
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
+		
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] )</h3>
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] )</h3>
 		<p>Sets the x component of the vector at the given index.</p>
 		<p>Sets the x component of the vector at the given index.</p>
 
 

+ 1 - 1
docs/api/en/extras/core/ShapePath.html

@@ -11,7 +11,7 @@
 
 
 		<p class="desc">
 		<p class="desc">
 			This class is used to convert a series of shapes to an array of
 			This class is used to convert a series of shapes to an array of
-			[page:Path]s, for example an SVG shape to a path (see the example below).
+			[page:Path]s, for example an SVG shape to a path.
 		</p>
 		</p>
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>

+ 1 - 2
docs/api/en/lights/Light.html

@@ -40,8 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			The light's intensity, or strength.<br />
 			The light's intensity, or strength.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			the units of intensity depend on the type of light.<br />
+			Tthe units of intensity depend on the type of light.<br />
 			Default - `1.0`.
 			Default - `1.0`.
 		</p>
 		</p>
 
 

+ 3 - 13
docs/api/en/lights/PointLight.html

@@ -75,12 +75,6 @@ scene.add( light );
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-			`Default mode` — When distance is zero, light does not attenuate. When
-			distance is non-zero, light will attenuate linearly from maximum intensity
-			at the light's position down to zero at this distance from the light.
-		</p>
-		<p>
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled —
 			When distance is zero, light will attenuate according to inverse-square
 			When distance is zero, light will attenuate according to inverse-square
 			law to infinite distance. When distance is non-zero, light will attenuate
 			law to infinite distance. When distance is non-zero, light will attenuate
 			according to inverse-square law until near the distance cutoff, where it
 			according to inverse-square law until near the distance cutoff, where it
@@ -91,19 +85,15 @@ scene.add( light );
 
 
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
-			The light's intensity. Default is `1`.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			intensity is the luminous intensity of the light measured in candela
-			(cd).<br /><br />
-
+			The light's luminous intensity measured in candela (cd). Default is `1`.
+			<br /><br />
 			Changing the intensity will also change the light's power.
 			Changing the intensity will also change the light's power.
 		</p>
 		</p>
 
 
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			The light's power.<br />
 			The light's power.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			power is the luminous power of the light measured in lumens (lm).
+			Power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 			<br /><br />
 
 
 			Changing the power will also change the light's intensity.
 			Changing the power will also change the light's intensity.

+ 3 - 6
docs/api/en/lights/RectAreaLight.html

@@ -73,10 +73,8 @@ rectLight.add( rectLightHelper );
 
 
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
-			The light's intensity. Default is `1`.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			intensity is the luminance (brightness) of the light measured in nits
-			(cd/m^2).<br /><br />
+			The light's intensity. It is the luminance (brightness) of the light measured in nits (cd/m^2). 
+			Default is `1`. <br /><br />
 
 
 			Changing the intensity will also change the light's power.
 			Changing the intensity will also change the light's power.
 		</p>
 		</p>
@@ -87,8 +85,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			The light's power.<br />
 			The light's power.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			power is the luminous power of the light measured in lumens (lm).
+			Power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 			<br /><br />
 
 
 			Changing the power will also change the light's intensity.
 			Changing the power will also change the light's intensity.

+ 3 - 12
docs/api/en/lights/SpotLight.html

@@ -90,12 +90,6 @@
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-			`Default mode` — When distance is zero, light does not attenuate. When
-			distance is non-zero, light will attenuate linearly from maximum intensity
-			at the light's position down to zero at this distance from the light.
-		</p>
-		<p>
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled —
 			When distance is zero, light will attenuate according to inverse-square
 			When distance is zero, light will attenuate according to inverse-square
 			law to infinite distance. When distance is non-zero, light will attenuate
 			law to infinite distance. When distance is non-zero, light will attenuate
 			according to inverse-square law until near the distance cutoff, where it
 			according to inverse-square law until near the distance cutoff, where it
@@ -106,10 +100,8 @@
 
 
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
-			The light's intensity. Default is `1`.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			intensity is the luminous intensity of the light measured in candela
-			(cd).<br /><br />
+			The light's luminous intensity measured in candela (cd). Default is `1`.
+			<br /><br />
 			Changing the intensity will also change the light's power.
 			Changing the intensity will also change the light's power.
 		</p>
 		</p>
 
 
@@ -131,8 +123,7 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			The light's power.<br />
 			The light's power.<br />
-			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
-			power is the luminous power of the light measured in lumens (lm).
+			Power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 			<br /><br />
 			Changing the power will also change the light's intensity.
 			Changing the power will also change the light's intensity.
 		</p>
 		</p>

+ 0 - 3
docs/api/en/renderers/WebGLRenderer.html

@@ -254,9 +254,6 @@ document.body.appendChild( renderer.domElement );
 			Default is `false`.
 			Default is `false`.
 		</p>
 		</p>
 
 
-		<h3>[property:Boolean useLegacyLights]</h3>
-		<p>Whether to use the legacy lighting mode or not. Default is `true`.</p>
-
 		<h3>[property:Object properties]</h3>
 		<h3>[property:Object properties]</h3>
 		<p>
 		<p>
 			Used internally by the renderer to keep track of various sub object
 			Used internally by the renderer to keep track of various sub object

+ 7 - 1
docs/api/fr/core/BufferAttribute.html

@@ -49,7 +49,7 @@
 
 
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
-		Stocke la longueur du tableau [page:BufferAttribute.array array] divisée par [page:BufferAttribute.itemSize itemSize].<br /><br />
+		Stocke la longueur du tableau [page:BufferAttribute.array array] divisée par [page:BufferAttribute.itemSize itemSize]. Read-only property.<br /><br />
 
 
 		Si le tampon stocke un vecteur à 3 composants (tel qu'une position, une normale ou une couleur),
 		Si le tampon stocke un vecteur à 3 composants (tel qu'une position, une normale ou une couleur),
 		cela comptera alors le nombre de ces vecteurs stockés.
 		cela comptera alors le nombre de ces vecteurs stockés.
@@ -146,6 +146,9 @@
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<p>Copie un vecteur de bufferAttribute[index2] à [page:BufferAttribute.array array][index1].</p>
 		<p>Copie un vecteur de bufferAttribute[index2] à [page:BufferAttribute.array array][index1].</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<p>Renvoie le composant x d'un vecteur à l'index donné.</p>
 		<p>Renvoie le composant x d'un vecteur à l'index donné.</p>
 
 
@@ -185,6 +188,9 @@
 			Remarque : Après la première utilisation d'un tampon, son utilisation ne peut pas être modifiée. Au lieu de cela, instanciez-en un nouveau et définissez l'utilisation souhaitée avant le prochain rendu.
 			Remarque : Après la première utilisation d'un tampon, son utilisation ne peut pas être modifiée. Au lieu de cela, instanciez-en un nouveau et définissez l'utilisation souhaitée avant le prochain rendu.
 		</p>
 		</p>
 
 
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
+
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<p>Définit la composante x du vecteur à l'indice donné.</p>
 		<p>Définit la composante x du vecteur à l'indice donné.</p>
 
 

+ 7 - 1
docs/api/it/core/BufferAttribute.html

@@ -47,7 +47,7 @@
 
 
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
-      Memorizza la lunghezza dell'[page:BufferAttribute.array array] divisa per [page:BufferAttribute.itemSize itemSize].<br /><br />
+      Memorizza la lunghezza dell'[page:BufferAttribute.array array] divisa per [page:BufferAttribute.itemSize itemSize]. Read-only property.<br /><br />
 
 
       Se il buffer memorizza un vettore a 3 componenti (come una posizione, una normale o un colore),
       Se il buffer memorizza un vettore a 3 componenti (come una posizione, una normale o un colore),
       questo conterà il numero dei vettori memorizzati.
       questo conterà il numero dei vettori memorizzati.
@@ -160,6 +160,9 @@
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<p>Copia un vettore da bufferAttribute[index2] a [page:BufferAttribute.array array][index1].</p>
 		<p>Copia un vettore da bufferAttribute[index2] a [page:BufferAttribute.array array][index1].</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<p>Restituisce il componente x del vettore in corrispondenza dell'indice specificato.</p>
 		<p>Restituisce il componente x del vettore in corrispondenza dell'indice specificato.</p>
 
 
@@ -198,6 +201,9 @@
       Nota: Dopo l'utilizzo iniziale di un buffer, il suo utilizzo non può cambiare. Invece, istanziane uno nuovo e 
       Nota: Dopo l'utilizzo iniziale di un buffer, il suo utilizzo non può cambiare. Invece, istanziane uno nuovo e 
       imposta l'utilizzo desiderato prima del rendering successivo.
       imposta l'utilizzo desiderato prima del rendering successivo.
 		</p>
 		</p>
+		
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
 
 
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<p>Imposta il componente x del vettore in corrispondenza dell'indice specificato.</p>
 		<p>Imposta il componente x del vettore in corrispondenza dell'indice specificato.</p>

+ 1 - 1
docs/api/it/extras/core/ShapePath.html

@@ -11,7 +11,7 @@
 
 
 		<p class="desc">
 		<p class="desc">
       Questa classe viene utilizzata per convertire una serie di forme in un array di [page:Path], ad esempio una 
       Questa classe viene utilizzata per convertire una serie di forme in un array di [page:Path], ad esempio una 
-      forma SVG in un path (vedere l'esempio seguente).
+      forma SVG in un path.
 		</p>
 		</p>
 
 
 		<h2>Costruttore</h2>
 		<h2>Costruttore</h2>

+ 1 - 1
docs/api/it/lights/Light.html

@@ -40,7 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
       L'intensità o la forza della luce.<br />
       L'intensità o la forza della luce.<br />
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, le unità di intensità dipendono dal tipo di luce.<br />
+      Le unità di intensità dipendono dal tipo di luce.<br />
 			Il valore predefinito è `1.0`.
 			Il valore predefinito è `1.0`.
 		</p>
 		</p>
 
 

+ 6 - 14
docs/api/it/lights/PointLight.html

@@ -68,16 +68,10 @@ scene.add( light );
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-			`Modalità predefinita` — Quando la distanza è zero, la luce non si attenua. Quando la distanza è diversa da zero,
-      la luce si attenuerà linearmente dalla massima intensità nella posizione della luce fino a zero a questa distanza 
-      dalla luce.
-		</p>
-		<p>
-			Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata — Quando la distanza è
-      zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
-      Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
-      fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e senza intoppi fino a 0.
-      Intrinsecamente, i limiti non sono fisicamente corretti.
+			Quando la distanza è zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
+			Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
+			fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e senza intoppi fino a 0.
+			Intrinsecamente, i limiti non sono fisicamente corretti.
 		</p>
 		</p>
 		<p>
 		<p>
 			Il valore predefinito è `0.0`.
 			Il valore predefinito è `0.0`.
@@ -86,8 +80,7 @@ scene.add( light );
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
       L'intensità della luce. Il valore predefinito è `1`.<br />
       L'intensità della luce. Il valore predefinito è `1`.<br />
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intensità 
-      è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
+      L'intensità è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
 
 
       Modificando l'intensità si modificherà anche la potenza della luce.
       Modificando l'intensità si modificherà anche la potenza della luce.
 		</p>
 		</p>
@@ -95,8 +88,7 @@ scene.add( light );
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
       La potenza della luce.<br />
       La potenza della luce.<br />
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
-      della luminosità della luce misurata in lumen (lm).<br /><br />
+      La potenza è la potenza della luminosità della luce misurata in lumen (lm).<br /><br />
 
 
       Modificando la potenza si modificherà anche l'intensità della luce.
       Modificando la potenza si modificherà anche l'intensità della luce.
 		</p>
 		</p>

+ 2 - 4
docs/api/it/lights/RectAreaLight.html

@@ -70,8 +70,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
       L'intensità della luce. Il valore predefinito è `1`.<br />
       L'intensità della luce. Il valore predefinito è `1`.<br />
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intesità è la luminanza
-      (luminosità) della luce misurata in nits (cd/m^2).<br /><br />
+      L'intesità è la luminanza (luminosità) della luce misurata in nits (cd/m^2).<br /><br />
 
 
       Modificando l'intensità si modificherà anche la potenza della luce.
       Modificando l'intensità si modificherà anche la potenza della luce.
 		</p>
 		</p>
@@ -84,8 +83,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
       La potenza della luce.<br />
       La potenza della luce.<br />
-	  Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
-      della luminosità della luce misurata in lumen (lm).<br /><br />
+      La potenza è la potenza della luminosità della luce misurata in lumen (lm).<br /><br />
 
 
       Modificando la potenza si modificherà anche l'intensità della luce.
       Modificando la potenza si modificherà anche l'intensità della luce.
 		</p>
 		</p>

+ 3 - 11
docs/api/it/lights/SpotLight.html

@@ -88,13 +88,7 @@
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-      `Modalità predefinita` — Quando la distanza è zero, la luce non si attenua. Quando la distanza è diversa da zero,
-      la luce si attenuerà linearmente dalla massima intensità nella posizione della luce fino a zero a questa distanza 
-      dalla luce.
-		</p>
-		<p>
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata — Quando la distanza è
-      zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
+      Quando la distanza è zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
       Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
       Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
       fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e uniformemente fino a `0`.
       fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e uniformemente fino a `0`.
       Intrinsecamente, i limiti non sono fisicamente corretti.
       Intrinsecamente, i limiti non sono fisicamente corretti.
@@ -106,8 +100,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			L'intensità della luce. Il valore predefinito è `1`.<br />
 			L'intensità della luce. Il valore predefinito è `1`.<br />
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intensità 
-      è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
+      L'intensità è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
 
 
       Modificando l'intensità si modificherà anche la potenza della luce.
       Modificando l'intensità si modificherà anche la potenza della luce.
 		</p>
 		</p>
@@ -132,8 +125,7 @@
 		<p>
 		<p>
       La potenza della luce. <br />
       La potenza della luce. <br />
 
 
-      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
-      della luminosità della luce misurata in lumen (lm).<br /><br />
+      La potenza è la potenza della luminosità della luce misurata in lumen (lm).<br /><br />
 
 
       Modificando la potenza si modificherà anche l'intensità della luce.
       Modificando la potenza si modificherà anche l'intensità della luce.
 		</p>
 		</p>

+ 0 - 5
docs/api/it/renderers/WebGLRenderer.html

@@ -223,11 +223,6 @@
 		<h3>[property:Boolean localClippingEnabled]</h3>
 		<h3>[property:Boolean localClippingEnabled]</h3>
 		<p>Definisce se il render rispetta i piani di taglio a livello di oggetto. Il valore predefinito è `false`.</p>
 		<p>Definisce se il render rispetta i piani di taglio a livello di oggetto. Il valore predefinito è `false`.</p>
 
 
-		<h3>[property:Boolean useLegacyLights]</h3>
-		<p>
-		Whether to use the legacy lighting mode or not. Il valore predefinito è `true`.
-		</p>
-
 		<h3>[property:Object properties]</h3>
 		<h3>[property:Object properties]</h3>
 		<p>
 		<p>
 			Utilizzato internamente dal renderer per mantenere traccia delle proprietà dei vari oggetti secondari.
 			Utilizzato internamente dal renderer per mantenere traccia delle proprietà dei vari oggetti secondari.

+ 7 - 1
docs/api/ko/core/BufferAttribute.html

@@ -53,7 +53,7 @@
 
 
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
-		[page:BufferAttribute.itemSize itemSize]로 나눈 [page:BufferAttribute.array array]의 길이를 저장.<br /><br />
+		[page:BufferAttribute.itemSize itemSize]로 나눈 [page:BufferAttribute.array array]의 길이를 저장. Read-only property.<br /><br />
 
 
 		버퍼가 3개의 컴포넌트를 저장한 벡터(위치, 법선, 색 등)
 		버퍼가 3개의 컴포넌트를 저장한 벡터(위치, 법선, 색 등)
 		저장된 벡터들의 수를 계산합니다.
 		저장된 벡터들의 수를 계산합니다.
@@ -146,6 +146,9 @@
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<p>bufferAttribute[index2]의 벡터를 [page:BufferAttribute.array array][index1]에 복사합니다.</p>
 		<p>bufferAttribute[index2]의 벡터를 [page:BufferAttribute.array array][index1]에 복사합니다.</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<p>해당 index의 벡터의 x 컴포넌트 값을 리턴합니다.</p>
 		<p>해당 index의 벡터의 x 컴포넌트 값을 리턴합니다.</p>
 
 
@@ -179,6 +182,9 @@
 		<h3>[method:this setUsage] ( [param:Usage value] ) </h3>
 		<h3>[method:this setUsage] ( [param:Usage value] ) </h3>
 		<p>[page:BufferAttribute.usage usage]를 value로 설정합니다.</p>
 		<p>[page:BufferAttribute.usage usage]를 value로 설정합니다.</p>
 
 
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
+
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<p> x 컴포넌트 값을 설정합니다.</p>
 		<p> x 컴포넌트 값을 설정합니다.</p>
 
 

+ 7 - 1
docs/api/zh/core/BufferAttribute.html

@@ -51,7 +51,7 @@
 
 
 		<h3>[property:Integer count]</h3>
 		<h3>[property:Integer count]</h3>
 		<p>
 		<p>
-			保存 [page:BufferAttribute.array array] 除以 [page:BufferAttribute.itemSize itemSize] 之后的大小。<br /><br />
+			保存 [page:BufferAttribute.array array] 除以 [page:BufferAttribute.itemSize itemSize] 之后的大小。Read-only property.<br /><br />
 
 
 			若缓存存储三元组(例如顶点位置、法向量、颜色值),则该值应等于队列中三元组的个数。
 			若缓存存储三元组(例如顶点位置、法向量、颜色值),则该值应等于队列中三元组的个数。
 		</p>
 		</p>
@@ -135,6 +135,9 @@
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<h3>[method:this copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
 		<p>将一个矢量从 bufferAttribute[index2] 拷贝到 [page:BufferAttribute.array array][index1] 中。</p>
 		<p>将一个矢量从 bufferAttribute[index2] 拷贝到 [page:BufferAttribute.array array][index1] 中。</p>
 
 
+		<h3>[method:Number getComponent]( [param:Integer index], [param:Integer component] ) </h3>
+		<p>Returns the given component of the vector at the given index.</p>
+
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<h3>[method:Number getX]( [param:Integer index] ) </h3>
 		<p>获取给定索引的矢量的第一维元素 (即 X 值)。</p>
 		<p>获取给定索引的矢量的第一维元素 (即 X 值)。</p>
 
 
@@ -166,6 +169,9 @@
 		<h3>[method:this setUsage] ( [param:Usage value] ) </h3>
 		<h3>[method:this setUsage] ( [param:Usage value] ) </h3>
 		<p>Set [page:BufferAttribute.usage usage] to value. See usage [page:BufferAttributeUsage constants] for all possible input values.</p>
 		<p>Set [page:BufferAttribute.usage usage] to value. See usage [page:BufferAttributeUsage constants] for all possible input values.</p>
 
 
+		<h3>[method:Number setComponent]( [param:Integer index], [param:Integer component], [param:Float value] ) </h3>
+		<p>Sets the given component of the vector at the given index.</p>
+
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<h3>[method:this setX]( [param:Integer index], [param:Float x] ) </h3>
 		<p>设置给定索引的矢量的第一维数据(设置 X 值)。</p>
 		<p>设置给定索引的矢量的第一维数据(设置 X 值)。</p>
 
 

+ 1 - 1
docs/api/zh/extras/core/ShapePath.html

@@ -10,7 +10,7 @@
 		<h1>形状路径([name])</h1>
 		<h1>形状路径([name])</h1>
 
 
 		<p class="desc">
 		<p class="desc">
-		该类用于转换一系列的形状为一个[page:Path]数组,例如转换SVG中的Path为three.js中的Path(请参阅下方的example)
+		该类用于转换一系列的形状为一个[page:Path]数组,例如转换SVG中的Path为three.js中的Path。
 		</p>
 		</p>
 
 
 		<h2>构造函数</h2>
 		<h2>构造函数</h2>

+ 1 - 1
docs/api/zh/lights/Light.html

@@ -40,7 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			光照的强度,或者说能量。<br />
 			光照的强度,或者说能量。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,强度的单位取决于光的类型。<br />
+			强度的单位取决于光的类型。<br />
 			默认值为 `1.0`。<br />
 			默认值为 `1.0`。<br />
 		</p>
 		</p>
 
 

+ 2 - 7
docs/api/zh/lights/PointLight.html

@@ -66,10 +66,6 @@
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-			默认模式下 — 当值为零时,光线不会衰减。当值不为零时,光线会从灯光的位置开始,到指定的距离之间,随着距离的增加线性衰减为零。
-		</p>
-		<p>
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下 —
 			当值为零时,光线将根据平方反比定律衰减到无限远。
 			当值为零时,光线将根据平方反比定律衰减到无限远。
 			当值不为零时,光线会先按照平方反比定律衰减,直到距离截止点附近,然后线性衰减到 0。
 			当值不为零时,光线会先按照平方反比定律衰减,直到距离截止点附近,然后线性衰减到 0。
 		</p>
 		</p>
@@ -78,15 +74,14 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			光源的强度。默认值为 `1`。<br />
 			光源的强度。默认值为 `1`。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位是坎德拉(cd)。<br /><br />
+			单位是坎德拉(cd)。<br /><br />
 			改变该值会影响到 `power` 的值。
 			改变该值会影响到 `power` 的值。
 		</p>
 		</p>
 
 
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			光源的功率。<br />
 			光源的功率。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位为流明(lm)。
-			<br /><br />
+			单位为流明(lm)。<br /><br />
 			改变该值会影响到 `intensity` 的值。
 			改变该值会影响到 `intensity` 的值。
 		</p>
 		</p>
 
 

+ 2 - 2
docs/api/zh/lights/RectAreaLight.html

@@ -67,7 +67,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			光源的强度。默认值为 `1`。<br />
 			光源的强度。默认值为 `1`。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位是尼特(cd/m^2)。<br /><br />
+			单位是尼特(cd/m^2)。<br /><br />
 
 
 			改变该值会影响到 `power` 的值。
 			改变该值会影响到 `power` 的值。
 		</p>
 		</p>
@@ -80,7 +80,7 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			光源的功率。<br />
 			光源的功率。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位为流明(lm)。<br /><br />
+			单位为流明(lm)。<br /><br />
 
 
 			改变该值会影响到 `intensity` 的值。
 			改变该值会影响到 `intensity` 的值。
 		</p>
 		</p>

+ 2 - 7
docs/api/zh/lights/SpotLight.html

@@ -84,10 +84,6 @@
 
 
 		<h3>[property:Float distance]</h3>
 		<h3>[property:Float distance]</h3>
 		<p>
 		<p>
-			默认模式下 — 当值为零时,光线不会衰减。当值不为零时,光线会从灯光的位置开始,到指定的距离之间,随着距离的增加线性衰减为零。
-		</p>
-		<p>
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下 —
 			当值为零时,光线将根据平方反比定律衰减到无限远。
 			当值为零时,光线将根据平方反比定律衰减到无限远。
 			当值不为零时,光线会先按照平方反比定律衰减,直到距离截止点附近,然后线性衰减到 0。
 			当值不为零时,光线会先按照平方反比定律衰减,直到距离截止点附近,然后线性衰减到 0。
 		</p>
 		</p>
@@ -96,7 +92,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<p>
 		<p>
 			光源的强度。默认值为 `1`。<br />
 			光源的强度。默认值为 `1`。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位是坎德拉(cd)。<br /><br />
+			单位是坎德拉(cd)。<br /><br />
 			改变该值会影响到 `power` 的值。
 			改变该值会影响到 `power` 的值。
 		</p>
 		</p>
 
 
@@ -118,8 +114,7 @@
 		<h3>[property:Float power]</h3>
 		<h3>[property:Float power]</h3>
 		<p>
 		<p>
 			光源的功率。<br />
 			光源的功率。<br />
-			禁用 [page:WebGLRenderer.useLegacyLights legacy lighting mode] 的情况下,单位为流明(lm)。
-			<br /><br />
+			单位为流明(lm)。<br /><br />
 			改变该值会影响到 `intensity` 的值。
 			改变该值会影响到 `intensity` 的值。
 		</p>
 		</p>
 
 

+ 0 - 5
docs/api/zh/renderers/WebGLRenderer.html

@@ -192,11 +192,6 @@
 		<h3>[property:Boolean localClippingEnabled]</h3>
 		<h3>[property:Boolean localClippingEnabled]</h3>
 		<p>定义渲染器是否考虑对象级剪切平面。 默认为*false*.</p>
 		<p>定义渲染器是否考虑对象级剪切平面。 默认为*false*.</p>
 
 
-		<h3>[property:Boolean useLegacyLights]</h3>
-		<p>
-		Whether to use the legacy lighting mode or not. 默认是*true*。
-		</p>
-
 		<h3>[property:Object properties]</h3>
 		<h3>[property:Object properties]</h3>
 		<p>
 		<p>
 		渲染器内部使用,以跟踪各种子对象属性。
 		渲染器内部使用,以跟踪各种子对象属性。

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

@@ -273,7 +273,10 @@ controls.touches = {
 			Speed of zooming / dollying. Default is 1.
 			Speed of zooming / dollying. Default is 1.
 		</p>
 		</p>
 
 
-
+		<h3>[property:Boolean zoomToCursor]</h3>
+		<p>
+		Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
+		</p>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 

+ 5 - 0
docs/examples/en/controls/TrackballControls.html

@@ -171,6 +171,11 @@
 			Whether or not damping is disabled. Default is `false`.
 			Whether or not damping is disabled. Default is `false`.
 		</p>
 		</p>
 
 
+		<h3>[property:Vector3 target]</h3>
+		<p>
+			The focus point of the controls.
+		</p>
+
 		<h3>[property:Number zoomSpeed]</h3>
 		<h3>[property:Number zoomSpeed]</h3>
 		<p>
 		<p>
 			The zoom speed. Default is `1.2`.
 			The zoom speed. Default is `1.2`.

+ 0 - 4
docs/examples/en/loaders/GLTFLoader.html

@@ -70,10 +70,6 @@
 			<li>[link:https://github.com/takahirox/three-gltf-extensions MSFT_texture_dds]</li>
 			<li>[link:https://github.com/takahirox/three-gltf-extensions MSFT_texture_dds]</li>
 		</ul>
 		</ul>
 
 
-		<p><i>
-			<sup>1</sup>Requires [link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.useLegacyLights useLegacyLights] to be disabled.
-		</i></p>
-
 		<p><i>
 		<p><i>
 			<sup>2</sup>You can also manually process the extension after loading in your application. See [link:https://threejs.org/examples/#webgl_loader_gltf_variants Three.js glTF materials variants example].
 			<sup>2</sup>You can also manually process the extension after loading in your application. See [link:https://threejs.org/examples/#webgl_loader_gltf_variants Three.js glTF materials variants example].
 		</i></p>
 		</i></p>

+ 11 - 3
docs/examples/en/utils/BufferGeometryUtils.html

@@ -122,11 +122,19 @@
 		</p>
 		</p>
 
 
 		<h3>[method:BufferGeometry toCreasedNormals]( [param:BufferGeometry geometry], [param:Number creaseAngle] )</h3>
 		<h3>[method:BufferGeometry toCreasedNormals]( [param:BufferGeometry geometry], [param:Number creaseAngle] )</h3>
+		<ul>
+			<li>geometry -- The input geometry.</li>
+			<li>creaseAngle -- The crease angle in radians.</li>
+		</ul>
+
 		<p>
 		<p>
-		geometry -- The input geometry. <br />
-		creaseAngle -- The crease angle. <br /><br />
+		Modifies the supplied geometry if it is non-indexed, otherwise creates a new,
+		non-indexed geometry.
+		</p>
 
 
-		Creates a new, non-indexed geometry with smooth normals everywhere except faces that meet at an angle greater than the crease angle.
+		<p>
+		Returns the geometry with smooth normals everywhere except faces
+		that meet at an angle greater than the crease angle.
 		</p>
 		</p>
 
 
 		<h3>[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )</h3>
 		<h3>[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )</h3>

+ 4 - 1
docs/examples/ko/controls/OrbitControls.html

@@ -269,7 +269,10 @@ controls.touches = {
 			줌잉(Zooming)과 달링(Dollying)의 속도를 설정합니다. 기본값은 1 입니다.
 			줌잉(Zooming)과 달링(Dollying)의 속도를 설정합니다. 기본값은 1 입니다.
 		</p>
 		</p>
 
 
-
+		<h3>[property:Boolean zoomToCursor]</h3>
+		<p>
+		Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
+		</p>
 
 
 		<h2>메서드</h2>
 		<h2>메서드</h2>
 
 

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

@@ -272,7 +272,10 @@ controls.touches = {
 			摄像机缩放的速度,其默认值为1。
 			摄像机缩放的速度,其默认值为1。
 		</p>
 		</p>
 
 
-
+		<h3>[property:Boolean zoomToCursor]</h3>
+		<p>
+		Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
+		</p>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 

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

@@ -69,9 +69,6 @@
 			<li>[link:https://github.com/takahirox/three-gltf-extensions MSFT_texture_dds]</li>
 			<li>[link:https://github.com/takahirox/three-gltf-extensions MSFT_texture_dds]</li>
 		</ul>
 		</ul>
 
 
-		<p><i>
-			<sup>1</sup>Requires [link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.useLegacyLights useLegacyLights] to be disabled.
-		</i></p>
 		<p><i>
 		<p><i>
 			<sup>2</sup>支持UV变换,但存在一些重要的限制。
 			<sup>2</sup>支持UV变换,但存在一些重要的限制。
 			Transforms applied to
 			Transforms applied to

+ 10 - 3
docs/examples/zh/utils/BufferGeometryUtils.html

@@ -120,12 +120,19 @@
 		</p>
 		</p>
 
 
 		<h3>[method:BufferGeometry toCreasedNormals]( [param:BufferGeometry geometry], [param:Number creaseAngle] )</h3>
 		<h3>[method:BufferGeometry toCreasedNormals]( [param:BufferGeometry geometry], [param:Number creaseAngle] )</h3>
+		<ul>
+			<li>geometry -- The input geometry.</li>
+			<li>creaseAngle -- The crease angle in radians.</li>
+		</ul>
+
 		<p>
 		<p>
-			geometry -- The input geometry. <br />
-			creaseAngle -- The crease angle.
+			Modifies the supplied geometry if it is non-indexed, otherwise creates a new,
+			non-indexed geometry.
 		</p>
 		</p>
+
 		<p>
 		<p>
-		Creates a new, non-indexed geometry with smooth normals everywhere except faces that meet at an angle greater than the crease angle.
+			Returns the geometry with smooth normals everywhere except faces
+			that meet at an angle greater than the crease angle.
 		</p>
 		</p>
 
 
 		<h3>[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )</h3>
 		<h3>[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry], [param:TrianglesDrawMode drawMode] )</h3>

+ 6 - 0
docs/list.json

@@ -730,6 +730,12 @@
 
 
 			"Renderers / WebXR": {
 			"Renderers / WebXR": {
 				"WebXRManager": "api/ar/renderers/webxr/WebXRManager"
 				"WebXRManager": "api/ar/renderers/webxr/WebXRManager"
+			},
+
+			"Scenes": {
+				"Fog": "api/ar/scenes/Fog",
+				"FogExp2": "api/ar/scenes/FogExp2",
+				"Scene": "api/ar/scenes/Scene"
 			}
 			}
 
 
 		}
 		}

+ 4 - 2
docs/manual/en/introduction/How-to-dispose-of-objects.html

@@ -99,8 +99,10 @@
 	<h3>What happens when I call `dispose()` and then use the respective object at a later point?</h3>
 	<h3>What happens when I call `dispose()` and then use the respective object at a later point?</h3>
 
 
 	<p>
 	<p>
-		The deleted internal resources will be created again by the engine. So no runtime error will occur but you might notice a negative performance impact for the current frame,
-		especially when shader programs have to be compiled.
+		That depends. For geometries, materials, textures, render targets and post processing passes the deleted internal resources can be created again by the engine. 
+		So no runtime error will occur but you might notice a negative performance impact for the current frame, especially when shader programs have to be compiled.
+
+		Controls and renderers are an exception. Instances of these classes can not be used after `dispose()` has been called. You have to create new instances in this case.
 	</p>
 	</p>
 
 
 	<h3>How should I manage *three.js* objects in my app? When do I know how to dispose things?</h3>
 	<h3>How should I manage *three.js* objects in my app? When do I know how to dispose things?</h3>

+ 8 - 4
docs/manual/en/introduction/How-to-use-post-processing.html

@@ -31,6 +31,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -59,8 +60,8 @@
 		<p>
 		<p>
 			Our composer is now ready so it's possible to configure the chain of post-processing passes. These passes are responsible for creating
 			Our composer is now ready so it's possible to configure the chain of post-processing passes. These passes are responsible for creating
 			the final visual output of the application. They are processed in order of their addition/insertion. In our example, the instance of `RenderPass`
 			the final visual output of the application. They are processed in order of their addition/insertion. In our example, the instance of `RenderPass`
-			is executed first and then the instance of `GlitchPass`. The last enabled pass in the chain is automatically rendered to the screen. The setup
-			of the passes looks like so:
+			is executed first, then the instance of `GlitchPass` and finally `OutputPass`. The last enabled pass in the chain is automatically rendered to the screen. 
+			The setup of the passes looks like so:
 		</p>
 		</p>
 
 
 		<code>
 		<code>
@@ -69,12 +70,15 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
 			`RenderPass` is normally placed at the beginning of the chain in order to provide the rendered scene as an input for the next post-processing step. In our case,
 			`RenderPass` is normally placed at the beginning of the chain in order to provide the rendered scene as an input for the next post-processing step. In our case,
-			`GlitchPass` is going to use these image data to apply a wild glitch effect. Check out this [link:https://threejs.org/examples/webgl_postprocessing_glitch live example]
-			to see it in action.
+			`GlitchPass` is going to use these image data to apply a wild glitch effect. `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+			Check out this [link:https://threejs.org/examples/webgl_postprocessing_glitch live example] to see it in action.
 		</p>
 		</p>
 
 
 		<h2>Built-in Passes</h2>
 		<h2>Built-in Passes</h2>

+ 8 - 4
docs/manual/fr/introduction/How-to-use-post-processing.html

@@ -31,6 +31,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -58,8 +59,8 @@
 
 
 		<p>
 		<p>
 			Notre composer est maintenant prêt, il est donc possible de configurer la chaîne d'effets de post-processing. Ces effets (passes) sont chargés de la création
 			Notre composer est maintenant prêt, il est donc possible de configurer la chaîne d'effets de post-processing. Ces effets (passes) sont chargés de la création
-			de l'apparence visuelle finale de l'application. Ils sont traités dans l'ordre de leur ajout/insertion. Dans notre example, l'instance de `RenderPass`
-			est exécutée en première, puis l'instance de `GlitchPass` est exécutée. Le dernier effet activé de la chaîne est automatiquement rendu dans la scène. Le setup
+			de l'apparence visuelle finale de l'application. Ils sont traités dans l'ordre de leur ajout/insertion. In our example, the instance of `RenderPass`
+			is executed first, then the instance of `GlitchPass` and finally `OutputPass`. Le dernier effet activé de la chaîne est automatiquement rendu dans la scène. Le setup
 			des effets ressemble à ça:
 			des effets ressemble à ça:
 		</p>
 		</p>
 
 
@@ -69,12 +70,15 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
 			`RenderPass` est normalement placé au début de la chaîne pour fournir la scène rendue en tant qu'entrée pour les prochaines étapes de post-processing. Dans notre cas,
 			`RenderPass` est normalement placé au début de la chaîne pour fournir la scène rendue en tant qu'entrée pour les prochaines étapes de post-processing. Dans notre cas,
-			`GlitchPass` va utiliser les données de l'image pour appliquer un effet de glitch. Regardez cet [link:https://threejs.org/examples/webgl_postprocessing_glitch exemple live]
-			pour voir cela en action.
+			`GlitchPass` va utiliser les données de l'image pour appliquer un effet de glitch.  `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+			Regardez cet [link:https://threejs.org/examples/webgl_postprocessing_glitch exemple live] pour voir cela en action.
 		</p>
 		</p>
 
 
 		<h2>Effets Intégrés</h2>
 		<h2>Effets Intégrés</h2>

+ 8 - 4
docs/manual/it/introduction/How-to-use-post-processing.html

@@ -32,6 +32,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -59,8 +60,8 @@
 
 
 		<p>
 		<p>
       Il composer è pronto, ed è possibile configurare la catena di passaggi di post-processing. Questi passaggi sono i responsabili per la creazione
       Il composer è pronto, ed è possibile configurare la catena di passaggi di post-processing. Questi passaggi sono i responsabili per la creazione
-      dell'output visivo finale dell'applicazione. Vengono elaborati nello stesso ordine in cui sono stati aggiunti/inseriti. Nel nostro esempio, l'istanza
-      di `RenderPass` viene eseguita per prima, poi l'istanza di `GlitchPass`. L'ultimo passaggio abilitato della catena viene automaticamente renderizzato sullo schermo.
+      dell'output visivo finale dell'applicazione. Vengono elaborati nello stesso ordine in cui sono stati aggiunti/inseriti. In our example, the instance of `RenderPass`
+      is executed first, then the instance of `GlitchPass` and finally `OutputPass`. L'ultimo passaggio abilitato della catena viene automaticamente renderizzato sullo schermo.
       La configurazione dei passaggi è la seguente:
       La configurazione dei passaggi è la seguente:
 		</p>
 		</p>
 
 
@@ -70,12 +71,15 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
       `RenderPass` viene normalmente posizionata all'inizio della catena per fornire la scena renderizzata come input per il passaggio successivo di post-processing.
       `RenderPass` viene normalmente posizionata all'inizio della catena per fornire la scena renderizzata come input per il passaggio successivo di post-processing.
-      Nel nostro caso `GlitchPass` utilizzarà questi dati di immagine per applicare un effetto glitch selvaggio. Guarda questo [link:https://threejs.org/examples/webgl_postprocessing_glitch esempio live]
-      per vederli in azione.
+      Nel nostro caso `GlitchPass` utilizzarà questi dati di immagine per applicare un effetto glitch selvaggio.  `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+      Guarda questo [link:https://threejs.org/examples/webgl_postprocessing_glitch esempio live] per vederli in azione.
 		</p>
 		</p>
 
 
 		<h2>Passi Built-in</h2>
 		<h2>Passi Built-in</h2>

+ 8 - 3
docs/manual/ja/introduction/How-to-use-post-processing.html

@@ -33,6 +33,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 	<p>
 	<p>
@@ -61,8 +62,8 @@
 	<p>
 	<p>
 		composerが準備できたので、post-processingパスのチェーンを設定できるようになりました。
 		composerが準備できたので、post-processingパスのチェーンを設定できるようになりました。
 		これらのパスはアプリケーションの最終的なビジュアルを出力することに責任を持ちます。
 		これらのパスはアプリケーションの最終的なビジュアルを出力することに責任を持ちます。
-		これらのパスは追加/挿入の順番で処理されます。今回示している例では、*RenderPass*インスタンスがはじめに実行され、
-		それから*GlitchPass*インスタンスが実行されます。チェーンの中で最後の有効なpassが自動的に画面に描画されます。
+		これらのパスは追加/挿入の順番で処理されます。In our example, the instance of `RenderPass`
+		is executed first, then the instance of `GlitchPass` and finally `OutputPass`。チェーンの中で最後の有効なpassが自動的に画面に描画されます。
 		passの設定は以下のように行います。
 		passの設定は以下のように行います。
 	</p>
 	</p>
 
 
@@ -72,12 +73,16 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
-		</code>
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
+	</code>
 
 
 	<p>
 	<p>
 		*RenderPass*は普通チェインのはじめにあります。
 		*RenderPass*は普通チェインのはじめにあります。
 		これはレンダリングされたシーンを次のpost-processingの入力とするためです。
 		これはレンダリングされたシーンを次のpost-processingの入力とするためです。
 		*GlitchPass*は、これらのイメージをワイルドなglitch effectを適用するために使います。
 		*GlitchPass*は、これらのイメージをワイルドなglitch effectを適用するために使います。
+		 `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
 		実際に動いているものを見るために、[link:https://threejs.org/examples/webgl_postprocessing_glitch sample]を見てみましょう。
 		実際に動いているものを見るために、[link:https://threejs.org/examples/webgl_postprocessing_glitch sample]を見てみましょう。
 	</p>
 	</p>
 
 

+ 9 - 4
docs/manual/ko/introduction/How-to-use-post-processing.html

@@ -31,6 +31,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -59,7 +60,7 @@
 		<p>
 		<p>
             composer는 이제 준비가 다 되었으니, 후처리 과정 연결을 설정할 수 있습니다.
             composer는 이제 준비가 다 되었으니, 후처리 과정 연결을 설정할 수 있습니다.
             이러한 과정은 앱을 만드는 최종 화면 출력을 담당하며, 첨부/삽입한 순서대로 처리합니다.
             이러한 과정은 앱을 만드는 최종 화면 출력을 담당하며, 첨부/삽입한 순서대로 처리합니다.
-            이 예제에서 먼저 실행한 것은 *RenderPass* 인스턴스이고 그 다음이 *GlitchPass* 입니다.
+            In our example, the instance of `RenderPass` is executed first, then the instance of `GlitchPass` and finally `OutputPass`.
             마지막 과정이 끝나면 자동으로 화면에 렌더링됩니다. 패스 설정은 아래와 같습니다.
             마지막 과정이 끝나면 자동으로 화면에 렌더링됩니다. 패스 설정은 아래와 같습니다.
 		</p>
 		</p>
 
 
@@ -69,12 +70,16 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
-			*RenderPass*는 일반적으로 맨 위에 위치해서 렌더링된 장면을 후처리의 기본 입력 장면으로 활용합니다. 예제의 경우,
-            *GlitchPass*는 이 이미지 데이터에 거친 글리치 효과를 넣어줍니다. [link:https://threejs.org/examples/webgl_postprocessing_glitch live example]에서 작동을
-            확인해보세요.
+            *RenderPass*는 일반적으로 맨 위에 위치해서 렌더링된 장면을 후처리의 기본 입력 장면으로 활용합니다. 예제의 경우,
+            *GlitchPass*는 이 이미지 데이터에 거친 글리치 효과를 넣어줍니다. 
+             `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+            [link:https://threejs.org/examples/webgl_postprocessing_glitch live example]에서 작동을 확인해보세요.
 		</p>
 		</p>
 
 
 		<h2>기본 내장 후처리방식</h2>
 		<h2>기본 내장 후처리방식</h2>

+ 10 - 5
docs/manual/pt-br/introduction/How-to-use-post-processing.html

@@ -31,6 +31,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -58,8 +59,8 @@
 
 
 		<p>
 		<p>
 			Nosso composer já está pronto para que seja possível configurar a cadeia de passos de pós-processamento. Esses passos são responsáveis ​​por criar
 			Nosso composer já está pronto para que seja possível configurar a cadeia de passos de pós-processamento. Esses passos são responsáveis ​​por criar
-			a saída visual final do aplicativo. Eles são processados ​​na ordem de sua adição/inserção. Em nosso exemplo, a instância de `RenderPass`
-			é executada primeiro e depois a instância de `GlitchPass`. A última passagem habilitada na cadeia é renderizada automaticamente na tela. A configuração
+			a saída visual final do aplicativo. Eles são processados ​​na ordem de sua adição/inserção. In our example, the instance of `RenderPass`
+			is executed first, then the instance of `GlitchPass` and finally `OutputPass`. A última passagem habilitada na cadeia é renderizada automaticamente na tela. A configuração
 			dos passos fica assim:
 			dos passos fica assim:
 		</p>
 		</p>
 
 
@@ -69,12 +70,16 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
-			O `RenderPass` é normalmente colocado no início da cadeia para fornecer a cena renderizada como entrada para a próxima etapa de pós-processamento. No nosso caso,
-			o `GlitchPass` usará esses dados de imagem para aplicar um efeito de glitch selvagem. Confira este [link:https://threejs.org/examples/webgl_postprocessing_glitch exemplo]
-			para vê-lo em ação.
+			O `RenderPass` é normalmente colocado no início da cadeia para fornecer a cena renderizada como entrada para a próxima etapa de pós-processamento. 
+			No nosso caso, o `GlitchPass` usará esses dados de imagem para aplicar um efeito de glitch selvagem. 
+			 `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+			Confira este [link:https://threejs.org/examples/webgl_postprocessing_glitch exemplo] para vê-lo em ação.
 		</p>
 		</p>
 
 
 		<h2>Passes integrados</h2>
 		<h2>Passes integrados</h2>

+ 8 - 3
docs/manual/zh/introduction/How-to-use-post-processing.html

@@ -31,6 +31,7 @@
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
 		import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
+		import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
 		</code>
 		</code>
 
 
 		<p>
 		<p>
@@ -59,7 +60,7 @@
 		<p>
 		<p>
 			我们的合成器已经准备好了,现在我们就可以来配置后期处理过程链了。
 			我们的合成器已经准备好了,现在我们就可以来配置后期处理过程链了。
 			这些过程负责创建应用程序的最终视觉输出,它们按照添加/插入的顺序来进行处理。
 			这些过程负责创建应用程序的最终视觉输出,它们按照添加/插入的顺序来进行处理。
-			在我们的示例中,首先执行的是*RenderPass*实例,然后是*GlitchPass*。在链中的最后一个过程将自动被渲染到屏幕上
+			In our example, the instance of `RenderPass` is executed first, then the instance of `GlitchPass` and finally `OutputPass`
 			这些过程的设置类似这样:
 			这些过程的设置类似这样:
 		</p>
 		</p>
 
 
@@ -69,12 +70,16 @@
 
 
 		const glitchPass = new GlitchPass();
 		const glitchPass = new GlitchPass();
 		composer.addPass( glitchPass );
 		composer.addPass( glitchPass );
+
+		const outputPass = new OutputPass();
+		composer.addPass( outputPass );
 		</code>
 		</code>
 
 
 		<p>
 		<p>
 			*RenderPass*通常位于过程链的开始,以便将渲染好的场景作为输入来提供给下一个后期处理步骤。
 			*RenderPass*通常位于过程链的开始,以便将渲染好的场景作为输入来提供给下一个后期处理步骤。
-			在我们的示例中,*GlitchPass*将会使用这些图像数据,来应用一个疯狂的故障效果。参见这个示例:
-			[link:https://threejs.org/examples/webgl_postprocessing_glitch live example]来看一看它的实际效果。
+			在我们的示例中,*GlitchPass*将会使用这些图像数据,来应用一个疯狂的故障效果。
+			 `OutputPass` is usually the last pass in the chain which performs sRGB color space conversion and optional tone mapping.
+			参见这个示例:[link:https://threejs.org/examples/webgl_postprocessing_glitch live example]来看一看它的实际效果。
 		</p>
 		</p>
 
 
 		<h2>内置过程</h2>
 		<h2>内置过程</h2>

+ 0 - 1
docs/scenes/bones-browser.html

@@ -80,7 +80,6 @@
 				renderer = new WebGLRenderer( { antialias: true } );
 				renderer = new WebGLRenderer( { antialias: true } );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.useLegacyLights = false;
 				document.body.appendChild( renderer.domElement );
 				document.body.appendChild( renderer.domElement );
 
 
 				orbit = new OrbitControls( camera, renderer.domElement );
 				orbit = new OrbitControls( camera, renderer.domElement );

+ 0 - 1
docs/scenes/ccdiksolver-browser.html

@@ -84,7 +84,6 @@
 				renderer = new WebGLRenderer( { antialias: true } );
 				renderer = new WebGLRenderer( { antialias: true } );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.useLegacyLights = false;
 				document.body.appendChild( renderer.domElement );
 				document.body.appendChild( renderer.domElement );
 
 
 				orbit = new OrbitControls( camera, renderer.domElement );
 				orbit = new OrbitControls( camera, renderer.domElement );

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

@@ -749,7 +749,6 @@
 			const renderer = new WebGLRenderer( { antialias: true } );
 			const renderer = new WebGLRenderer( { antialias: true } );
 			renderer.setPixelRatio( window.devicePixelRatio );
 			renderer.setPixelRatio( window.devicePixelRatio );
 			renderer.setSize( window.innerWidth, window.innerHeight );
 			renderer.setSize( window.innerWidth, window.innerHeight );
-			renderer.useLegacyLights = false;
 			document.body.appendChild( renderer.domElement );
 			document.body.appendChild( renderer.domElement );
 
 
 			const orbit = new OrbitControls( camera, renderer.domElement );
 			const orbit = new OrbitControls( camera, renderer.domElement );

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

@@ -737,7 +737,6 @@
 			const renderer = new THREE.WebGLRenderer( { antialias: true } );
 			const renderer = new THREE.WebGLRenderer( { antialias: true } );
 			renderer.setPixelRatio( window.devicePixelRatio );
 			renderer.setPixelRatio( window.devicePixelRatio );
 			renderer.setSize( window.innerWidth, window.innerHeight );
 			renderer.setSize( window.innerWidth, window.innerHeight );
-			renderer.useLegacyLights = false;
 			document.body.appendChild( renderer.domElement );
 			document.body.appendChild( renderer.domElement );
 
 
 			const pmremGenerator = new THREE.PMREMGenerator( renderer );
 			const pmremGenerator = new THREE.PMREMGenerator( renderer );

+ 0 - 1
editor/js/Config.js

@@ -14,7 +14,6 @@ function Config() {
 		'project/renderer/antialias': true,
 		'project/renderer/antialias': true,
 		'project/renderer/shadows': true,
 		'project/renderer/shadows': true,
 		'project/renderer/shadowType': 1, // PCF
 		'project/renderer/shadowType': 1, // PCF
-		'project/renderer/useLegacyLights': false,
 		'project/renderer/toneMapping': 0, // NoToneMapping
 		'project/renderer/toneMapping': 0, // NoToneMapping
 		'project/renderer/toneMappingExposure': 1,
 		'project/renderer/toneMappingExposure': 1,
 
 

+ 0 - 1
editor/js/Editor.js

@@ -689,7 +689,6 @@ Editor.prototype = {
 				shadows: this.config.getKey( 'project/renderer/shadows' ),
 				shadows: this.config.getKey( 'project/renderer/shadows' ),
 				shadowType: this.config.getKey( 'project/renderer/shadowType' ),
 				shadowType: this.config.getKey( 'project/renderer/shadowType' ),
 				vr: this.config.getKey( 'project/vr' ),
 				vr: this.config.getKey( 'project/vr' ),
-				useLegacyLights: this.config.getKey( 'project/renderer/useLegacyLights' ),
 				toneMapping: this.config.getKey( 'project/renderer/toneMapping' ),
 				toneMapping: this.config.getKey( 'project/renderer/toneMapping' ),
 				toneMappingExposure: this.config.getKey( 'project/renderer/toneMappingExposure' )
 				toneMappingExposure: this.config.getKey( 'project/renderer/toneMappingExposure' )
 			},
 			},

+ 25 - 3
editor/js/Loader.js

@@ -307,12 +307,19 @@ function Loader( editor ) {
 
 
 					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
 					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
+					const { KTX2Loader } = await import( 'three/addons/loaders/KTX2Loader.js' );
+					const { MeshoptDecoder } = await import( 'three/addons/libs/meshopt_decoder.module.js' );
 
 
 					const dracoLoader = new DRACOLoader();
 					const dracoLoader = new DRACOLoader();
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 
 
+					const ktx2Loader = new KTX2Loader();
+					ktx2Loader.setTranscoderPath( '../examples/jsm/libs/basis/' );
+
 					const loader = new GLTFLoader( manager );
 					const loader = new GLTFLoader( manager );
 					loader.setDRACOLoader( dracoLoader );
 					loader.setDRACOLoader( dracoLoader );
+					loader.setKTX2Loader( ktx2Loader );
+					loader.setMeshoptDecoder( MeshoptDecoder );
 
 
 					loader.parse( contents, '', function ( result ) {
 					loader.parse( contents, '', function ( result ) {
 
 
@@ -953,14 +960,21 @@ function Loader( editor ) {
 
 
 				{
 				{
 
 
-					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
+					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
+					const { KTX2Loader } = await import( 'three/addons/loaders/KTX2Loader.js' );
+					const { MeshoptDecoder } = await import( 'three/addons/libs/meshopt_decoder.module.js' );
 
 
 					const dracoLoader = new DRACOLoader();
 					const dracoLoader = new DRACOLoader();
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 
 
+					const ktx2Loader = new KTX2Loader();
+					ktx2Loader.setTranscoderPath( '../examples/jsm/libs/basis/' );
+
 					const loader = new GLTFLoader();
 					const loader = new GLTFLoader();
 					loader.setDRACOLoader( dracoLoader );
 					loader.setDRACOLoader( dracoLoader );
+					loader.setKTX2Loader( ktx2Loader );
+					loader.setMeshoptDecoder( MeshoptDecoder );
 
 
 					loader.parse( file.buffer, '', function ( result ) {
 					loader.parse( file.buffer, '', function ( result ) {
 
 
@@ -981,14 +995,22 @@ function Loader( editor ) {
 
 
 				{
 				{
 
 
-					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
 					const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
+					const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
+					const { KTX2Loader } = await import( 'three/addons/loaders/KTX2Loader.js' );
+					const { MeshoptDecoder } = await import( 'three/addons/libs/meshopt_decoder.module.js' );
 
 
 					const dracoLoader = new DRACOLoader();
 					const dracoLoader = new DRACOLoader();
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 					dracoLoader.setDecoderPath( '../examples/jsm/libs/draco/gltf/' );
 
 
-					const loader = new GLTFLoader( manager );
+					const ktx2Loader = new KTX2Loader();
+					ktx2Loader.setTranscoderPath( '../examples/jsm/libs/basis/' );
+
+					const loader = new GLTFLoader();
 					loader.setDRACOLoader( dracoLoader );
 					loader.setDRACOLoader( dracoLoader );
+					loader.setKTX2Loader( ktx2Loader );
+					loader.setMeshoptDecoder( MeshoptDecoder );
+					
 					loader.parse( strFromU8( file ), '', function ( result ) {
 					loader.parse( strFromU8( file ), '', function ( result ) {
 
 
 						const scene = result.scene;
 						const scene = result.scene;

+ 0 - 19
editor/js/Sidebar.Project.Renderer.js

@@ -27,21 +27,6 @@ function SidebarProjectRenderer( editor ) {
 	const antialiasBoolean = new UIBoolean( config.getKey( 'project/renderer/antialias' ) ).onChange( createRenderer );
 	const antialiasBoolean = new UIBoolean( config.getKey( 'project/renderer/antialias' ) ).onChange( createRenderer );
 	antialiasRow.add( antialiasBoolean );
 	antialiasRow.add( antialiasBoolean );
 
 
-	// Physically Correct lights
-
-	const useLegacyLightsRow = new UIRow();
-	container.add( useLegacyLightsRow );
-
-	useLegacyLightsRow.add( new UIText( strings.getKey( 'sidebar/project/useLegacyLights' ) ).setWidth( '90px' ) );
-
-	const useLegacyLightsBoolean = new UIBoolean( config.getKey( 'project/renderer/useLegacyLights' ) ).onChange( function () {
-
-		currentRenderer.useLegacyLights = this.getValue();
-		signals.rendererUpdated.dispatch();
-
-	} );
-	useLegacyLightsRow.add( useLegacyLightsBoolean );
-
 	// Shadows
 	// Shadows
 
 
 	const shadowsRow = new UIRow();
 	const shadowsRow = new UIRow();
@@ -109,7 +94,6 @@ function SidebarProjectRenderer( editor ) {
 	function createRenderer() {
 	function createRenderer() {
 
 
 		currentRenderer = new THREE.WebGLRenderer( { antialias: antialiasBoolean.getValue() } );
 		currentRenderer = new THREE.WebGLRenderer( { antialias: antialiasBoolean.getValue() } );
-		currentRenderer.useLegacyLights = useLegacyLightsBoolean.getValue();
 		currentRenderer.shadowMap.enabled = shadowsBoolean.getValue();
 		currentRenderer.shadowMap.enabled = shadowsBoolean.getValue();
 		currentRenderer.shadowMap.type = parseFloat( shadowTypeSelect.getValue() );
 		currentRenderer.shadowMap.type = parseFloat( shadowTypeSelect.getValue() );
 		currentRenderer.toneMapping = parseFloat( toneMappingSelect.getValue() );
 		currentRenderer.toneMapping = parseFloat( toneMappingSelect.getValue() );
@@ -127,13 +111,11 @@ function SidebarProjectRenderer( editor ) {
 
 
 	signals.editorCleared.add( function () {
 	signals.editorCleared.add( function () {
 
 
-		currentRenderer.useLegacyLights = false;
 		currentRenderer.shadowMap.enabled = true;
 		currentRenderer.shadowMap.enabled = true;
 		currentRenderer.shadowMap.type = THREE.PCFShadowMap;
 		currentRenderer.shadowMap.type = THREE.PCFShadowMap;
 		currentRenderer.toneMapping = THREE.NoToneMapping;
 		currentRenderer.toneMapping = THREE.NoToneMapping;
 		currentRenderer.toneMappingExposure = 1;
 		currentRenderer.toneMappingExposure = 1;
 
 
-		useLegacyLightsBoolean.setValue( currentRenderer.useLegacyLights );
 		shadowsBoolean.setValue( currentRenderer.shadowMap.enabled );
 		shadowsBoolean.setValue( currentRenderer.shadowMap.enabled );
 		shadowTypeSelect.setValue( currentRenderer.shadowMap.type );
 		shadowTypeSelect.setValue( currentRenderer.shadowMap.type );
 		toneMappingSelect.setValue( currentRenderer.toneMapping );
 		toneMappingSelect.setValue( currentRenderer.toneMapping );
@@ -148,7 +130,6 @@ function SidebarProjectRenderer( editor ) {
 
 
 		config.setKey(
 		config.setKey(
 			'project/renderer/antialias', antialiasBoolean.getValue(),
 			'project/renderer/antialias', antialiasBoolean.getValue(),
-			'project/renderer/useLegacyLights', useLegacyLightsBoolean.getValue(),
 			'project/renderer/shadows', shadowsBoolean.getValue(),
 			'project/renderer/shadows', shadowsBoolean.getValue(),
 			'project/renderer/shadowType', parseFloat( shadowTypeSelect.getValue() ),
 			'project/renderer/shadowType', parseFloat( shadowTypeSelect.getValue() ),
 			'project/renderer/toneMapping', parseFloat( toneMappingSelect.getValue() ),
 			'project/renderer/toneMapping', parseFloat( toneMappingSelect.getValue() ),

+ 0 - 3
editor/js/Strings.js

@@ -316,7 +316,6 @@ function Strings( config ) {
 			'sidebar/project/renderer': 'Renderer',
 			'sidebar/project/renderer': 'Renderer',
 			'sidebar/project/antialias': 'Antialias',
 			'sidebar/project/antialias': 'Antialias',
 			'sidebar/project/shadows': 'Shadows',
 			'sidebar/project/shadows': 'Shadows',
-			'sidebar/project/useLegacyLights': 'Use legacy lights',
 			'sidebar/project/toneMapping': 'Tone mapping',
 			'sidebar/project/toneMapping': 'Tone mapping',
 			'sidebar/project/materials': 'Materials',
 			'sidebar/project/materials': 'Materials',
 			'sidebar/project/Assign': 'Assign',
 			'sidebar/project/Assign': 'Assign',
@@ -667,7 +666,6 @@ function Strings( config ) {
 			'sidebar/project/renderer': 'Rendus',
 			'sidebar/project/renderer': 'Rendus',
 			'sidebar/project/antialias': 'Anticrénelage',
 			'sidebar/project/antialias': 'Anticrénelage',
 			'sidebar/project/shadows': 'Ombres',
 			'sidebar/project/shadows': 'Ombres',
-			'sidebar/project/useLegacyLights': 'Use legacy lights',
 			'sidebar/project/toneMapping': 'Mappage des nuances',
 			'sidebar/project/toneMapping': 'Mappage des nuances',
 			'sidebar/project/materials': 'Matériaux',
 			'sidebar/project/materials': 'Matériaux',
 			'sidebar/project/Assign': 'Attribuer',
 			'sidebar/project/Assign': 'Attribuer',
@@ -1018,7 +1016,6 @@ function Strings( config ) {
 			'sidebar/project/renderer': '渲染器',
 			'sidebar/project/renderer': '渲染器',
 			'sidebar/project/antialias': '抗锯齿',
 			'sidebar/project/antialias': '抗锯齿',
 			'sidebar/project/shadows': '阴影',
 			'sidebar/project/shadows': '阴影',
-			'sidebar/project/useLegacyLights': '传统灯',
 			'sidebar/project/toneMapping': '色调映射',
 			'sidebar/project/toneMapping': '色调映射',
 			'sidebar/project/materials': '材质',
 			'sidebar/project/materials': '材质',
 			'sidebar/project/Assign': '应用',
 			'sidebar/project/Assign': '应用',

+ 0 - 1
editor/js/libs/app.js

@@ -29,7 +29,6 @@ var APP = {
 			if ( project.shadowType !== undefined ) renderer.shadowMap.type = project.shadowType;
 			if ( project.shadowType !== undefined ) renderer.shadowMap.type = project.shadowType;
 			if ( project.toneMapping !== undefined ) renderer.toneMapping = project.toneMapping;
 			if ( project.toneMapping !== undefined ) renderer.toneMapping = project.toneMapping;
 			if ( project.toneMappingExposure !== undefined ) renderer.toneMappingExposure = project.toneMappingExposure;
 			if ( project.toneMappingExposure !== undefined ) renderer.toneMappingExposure = project.toneMappingExposure;
-			if ( project.useLegacyLights !== undefined ) renderer.useLegacyLights = project.useLegacyLights;
 
 
 			this.setScene( loader.parse( json.scene ) );
 			this.setScene( loader.parse( json.scene ) );
 			this.setCamera( loader.parse( json.camera ) );
 			this.setCamera( loader.parse( json.camera ) );

+ 0 - 1
examples/css2d_label.html

@@ -175,7 +175,6 @@
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.useLegacyLights = false;
 				document.body.appendChild( renderer.domElement );
 				document.body.appendChild( renderer.domElement );
 
 
 				labelRenderer = new CSS2DRenderer();
 				labelRenderer = new CSS2DRenderer();

+ 0 - 1
examples/css3d_orthographic.html

@@ -98,7 +98,6 @@
 				renderer = new THREE.WebGLRenderer();
 				renderer = new THREE.WebGLRenderer();
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.useLegacyLights = false;
 				document.body.appendChild( renderer.domElement );
 				document.body.appendChild( renderer.domElement );
 
 
 				renderer2 = new CSS3DRenderer();
 				renderer2 = new CSS3DRenderer();

+ 0 - 1
examples/css3d_sandbox.html

@@ -93,7 +93,6 @@
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.useLegacyLights = false;
 				document.body.appendChild( renderer.domElement );
 				document.body.appendChild( renderer.domElement );
 
 
 				renderer2 = new CSS3DRenderer();
 				renderer2 = new CSS3DRenderer();

+ 2 - 0
examples/files.json

@@ -142,6 +142,7 @@
 		"webgl_materials_cubemap_dynamic",
 		"webgl_materials_cubemap_dynamic",
 		"webgl_materials_cubemap_refraction",
 		"webgl_materials_cubemap_refraction",
 		"webgl_materials_cubemap_mipmaps",
 		"webgl_materials_cubemap_mipmaps",
+		"webgl_materials_cubemap_render_to_mipmaps",
 		"webgl_materials_curvature",
 		"webgl_materials_curvature",
 		"webgl_materials_displacementmap",
 		"webgl_materials_displacementmap",
 		"webgl_materials_envmaps",
 		"webgl_materials_envmaps",
@@ -324,6 +325,7 @@
 		"webgpu_lights_selective",
 		"webgpu_lights_selective",
 		"webgpu_loader_gltf",
 		"webgpu_loader_gltf",
 		"webgpu_loader_gltf_compressed",
 		"webgpu_loader_gltf_compressed",
+		"webgpu_loader_gltf_iridescence",
 		"webgpu_loader_gltf_sheen",
 		"webgpu_loader_gltf_sheen",
 		"webgpu_materials",
 		"webgpu_materials",
 		"webgpu_materials_video",
 		"webgpu_materials_video",

+ 0 - 1
examples/games_fps.html

@@ -78,7 +78,6 @@
 			renderer.shadowMap.enabled = true;
 			renderer.shadowMap.enabled = true;
 			renderer.shadowMap.type = THREE.VSMShadowMap;
 			renderer.shadowMap.type = THREE.VSMShadowMap;
 			renderer.toneMapping = THREE.ACESFilmicToneMapping;
 			renderer.toneMapping = THREE.ACESFilmicToneMapping;
-			renderer.useLegacyLights = false;
 			container.appendChild( renderer.domElement );
 			container.appendChild( renderer.domElement );
 
 
 			const stats = new Stats();
 			const stats = new Stats();

+ 143 - 21
examples/jsm/controls/OrbitControls.js

@@ -5,7 +5,10 @@ import {
 	Spherical,
 	Spherical,
 	TOUCH,
 	TOUCH,
 	Vector2,
 	Vector2,
-	Vector3
+	Vector3,
+	Plane,
+	Ray,
+	MathUtils
 } from 'three';
 } from 'three';
 
 
 // OrbitControls performs orbiting, dollying (zooming), and panning.
 // OrbitControls performs orbiting, dollying (zooming), and panning.
@@ -18,6 +21,9 @@ import {
 const _changeEvent = { type: 'change' };
 const _changeEvent = { type: 'change' };
 const _startEvent = { type: 'start' };
 const _startEvent = { type: 'start' };
 const _endEvent = { type: 'end' };
 const _endEvent = { type: 'end' };
+const _ray = new Ray();
+const _plane = new Plane();
+const TILT_LIMIT = Math.cos( 70 * MathUtils.DEG2RAD );
 
 
 class OrbitControls extends EventDispatcher {
 class OrbitControls extends EventDispatcher {
 
 
@@ -72,6 +78,7 @@ class OrbitControls extends EventDispatcher {
 		this.panSpeed = 1.0;
 		this.panSpeed = 1.0;
 		this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up
 		this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up
 		this.keyPanSpeed = 7.0;	// pixels moved per arrow key push
 		this.keyPanSpeed = 7.0;	// pixels moved per arrow key push
+		this.zoomToCursor = false;
 
 
 		// Set to true to automatically rotate around the target
 		// Set to true to automatically rotate around the target
 		// If auto-rotate is enabled, you must call controls.update() in your animation loop
 		// If auto-rotate is enabled, you must call controls.update() in your animation loop
@@ -230,11 +237,6 @@ class OrbitControls extends EventDispatcher {
 				spherical.makeSafe();
 				spherical.makeSafe();
 
 
 
 
-				spherical.radius *= scale;
-
-				// restrict radius to be between desired limits
-				spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );
-
 				// move target to panned location
 				// move target to panned location
 
 
 				if ( scope.enableDamping === true ) {
 				if ( scope.enableDamping === true ) {
@@ -247,6 +249,19 @@ class OrbitControls extends EventDispatcher {
 
 
 				}
 				}
 
 
+				// adjust the camera position based on zoom only if we're not zooming to the cursor or if it's an ortho camera
+				// we adjust zoom later in these cases
+				if ( scope.zoomToCursor && performCursorZoom || scope.object.isOrthographicCamera ) {
+
+					spherical.radius = clampDistance( spherical.radius );
+
+				} else {
+
+					spherical.radius = clampDistance( spherical.radius * scale );
+
+				}
+
+
 				offset.setFromSpherical( spherical );
 				offset.setFromSpherical( spherical );
 
 
 				// rotate offset back to "camera-up-vector-is-up" space
 				// rotate offset back to "camera-up-vector-is-up" space
@@ -271,7 +286,91 @@ class OrbitControls extends EventDispatcher {
 
 
 				}
 				}
 
 
+				// adjust camera position
+				let zoomChanged = false;
+				if ( scope.zoomToCursor && performCursorZoom ) {
+
+					let newRadius = null;
+					if ( scope.object.isPerspectiveCamera ) {
+
+						// move the camera down the pointer ray
+						// this method avoids floating point error
+						const prevRadius = offset.length();
+						newRadius = clampDistance( prevRadius * scale );
+
+						const radiusDelta = prevRadius - newRadius;
+						scope.object.position.addScaledVector( dollyDirection, radiusDelta );
+						scope.object.updateMatrixWorld();
+
+					} else if ( scope.object.isOrthographicCamera ) {
+
+						// adjust the ortho camera position based on zoom changes
+						const mouseBefore = new Vector3( mouse.x, mouse.y, 0 );
+						mouseBefore.unproject( scope.object );
+
+						scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) );
+						scope.object.updateProjectionMatrix();
+						zoomChanged = true;
+
+						const mouseAfter = new Vector3( mouse.x, mouse.y, 0 );
+						mouseAfter.unproject( scope.object );
+
+						scope.object.position.sub( mouseAfter ).add( mouseBefore );
+						scope.object.updateMatrixWorld();
+
+						newRadius = offset.length();
+
+					} else {
+
+						console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.' );
+						scope.zoomToCursor = false;
+
+					}
+
+					// handle the placement of the target
+					if ( newRadius !== null ) {
+
+						if ( this.screenSpacePanning ) {
+
+							// position the orbit target in front of the new camera position
+							scope.target.set( 0, 0, - 1 )
+								.transformDirection( scope.object.matrix )
+								.multiplyScalar( newRadius )
+								.add( scope.object.position );
+
+						} else {
+
+							// get the ray and translation plane to compute target
+							_ray.origin.copy( scope.object.position );
+							_ray.direction.set( 0, 0, - 1 ).transformDirection( scope.object.matrix );
+
+							// if the camera is 20 degrees above the horizon then don't adjust the focus target to avoid
+							// extremely large values
+							if ( Math.abs( scope.object.up.dot( _ray.direction ) ) < TILT_LIMIT ) {
+
+								object.lookAt( scope.target );
+
+							} else {
+
+								_plane.setFromNormalAndCoplanarPoint( scope.object.up, scope.target );
+								_ray.intersectPlane( _plane, scope.target );
+
+							}
+
+						}
+
+					}
+
+				} else if ( scope.object.isOrthographicCamera ) {
+
+					scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) );
+					scope.object.updateProjectionMatrix();
+					zoomChanged = true;
+
+				}
+
 				scale = 1;
 				scale = 1;
+				performCursorZoom = false;
 
 
 				// update condition is:
 				// update condition is:
 				// min(camera displacement, camera rotation in radians)^2 > EPS
 				// min(camera displacement, camera rotation in radians)^2 > EPS
@@ -350,7 +449,6 @@ class OrbitControls extends EventDispatcher {
 
 
 		let scale = 1;
 		let scale = 1;
 		const panOffset = new Vector3();
 		const panOffset = new Vector3();
-		let zoomChanged = false;
 
 
 		const rotateStart = new Vector2();
 		const rotateStart = new Vector2();
 		const rotateEnd = new Vector2();
 		const rotateEnd = new Vector2();
@@ -364,6 +462,10 @@ class OrbitControls extends EventDispatcher {
 		const dollyEnd = new Vector2();
 		const dollyEnd = new Vector2();
 		const dollyDelta = new Vector2();
 		const dollyDelta = new Vector2();
 
 
+		const dollyDirection = new Vector3();
+		const mouse = new Vector2();
+		let performCursorZoom = false;
+
 		const pointers = [];
 		const pointers = [];
 		const pointerPositions = {};
 		const pointerPositions = {};
 
 
@@ -474,16 +576,10 @@ class OrbitControls extends EventDispatcher {
 
 
 		function dollyOut( dollyScale ) {
 		function dollyOut( dollyScale ) {
 
 
-			if ( scope.object.isPerspectiveCamera ) {
+			if ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) {
 
 
 				scale /= dollyScale;
 				scale /= dollyScale;
 
 
-			} else if ( scope.object.isOrthographicCamera ) {
-
-				scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) );
-				scope.object.updateProjectionMatrix();
-				zoomChanged = true;
-
 			} else {
 			} else {
 
 
 				console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
 				console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
@@ -495,16 +591,10 @@ class OrbitControls extends EventDispatcher {
 
 
 		function dollyIn( dollyScale ) {
 		function dollyIn( dollyScale ) {
 
 
-			if ( scope.object.isPerspectiveCamera ) {
+			if ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) {
 
 
 				scale *= dollyScale;
 				scale *= dollyScale;
 
 
-			} else if ( scope.object.isOrthographicCamera ) {
-
-				scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) );
-				scope.object.updateProjectionMatrix();
-				zoomChanged = true;
-
 			} else {
 			} else {
 
 
 				console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
 				console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
@@ -514,6 +604,35 @@ class OrbitControls extends EventDispatcher {
 
 
 		}
 		}
 
 
+		function updateMouseParameters( event ) {
+
+			if ( ! scope.zoomToCursor ) {
+
+				return;
+
+			}
+
+			performCursorZoom = true;
+
+			const rect = scope.domElement.getBoundingClientRect();
+			const x = event.clientX - rect.left;
+			const y = event.clientY - rect.top;
+			const w = rect.width;
+			const h = rect.height;
+
+			mouse.x = ( x / w ) * 2 - 1;
+			mouse.y = - ( y / h ) * 2 + 1;
+
+			dollyDirection.set( mouse.x, mouse.y, 1 ).unproject( object ).sub( object.position ).normalize();
+
+		}
+
+		function clampDistance( dist ) {
+
+			return Math.max( scope.minDistance, Math.min( scope.maxDistance, dist ) );
+
+		}
+
 		//
 		//
 		// event callbacks - update the object state
 		// event callbacks - update the object state
 		//
 		//
@@ -526,6 +645,7 @@ class OrbitControls extends EventDispatcher {
 
 
 		function handleMouseDownDolly( event ) {
 		function handleMouseDownDolly( event ) {
 
 
+			updateMouseParameters( event );
 			dollyStart.set( event.clientX, event.clientY );
 			dollyStart.set( event.clientX, event.clientY );
 
 
 		}
 		}
@@ -592,6 +712,8 @@ class OrbitControls extends EventDispatcher {
 
 
 		function handleMouseWheel( event ) {
 		function handleMouseWheel( event ) {
 
 
+			updateMouseParameters( event );
+
 			if ( event.deltaY < 0 ) {
 			if ( event.deltaY < 0 ) {
 
 
 				dollyIn( getZoomScale() );
 				dollyIn( getZoomScale() );

+ 1 - 1
examples/jsm/environments/RoomEnvironment.js

@@ -26,7 +26,7 @@ class RoomEnvironment extends Scene {
 
 
 		let intensity = 5;
 		let intensity = 5;
 
 
-		if ( renderer !== null && renderer.useLegacyLights === false ) intensity = 900;
+		if ( renderer !== null && renderer._useLegacyLights === false ) intensity = 900;
 
 
 		const mainLight = new PointLight( 0xffffff, intensity, 28, 2 );
 		const mainLight = new PointLight( 0xffffff, intensity, 28, 2 );
 		mainLight.position.set( 0.418, 16.199, 0.300 );
 		mainLight.position.set( 0.418, 16.199, 0.300 );

+ 1 - 0
examples/jsm/exporters/USDZExporter.js

@@ -165,6 +165,7 @@ function buildHeader() {
 	customLayerData = {
 	customLayerData = {
 		string creator = "Three.js USDZExporter"
 		string creator = "Three.js USDZExporter"
 	}
 	}
+	defaultPrim = "Root"
 	metersPerUnit = 1
 	metersPerUnit = 1
 	upAxis = "Y"
 	upAxis = "Y"
 )
 )

+ 7 - 0
examples/jsm/interactive/SelectionHelper.js

@@ -15,9 +15,12 @@ class SelectionHelper {
 		this.pointBottomRight = new Vector2();
 		this.pointBottomRight = new Vector2();
 
 
 		this.isDown = false;
 		this.isDown = false;
+		this.enabled = true;
 
 
 		this.onPointerDown = function ( event ) {
 		this.onPointerDown = function ( event ) {
 
 
+			if ( this.enabled === false ) return;
+
 			this.isDown = true;
 			this.isDown = true;
 			this.onSelectStart( event );
 			this.onSelectStart( event );
 
 
@@ -25,6 +28,8 @@ class SelectionHelper {
 
 
 		this.onPointerMove = function ( event ) {
 		this.onPointerMove = function ( event ) {
 
 
+			if ( this.enabled === false ) return;
+
 			if ( this.isDown ) {
 			if ( this.isDown ) {
 
 
 				this.onSelectMove( event );
 				this.onSelectMove( event );
@@ -35,6 +40,8 @@ class SelectionHelper {
 
 
 		this.onPointerUp = function ( ) {
 		this.onPointerUp = function ( ) {
 
 
+			if ( this.enabled === false ) return;
+
 			this.isDown = false;
 			this.isDown = false;
 			this.onSelectOver();
 			this.onSelectOver();
 
 

+ 1 - 1
examples/jsm/loaders/FBXLoader.js

@@ -1270,7 +1270,7 @@ class FBXTreeParser {
 
 
 		} else {
 		} else {
 
 
-			material = new MeshPhongMaterial( { 
+			material = new MeshPhongMaterial( {
 				name: Loader.DEFAULT_MATERIAL_NAME,
 				name: Loader.DEFAULT_MATERIAL_NAME,
 				color: 0xcccccc
 				color: 0xcccccc
 			} );
 			} );

+ 8 - 3
examples/jsm/loaders/GLTFLoader.js

@@ -3918,7 +3918,6 @@ class GLTFParser {
 				if ( node.updateMatrix ) {
 				if ( node.updateMatrix ) {
 
 
 					node.updateMatrix();
 					node.updateMatrix();
-					node.matrixAutoUpdate = true;
 
 
 				}
 				}
 
 
@@ -4267,7 +4266,6 @@ class GLTFParser {
 		const tracks = [];
 		const tracks = [];
 
 
 		const targetName = node.name ? node.name : node.uuid;
 		const targetName = node.name ? node.name : node.uuid;
-
 		const targetNames = [];
 		const targetNames = [];
 
 
 		if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
 		if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
@@ -4304,7 +4302,12 @@ class GLTFParser {
 
 
 			case PATH_PROPERTIES.position:
 			case PATH_PROPERTIES.position:
 			case PATH_PROPERTIES.scale:
 			case PATH_PROPERTIES.scale:
+
+				TypedKeyframeTrack = VectorKeyframeTrack;
+				break;
+
 			default:
 			default:
+
 				switch ( outputAccessor.itemSize ) {
 				switch ( outputAccessor.itemSize ) {
 
 
 					case 1:
 					case 1:
@@ -4312,6 +4315,7 @@ class GLTFParser {
 						break;
 						break;
 					case 2:
 					case 2:
 					case 3:
 					case 3:
+					default:
 						TypedKeyframeTrack = VectorKeyframeTrack;
 						TypedKeyframeTrack = VectorKeyframeTrack;
 						break;
 						break;
 
 
@@ -4323,6 +4327,7 @@ class GLTFParser {
 
 
 		const interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : InterpolateLinear;
 		const interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : InterpolateLinear;
 
 
+
 		const outputArray = this._getArrayFromAccessor( outputAccessor );
 		const outputArray = this._getArrayFromAccessor( outputAccessor );
 
 
 		for ( let j = 0, jl = targetNames.length; j < jl; j ++ ) {
 		for ( let j = 0, jl = targetNames.length; j < jl; j ++ ) {
@@ -4335,7 +4340,7 @@ class GLTFParser {
 			);
 			);
 
 
 			// Override interpolation with custom factory method.
 			// Override interpolation with custom factory method.
-			if ( interpolation === 'CUBICSPLINE' ) {
+			if ( sampler.interpolation === 'CUBICSPLINE' ) {
 
 
 				this._createCubicSplineTrackInterpolant( track );
 				this._createCubicSplineTrackInterpolant( track );
 
 

+ 4 - 4
examples/jsm/loaders/KTX2Loader.js

@@ -14,6 +14,7 @@
 import {
 import {
 	CompressedTexture,
 	CompressedTexture,
 	CompressedArrayTexture,
 	CompressedArrayTexture,
+	CompressedCubeTexture,
 	Data3DTexture,
 	Data3DTexture,
 	DataTexture,
 	DataTexture,
 	FileLoader,
 	FileLoader,
@@ -261,10 +262,7 @@ class KTX2Loader extends Loader {
 
 
 		if ( container.faceCount === 6 ) {
 		if ( container.faceCount === 6 ) {
 
 
-			texture = new CompressedTexture();
-			texture.image = faces;
-			texture.format = format;
-			texture.type = UnsignedByteType;
+			texture = new CompressedCubeTexture( faces, format, UnsignedByteType );
 
 
 		} else {
 		} else {
 
 
@@ -317,12 +315,14 @@ class KTX2Loader extends Loader {
 
 
 			const texture = mipmaps[ 0 ];
 			const texture = mipmaps[ 0 ];
 			texture.mipmaps = mipmaps.map( dt => {
 			texture.mipmaps = mipmaps.map( dt => {
+
 				return {
 				return {
 					data: dt.source.data,
 					data: dt.source.data,
 					width: dt.source.data.width,
 					width: dt.source.data.width,
 					height: dt.source.data.height,
 					height: dt.source.data.height,
 					depth: dt.source.data.depth
 					depth: dt.source.data.depth
 				};
 				};
+
 			} );
 			} );
 			return texture;
 			return texture;
 
 

+ 1 - 1
examples/jsm/loaders/LDrawLoader.js

@@ -767,7 +767,7 @@ class LDrawParsedCache {
 				const text = await fileLoader.loadAsync( subobjectURL );
 				const text = await fileLoader.loadAsync( subobjectURL );
 				return text;
 				return text;
 
 
-			} catch {
+			} catch ( _ ) {
 
 
 				continue;
 				continue;
 
 

+ 3 - 3
examples/jsm/loaders/NRRDLoader.js

@@ -473,10 +473,10 @@ class NRRDLoader extends Loader {
 
 
 		volume.inverseMatrix = new Matrix4();
 		volume.inverseMatrix = new Matrix4();
 		volume.inverseMatrix.copy( volume.matrix ).invert();
 		volume.inverseMatrix.copy( volume.matrix ).invert();
-		
+
 		volume.RASDimensions = [
 		volume.RASDimensions = [
-			Math.floor( volume.xLength * spacingX ), 
-			Math.floor( volume.yLength * spacingY ), 
+			Math.floor( volume.xLength * spacingX ),
+			Math.floor( volume.yLength * spacingY ),
 			Math.floor( volume.zLength * spacingZ )
 			Math.floor( volume.zLength * spacingZ )
 		];
 		];
 
 

+ 1 - 1
examples/jsm/loaders/PLYLoader.js

@@ -706,7 +706,7 @@ class PLYLoader extends Loader {
 			// ascii section using \r\n as line endings
 			// ascii section using \r\n as line endings
 			if ( hasCRNL === true ) i ++;
 			if ( hasCRNL === true ) i ++;
 
 
-			return { headerText: lines.join( '\r' ) + '\r',  headerLength: i };
+			return { headerText: lines.join( '\r' ) + '\r', headerLength: i };
 
 
 		}
 		}
 
 

+ 10 - 10
examples/jsm/loaders/TGALoader.js

@@ -25,7 +25,7 @@ class TGALoader extends DataTextureLoader {
 				case TGA_TYPE_RLE_INDEXED:
 				case TGA_TYPE_RLE_INDEXED:
 					if ( header.colormap_length > 256 || header.colormap_size !== 24 || header.colormap_type !== 1 ) {
 					if ( header.colormap_length > 256 || header.colormap_size !== 24 || header.colormap_type !== 1 ) {
 
 
-						console.error( 'THREE.TGALoader: Invalid type colormap data for indexed type.' );
+						throw new Error( 'THREE.TGALoader: Invalid type colormap data for indexed type.' );
 
 
 					}
 					}
 
 
@@ -39,7 +39,7 @@ class TGALoader extends DataTextureLoader {
 				case TGA_TYPE_RLE_GREY:
 				case TGA_TYPE_RLE_GREY:
 					if ( header.colormap_type ) {
 					if ( header.colormap_type ) {
 
 
-						console.error( 'THREE.TGALoader: Invalid type colormap data for colormap type.' );
+						throw new Error( 'THREE.TGALoader: Invalid type colormap data for colormap type.' );
 
 
 					}
 					}
 
 
@@ -48,12 +48,12 @@ class TGALoader extends DataTextureLoader {
 					// What the need of a file without data ?
 					// What the need of a file without data ?
 
 
 				case TGA_TYPE_NO_DATA:
 				case TGA_TYPE_NO_DATA:
-					console.error( 'THREE.TGALoader: No data.' );
+					throw new Error( 'THREE.TGALoader: No data.' );
 
 
 					// Invalid type ?
 					// Invalid type ?
 
 
 				default:
 				default:
-					console.error( 'THREE.TGALoader: Invalid type "%s".', header.image_type );
+					throw new Error( 'THREE.TGALoader: Invalid type ' + header.image_type );
 
 
 			}
 			}
 
 
@@ -61,7 +61,7 @@ class TGALoader extends DataTextureLoader {
 
 
 			if ( header.width <= 0 || header.height <= 0 ) {
 			if ( header.width <= 0 || header.height <= 0 ) {
 
 
-				console.error( 'THREE.TGALoader: Invalid image size.' );
+				throw new Error( 'THREE.TGALoader: Invalid image size.' );
 
 
 			}
 			}
 
 
@@ -70,7 +70,7 @@ class TGALoader extends DataTextureLoader {
 			if ( header.pixel_size !== 8 && header.pixel_size !== 16 &&
 			if ( header.pixel_size !== 8 && header.pixel_size !== 16 &&
 				header.pixel_size !== 24 && header.pixel_size !== 32 ) {
 				header.pixel_size !== 24 && header.pixel_size !== 32 ) {
 
 
-				console.error( 'THREE.TGALoader: Invalid pixel size "%s".', header.pixel_size );
+				throw new Error( 'THREE.TGALoader: Invalid pixel size ' + header.pixel_size );
 
 
 			}
 			}
 
 
@@ -365,7 +365,7 @@ class TGALoader extends DataTextureLoader {
 						break;
 						break;
 
 
 					default:
 					default:
-						console.error( 'THREE.TGALoader: Format not supported.' );
+						throw new Error( 'THREE.TGALoader: Format not supported.' );
 						break;
 						break;
 
 
 				}
 				}
@@ -391,7 +391,7 @@ class TGALoader extends DataTextureLoader {
 						break;
 						break;
 
 
 					default:
 					default:
-						console.error( 'THREE.TGALoader: Format not supported.' );
+						throw new Error( 'THREE.TGALoader: Format not supported.' );
 						break;
 						break;
 
 
 				}
 				}
@@ -422,7 +422,7 @@ class TGALoader extends DataTextureLoader {
 			TGA_ORIGIN_UL = 0x02,
 			TGA_ORIGIN_UL = 0x02,
 			TGA_ORIGIN_UR = 0x03;
 			TGA_ORIGIN_UR = 0x03;
 
 
-		if ( buffer.length < 19 ) console.error( 'THREE.TGALoader: Not enough data to contain header.' );
+		if ( buffer.length < 19 ) throw new Error( 'THREE.TGALoader: Not enough data to contain header.' );
 
 
 		let offset = 0;
 		let offset = 0;
 
 
@@ -450,7 +450,7 @@ class TGALoader extends DataTextureLoader {
 
 
 		if ( header.id_length + offset > buffer.length ) {
 		if ( header.id_length + offset > buffer.length ) {
 
 
-			console.error( 'THREE.TGALoader: No data.' );
+			throw new Error( 'THREE.TGALoader: No data.' );
 
 
 		}
 		}
 
 

+ 1 - 1
examples/jsm/loaders/VRMLLoader.js

@@ -960,7 +960,7 @@ class VRMLLoader extends Loader {
 
 
 			// if the appearance field is NULL or unspecified, lighting is off and the unlit object color is (0, 0, 0)
 			// if the appearance field is NULL or unspecified, lighting is off and the unlit object color is (0, 0, 0)
 
 
-			let material = new MeshBasicMaterial( { 
+			let material = new MeshBasicMaterial( {
 				name: Loader.DEFAULT_MATERIAL_NAME,
 				name: Loader.DEFAULT_MATERIAL_NAME,
 				color: 0x000000
 				color: 0x000000
 			} );
 			} );

+ 0 - 9
examples/jsm/misc/GPUComputationRenderer.js

@@ -3,10 +3,8 @@ import {
 	ClampToEdgeWrapping,
 	ClampToEdgeWrapping,
 	DataTexture,
 	DataTexture,
 	FloatType,
 	FloatType,
-	LinearSRGBColorSpace,
 	Mesh,
 	Mesh,
 	NearestFilter,
 	NearestFilter,
-	NoToneMapping,
 	PlaneGeometry,
 	PlaneGeometry,
 	RGBAFormat,
 	RGBAFormat,
 	Scene,
 	Scene,
@@ -400,14 +398,9 @@ class GPUComputationRenderer {
 
 
 			const currentXrEnabled = renderer.xr.enabled;
 			const currentXrEnabled = renderer.xr.enabled;
 			const currentShadowAutoUpdate = renderer.shadowMap.autoUpdate;
 			const currentShadowAutoUpdate = renderer.shadowMap.autoUpdate;
-			const currentOutputColorSpace = renderer.outputColorSpace;
-			const currentToneMapping = renderer.toneMapping;
 
 
 			renderer.xr.enabled = false; // Avoid camera modification
 			renderer.xr.enabled = false; // Avoid camera modification
 			renderer.shadowMap.autoUpdate = false; // Avoid re-computing shadows
 			renderer.shadowMap.autoUpdate = false; // Avoid re-computing shadows
-			renderer.outputColorSpace = LinearSRGBColorSpace;
-			renderer.toneMapping = NoToneMapping;
-
 			mesh.material = material;
 			mesh.material = material;
 			renderer.setRenderTarget( output );
 			renderer.setRenderTarget( output );
 			renderer.render( scene, camera );
 			renderer.render( scene, camera );
@@ -415,8 +408,6 @@ class GPUComputationRenderer {
 
 
 			renderer.xr.enabled = currentXrEnabled;
 			renderer.xr.enabled = currentXrEnabled;
 			renderer.shadowMap.autoUpdate = currentShadowAutoUpdate;
 			renderer.shadowMap.autoUpdate = currentShadowAutoUpdate;
-			renderer.outputColorSpace = currentOutputColorSpace;
-			renderer.toneMapping = currentToneMapping;
 
 
 			renderer.setRenderTarget( currentRenderTarget );
 			renderer.setRenderTarget( currentRenderTarget );
 
 

+ 4 - 6
examples/jsm/misc/Volume.js

@@ -340,20 +340,18 @@ class Volume {
 
 
 		}
 		}
 
 
-
-		let iLength, jLength;
-
-		if( ! this.segmentation ) {
+		if ( ! this.segmentation ) {
 
 
 			firstDirection.applyMatrix4( volume.inverseMatrix ).normalize();
 			firstDirection.applyMatrix4( volume.inverseMatrix ).normalize();
 			secondDirection.applyMatrix4( volume.inverseMatrix ).normalize();
 			secondDirection.applyMatrix4( volume.inverseMatrix ).normalize();
 			axisInIJK.applyMatrix4( volume.inverseMatrix ).normalize();
 			axisInIJK.applyMatrix4( volume.inverseMatrix ).normalize();
 
 
 		}
 		}
+
 		firstDirection.arglet = 'i';
 		firstDirection.arglet = 'i';
 		secondDirection.arglet = 'j';
 		secondDirection.arglet = 'j';
-		iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) );
-		jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) );
+		const iLength = Math.floor( Math.abs( firstDirection.dot( dimensions ) ) );
+		const jLength = Math.floor( Math.abs( secondDirection.dot( dimensions ) ) );
 		const planeWidth = Math.abs( iLength * firstSpacing );
 		const planeWidth = Math.abs( iLength * firstSpacing );
 		const planeHeight = Math.abs( jLength * secondSpacing );
 		const planeHeight = Math.abs( jLength * secondSpacing );
 
 

+ 5 - 6
examples/jsm/nodes/Nodes.js

@@ -12,7 +12,7 @@ export { default as CacheNode, cache } from './core/CacheNode.js';
 export { default as ConstNode } from './core/ConstNode.js';
 export { default as ConstNode } from './core/ConstNode.js';
 export { default as ContextNode, context, label } from './core/ContextNode.js';
 export { default as ContextNode, context, label } from './core/ContextNode.js';
 export { default as IndexNode, vertexIndex, instanceIndex } from './core/IndexNode.js';
 export { default as IndexNode, vertexIndex, instanceIndex } from './core/IndexNode.js';
-export { default as LightingModel, lightingModel } from './core/LightingModel.js';
+export { default as LightingModel } from './core/LightingModel.js';
 export { default as Node, addNodeClass, createNodeFromType } from './core/Node.js';
 export { default as Node, addNodeClass, createNodeFromType } from './core/Node.js';
 export { default as NodeAttribute } from './core/NodeAttribute.js';
 export { default as NodeAttribute } from './core/NodeAttribute.js';
 export { default as NodeBuilder } from './core/NodeBuilder.js';
 export { default as NodeBuilder } from './core/NodeBuilder.js';
@@ -24,7 +24,7 @@ export { default as NodeKeywords } from './core/NodeKeywords.js';
 export { default as NodeUniform } from './core/NodeUniform.js';
 export { default as NodeUniform } from './core/NodeUniform.js';
 export { default as NodeVar } from './core/NodeVar.js';
 export { default as NodeVar } from './core/NodeVar.js';
 export { default as NodeVarying } from './core/NodeVarying.js';
 export { default as NodeVarying } from './core/NodeVarying.js';
-export { default as PropertyNode, property, diffuseColor, roughness, metalness, specularColor, shininess } from './core/PropertyNode.js';
+export { default as PropertyNode, property, output, diffuseColor, roughness, metalness, specularColor, shininess } from './core/PropertyNode.js';
 export { default as StackNode, stack } from './core/StackNode.js';
 export { default as StackNode, stack } from './core/StackNode.js';
 export { default as TempNode } from './core/TempNode.js';
 export { default as TempNode } from './core/TempNode.js';
 export { default as UniformNode, uniform } from './core/UniformNode.js';
 export { default as UniformNode, uniform } from './core/UniformNode.js';
@@ -82,7 +82,7 @@ export { default as PositionNode, positionGeometry, positionLocal, positionWorld
 export { default as ReferenceNode, reference } from './accessors/ReferenceNode.js';
 export { default as ReferenceNode, reference } from './accessors/ReferenceNode.js';
 export { default as ReflectVectorNode, reflectVector } from './accessors/ReflectVectorNode.js';
 export { default as ReflectVectorNode, reflectVector } from './accessors/ReflectVectorNode.js';
 export { default as SkinningNode, skinning } from './accessors/SkinningNode.js';
 export { default as SkinningNode, skinning } from './accessors/SkinningNode.js';
-export { default as SceneNode, backgroundBlurriness } from './accessors/SceneNode.js';
+export { default as SceneNode, backgroundBlurriness, backgroundIntensity } from './accessors/SceneNode.js';
 export { default as StorageBufferNode, storage } from './accessors/StorageBufferNode.js';
 export { default as StorageBufferNode, storage } from './accessors/StorageBufferNode.js';
 export { default as TangentNode, tangentGeometry, tangentLocal, tangentView, tangentWorld, transformedTangentView, transformedTangentWorld } from './accessors/TangentNode.js';
 export { default as TangentNode, tangentGeometry, tangentLocal, tangentView, tangentWorld, transformedTangentView, transformedTangentWorld } from './accessors/TangentNode.js';
 export { default as TextureNode, texture, /*textureLevel,*/ sampler } from './accessors/TextureNode.js';
 export { default as TextureNode, texture, /*textureLevel,*/ sampler } from './accessors/TextureNode.js';
@@ -155,7 +155,6 @@ export * from './materials/Materials.js';
 export * from './materialx/MaterialXNodes.js';
 export * from './materialx/MaterialXNodes.js';
 
 
 // functions
 // functions
-export { default as BRDF_BlinnPhong } from './functions/BSDF/BRDF_BlinnPhong.js';
 export { default as BRDF_GGX } from './functions/BSDF/BRDF_GGX.js';
 export { default as BRDF_GGX } from './functions/BSDF/BRDF_GGX.js';
 export { default as BRDF_Lambert } from './functions/BSDF/BRDF_Lambert.js';
 export { default as BRDF_Lambert } from './functions/BSDF/BRDF_Lambert.js';
 export { default as D_GGX } from './functions/BSDF/D_GGX.js';
 export { default as D_GGX } from './functions/BSDF/D_GGX.js';
@@ -168,5 +167,5 @@ export { getDistanceAttenuation } from './lighting/LightUtils.js';
 export { default as getGeometryRoughness } from './functions/material/getGeometryRoughness.js';
 export { default as getGeometryRoughness } from './functions/material/getGeometryRoughness.js';
 export { default as getRoughness } from './functions/material/getRoughness.js';
 export { default as getRoughness } from './functions/material/getRoughness.js';
 
 
-export { default as phongLightingModel } from './functions/PhongLightingModel.js';
-export { default as physicalLightingModel } from './functions/PhysicalLightingModel.js';
+export { default as PhongLightingModel } from './functions/PhongLightingModel.js';
+export { default as PhysicalLightingModel } from './functions/PhysicalLightingModel.js';

+ 1 - 1
examples/jsm/nodes/accessors/BufferAttributeNode.js

@@ -29,7 +29,7 @@ class BufferAttributeNode extends InputNode {
 		const stride = this.bufferStride || itemSize;
 		const stride = this.bufferStride || itemSize;
 		const offset = this.bufferOffset;
 		const offset = this.bufferOffset;
 
 
-		const buffer = new InterleavedBuffer( array, stride );
+		const buffer = array.isInterleavedBuffer === true ? array : new InterleavedBuffer( array, stride );
 		const bufferAttribute = new InterleavedBufferAttribute( buffer, itemSize, offset );
 		const bufferAttribute = new InterleavedBufferAttribute( buffer, itemSize, offset );
 
 
 		buffer.setUsage( this.usage );
 		buffer.setUsage( this.usage );

+ 2 - 0
examples/jsm/nodes/accessors/CubeTextureNode.js

@@ -26,6 +26,8 @@ class CubeTextureNode extends TextureNode {
 
 
 	}
 	}
 
 
+	setUpdateMatrix( /*updateMatrix*/ ) { } // Ignore .updateMatrix for CubeTextureNode
+
 	generate( builder, output ) {
 	generate( builder, output ) {
 
 
 		const { uvNode, levelNode } = builder.getNodeProperties( this );
 		const { uvNode, levelNode } = builder.getNodeProperties( this );

+ 14 - 1
examples/jsm/nodes/accessors/ExtendedMaterialNode.js

@@ -4,6 +4,7 @@ import MaterialNode from './MaterialNode.js';
 import { materialReference } from './MaterialReferenceNode.js';
 import { materialReference } from './MaterialReferenceNode.js';
 import { normalView } from './NormalNode.js';
 import { normalView } from './NormalNode.js';
 import { normalMap } from '../display/NormalMapNode.js';
 import { normalMap } from '../display/NormalMapNode.js';
+import { bumpMap } from '../display/BumpMapNode.js';
 import { addNodeClass } from '../core/Node.js';
 import { addNodeClass } from '../core/Node.js';
 import { nodeImmutable } from '../shadernode/ShaderNode.js';
 import { nodeImmutable } from '../shadernode/ShaderNode.js';
 
 
@@ -39,7 +40,19 @@ class ExtendedMaterialNode extends MaterialNode {
 
 
 		if ( scope === ExtendedMaterialNode.NORMAL ) {
 		if ( scope === ExtendedMaterialNode.NORMAL ) {
 
 
-			node = material.normalMap ? normalMap( this.getTexture( 'normalMap' ), materialReference( 'normalScale', 'vec2' ) ) : normalView;
+			if ( material.normalMap ) {
+
+				node = normalMap( this.getTexture( 'normalMap' ), materialReference( 'normalScale', 'vec2' ) );
+
+			} else if ( material.bumpMap ) {
+
+				node = bumpMap( material.bumpMap, materialReference( 'bumpScale', 'float' ) );
+
+			} else {
+
+				node = normalView;
+
+			}
 
 
 		} else if ( scope === ExtendedMaterialNode.CLEARCOAT_NORMAL ) {
 		} else if ( scope === ExtendedMaterialNode.CLEARCOAT_NORMAL ) {
 
 

+ 8 - 8
examples/jsm/nodes/accessors/InstanceNode.js

@@ -3,7 +3,7 @@ import { instancedBufferAttribute, instancedDynamicBufferAttribute } from './Buf
 import { normalLocal } from './NormalNode.js';
 import { normalLocal } from './NormalNode.js';
 import { positionLocal } from './PositionNode.js';
 import { positionLocal } from './PositionNode.js';
 import { nodeProxy, vec3, mat3, mat4 } from '../shadernode/ShaderNode.js';
 import { nodeProxy, vec3, mat3, mat4 } from '../shadernode/ShaderNode.js';
-import { DynamicDrawUsage } from 'three';
+import { DynamicDrawUsage, InstancedInterleavedBuffer } from 'three';
 
 
 class InstanceNode extends Node {
 class InstanceNode extends Node {
 
 
@@ -24,17 +24,17 @@ class InstanceNode extends Node {
 		if ( instanceMatrixNode === null ) {
 		if ( instanceMatrixNode === null ) {
 
 
 			const instanceMesh = this.instanceMesh;
 			const instanceMesh = this.instanceMesh;
-			const instaceAttribute = instanceMesh.instanceMatrix;
-			const array = instaceAttribute.array;
+			const instanceAttribute = instanceMesh.instanceMatrix;
+			const buffer = new InstancedInterleavedBuffer( instanceAttribute.array, 16, 1 );
 
 
-			const bufferFn = instaceAttribute.usage === DynamicDrawUsage ? instancedDynamicBufferAttribute : instancedBufferAttribute;
+			const bufferFn = instanceAttribute.usage === DynamicDrawUsage ? instancedDynamicBufferAttribute : instancedBufferAttribute;
 
 
 			const instanceBuffers = [
 			const instanceBuffers = [
 				// F.Signature -> bufferAttribute( array, type, stride, offset )
 				// F.Signature -> bufferAttribute( array, type, stride, offset )
-				bufferFn( array, 'vec4', 16, 0 ),
-				bufferFn( array, 'vec4', 16, 4 ),
-				bufferFn( array, 'vec4', 16, 8 ),
-				bufferFn( array, 'vec4', 16, 12 )
+				bufferFn( buffer, 'vec4', 16, 0 ),
+				bufferFn( buffer, 'vec4', 16, 4 ),
+				bufferFn( buffer, 'vec4', 16, 8 ),
+				bufferFn( buffer, 'vec4', 16, 12 )
 			];
 			];
 
 
 			instanceMatrixNode = mat4( ...instanceBuffers );
 			instanceMatrixNode = mat4( ...instanceBuffers );

+ 34 - 44
examples/jsm/nodes/accessors/MaterialNode.js

@@ -1,6 +1,7 @@
 import Node, { addNodeClass } from '../core/Node.js';
 import Node, { addNodeClass } from '../core/Node.js';
+import { reference } from './ReferenceNode.js';
 import { materialReference } from './MaterialReferenceNode.js';
 import { materialReference } from './MaterialReferenceNode.js';
-import { nodeImmutable } from '../shadernode/ShaderNode.js';
+import { nodeImmutable, float } from '../shadernode/ShaderNode.js';
 
 
 class MaterialNode extends Node {
 class MaterialNode extends Node {
 
 
@@ -12,31 +13,6 @@ class MaterialNode extends Node {
 
 
 	}
 	}
 
 
-	getNodeType( builder ) {
-
-		const scope = this.scope;
-		const material = builder.context.material;
-
-		if ( scope === MaterialNode.COLOR ) {
-
-			return material.map !== null ? 'vec4' : 'vec3';
-
-		} else if ( scope === MaterialNode.OPACITY || scope === MaterialNode.ROTATION ) {
-
-			return 'float';
-
-		} else if ( scope === MaterialNode.EMISSIVE || scope === MaterialNode.SHEEN ) {
-
-			return 'vec3';
-
-		} else if ( scope === MaterialNode.ROUGHNESS || scope === MaterialNode.METALNESS || scope === MaterialNode.SPECULAR || scope === MaterialNode.SHININESS || scope === MaterialNode.CLEARCOAT_ROUGHNESS || scope === MaterialNode.SHEEN_ROUGHNESS ) {
-
-			return 'float';
-
-		}
-
-	}
-
 	getFloat( property ) {
 	getFloat( property ) {
 
 
 		//@TODO: Check if it can be cached by property name.
 		//@TODO: Check if it can be cached by property name.
@@ -70,9 +46,13 @@ class MaterialNode extends Node {
 
 
 		let node = null;
 		let node = null;
 
 
-		if ( scope === MaterialNode.ALPHA_TEST ) {
+		if ( scope === MaterialNode.ALPHA_TEST || scope === MaterialNode.SHININESS || scope === MaterialNode.REFLECTIVITY || scope === MaterialNode.ROTATION || scope === MaterialNode.IRIDESCENCE || scope === MaterialNode.IRIDESCENCE_IOR ) {
 
 
-			node = this.getFloat( 'alphaTest' );
+			node = this.getFloat( scope );
+
+		} else if ( scope === MaterialNode.SPECULAR_COLOR ) {
+
+			node = this.getColor( 'specular' );
 
 
 		} else if ( scope === MaterialNode.COLOR ) {
 		} else if ( scope === MaterialNode.COLOR ) {
 
 
@@ -102,25 +82,15 @@ class MaterialNode extends Node {
 
 
 			}
 			}
 
 
-		} else if ( scope === MaterialNode.SHININESS ) {
-
-			node = this.getFloat( 'shininess' );
-
-		} else if ( scope === MaterialNode.SPECULAR_COLOR ) {
-
-			node = this.getColor( 'specular' );
-
-		} else if ( scope === MaterialNode.REFLECTIVITY ) {
-
-			const reflectivityNode = this.getFloat( 'reflectivity' );
+		} else if ( scope === MaterialNode.SPECULAR_STRENGTH ) {
 
 
 			if ( material.specularMap && material.specularMap.isTexture === true ) {
 			if ( material.specularMap && material.specularMap.isTexture === true ) {
 
 
-				node = reflectivityNode.mul( this.getTexture( 'specularMap' ).r );
+				node = this.getTexture( 'specularMap' ).r;
 
 
 			} else {
 			} else {
 
 
-				node = reflectivityNode;
+				node = float( 1 );
 
 
 			}
 			}
 
 
@@ -224,9 +194,21 @@ class MaterialNode extends Node {
 
 
 			node = node.clamp( 0.07, 1.0 );
 			node = node.clamp( 0.07, 1.0 );
 
 
-		} else if ( scope === MaterialNode.ROTATION ) {
+		} else if ( scope === MaterialNode.IRIDESCENCE_THICKNESS ) {
 
 
-			node = this.getFloat( 'rotation' );
+			const iridescenceThicknessMaximum = reference( 1, 'float', material.iridescenceThicknessRange );
+
+			if ( material.iridescenceThicknessMap ) {
+
+				const iridescenceThicknessMinimum = reference( 0, 'float', material.iridescenceThicknessRange );
+
+				node = iridescenceThicknessMaximum.sub( iridescenceThicknessMinimum ).mul( this.getTexture( 'iridescenceThicknessMap' ).g ).add( iridescenceThicknessMinimum );
+
+			} else {
+
+				node = iridescenceThicknessMaximum;
+
+			}
 
 
 		} else {
 		} else {
 
 
@@ -246,7 +228,8 @@ MaterialNode.ALPHA_TEST = 'alphaTest';
 MaterialNode.COLOR = 'color';
 MaterialNode.COLOR = 'color';
 MaterialNode.OPACITY = 'opacity';
 MaterialNode.OPACITY = 'opacity';
 MaterialNode.SHININESS = 'shininess';
 MaterialNode.SHININESS = 'shininess';
-MaterialNode.SPECULAR_COLOR = 'specularColor';
+MaterialNode.SPECULAR = 'specular';
+MaterialNode.SPECULAR_STRENGTH = 'specularStrength';
 MaterialNode.REFLECTIVITY = 'reflectivity';
 MaterialNode.REFLECTIVITY = 'reflectivity';
 MaterialNode.ROUGHNESS = 'roughness';
 MaterialNode.ROUGHNESS = 'roughness';
 MaterialNode.METALNESS = 'metalness';
 MaterialNode.METALNESS = 'metalness';
@@ -256,6 +239,9 @@ MaterialNode.EMISSIVE = 'emissive';
 MaterialNode.ROTATION = 'rotation';
 MaterialNode.ROTATION = 'rotation';
 MaterialNode.SHEEN = 'sheen';
 MaterialNode.SHEEN = 'sheen';
 MaterialNode.SHEEN_ROUGHNESS = 'sheenRoughness';
 MaterialNode.SHEEN_ROUGHNESS = 'sheenRoughness';
+MaterialNode.IRIDESCENCE = 'iridescence';
+MaterialNode.IRIDESCENCE_IOR = 'iridescenceIOR';
+MaterialNode.IRIDESCENCE_THICKNESS = 'iridescenceThickness';
 
 
 export default MaterialNode;
 export default MaterialNode;
 
 
@@ -265,6 +251,7 @@ export const materialShininess = nodeImmutable( MaterialNode, MaterialNode.SHINI
 export const materialEmissive = nodeImmutable( MaterialNode, MaterialNode.EMISSIVE );
 export const materialEmissive = nodeImmutable( MaterialNode, MaterialNode.EMISSIVE );
 export const materialOpacity = nodeImmutable( MaterialNode, MaterialNode.OPACITY );
 export const materialOpacity = nodeImmutable( MaterialNode, MaterialNode.OPACITY );
 export const materialSpecularColor = nodeImmutable( MaterialNode, MaterialNode.SPECULAR_COLOR );
 export const materialSpecularColor = nodeImmutable( MaterialNode, MaterialNode.SPECULAR_COLOR );
+export const materialSpecularStrength = nodeImmutable( MaterialNode, MaterialNode.SPECULAR_STRENGTH );
 export const materialReflectivity = nodeImmutable( MaterialNode, MaterialNode.REFLECTIVITY );
 export const materialReflectivity = nodeImmutable( MaterialNode, MaterialNode.REFLECTIVITY );
 export const materialRoughness = nodeImmutable( MaterialNode, MaterialNode.ROUGHNESS );
 export const materialRoughness = nodeImmutable( MaterialNode, MaterialNode.ROUGHNESS );
 export const materialMetalness = nodeImmutable( MaterialNode, MaterialNode.METALNESS );
 export const materialMetalness = nodeImmutable( MaterialNode, MaterialNode.METALNESS );
@@ -273,5 +260,8 @@ export const materialClearcoatRoughness = nodeImmutable( MaterialNode, MaterialN
 export const materialRotation = nodeImmutable( MaterialNode, MaterialNode.ROTATION );
 export const materialRotation = nodeImmutable( MaterialNode, MaterialNode.ROTATION );
 export const materialSheen = nodeImmutable( MaterialNode, MaterialNode.SHEEN );
 export const materialSheen = nodeImmutable( MaterialNode, MaterialNode.SHEEN );
 export const materialSheenRoughness = nodeImmutable( MaterialNode, MaterialNode.SHEEN_ROUGHNESS );
 export const materialSheenRoughness = nodeImmutable( MaterialNode, MaterialNode.SHEEN_ROUGHNESS );
+export const materialIridescence = nodeImmutable( MaterialNode, MaterialNode.IRIDESCENCE );
+export const materialIridescenceIOR = nodeImmutable( MaterialNode, MaterialNode.IRIDESCENCE_IOR );
+export const materialIridescenceThickness = nodeImmutable( MaterialNode, MaterialNode.IRIDESCENCE_THICKNESS );
 
 
 addNodeClass( MaterialNode );
 addNodeClass( MaterialNode );

+ 6 - 0
examples/jsm/nodes/accessors/SceneNode.js

@@ -25,6 +25,10 @@ class SceneNode extends Node {
 
 
 			output = reference( 'backgroundBlurriness', 'float', scene );
 			output = reference( 'backgroundBlurriness', 'float', scene );
 
 
+		} else if ( scope === SceneNode.BACKGROUND_INTENSITY ) {
+
+			output = reference( 'backgroundIntensity', 'float', scene );
+
 		} else {
 		} else {
 
 
 			console.error( 'THREE.SceneNode: Unknown scope:', scope );
 			console.error( 'THREE.SceneNode: Unknown scope:', scope );
@@ -38,9 +42,11 @@ class SceneNode extends Node {
 }
 }
 
 
 SceneNode.BACKGROUND_BLURRINESS = 'backgroundBlurriness';
 SceneNode.BACKGROUND_BLURRINESS = 'backgroundBlurriness';
+SceneNode.BACKGROUND_INTENSITY = 'backgroundIntensity';
 
 
 export default SceneNode;
 export default SceneNode;
 
 
 export const backgroundBlurriness = nodeImmutable( SceneNode, SceneNode.BACKGROUND_BLURRINESS );
 export const backgroundBlurriness = nodeImmutable( SceneNode, SceneNode.BACKGROUND_BLURRINESS );
+export const backgroundIntensity = nodeImmutable( SceneNode, SceneNode.BACKGROUND_INTENSITY );
 
 
 addNodeClass( SceneNode );
 addNodeClass( SceneNode );

+ 48 - 7
examples/jsm/nodes/accessors/TextureNode.js

@@ -5,12 +5,12 @@ import { colorSpaceToLinear } from '../display/ColorSpaceNode.js';
 import { context } from '../core/ContextNode.js';
 import { context } from '../core/ContextNode.js';
 import { expression } from '../code/ExpressionNode.js';
 import { expression } from '../code/ExpressionNode.js';
 import { addNodeClass } from '../core/Node.js';
 import { addNodeClass } from '../core/Node.js';
-import { addNodeElement, nodeProxy, vec3 } from '../shadernode/ShaderNode.js';
+import { addNodeElement, nodeProxy, vec3, nodeObject } from '../shadernode/ShaderNode.js';
 import { NodeUpdateType } from '../core/constants.js';
 import { NodeUpdateType } from '../core/constants.js';
 
 
 class TextureNode extends UniformNode {
 class TextureNode extends UniformNode {
 
 
-	constructor( value, uvNode = null, levelNode = null ) {
+	constructor( value, uvNode = null, levelNode = null, compareNode = null ) {
 
 
 		super( value );
 		super( value );
 
 
@@ -18,8 +18,12 @@ class TextureNode extends UniformNode {
 
 
 		this.uvNode = uvNode;
 		this.uvNode = uvNode;
 		this.levelNode = levelNode;
 		this.levelNode = levelNode;
+		this.compareNode = compareNode;
 
 
-		this.updateType = NodeUpdateType.FRAME;
+		this.updateMatrix = false;
+		this.updateType = NodeUpdateType.NONE;
+
+		this.setUpdateMatrix( uvNode === null );
 
 
 	}
 	}
 
 
@@ -45,9 +49,24 @@ class TextureNode extends UniformNode {
 
 
 	getDefaultUV() {
 	getDefaultUV() {
 
 
+		return uv( this.value.channel );
+
+	}
+
+	getTextureMatrix( uvNode ) {
+
 		const texture = this.value;
 		const texture = this.value;
 
 
-		return uniform( texture.matrix ).mul( vec3( uv( texture.channel ), 1 ) );
+		return uniform( texture.matrix ).mul( vec3( uvNode, 1 ) ).xy;
+
+	}
+
+	setUpdateMatrix( value ) {
+
+		this.updateMatrix = value;
+		this.updateType = value ? NodeUpdateType.FRAME : NodeUpdateType.NONE;
+
+		return this;
 
 
 	}
 	}
 
 
@@ -65,7 +84,13 @@ class TextureNode extends UniformNode {
 
 
 		}
 		}
 
 
-		uvNode || ( uvNode = this.getDefaultUV() );
+		if ( ! uvNode ) uvNode = this.getDefaultUV();
+
+		if ( this.updateMatrix ) {
+
+			uvNode = this.getTextureMatrix( uvNode );
+
+		}
 
 
 		//
 		//
 
 
@@ -88,6 +113,7 @@ class TextureNode extends UniformNode {
 
 
 		const { uvNode, levelNode } = builder.getNodeProperties( this );
 		const { uvNode, levelNode } = builder.getNodeProperties( this );
 
 
+		const compareNode = this.compareNode;
 		const texture = this.value;
 		const texture = this.value;
 
 
 		if ( ! texture || texture.isTexture !== true ) {
 		if ( ! texture || texture.isTexture !== true ) {
@@ -128,6 +154,12 @@ class TextureNode extends UniformNode {
 
 
 					snippet = builder.getTextureLevel( texture, textureProperty, uvSnippet, levelSnippet );
 					snippet = builder.getTextureLevel( texture, textureProperty, uvSnippet, levelSnippet );
 
 
+				} else if ( compareNode !== null ) {
+
+					const compareSnippet = compareNode.build( builder, 'float' );
+
+					snippet = builder.getTextureCompare( texture, textureProperty, uvSnippet, compareSnippet );
+
 				} else {
 				} else {
 
 
 					snippet = builder.getTexture( texture, textureProperty, uvSnippet );
 					snippet = builder.getTexture( texture, textureProperty, uvSnippet );
@@ -160,7 +192,7 @@ class TextureNode extends UniformNode {
 		const textureNode = this.clone();
 		const textureNode = this.clone();
 		textureNode.uvNode = uvNode;
 		textureNode.uvNode = uvNode;
 
 
-		return textureNode;
+		return nodeObject( textureNode );
 
 
 	}
 	}
 
 
@@ -181,6 +213,15 @@ class TextureNode extends UniformNode {
 
 
 	}
 	}
 
 
+	compare( compareNode ) {
+
+		const textureNode = this.clone();
+		textureNode.compareNode = nodeObject( compareNode );
+
+		return nodeObject( textureNode );
+
+	}
+
 	serialize( data ) {
 	serialize( data ) {
 
 
 		super.serialize( data );
 		super.serialize( data );
@@ -211,7 +252,7 @@ class TextureNode extends UniformNode {
 
 
 	clone() {
 	clone() {
 
 
-		return new this.constructor( this.value, this.uvNode, this.levelNode );
+		return new this.constructor( this.value, this.uvNode, this.levelNode, this.compareNode );
 
 
 	}
 	}
 
 

+ 7 - 9
examples/jsm/nodes/core/LightingModel.js

@@ -1,17 +1,15 @@
 class LightingModel {
 class LightingModel {
 
 
-	constructor( init = null, direct = null, indirectDiffuse = null, indirectSpecular = null, ambientOcclusion = null ) {
+	init( /*input, stack, builder*/ ) { }
 
 
-		this.init = init;
-		this.direct = direct;
-		this.indirectDiffuse = indirectDiffuse;
-		this.indirectSpecular = indirectSpecular;
-		this.ambientOcclusion = ambientOcclusion;
+	direct( /*input, stack, builder*/ ) { }
 
 
-	}
+	indirectDiffuse( /*input, stack, builder*/ ) { }
+
+	indirectSpecular( /*input, stack, builder*/ ) { }
+
+	ambientOcclusion( /*input, stack, builder*/ ) { }
 
 
 }
 }
 
 
 export default LightingModel;
 export default LightingModel;
-
-export const lightingModel = ( ...params ) => new LightingModel( ...params );

+ 11 - 2
examples/jsm/nodes/core/Node.js

@@ -1,3 +1,4 @@
+import { EventDispatcher } from 'three';
 import { NodeUpdateType } from './constants.js';
 import { NodeUpdateType } from './constants.js';
 import { getNodeChildren, getCacheKey } from './NodeUtils.js';
 import { getNodeChildren, getCacheKey } from './NodeUtils.js';
 import { MathUtils } from 'three';
 import { MathUtils } from 'three';
@@ -6,11 +7,11 @@ const NodeClasses = new Map();
 
 
 let _nodeId = 0;
 let _nodeId = 0;
 
 
-class Node {
+class Node extends EventDispatcher {
 
 
 	constructor( nodeType = null ) {
 	constructor( nodeType = null ) {
 
 
-		this.isNode = true;
+		super();
 
 
 		this.nodeType = nodeType;
 		this.nodeType = nodeType;
 
 
@@ -19,6 +20,8 @@ class Node {
 
 
 		this.uuid = MathUtils.generateUUID();
 		this.uuid = MathUtils.generateUUID();
 
 
+		this.isNode = true;
+
 		Object.defineProperty( this, 'id', { value: _nodeId ++ } );
 		Object.defineProperty( this, 'id', { value: _nodeId ++ } );
 
 
 	}
 	}
@@ -52,6 +55,12 @@ class Node {
 
 
 	}
 	}
 
 
+	dispose() {
+
+		this.dispatchEvent( { type: 'dispose' } );
+
+	}
+
 	traverse( callback, replaceNode = null ) {
 	traverse( callback, replaceNode = null ) {
 
 
 		callback( this, replaceNode );
 		callback( this, replaceNode );

+ 4 - 0
examples/jsm/nodes/core/PropertyNode.js

@@ -51,7 +51,11 @@ export const clearcoat = nodeImmutable( PropertyNode, 'float', 'Clearcoat' );
 export const clearcoatRoughness = nodeImmutable( PropertyNode, 'float', 'ClearcoatRoughness' );
 export const clearcoatRoughness = nodeImmutable( PropertyNode, 'float', 'ClearcoatRoughness' );
 export const sheen = nodeImmutable( PropertyNode, 'vec3', 'Sheen' );
 export const sheen = nodeImmutable( PropertyNode, 'vec3', 'Sheen' );
 export const sheenRoughness = nodeImmutable( PropertyNode, 'float', 'SheenRoughness' );
 export const sheenRoughness = nodeImmutable( PropertyNode, 'float', 'SheenRoughness' );
+export const iridescence = nodeImmutable( PropertyNode, 'float', 'Iridescence' );
+export const iridescenceIOR = nodeImmutable( PropertyNode, 'float', 'IridescenceIOR' );
+export const iridescenceThickness = nodeImmutable( PropertyNode, 'float', 'IridescenceThickness' );
 export const specularColor = nodeImmutable( PropertyNode, 'color', 'SpecularColor' );
 export const specularColor = nodeImmutable( PropertyNode, 'color', 'SpecularColor' );
 export const shininess = nodeImmutable( PropertyNode, 'float', 'Shininess' );
 export const shininess = nodeImmutable( PropertyNode, 'float', 'Shininess' );
+export const output = nodeImmutable( PropertyNode, 'vec4', 'Output' );
 
 
 addNodeClass( PropertyNode );
 addNodeClass( PropertyNode );

+ 77 - 0
examples/jsm/nodes/display/BumpMapNode.js

@@ -0,0 +1,77 @@
+import TempNode from '../core/TempNode.js';
+import { texture } from '../accessors/TextureNode.js';
+import { addNodeClass } from '../core/Node.js';
+import { uv } from '../accessors/UVNode.js';
+import { normalView } from '../accessors/NormalNode.js';
+import { positionView } from '../accessors/PositionNode.js';
+import { faceDirection } from './FrontFacingNode.js';
+import { tslFn, nodeProxy, vec2 } from '../shadernode/ShaderNode.js';
+
+// Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen
+// https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf
+
+// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)
+
+const dHdxy_fwd = tslFn( ( { bumpTexture, bumpScale } ) => {
+
+	const uvNode = uv();
+
+	const Hll = texture( bumpTexture, uvNode ).x;
+
+	return vec2(
+		texture( bumpTexture, uvNode.add( uvNode.dFdx() ) ).x.sub( Hll ),
+		texture( bumpTexture, uvNode.add( uvNode.dFdy() ) ).x.sub( Hll )
+	).mul( bumpScale );
+
+} );
+
+const perturbNormalArb = tslFn( ( inputs ) => {
+
+	const { surf_pos, surf_norm, dHdxy } = inputs;
+
+	const vSigmaX = surf_pos.dFdx();
+	const vSigmaY = surf_pos.dFdy();
+	const vN = surf_norm; // normalized
+
+	const R1 = vSigmaY.cross( vN );
+	const R2 = vN.cross( vSigmaX );
+
+	const fDet = vSigmaX.dot( R1 ).mul( faceDirection );
+
+	const vGrad = fDet.sign().mul( dHdxy.x.mul( R1 ).add( dHdxy.y.mul( R2 ) ) );
+
+	return fDet.abs().mul( surf_norm ).sub( vGrad ).normalize();
+
+} );
+
+class BumpMapNode extends TempNode {
+
+	constructor( texture, scaleNode = null ) {
+
+		super( 'vec3' );
+
+		this.texture = texture;
+		this.scaleNode = scaleNode;
+
+	}
+
+	construct() {
+
+		const bumpScale = this.scaleNode !== null ? this.scaleNode : 1;
+		const dHdxy = dHdxy_fwd( { bumpTexture: this.texture, bumpScale } );
+
+		return perturbNormalArb( {
+			surf_pos: positionView.negate(),
+			surf_norm: normalView,
+			dHdxy
+		} );
+
+	}
+
+}
+
+export default BumpMapNode;
+
+export const bumpMap = nodeProxy( BumpMapNode );
+
+addNodeClass( BumpMapNode );

+ 2 - 2
examples/jsm/nodes/display/NormalMapNode.js

@@ -15,7 +15,7 @@ import { TangentSpaceNormalMap, ObjectSpaceNormalMap } from 'three';
 // Normal Mapping Without Precomputed Tangents
 // Normal Mapping Without Precomputed Tangents
 // http://www.thetenthplanet.de/archives/1180
 // http://www.thetenthplanet.de/archives/1180
 
 
-const perturbNormal2ArbNode = tslFn( ( inputs ) => {
+const perturbNormal2Arb = tslFn( ( inputs ) => {
 
 
 	const { eye_pos, surf_norm, mapN, uv } = inputs;
 	const { eye_pos, surf_norm, mapN, uv } = inputs;
 
 
@@ -80,7 +80,7 @@ class NormalMapNode extends TempNode {
 
 
 			} else {
 			} else {
 
 
-				outputNode = perturbNormal2ArbNode( {
+				outputNode = perturbNormal2Arb( {
 					eye_pos: positionView,
 					eye_pos: positionView,
 					surf_norm: normalView,
 					surf_norm: normalView,
 					mapN: normalMap,
 					mapN: normalMap,

+ 0 - 30
examples/jsm/nodes/functions/BSDF/BRDF_BlinnPhong.js

@@ -1,30 +0,0 @@
-import F_Schlick from './F_Schlick.js';
-import { shininess, specularColor } from '../../core/PropertyNode.js';
-import { transformedNormalView } from '../../accessors/NormalNode.js';
-import { positionViewDirection } from '../../accessors/PositionNode.js';
-import { tslFn, float } from '../../shadernode/ShaderNode.js';
-
-const G_BlinnPhong_Implicit = () => float( 0.25 );
-
-const D_BlinnPhong = tslFn( ( { dotNH } ) => {
-
-	return shininess.mul( 0.5 / Math.PI ).add( 1.0 ).mul( dotNH.pow( shininess ) );
-
-} );
-
-const BRDF_BlinnPhong = tslFn( ( { lightDirection } ) => {
-
-	const halfDir = lightDirection.add( positionViewDirection ).normalize();
-
-	const dotNH = transformedNormalView.dot( halfDir ).clamp();
-	const dotVH = positionViewDirection.dot( halfDir ).clamp();
-
-	const F = F_Schlick( { f0: specularColor, f90: 1.0, dotVH } );
-	const G = G_BlinnPhong_Implicit();
-	const D = D_BlinnPhong( { dotNH } );
-
-	return F.mul( G ).mul( D );
-
-} );
-
-export default BRDF_BlinnPhong;

+ 10 - 2
examples/jsm/nodes/functions/BSDF/BRDF_GGX.js

@@ -3,12 +3,13 @@ import V_GGX_SmithCorrelated from './V_GGX_SmithCorrelated.js';
 import D_GGX from './D_GGX.js';
 import D_GGX from './D_GGX.js';
 import { transformedNormalView } from '../../accessors/NormalNode.js';
 import { transformedNormalView } from '../../accessors/NormalNode.js';
 import { positionViewDirection } from '../../accessors/PositionNode.js';
 import { positionViewDirection } from '../../accessors/PositionNode.js';
+import { iridescence } from '../../core/PropertyNode.js';
 import { tslFn } from '../../shadernode/ShaderNode.js';
 import { tslFn } from '../../shadernode/ShaderNode.js';
 
 
 // GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility
 // GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility
 const BRDF_GGX = tslFn( ( inputs ) => {
 const BRDF_GGX = tslFn( ( inputs ) => {
 
 
-	const { lightDirection, f0, f90, roughness } = inputs;
+	const { lightDirection, f0, f90, roughness, iridescenceFresnel } = inputs;
 
 
 	const normalView = inputs.normalView || transformedNormalView;
 	const normalView = inputs.normalView || transformedNormalView;
 
 
@@ -21,7 +22,14 @@ const BRDF_GGX = tslFn( ( inputs ) => {
 	const dotNH = normalView.dot( halfDir ).clamp();
 	const dotNH = normalView.dot( halfDir ).clamp();
 	const dotVH = positionViewDirection.dot( halfDir ).clamp();
 	const dotVH = positionViewDirection.dot( halfDir ).clamp();
 
 
-	const F = F_Schlick( { f0, f90, dotVH } );
+	let F = F_Schlick( { f0, f90, dotVH } );
+
+	if ( iridescenceFresnel ) {
+
+		F = iridescence.mix( F, iridescenceFresnel );
+
+	}
+
 	const V = V_GGX_SmithCorrelated( { alpha, dotNL, dotNV } );
 	const V = V_GGX_SmithCorrelated( { alpha, dotNL, dotNV } );
 	const D = D_GGX( { alpha, dotNH } );
 	const D = D_GGX( { alpha, dotNH } );
 
 

+ 13 - 0
examples/jsm/nodes/functions/BSDF/Schlick_to_F0.js

@@ -0,0 +1,13 @@
+import { tslFn, vec3 } from '../../shadernode/ShaderNode.js';
+
+const Schlick_to_F0 = tslFn( ( { f, f90, dotVH } ) => {
+
+	const x = dotVH.oneMinus().saturate();
+	const x2 = x.mul( x );
+	const x5 = x.mul( x2, x2 ).clamp( 0, .9999 );
+
+	return f.sub( vec3( f90 ).mul( x5 ) ).div( x5.oneMinus() );
+
+} );
+
+export default Schlick_to_F0;

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