ThatOpen / web-ifc-viewer

Graphics engine and toolkit for client applications.
MIT License
950 stars 236 forks source link

IFC Viewer in Flutter App example #237

Open Sadhorsephile opened 1 year ago

Sadhorsephile commented 1 year ago

Hi! Is it possible to somehow use your solution in the Flutter App?

Now I see only the following possibilities:

  1. Place your library on a remote server and show it to the viewer in FlutterApp via WebView.
  2. Place your library in the FlutterApp project directory as an asset, plug it into WebView, and use it inside WebView with local HTML code.

I will be glad if you give me some advice or provide me with some example.

agviegas commented 1 year ago

Hi!

Yes, it's possible and with webview should be quite simple. You just have to create an app with IFC.js, publish it to a public URL and consume it with webview. You can communicate with the app using window events (window.onmessage, and window.postMessage).

We are going to officially release the new library components on September 20. This library will substitute web-ifc-three and web-ifc-viewer. Both WIV and WIT will remain up, but they will be deprecated and won't be maintained any longer.

All our efforts are going towards components now. The API is very similar, so I strongly suggest you make the leap and start using it. You can start using it now (check out the latest alpha version in npm or see the big-restructure branch in the repo.

Cheers!