@@ -24,7 +24,13 @@ export function newRenderPlugin3DViewer(): FileRenderPlugin {
2424 // .ifc, .igs, .iges, .stp, .step are: TEXT
2525 // .stl .ply: TEXT or BINARY
2626 // .obj .off .wrl: TEXT
27- // So we need to be able to render when the file is recognized as plaintext file by backend
27+ // So we need to be able to render when the file is recognized as plaintext file by backend.
28+ //
29+ // It needs more logic to make it overall right (render a text 3D model automatically):
30+ // we need to distinguish the ambiguous filename extensions.
31+ // For example: "*.obj, *.off, *.step" might be or not be a 3D model file.
32+ // So when it is a text file, we can't assume that "we only render it by 3D plugin",
33+ // otherwise the end users would be impossible to view its real content when the file is not a 3D model.
2834 const SUPPORTED_EXTENSIONS = [
2935 '.3dm' , '.3ds' , '.3mf' , '.amf' , '.bim' , '.brep' ,
3036 '.dae' , '.fbx' , '.fcstd' , '.glb' , '.gltf' ,
@@ -41,6 +47,7 @@ export function newRenderPlugin3DViewer(): FileRenderPlugin {
4147 } ,
4248
4349 async render ( container : HTMLElement , fileUrl : string ) : Promise < void > {
50+ // TODO: height and/or max-height?
4451 const OV = await import ( /* webpackChunkName: "online-3d-viewer" */ 'online-3d-viewer' ) ;
4552 const viewer = new OV . EmbeddedViewer ( container , {
4653 backgroundColor : new OV . RGBAColor ( 59 , 68 , 76 , 0 ) ,
0 commit comments