xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
695 stars 280 forks source link

Can't load Las, Laz models from Electron app #1485

Open intrida-dev opened 1 month ago

intrida-dev commented 1 month ago

We have an application which is built only to run in ElectronJS. Recently we implemented Las/Laz loading capability and found that it doesn't work in ElectronJS App. We get following error: image

But we can load the same model with same code when it is viewed in browser. I have attached a video explaining this issue.

https://github.com/xeokit/xeokit-sdk/assets/73640257/75ae3087-cfd5-45bd-b228-2e128592690f

We debugged a little and found an issue in canParseWithWorker function. If statement at line number 108996 evaluates to true, when it is from Electron. image

Also I have attached a sample code in zip. sample.zip

To Reproduce Steps to reproduce the behavior:

  1. First place 'autzen.laz' sample model in models directory
  2. Open the attached sample code in VS code and go to terminal
  3. Execute 'npm install electron'
  4. Run command 'npm start' to launch electronjs app.
  5. See error on console
xeolabs commented 1 month ago

This looks like an issue with the 3rd-party library, loaders.gl, which we use for loading LAS/LAZ.

We've never developed any xeokit applications on Electron unfortunately, so I'm not sure what to suggest, but I recommend logging the issue with their repo.

intrida-dev commented 1 month ago

Sure, I am going to report this to them. Thanks :-)