KeKsBoTer / web-splat

3D Gaussian Splatting Renderer implemented in WebGPU (WGPU) and Rust
https://web-splat.niedermayr.dev
116 stars 10 forks source link

How to create a href? #7

Open JonHe2002 opened 5 months ago

JonHe2002 commented 5 months ago

Dear: I'm a undergraduate from China,recently,my mates and I want to create a href like the following one for our own point_clouds.ply and cameras.json files?

href="https://keksboter.github.io/web-splat?file=./scenes/bicycle/point_cloud/iteration_35000/ point_cloud.npz&scene=./scenes/bicycle/cameras.json">

We want to show this following scene in chrome instead of showing by cargo run --release --bin viewer point_cloud.ply cameras.json Could you give us some suggestions.

https://github.com/KeKsBoTer/web-splat/assets/108330562/e0d20244-ef9e-45b1-b673-cb5528211673

                                                                                                                                                                                             Sincerely.
KeKsBoTer commented 5 months ago

You have to upload the file somewhere first and then pass the URL to the viewer via the file parameter. It is important that the viewer and files use the same host (e.g. domain). Or the web server for the files has to allow CORS (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). Otherwise the brower will not allow the viewer to read the file ( for security reasons)