瀏覽代碼

Editor: Added supported file formats to import's file browser.

Mr.doob 1 年之前
父節點
當前提交
a1317753d8
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      editor/js/Menubar.File.js

+ 1 - 0
editor/js/Menubar.File.js

@@ -44,6 +44,7 @@ function MenubarFile( editor ) {
 	const fileInput = document.createElement( 'input' );
 	fileInput.multiple = true;
 	fileInput.type = 'file';
+	fileInput.accept = '.3dm, .3ds, .3mf, .amf, .dae, .drc, .fbx, .glb, .gltf, .js, .json, .kmz, .ldr, .md2, .mpd, .obj, .pcd, .ply, .stl, .svg, .usdz, .vox, .vtk, .vtp, .wrl, .xyz, .zip';
 	fileInput.addEventListener( 'change', function () {
 
 		editor.loader.loadFiles( fileInput.files );