فهرست منبع

added concatenate

Jaume Sanchez 7 سال پیش
والد
کامیت
27f07c9867
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      examples/js/MarchingCubes.js

+ 8 - 0
examples/js/MarchingCubes.js

@@ -734,6 +734,14 @@ THREE.MarchingCubes = function ( resolution, material, enableUvs, enableColors )
 		return geo;
 		return geo;
 
 
 	};
 	};
+	
+	function concatenate(resultConstructor, a1, a2, length) {
+		let totalLength = a1.length + length;
+		let result = new resultConstructor(totalLength);
+		result.set(a1, 0);
+		result.set(a2.slice(0,length), a1.length);
+		return result;
+	}
 
 
 	this.generateBufferGeometry = function() {
 	this.generateBufferGeometry = function() {