opensourceBIM / BIMsurfer

The latest version of the BIM Surfer WebGL viewer for IFC
MIT License
377 stars 131 forks source link

Is it possible to load more roids on the same surfer? #109

Open francesco-gallo opened 2 years ago

francesco-gallo commented 2 years ago

When I try to do so, the new model seems to replace the previous one, but I can still see the camera pivot from the previous model.

gaoobin commented 2 years ago

Each time the demo code creates a new view, it can be solved by adding a judgment.

if(!this.bimServerViewer){
    this.bimServerViewer = new BimServerViewer(this.settings, this.canvas, window.innerWidth, window.innerHeight, stats);
}
francesco-gallo commented 2 years ago

I already added a guard like it, but it didn't solve the problem...

gaoobin commented 2 years ago

There are a lot of errors in the code. I have changed a lot. I'm still revising it. I'll send you a copy after I finish it. image

gaoobin commented 2 years ago

I just find the BIMServer project the day before yesterday and thought no one attention it. My BIMServer is running OK. I'm looking at this project today. I'm a little happy to see someone ask questions.

francesco-gallo commented 2 years ago

The bimserver is working just fine, I'm having problem only with bimsurfer v3. That would help, thanks!

gaoobin commented 2 years ago

dev.html and minimal.html has been running . See attachment for code. In addition to these two pages, the files in path 'viewer' are also modified. Now you just modify the server address and account password. The reason of dev page is not displayed, which is mainly caused by the settings of bimserverviewer. In addition, I added conditional judgment。 image

BIMsurfer-bimsurfer3-0.0.272.zip

francesco-gallo commented 2 years ago

Thanks @gaoobin , I'm trying to merge your code with mine. I saw that on BimSurfer.js, on load(), there isn't anymore the check "if (params.loadertype == 'fromserver' / 'gltf')" Has it been merged to behave in the same way?

francesco-gallo commented 2 years ago

Your code worked, thanks a lot!