How to use data from bundle.js created by webpack

can we use data from bundle.js created by webpack. and if yes how can we do that

There are instructions on using a bundled webpack script at

1 Like

I reviewed that already.
but i cannot figure it out how can we do that.
can you help me with where is instruction for getting data from bundle.js

Hi @ranaraumik, what do you mean with data? The bundle output itself, or some data getting imported inside the bundle?

Assumptions here, but does it relate to ranaraumik’s other question about .las files and three.js

Could the data be exported to a file as JSON with fileSystem?

1 Like

yes it relates to that question

I want to create mesh from ‘.las’ data in three.js with input tag to select file from computer.

using npm packages “@loaders/core , @loaders/las”,
I read data from binary las and get Float32Array from that.
save that array to file.

and in my three.js code I use that file to create mesh.

so in this process I have to save that data to server and after that I can get data from server and process it.

so if there any way we can read that file on client side.

These packages don’t have browser build.
so I created bundle.js with webpack to read file on server side.
but I dont know how to extract “.las” file data from bundle.js

You’d have to serve this file with your node application then, and fetch it on the client side using AJAX.

You mean you created a bundle of your node.js code? This is rarely necessary, and you can’t use it on the client side at all if you’re using any node APIs such as fs.

Just a thought, I’m not familiar with three js, but see that there is an fbx loader with various animated examples.

Would that not be an option, to convert your .las format to fbx?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.