Skip to Content
🎉 @playcanvas/react 0.3.0! Now with React 19 support. Read more →

GSplat

Gaussian Splats are a new way of capturing and rendering high quality 3D content. They capture the shape and lighting of a scene in a way that produces incredibly high quality results. You can read more about Gaussian Splats in the PlayCanvas docs or view this Youtube video.

Usage

Once you load a Gaussian Splat model, you can use the GSplat component to render it.

import { GSplat } from '@playcanvas/react/components' const Splat = (( src, ...props )) => { const { data } = useGSplat(src) return (<Entity {...props}> <GSplat asset={data} /> </Entity>) }

Props

The following props are based on the GSplat Component from PlayCanvas version 2.3.3. This documentation is automatically generated from the TypeScript types of the installed PlayCanvas package.

NameTypeDefault
assetAsset

The asset to use for the GSplat.

vertexstring

The vertex shader to use for the GSplat.

fragmentstring

The fragment shader to use for the GSplat.

customAabbBoundingBox

Sets a custom object space bounding box for visibility culling of the attached gsplat. Gets the custom object space bounding box for visibility culling of the attached gsplat.

instanceGSplatInstance

Sets a GSplatInstance on the component. If not set or loaded, it returns null. Gets the GSplatInstance on the component.

materialOptionsSplatMaterialOptions
layersnumber[]

Sets an array of layer IDs (Layer#id ) to which this gsplat should belong. Don’t push, pop, splice or modify this array. If you want to change it, set a new one instead. Gets the array of layer IDs (Layer#id ) to which this gsplat belongs.

systemComponentSystem

The ComponentSystem used to create this Component.

entityEntity

The Entity that this Component is attached to.

enabledboolean

Sets the enabled state of the component. Gets the enabled state of the component.

Last updated on