2
0
Эх сурвалжийг харах

Merge remote-tracking branch 'upstream/dev' into nodematerial-webgpu

sunag 4 жил өмнө
parent
commit
6e1bca1a69

+ 6 - 3
docs/api/en/core/Object3D.html

@@ -413,7 +413,8 @@
 		<p>
 		<p>
 		callback - A function with as first argument an object3D object.<br /><br />
 		callback - A function with as first argument an object3D object.<br /><br />
 
 
-		Executes the callback on this object and all descendants.
+		Executes the callback on this object and all descendants.<br/>
+		Note: Modifying the scene graph inside the callback is discouraged.
 		</p>
 		</p>
 
 
 		<h3>[method:null traverseVisible]( [param:Function callback] )</h3>
 		<h3>[method:null traverseVisible]( [param:Function callback] )</h3>
@@ -421,14 +422,16 @@
 		callback - A function with as first argument an object3D object.<br /><br />
 		callback - A function with as first argument an object3D object.<br /><br />
 
 
 		Like traverse, but the callback will only be executed for visible objects.
 		Like traverse, but the callback will only be executed for visible objects.
-		Descendants of invisible objects are not traversed.
+		Descendants of invisible objects are not traversed.<br/>
+		Note: Modifying the scene graph inside the callback is discouraged.
 		</p>
 		</p>
 
 
 		<h3>[method:null traverseAncestors]( [param:Function callback] )</h3>
 		<h3>[method:null traverseAncestors]( [param:Function callback] )</h3>
 		<p>
 		<p>
 		callback - A function with as first argument an object3D object.<br /><br />
 		callback - A function with as first argument an object3D object.<br /><br />
 
 
-		Executes the callback on all ancestors.
+		Executes the callback on all ancestors.<br/>
+		Note: Modifying the scene graph inside the callback is discouraged.
 		</p>
 		</p>
 
 
 		<h3>[method:null updateMatrix]()</h3>
 		<h3>[method:null updateMatrix]()</h3>

+ 1 - 0
examples/jsm/controls/TransformControls.d.ts

@@ -38,6 +38,7 @@ export class TransformControls extends Object3D {
 	setMode( mode: string ): void;
 	setMode( mode: string ): void;
 	setTranslationSnap( translationSnap: Number | null ): void;
 	setTranslationSnap( translationSnap: Number | null ): void;
 	setRotationSnap( rotationSnap: Number | null ): void;
 	setRotationSnap( rotationSnap: Number | null ): void;
+	setScaleSnap( scaleSnap: Number | null ): void;
 	setSize( size: number ): void;
 	setSize( size: number ): void;
 	setSpace( space: string ): void;
 	setSpace( space: string ): void;
 	dispose(): void;
 	dispose(): void;

+ 1 - 1
examples/jsm/offscreen/scene.js

@@ -22,7 +22,7 @@ function init( canvas, width, height, pixelRatio, path ) {
 
 
 		var texture = new THREE.CanvasTexture( imageBitmap );
 		var texture = new THREE.CanvasTexture( imageBitmap );
 
 
-		var geometry = new THREE.IcosahedronBufferGeometry( 5, 3 );
+		var geometry = new THREE.IcosahedronBufferGeometry( 5, 8 );
 		var materials = [
 		var materials = [
 			new THREE.MeshMatcapMaterial( { color: 0xaa24df, matcap: texture } ),
 			new THREE.MeshMatcapMaterial( { color: 0xaa24df, matcap: texture } ),
 			new THREE.MeshMatcapMaterial( { color: 0x605d90, matcap: texture } ),
 			new THREE.MeshMatcapMaterial( { color: 0x605d90, matcap: texture } ),

+ 1 - 1
examples/physics_ammo_instancing.html

@@ -88,7 +88,7 @@
 
 
 				// Spheres
 				// Spheres
 
 
-				var geometry = new THREE.IcosahedronBufferGeometry( 0.075, 2 );
+				var geometry = new THREE.IcosahedronBufferGeometry( 0.075, 3 );
 				spheres = new THREE.InstancedMesh( geometry, material, 100 );
 				spheres = new THREE.InstancedMesh( geometry, material, 100 );
 				spheres.castShadow = true;
 				spheres.castShadow = true;
 				spheres.receiveShadow = true;
 				spheres.receiveShadow = true;

+ 1 - 1
examples/webgl_instancing_raycast.html

@@ -45,7 +45,7 @@
 				light.position.set( - 1, - 1.5, - 1 );
 				light.position.set( - 1, - 1.5, - 1 );
 				scene.add( light );
 				scene.add( light );
 
 
-				var geometry = new THREE.IcosahedronGeometry( 0.5, 2 );
+				var geometry = new THREE.IcosahedronGeometry( 0.5, 3 );
 				var material = new THREE.MeshPhongMaterial();
 				var material = new THREE.MeshPhongMaterial();
 
 
 				mesh = new THREE.InstancedMesh( geometry, material, count );
 				mesh = new THREE.InstancedMesh( geometry, material, count );

+ 1 - 1
examples/webgl_loader_pdb.html

@@ -180,7 +180,7 @@
 					var json = pdb.json;
 					var json = pdb.json;
 
 
 					var boxGeometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
 					var boxGeometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
-					var sphereGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );
+					var sphereGeometry = new THREE.IcosahedronBufferGeometry( 1, 3 );
 
 
 					geometryAtoms.computeBoundingBox();
 					geometryAtoms.computeBoundingBox();
 					geometryAtoms.boundingBox.getCenter( offset ).negate();
 					geometryAtoms.boundingBox.getCenter( offset ).negate();

+ 1 - 1
examples/webgl_materials_cubemap_dynamic.html

@@ -82,7 +82,7 @@
 					reflectivity: 1
 					reflectivity: 1
 				} );
 				} );
 
 
