Browse Source

Check that the buffer is actually the 3dm file.

Luis Fraguada 5 years ago
parent
commit
c4d3d9ac29
1 changed files with 6 additions and 1 deletions
  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;