import { getClone } from './getClone';
import { addTo } from './addTo';
import { getWrapper } from './getWrapper';
/**
 *
 * Stack prefab or a group on each other diagonally
 * @example
 * ```
  const cube = getPrefab();
  addTo(root, getRamped(cube, { dim: 2, repeats: 5, p: [0, 5, 0], r: [0, 30, 20] }));
 * ```
 */
export const getRamped = (toRamp, options = {}) => {
    const { repeats = 2, dim = 2 } = options;
    const wrapper = getWrapper(options);
    for (let index = 0; index < repeats; index++) {
        const clone = getClone(toRamp, { p: [0, dim * index, dim * index * -1] });
        addTo(wrapper, clone);
    }
    return wrapper;
};
//# sourceMappingURL=getRamped.js.map