-				sphere = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 20, 3 ), material );
+				sphere = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 20, 8 ), material );
 				scene.add( sphere );
 				scene.add( sphere );
 
 
 				cube = new THREE.Mesh( new THREE.BoxBufferGeometry( 20, 20, 20 ), material );
 				cube = new THREE.Mesh( new THREE.BoxBufferGeometry( 20, 20, 20 ), material );

+ 1 - 1
examples/webgl_materials_envmaps.html

@@ -62,7 +62,7 @@
 
 
 				//
 				//
 
 
-				var geometry = new THREE.IcosahedronBufferGeometry( 400, 4 );
+				var geometry = new THREE.IcosahedronBufferGeometry( 400, 15 );
 				sphereMaterial = new THREE.MeshLambertMaterial( { envMap: textureCube } );
 				sphereMaterial = new THREE.MeshLambertMaterial( { envMap: textureCube } );
 				sphereMesh = new THREE.Mesh( geometry, sphereMaterial );
 				sphereMesh = new THREE.Mesh( geometry, sphereMaterial );
 				scene.add( sphereMesh );
 				scene.add( sphereMesh );

+ 1 - 1
examples/webgl_multiple_scenes_comparison.html

@@ -87,7 +87,7 @@
 
 
 			function initMeshes() {
 			function initMeshes() {
 
 
-				var geometry = new THREE.IcosahedronBufferGeometry( 1, 2 );
+				var geometry = new THREE.IcosahedronBufferGeometry( 1, 3 );
 
 
 				var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 				var mesh = new THREE.Mesh( geometry, new THREE.MeshStandardMaterial() );
 				sceneL.add( mesh );
 				sceneL.add( mesh );

+ 1 - 1
examples/webgl_postprocessing_unreal_bloom_selective.html

@@ -222,7 +222,7 @@
 				scene.traverse( disposeMaterial );
 				scene.traverse( disposeMaterial );
 				scene.children.length = 0;
 				scene.children.length = 0;
 
 
-				var geometry = new THREE.IcosahedronBufferGeometry( 1, 4 );
+				var geometry = new THREE.IcosahedronBufferGeometry( 1, 15 );
 
 
 				for ( var i = 0; i < 50; i ++ ) {
 				for ( var i = 0; i < 50; i ++ ) {
 
 

+ 1 - 1
examples/webxr_vr_ballshooter.html

@@ -57,7 +57,7 @@
 				light.position.set( 1, 1, 1 ).normalize();
 				light.position.set( 1, 1, 1 ).normalize();
 				scene.add( light );
 				scene.add( light );
 
 
-				var geometry = new THREE.IcosahedronBufferGeometry( radius, 2 );
+				var geometry = new THREE.IcosahedronBufferGeometry( radius, 3 );
 
 
 				for ( var i = 0; i < 200; i ++ ) {
 				for ( var i = 0; i < 200; i ++ ) {
 
 

+ 1 - 1
examples/webxr_vr_dragging.html

@@ -77,7 +77,7 @@
 					new THREE.BoxBufferGeometry( 0.2, 0.2, 0.2 ),
 					new THREE.BoxBufferGeometry( 0.2, 0.2, 0.2 ),
 					new THREE.ConeBufferGeometry( 0.2, 0.2, 64 ),
 					new THREE.ConeBufferGeometry( 0.2, 0.2, 64 ),
 					new THREE.CylinderBufferGeometry( 0.2, 0.2, 0.2, 64 ),
 					new THREE.CylinderBufferGeometry( 0.2, 0.2, 0.2, 64 ),
-					new THREE.IcosahedronBufferGeometry( 0.2, 3 ),
+					new THREE.IcosahedronBufferGeometry( 0.2, 8 ),
 					new THREE.TorusBufferGeometry( 0.2, 0.04, 64, 32 )
 					new THREE.TorusBufferGeometry( 0.2, 0.04, 64, 32 )
 				];
 				];
 
 

+ 1 - 1
examples/webxr_vr_paint.html

@@ -146,7 +146,7 @@
 				var material = new THREE.MeshStandardMaterial( { flatShading: true } );
 				var material = new THREE.MeshStandardMaterial( { flatShading: true } );
 				var mesh = new THREE.Mesh( geometry, material );
 				var mesh = new THREE.Mesh( geometry, material );
 
 
-				var pivot = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 0.01, 2 ) );
+				var pivot = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 0.01, 3 ) );
 				pivot.name = 'pivot';
 				pivot.name = 'pivot';
 				pivot.position.z = - 0.05;
 				pivot.position.z = - 0.05;
 				mesh.add( pivot );
 				mesh.add( pivot );

+ 1 - 1
examples/webxr_vr_sculpt.html

@@ -121,7 +121,7 @@
 				var material = new THREE.MeshStandardMaterial( { flatShading: true } );
 				var material = new THREE.MeshStandardMaterial( { flatShading: true } );
 				var mesh = new THREE.Mesh( geometry, material );
 				var mesh = new THREE.Mesh( geometry, material );
 
 
-				var pivot = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 0.01, 2 ) );
+				var pivot = new THREE.Mesh( new THREE.IcosahedronBufferGeometry( 0.01, 3 ) );
 				pivot.name = 'pivot';
 				pivot.name = 'pivot';
 				pivot.position.z = - 0.05;
 				pivot.position.z = - 0.05;
 				mesh.add( pivot );
 				mesh.add( pivot );