瀏覽代碼

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( () => { 
 
 					// 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;