Procházet zdrojové kódy

Check that the buffer is actually the 3dm file.

Luis Fraguada před 5 roky
rodič
revize
c4d3d9ac29
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      examples/jsm/loaders/3DMLoader.js

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

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