Thank you, I’m on the right track now. Do you know why this code fails?
let entity = new pc.Entity();
const mesh = pc.createBox(app.graphicsDevice, {
widthSegments: 60,
heightSegments: 60,
});
entity.addComponent('render', {
meshInstances: [mesh],
});
with
mi[i].setLightmapped is not a function