How to increase vertices / faces of standard meshes using the API?

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

on this line: https://github.com/playcanvas/engine/blob/128b0dfbe0d3cf7a75a0463169b6eccf0e3286a4/src/framework/components/render/component.js#L259