Преглед на файлове

Check that the buffer is actually the 3dm file.

Luis Fraguada преди 5 години
родител
ревизия
c4d3d9ac29
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      examples/jsm/loaders/3DMLoader.js

+ 6 - 1
examples/jsm/loaders/3DMLoader.js

@@ -338,9 +338,14 @@ Rhino3dmLoader.Rhino3dmWorker = function () {
 				libraryPending.then( () => { 
 				libraryPending.then( () => { 
 
 
 					// TODO
 					// TODO
-					let sphere = new rhino.Sphere([0,0,0], 10);
+					var sphere = new rhino.Sphere([0,0,0], 10);
 					console.log(sphere.radius);
 					console.log(sphere.radius);
 
 
+					var arr = new Uint8Array(buffer);
+					var doc = rhino.File3dm.fromByteArray(arr);
+
+					console.log(doc);
+
 				} );
 				} );
 				
 				
 				break;
 				break;