The viewer package is within the speckle-server repo but can be installed from npm independently.
If you also use the ObjectLoader package, there are tools in that to do that traversal for you (also with specklepy, incidentally)
To implement the Viewer (which can work with freely hosted models from speckle.xyz), look at the Sandbox-Viewer project - this is what we use to test the integration of the packages and also test some of the functionality. It does bring viewer-specific UI to it.
Instead of that, there is also a minimal example over in our Speckle Examples repo.
@jonathon! Just want to update you on the progress on this topic real quick. It’s quite nice playing around with the viewer.
P.S: Also have been thinking about how it could break the UI class into React modules. I’ve seen a few threads about this also here and there - but anyway it’s extremely cool to have them in JS.
@jonathon thanks for your pointers so far! As you can tell from Ashkan’s post, we’ve been able to get an MVP up & running. But appetite comes with eating and we’d like to push it further. Any ideas on how we could embed animations in the viewer? Think an animated FBX with wind study results, which we could display in this context.
@dimitrie if this is not doable yet, I’d like to make an official feature request
Ideally we’d have animated Speckle Objects. Check out this random example from three.js:
Or this fun one from Sketchfab:
We’d like to bake an animation to an object (one frame == one position), save it as .FBX, alembic, USD or whatever and have it sent directly to a Speckle stream.
For our specific example, we’d like to run wind simulations in an offline package, bake the results to an animation and display these interactively in the viewer. Users would then only control the playback speed, not run the actual sim in the viewer. But if we’re thinking big, real-time physics should be the end goal