Răsfoiți Sursa

.applyMatrix() -> .applyMatrix4()

WestLangley 5 ani în urmă
părinte
comite
e1d444d681

+ 1 - 1
examples/js/controls/TransformControls.js

@@ -1064,7 +1064,7 @@ THREE.TransformControlsGizmo = function () {
 				object.updateMatrix();
 
 				var tempGeometry = object.geometry.clone();
-				tempGeometry.applyMatrix( object.matrix );
+				tempGeometry.applyMatrix4( object.matrix );
 				object.geometry = tempGeometry;
 				object.renderOrder = Infinity;
 

+ 1 - 1
examples/js/geometries/TeapotBufferGeometry.js

@@ -674,7 +674,7 @@ THREE.TeapotBufferGeometry = function ( size, segments, bottom, lid, body, fitLi
 					v4 = v1 + vertPerRow;
 
 					// Normals and UVs cannot be shared. Without clone(), you can see the consequences
-					// of sharing if you call geometry.applyMatrix( matrix ).
+					// of sharing if you call geometry.applyMatrix4( matrix ).
 					if ( notDegenerate( v1, v2, v3 ) ) {
 
 						indices[ indexCount ++ ] = v1;

+ 2 - 2
examples/js/loaders/3MFLoader.js

@@ -1281,7 +1281,7 @@ THREE.ThreeMFLoader.prototype = Object.assign( Object.create( THREE.Loader.proto
 
 				if ( transform ) {
 
-					object3D.applyMatrix( transform );
+					object3D.applyMatrix4( transform );
 
 				}
 
@@ -1386,7 +1386,7 @@ THREE.ThreeMFLoader.prototype = Object.assign( Object.create( THREE.Loader.proto
 
 				if ( transform ) {
 
-					object3D.applyMatrix( transform );
+					object3D.applyMatrix4( transform );
 
 				}
 

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

@@ -822,7 +822,7 @@ THREE.FBXLoader = ( function () {
 
 					var transform = generateTransform( node.userData.transformData );
 
-					node.applyMatrix( transform );
+					node.applyMatrix4( transform );
 
 				}
 

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -3126,7 +3126,7 @@ THREE.GLTFLoader = ( function () {
 
 				var matrix = new THREE.Matrix4();
 				matrix.fromArray( nodeDef.matrix );
-				node.applyMatrix( matrix );
+				node.applyMatrix4( matrix );
 
 			} else {
 

+ 1 - 1
examples/js/loaders/TDSLoader.js

@@ -426,7 +426,7 @@ THREE.TDSLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 				var inverse = new THREE.Matrix4();
 				inverse.getInverse( matrix, true );
-				geometry.applyMatrix( inverse );
+				geometry.applyMatrix4( inverse );
 
 				matrix.decompose( mesh.position, mesh.quaternion, mesh.scale );
 

+ 3 - 3
examples/js/loaders/XLoader.js

@@ -799,7 +799,7 @@ THREE.XLoader = ( function () {
 				}
 				var b = new THREE.Bone();
 				b.name = this._currentFrame.name;
-				b.applyMatrix( this._currentFrame.FrameTransformMatrix );
+				b.applyMatrix4( this._currentFrame.FrameTransformMatrix );
 				b.matrixWorld = b.matrix;
 				b.FrameTransformMatrix = this._currentFrame.FrameTransformMatrix;
 				this._currentFrame.putBone = b;
@@ -1262,7 +1262,7 @@ THREE.XLoader = ( function () {
 						putting = true;
 						var b = new THREE.Bone();
 						b.name = this.HieStack[ frame ].name;
-						b.applyMatrix( this.HieStack[ frame ].FrameTransformMatrix );
+						b.applyMatrix4( this.HieStack[ frame ].FrameTransformMatrix );
 						b.matrixWorld = b.matrix;
 						b.FrameTransformMatrix = this.HieStack[ frame ].FrameTransformMatrix;
 						b.pos = new THREE.Vector3().setFromMatrixPosition( b.FrameTransformMatrix ).toArray();
@@ -1401,7 +1401,7 @@ THREE.XLoader = ( function () {
 						}
 
 					}
-					mesh.applyMatrix( worldBaseMx );
+					mesh.applyMatrix4( worldBaseMx );
 
 				}
 				this.Meshes.push( mesh );

+ 1 - 1
examples/js/misc/VolumeSlice.js

@@ -206,7 +206,7 @@ THREE.VolumeSlice.prototype = {
 			this.mesh.geometry = this.geometry;
 			//reset mesh matrix
 			this.mesh.matrix.identity();
-			this.mesh.applyMatrix( this.matrix );
+			this.mesh.applyMatrix4( this.matrix );
 
 		}
 

+ 1 - 1
examples/jsm/controls/TransformControls.js

@@ -1087,7 +1087,7 @@ var TransformControlsGizmo = function () {
 				object.updateMatrix();
 
 				var tempGeometry = object.geometry.clone();
-				tempGeometry.applyMatrix( object.matrix );
+				tempGeometry.applyMatrix4( object.matrix );
 				object.geometry = tempGeometry;
 				object.renderOrder = Infinity;
 

+ 1 - 1
examples/jsm/geometries/TeapotBufferGeometry.js

@@ -682,7 +682,7 @@ var TeapotBufferGeometry = function ( size, segments, bottom, lid, body, fitLid,
 					v4 = v1 + vertPerRow;
 
 					// Normals and UVs cannot be shared. Without clone(), you can see the consequences
-					// of sharing if you call geometry.applyMatrix( matrix ).
+					// of sharing if you call geometry.applyMatrix4( matrix ).
 					if ( notDegenerate( v1, v2, v3 ) ) {
 
 						indices[ indexCount ++ ] = v1;

+ 2 - 2
examples/jsm/loaders/3MFLoader.js

@@ -1305,7 +1305,7 @@ ThreeMFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 				if ( transform ) {
 
-					object3D.applyMatrix( transform );
+					object3D.applyMatrix4( transform );
 
 				}
 
@@ -1410,7 +1410,7 @@ ThreeMFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 				if ( transform ) {
 
-					object3D.applyMatrix( transform );
+					object3D.applyMatrix4( transform );
 
 				}
 

+ 2 - 2
examples/jsm/loaders/AWDLoader.js

@@ -290,7 +290,7 @@ var AWDLoader = ( function () {
 				mtx = this.parseMatrix4();
 
 			ctr.name = this.readUTF();
-			ctr.applyMatrix( mtx );
+			ctr.applyMatrix4( mtx );
 
 			parent = this._blocks[ par_id ].data || this.trunk;
 			parent.add( ctr );
@@ -360,7 +360,7 @@ var AWDLoader = ( function () {
 
 			}
 
-			mesh.applyMatrix( mtx );
+			mesh.applyMatrix4( mtx );
 			mesh.name = name;
 
 

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

@@ -870,7 +870,7 @@ var FBXLoader = ( function () {
 
 					var transform = generateTransform( node.userData.transformData );
 
-					node.applyMatrix( transform );
+					node.applyMatrix4( transform );
 
 				}
 

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

@@ -3194,7 +3194,7 @@ var GLTFLoader = ( function () {
 
 				var matrix = new Matrix4();
 				matrix.fromArray( nodeDef.matrix );
-				node.applyMatrix( matrix );
+				node.applyMatrix4( matrix );
 
 			} else {
 

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

@@ -442,7 +442,7 @@ TDSLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 				var inverse = new Matrix4();
 				inverse.getInverse( matrix, true );
-				geometry.applyMatrix( inverse );
+				geometry.applyMatrix4( inverse );
 
 				matrix.decompose( mesh.position, mesh.quaternion, mesh.scale );
 

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

@@ -821,7 +821,7 @@ var XLoader = ( function () {
 				}
 				var b = new Bone();
 				b.name = this._currentFrame.name;
-				b.applyMatrix( this._currentFrame.FrameTransformMatrix );
+				b.applyMatrix4( this._currentFrame.FrameTransformMatrix );
 				b.matrixWorld = b.matrix;
 				b.FrameTransformMatrix = this._currentFrame.FrameTransformMatrix;
 				this._currentFrame.putBone = b;
@@ -1284,7 +1284,7 @@ var XLoader = ( function () {
 						putting = true;
 						var b = new Bone();
 						b.name = this.HieStack[ frame ].name;
-						b.applyMatrix( this.HieStack[ frame ].FrameTransformMatrix );
+						b.applyMatrix4( this.HieStack[ frame ].FrameTransformMatrix );
 						b.matrixWorld = b.matrix;
 						b.FrameTransformMatrix = this.HieStack[ frame ].FrameTransformMatrix;
 						b.pos = new Vector3().setFromMatrixPosition( b.FrameTransformMatrix ).toArray();
@@ -1423,7 +1423,7 @@ var XLoader = ( function () {
 						}
 
 					}
-					mesh.applyMatrix( worldBaseMx );
+					mesh.applyMatrix4( worldBaseMx );
 
 				}
 				this.Meshes.push( mesh );

+ 1 - 1
examples/jsm/misc/VolumeSlice.js

@@ -216,7 +216,7 @@ VolumeSlice.prototype = {
 			this.mesh.geometry = this.geometry;
 			//reset mesh matrix
 			this.mesh.matrix.identity();
-			this.mesh.applyMatrix( this.matrix );
+			this.mesh.applyMatrix4( this.matrix );
 
 		}
 

+ 1 - 1
examples/webgl_clipping_advanced.html

@@ -374,7 +374,7 @@
 				var parent = object.parent;
 				scene.updateMatrixWorld();
 				object.matrix.getInverse( parent.matrixWorld );
-				object.applyMatrix( matrix );
+				object.applyMatrix4( matrix );
 
 			}
 

+ 5 - 5
examples/webgl_geometry_minecraft.html

@@ -108,29 +108,29 @@
 						var pz = getY( x, z + 1 );
 						var nz = getY( x, z - 1 );
 
-						geometries.push( pyGeometry.clone().applyMatrix( matrix ) );
+						geometries.push( pyGeometry.clone().applyMatrix4( matrix ) );
 
 						if ( ( px !== h && px !== h + 1 ) || x === 0 ) {
 
-							geometries.push( pxGeometry.clone().applyMatrix( matrix ) );
+							geometries.push( pxGeometry.clone().applyMatrix4( matrix ) );
 
 						}
 
 						if ( ( nx !== h && nx !== h + 1 ) || x === worldWidth - 1 ) {
 
-							geometries.push( nxGeometry.clone().applyMatrix( matrix ) );
+							geometries.push( nxGeometry.clone().applyMatrix4( matrix ) );
 
 						}
 
 						if ( ( pz !== h && pz !== h + 1 ) || z === worldDepth - 1 ) {
 
-							geometries.push( pzGeometry.clone().applyMatrix( matrix ) );
+							geometries.push( pzGeometry.clone().applyMatrix4( matrix ) );
 
 						}
 
 						if ( ( nz !== h && nz !== h + 1 ) || z === 0 ) {
 
-							geometries.push( nzGeometry.clone().applyMatrix( matrix ) );
+							geometries.push( nzGeometry.clone().applyMatrix4( matrix ) );
 
 						}
 

+ 2 - 2
examples/webgl_instancing_performance.html

@@ -182,7 +182,7 @@
 				randomizeMatrix( matrix );
 
 				var instanceGeometry = geometry.clone();
-				instanceGeometry.applyMatrix( matrix );
+				instanceGeometry.applyMatrix4( matrix );
 
 				geometries.push( instanceGeometry );
 
@@ -212,7 +212,7 @@
 				randomizeMatrix( matrix );
 
 				var mesh = new THREE.Mesh( geometry, material );
-				mesh.applyMatrix( matrix );
+				mesh.applyMatrix4( matrix );
 
 				scene.add( mesh );
 

+ 2 - 2
examples/webgl_instancing_scatter.html

@@ -76,8 +76,8 @@
 					.makeRotationX( Math.PI )
 					.multiply( new THREE.Matrix4().makeScale( 7, 7, 7 ) )
 
-				stemGeometry.applyMatrix( defaultTransform );
-				blossomGeometry.applyMatrix( defaultTransform );
+				stemGeometry.applyMatrix4( defaultTransform );
+				blossomGeometry.applyMatrix4( defaultTransform );
 
 				stemMaterial = _stemMesh.material;
 				blossomMaterial = _blossomMesh.material;

+ 1 - 1
examples/webgl_interactive_buffergeometry.html

@@ -259,7 +259,7 @@
 
 					mesh.updateMatrix();
 
-					line.geometry.applyMatrix( mesh.matrix );
+					line.geometry.applyMatrix4( mesh.matrix );
 
 					line.visible = true;
 

+ 1 - 1
examples/webgl_interactive_cubes_gpu.html

@@ -109,7 +109,7 @@
 					quaternion.setFromEuler( rotation );
 					matrix.compose( position, quaternion, scale );
 
-					geometry.applyMatrix( matrix );
+					geometry.applyMatrix4( matrix );
 
 					// give the geometry's vertices a random color, to be displayed
 

+ 1 - 1
examples/webgl_interactive_raycasting_points.html

@@ -242,7 +242,7 @@
 
 			function render() {
 
-				camera.applyMatrix( rotateY );
+				camera.applyMatrix4( rotateY );
 				camera.updateMatrixWorld();
 
 				raycaster.setFromCamera( mouse, camera );

+ 1 - 1
examples/webgl_loader_nrrd.html

@@ -87,7 +87,7 @@
 					cube.visible = false;
 					var box = new THREE.BoxHelper( cube );
 					scene.add( box );
-					box.applyMatrix( volume.matrix );
+					box.applyMatrix4( volume.matrix );
 					scene.add( cube );
 
 					//z plane

+ 1 - 1
examples/webgl_postprocessing_crossfade.html

@@ -171,7 +171,7 @@
 					applyVertexColors( geometry, color );
 
 					matrix.compose( position, quaternion, scale );
-					geometry.applyMatrix( matrix );
+					geometry.applyMatrix4( matrix );
 
 					geometries.push( geometry );