Open willeastcott opened 1 month ago
Check out: https://playcanvas.github.io/#/loaders/gsplat
To create the 3DGS entity, the example does:
const createSplatInstance = (resource, px, py, pz, scale, vertex, fragment) => { const splat = resource.instantiate({ debugRender: false, fragment: fragment, vertex: vertex }); splat.setLocalPosition(px, py, pz); splat.setLocalScale(scale, scale, scale); app.root.addChild(splat); return splat; }; const biker = createSplatInstance(assets.biker.resource, -1.5, 0.05, 0, 0.7);
Is there any reason this can't adhere to our standard addComponent style? Here's a sketch:
addComponent
const biker = new pc.Entity(); biker.addComponent('gsplat', { asset: assets.biker, debugRender: false, fragment: fragment, vertex: vertex }); biker.setLocalPosition(px, py, pz); biker.setLocalScale(scale, scale, scale); app.root.addChild(biker);
Interestingly enough, debugRender doesn't actually seem to do anything!
debugRender
Check out: https://playcanvas.github.io/#/loaders/gsplat
To create the 3DGS entity, the example does:
Is there any reason this can't adhere to our standard
addComponent
style? Here's a sketch: