Skip to content

Commit 5ff31f2

Browse files
committed
Fixed splat demo
1 parent 0a03de3 commit 5ff31f2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/docs/content/examples/splats.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
export const Example = () => {
2-
32
/**
4-
* Loading a Gaussian Splat ply
3+
* Loading a compressed Gaussian Splat SOGs file
54
*/
6-
const splatURL = "https://6rpjo46zo7.ufs.sh/f/dTTBXSHFOX4z7irrg5DfZElT6yeQYKvdjgi5IsoB0cmu9OtF"
7-
const { data: splat } = useSplat(splatURL);
5+
6+
const { data: splat } = useSplat('/skull.sog');
7+
8+
if (!splat) return null;
89

910
return <Entity>
1011
<Entity>
11-
<Camera fov={30} />
12-
{ splat && <OrbitControls
13-
distanceMin={3}
14-
distanceMax={6} /> }
12+
<Camera fov={30} position={[0, , -6]}/>
13+
<OrbitControls zoomRange={[3, 6]} />
1514
</Entity>
1615
{/* Create the splat entity */}
1716
<Entity
18-
rotation={[0, 40, 180]}
19-
position={[0.2, -1.7, -6]}>
20-
{ splat && <GSplat asset={splat}/> }
17+
rotation={[0, 210, 180]}
18+
position={[0, -.5, 0]}
19+
>
20+
<GSplat asset={splat}/>
2121
</Entity>
2222
</Entity>
2323
}

packages/docs/public/skull.sog

3.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)