Work Name: 【box】

Source Code


const mesh01K76M6SMS5H3ZXWSVY68F8MPW = BABYLON.MeshBuilder.CreateBox('01K76M6SMS5H3ZXWSVY68F8MPW', {}, scene);
mesh01K76M6SMS5H3ZXWSVY68F8MPW.position = new BABYLON.Vector3(
  0,
  0,
  0,
);
mesh01K76M6SMS5H3ZXWSVY68F8MPW.rotationQuaternion = new BABYLON.Quaternion(
  0,
  0,
  0,
  0,
);
mesh01K76M6SMS5H3ZXWSVY68F8MPW.scaling = new BABYLON.Vector3(
  5,
  5,
  5,
);

const mesh01K76M6Z2SFZ0P647HNR49RXK2 = BABYLON.MeshBuilder.CreateSphere('01K76M6Z2SFZ0P647HNR49RXK2', { segments: 3 }, scene);
mesh01K76M6Z2SFZ0P647HNR49RXK2.position = new BABYLON.Vector3(
  0,
  0,
  0,
);
mesh01K76M6Z2SFZ0P647HNR49RXK2.rotationQuaternion = new BABYLON.Quaternion(
  0,
  0,
  0,
  1,
);
mesh01K76M6Z2SFZ0P647HNR49RXK2.scaling = new BABYLON.Vector3(
  5.311704158782959,
  8.804842948913574,
  5.311704158782959,
);

const subCSG = BABYLON.CSG.FromMesh(mesh01K76M6SMS5H3ZXWSVY68F8MPW);
subCSG['unionInPlace'](BABYLON.CSG.FromMesh(mesh01K76M6Z2SFZ0P647HNR49RXK2));
subCSG.toMesh("csg", undefined, scene, true);

mesh01K76M6SMS5H3ZXWSVY68F8MPW.dispose();
mesh01K76M6Z2SFZ0P647HNR49RXK2.dispose();