| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- import type { Scene } from "./_helpers";
- export const multiSplat: Scene = {
- name: "Multi-Splat Gallery",
- description: "Multiple gaussian splats arranged in a gallery with spotlights",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "camera",
- "ambient",
- "spot-left",
- "spot-right",
- "splat-left",
- "splat-right",
- "grid",
- "fog",
- "controls",
- ],
- },
- camera: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 3, 8],
- rotation: null,
- scale: null,
- fov: 50,
- near: null,
- far: null,
- makeDefault: true,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#e0e0ff", intensity: 0.2 },
- children: [],
- },
- "spot-left": {
- type: "SpotLight",
- props: {
- position: [-3, 6, 2],
- rotation: null,
- scale: null,
- color: "#ffddaa",
- intensity: 60,
- distance: 15,
- decay: null,
- angle: 0.5,
- penumbra: 0.8,
- castShadow: true,
- },
- children: [],
- },
- "spot-right": {
- type: "SpotLight",
- props: {
- position: [3, 6, 2],
- rotation: null,
- scale: null,
- color: "#aaddff",
- intensity: 60,
- distance: 15,
- decay: null,
- angle: 0.5,
- penumbra: 0.8,
- castShadow: true,
- },
- children: [],
- },
- "splat-left": {
- type: "GaussianSplat",
- props: {
- src: "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k.splat",
- position: [-3, 0, 0],
- rotation: null,
- scale: [0.8, 0.8, 0.8],
- castShadow: null,
- receiveShadow: null,
- alphaHash: null,
- toneMapped: null,
- visible: true,
- },
- children: [],
- },
- "splat-right": {
- type: "GaussianSplat",
- props: {
- src: "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/garden/garden-7k.splat",
- position: [3, 0, 0],
- rotation: null,
- scale: [0.8, 0.8, 0.8],
- castShadow: null,
- receiveShadow: null,
- alphaHash: null,
- toneMapped: null,
- visible: true,
- },
- children: [],
- },
- grid: {
- type: "GridHelper",
- props: {
- position: [0, -0.5, 0],
- rotation: null,
- scale: null,
- size: 30,
- divisions: 30,
- color: "#222222",
- secondaryColor: "#111111",
- },
- children: [],
- },
- fog: {
- type: "Fog",
- props: {
- color: "#0a0a0a",
- near: 8,
- far: 25,
- },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: null,
- enablePan: null,
- enableRotate: null,
- minDistance: 3,
- maxDistance: 18,
- minPolarAngle: 0.3,
- maxPolarAngle: 1.4,
- autoRotate: true,
- autoRotateSpeed: 0.3,
- target: [0, 0.5, 0],
- },
- children: [],
- },
- },
- },
- };
|