/**
 * Creates a prefab on the fly using MeshId.
 * Good for creating objects without collider.
 * @example
 * ```
  const mesh = getMesh({
    id: 'en_b_cube_01',
    p: [0, 0, 5],
    physical: false,
    material: 'palette_01_white',
    s: [5, 5, 0.1],
  });
 * ```
 */
export const getMesh = (opt) => {
    opt = {
        id: 'en_b_cube_01',
        material: 't_hiber_grid_01',
        physical: true,
        ...opt,
    };
    let node = {
        name: opt.name,
        rendering: { meshID: opt.id, materialID: opt.material },
        transform: {
            pos: opt.p,
            scale: opt.s,
            rot: opt.r,
        },
        children: opt.children ?? [],
    };
    if (opt.physical && node) {
        node.collider = { collider: { meshId: 'en_p_tron_m2_01' } };
        // TBD: Why 'en_p_tron_m2_01' ??
    }
    return node;
};
//# sourceMappingURL=getMesh.js.map