pattern-x / gemini-viewer-examples

Examples and demos for gemini-viewer sdk, which is a WebGL based BIM model viewer, built on three.js. It is used to view dwg/dxf, gltf, obj, ifc models, etc.
169 stars 40 forks source link

script import #132

Open Super-Xiao opened 2 months ago

Super-Xiao commented 2 months ago

Hello, how to use script import instead of NPM installation

Super-Xiao commented 2 months ago

Directly using the min.js file resulted in an error

Super-Xiao commented 2 months ago

@yanzexuan1

yanzexuan1 commented 2 months ago

Just like what we did in https://github.com/pattern-x/gemini-viewer-examples/blob/main/public/demo/dxf_0.html, copy gemini-viewer.esm.min.js to some where, then:

        import { DxfViewer } from "./gemini-viewer.esm.min.js";
Super-Xiao commented 2 months ago

Can we introduce it this way ?