What it does
mesh.clone brings a mesh object into being: it is how the rest of the script comes to have one. It takes id and newId.
Signature
mesh.clone(id, newId)Arguments
idnewId
Example · generated
function start() { mesh.createBox('box', { size: 1 }); mesh.clone('box', 'copy');}mesh.createBox is there to give the call something to act on; mesh.clone is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.