import { addTo } from '../../addTo';
import { getGroup } from '../../getGroup';
import { getLaser } from '../../getLaser';
import { getPrefab } from '../../getPrefab';
import { rsd } from '../../utils/randomSeed';
import { spinIt } from '../getVortex';
export const laserVortex = {
    onEach: (info) => {
        const spinDuration = 8;
        const spinning = false;
        const laserSpread = 9;
        const roofY = 20;
        const wrapper = getGroup({ p: [0, -3, 0] });
        const floor = getPrefab({ p: [6, 0, 0], s: [6, 1, 5], material: 't_metal_01' });
        const floor2 = getPrefab({ p: [-6, 0, 0], s: [6, 1, 5], material: 't_metal_01' });
        const roof = getPrefab({ id: 'tron_l2_blue', p: [0, roofY, 0], s: [10, 10, 10] });
        const laser = getLaser({
            distanceToImpactObject: roofY * 0.95,
            p: [rsd(info.seed).range(laserSpread * -0.95, laserSpread * 0.95), roofY, 0],
            length: roofY * 1,
            r: [0, 0, 180],
            progress: rsd(info.seed).getValue(),
        });
        const laser2 = getLaser({
            distanceToImpactObject: roofY * 0.95,
            p: [rsd(info.seed).range(laserSpread * -0.95, laserSpread * 0.95), roofY, 0],
            length: roofY * 1,
            r: [0, 0, 180],
            progress: rsd(info.seed).getValue(),
        });
        addTo(wrapper, [floor, floor2, roof, laser, laser2]);
        return spinning ? spinIt(wrapper, spinDuration, info) : wrapper;
    },
    depth: 10,
    repeats: 20,
    duration: 32,
};
//# sourceMappingURL=laserVortex.js.map