multi-offset.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import type { Scene } from "./_helpers";
  2. export const multiOffset: Scene = {
  3. name: "Multi-Splat (Offset)",
  4. description:
  5. "Two splats placed away from the origin — demonstrates off-center orbit",
  6. spec: {
  7. root: "viewer",
  8. elements: {
  9. viewer: {
  10. type: "GaussianSplatViewer",
  11. props: {
  12. width: "100%",
  13. height: "100vh",
  14. backgroundColor: "#0a0a0a",
  15. controls: true,
  16. autoRotate: true,
  17. autoRotateSpeed: 0.4,
  18. cameraPosition: [5, 3, 8],
  19. cameraTarget: [3, 0.5, 3],
  20. fov: 50,
  21. },
  22. children: [],
  23. },
  24. },
  25. },
  26. viewer: {
  27. backgroundColor: "#0a0a0a",
  28. controls: true,
  29. autoRotate: true,
  30. autoRotateSpeed: 0.4,
  31. cameraPosition: [5, 3, 8],
  32. cameraTarget: [3, 0.5, 3],
  33. fov: 50,
  34. },
  35. splats: [
  36. {
  37. src: "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k.splat",
  38. position: [1.5, 0, 3],
  39. },
  40. {
  41. src: "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/stump/stump-7k.splat",
  42. position: [4.5, 0, 3],
  43. scale: [0.8, 0.8, 0.8],
  44. },
  45. ],
  46. };