nexus icon indicating copy to clipboard operation
nexus copied to clipboard

Use in three.js without range requests

Open amarchino opened this issue 5 years ago • 3 comments

Greetings.

I am trying to use Your JS library to render nexus files in a browser. I have tried using the three.js version of Your library, and I find myself quite satisfied for its semplicity.

However, I could not render a nexus file that was loaded without using the new NexusObject() method. More specifically, I have some resources that reside in an un-accessible (from a webserver point of view) folder, and the access to (and elaboration of the files in) this folder is regulated by my application. I can send the nexus data to the client via HTTP or WebSocket, but then I cannot seem to be able to use this data in the NexusObject.

By looking though the code, it seems that the loading of the data is done only via a range request. Is there any other mean to use the data that has already been downloaded? Or will there be any possible evolution of the library to enable this use case?

Thank you for your attention.

amarchino avatar Jul 27 '18 10:07 amarchino

Ciao, there are 2 possible evolution:

  1. give up view-dependent loading and just refine the model while is being downloaded (wont make a difference for small models). I have this in mind for a long time, just currently overburdened.

  2. allow to use a url ?start=123&end=155 and use a php or other server code to return the relevant code (actually a couple of lines needed for authentication and serving). This would be quick, just tell me if it's something you think acceptable.

Ciao,

Federico

On Fri, Jul 27, 2018 at 12:50 PM, amarchino [email protected] wrote:

Greetings.

I am trying to use Your JS library to render nexus files in a browser. I have tried using the three.js version of Your library, and I find myself quite satisfied for its semplicity.

However, I could not render a nexus file that was loaded without using the new NexusObject() method. More specifically, I have some resources that reside in an un-accessible (from a webserver point of view) folder, and the access to (and elaboration of the files in) this folder is regulated by my application. I can send the nexus data to the client via HTTP or WebSocket, but then I cannot seem to be able to use this data in the NexusObject.

By looking though the code, it seems that the loading of the data is done only via a range request. Is there any other mean to use the data that has already been downloaded? Or will there be any possible evolution of the library to enable this use case?

Thank you for your attention.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cnr-isti-vclab/nexus/issues/19, or mute the thread https://github.com/notifications/unsubscribe-auth/ACg66yZ8hni_Cnmyia7RnWRhs4iiq-9tks5uKvB7gaJpZM4VjTS- .

ponchio avatar Jul 31 '18 16:07 ponchio

Greetings.

I don't understand exactly what so You mean in the first possible evolution, yet the second possibile evolution would be actually feasible.

Yet I actually forked the JS files and added some new classes that handle the synchronous loading... Were You interested, I may refactor some of the modifications and create a pull request, even as a separate js module that can be optionally loaded.

Thanks

amarchino avatar Aug 01 '18 07:08 amarchino

Ciao,

sure go ahead and I will integrate it :)

Federico

On Wed, Aug 1, 2018 at 9:16 AM, amarchino [email protected] wrote:

Greetings.

I don't understand exactly what so You mean in the first possible evolution, yet the second possibile evolution would be actually feasible.

Yet I actually forked the JS files and added some new classes that handle the synchronous loading... Were You interested, I may refactor some of the modifications and create a pull request, even as a separate js module that can be optionally loaded.

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cnr-isti-vclab/nexus/issues/19#issuecomment-409474828, or mute the thread https://github.com/notifications/unsubscribe-auth/ACg665r24bJK_PTMFwb0u7xe8jF6LTyKks5uMVXXgaJpZM4VjTS- .

ponchio avatar Aug 01 '18 09:08 ponchio