How to correctly load .ply splats from external url in 2025?

hi i can’t find any example code / tutorial that shows how to correctly load Gaussian Splats dynamically with .loadfromUrl. ? there are a few examples for glb / json etc. but not for gsplats / .ply files

this splat demo doesn’t work when i change the url: <pc-splat> | PlayCanvas Developer Site

this link from the examples seems to be deleted?PlayCanvas Examples

a related forum post, with a link to an example project (which i couldn’t get to work) : [SOLVED] GSplat loads very slowly and sometimes crashes after update

would appreciate your help! a working project to fork… anything :slight_smile:

see an example here:
https://playcanvas.vercel.app/#/loaders/gsplat

but basically:

const biker = new pc.Asset('gsplat', 'gsplat', { url: `biker.ply` }),
const biker = new pc.Entity();
biker.addComponent('gsplat', {
    asset: assets.biker
});
biker.setLocalPosition(-1.5, 0.05, 0);
biker.setLocalEulerAngles(180, 90, 0);
biker.setLocalScale(0.7, 0.7, 0.7);
app.root.addChild(biker);

@slimbuck - do we have some editor examples?

Hi @F_D ,

I’m not sure where you’re getting your info. As @mvaligursky mentioned you have the wrong url for the engine example, please see his link.

Also the pc-splat web components demo works fine for me. If it doesn’t for you, then perhaps you’re not serving the data correctly? Are you missing cors headers or similar? What is the error you encounter in the developer console?

Thanks

Also, here is an editor example PlayCanvas 3D HTML5 Game Engine

1 Like