mesh.merge

Section: Mesh (Babylon)

What it does

mesh.merge brings a mesh object into being: it is how the rest of the script comes to have one. It takes a list and newId.

Signature

mesh.merge(ids[], newId)

Arguments

  • ids[]
  • newId

Example · generated

function start() {  mesh.createBox('box', { size: 1 });  mesh.merge(['box'], 'copy');}

mesh.createBox is there to give the call something to act on; mesh.merge is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.

20 members in mesh