فهرست منبع

Updated builds.

Mugen87 5 سال پیش
والد
کامیت
0616049202
3فایلهای تغییر یافته به همراه246 افزوده شده و 206 حذف شده
  1. 21 1
      build/three.js
  2. 204 204
      build/three.min.js
  3. 21 1
      build/three.module.js

+ 21 - 1
build/three.js

@@ -5844,6 +5844,14 @@
 
 			if ( this.isMesh && this.drawMode !== TrianglesDrawMode ) { object.drawMode = this.drawMode; }
 
+			if ( this.isInstancedMesh ) {
+
+				object.type = 'InstancedMesh';
+				object.count = this.count;
+				object.instanceMatrix = this.instanceMatrix.toJSON();
+
+			}
+
 			//
 
 			function serialize( library, element ) {
@@ -40331,7 +40339,17 @@
 
 					}
 
-					if ( data.drawMode !== undefined ) { object.setDrawMode( data.drawMode ); }
+					break;
+
+				case 'InstancedMesh':
+
+					var geometry = getGeometry( data.geometry );
+					var material = getMaterial( data.material );
+					var count = data.count;
+					var instanceMatrix = data.instanceMatrix;
+
+					object = new InstancedMesh( geometry, material, count );
+					object.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 );
 
 					break;
 
@@ -40422,6 +40440,8 @@
 			if ( data.userData !== undefined ) { object.userData = data.userData; }
 			if ( data.layers !== undefined ) { object.layers.mask = data.layers; }
 
+			if ( data.drawMode !== undefined ) { object.setDrawMode( data.drawMode ); }
+
 			if ( data.children !== undefined ) {
 
 				var children = data.children;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 204 - 204
build/three.min.js


+ 21 - 1
build/three.module.js

@@ -5838,6 +5838,14 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 		if ( this.isMesh && this.drawMode !== TrianglesDrawMode ) object.drawMode = this.drawMode;
 
+		if ( this.isInstancedMesh ) {
+
+			object.type = 'InstancedMesh';
+			object.count = this.count;
+			object.instanceMatrix = this.instanceMatrix.toJSON();
+
+		}
+
 		//
 
 		function serialize( library, element ) {
@@ -40323,7 +40331,17 @@ ObjectLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 				}
 
-				if ( data.drawMode !== undefined ) object.setDrawMode( data.drawMode );
+				break;
+
+			case 'InstancedMesh':
+
+				var geometry = getGeometry( data.geometry );
+				var material = getMaterial( data.material );
+				var count = data.count;
+				var instanceMatrix = data.instanceMatrix;
+
+				object = new InstancedMesh( geometry, material, count );
+				object.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 );
 
 				break;
 
@@ -40414,6 +40432,8 @@ ObjectLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 		if ( data.userData !== undefined ) object.userData = data.userData;
 		if ( data.layers !== undefined ) object.layers.mask = data.layers;
 
+		if ( data.drawMode !== undefined ) object.setDrawMode( data.drawMode );
+
 		if ( data.children !== undefined ) {
 
 			var children = data.children;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است