viser icon indicating copy to clipboard operation
viser copied to clipboard

How to embed a Viser visualization in another HTML page?

Open Daniil-KR opened this issue 1 year ago • 1 comments

There is a nice embedded 3D demonstration in https://lerftogo.github.io/desktop.html

It seems like they are running Viser demos on GitHub Pages somehow.

Can you please advise me on how I can do the same thing? Is it possible to host the visualization through GitHub Pages, or can I save it in some intermediate format that can later be rendered in three.js?

Daniil-KR avatar Jun 03 '24 15:06 Daniil-KR

Hi!

We're planning on it, but unfortunately this functionality hasn't been cleaned up / documented / supported. If it's important to you and you want to figure it out, you can reference the implementation that still lives in this branch: https://github.com/nerfstudio-project/viser/tree/brent/record

The most relevant class is RecordHandle. Combined with the client built from that branch, RecordHandle can be used to produce a .viser file that can be optionally gzipped and loaded in a URL like:

  • https://brentyi.github.io/rotateit-embed/?playbackPath=https://brentyi.github.io/rotateit-embed/trajectories/-1_0_0_ycb_072-a_toy_airplane.viser.gz
  • https://brentyi.github.io/viser-embed-test/?playbackPath=https://brentyi.github.io/viser-embed-test/trajectories/black_handle_sem.viser

brentyi avatar Jun 04 '24 01:06 brentyi