Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load Las, Laz models from Xeokit based Electron app #2998

Open
intrida-dev opened this issue May 10, 2024 · 2 comments
Open

Can't load Las, Laz models from Xeokit based Electron app #2998

intrida-dev opened this issue May 10, 2024 · 2 comments

Comments

@intrida-dev
Copy link

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

329126363-8d346b5e-3a54-4d33-a234-c33e3b85c2e4

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

Untitled.mp4

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.
329127015-145ae717-b6a1-4890-8d0e-62d59e06c015

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

We reported this to Xeokit earlier. They suggested us to report here loaders.gl library to load Las/laz models.

@intrida-dev
Copy link
Author

Can anyone please help us on this?

@ibgreen
Copy link
Collaborator

ibgreen commented Aug 13, 2024

@intrida-dev Thanks for reporting.

There is an isElectron function in the companion @probe.gl/env module that could perhaps be used here to disambiguate: https://github.com/visgl/probe.gl/blob/master/modules/env/src/lib/is-electron.ts

As the maintainers are not electron users we don't actively support that environment, nor can we test that things work, but we do accept small PRs with fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants