import { animations } from '@hiberworld/code-kit';
import { addTo } from '../../addTo';
import { EXTERNAL_AVATARS } from '../../constants';
import { getClone } from '../../getClone';
import { getExternalAvatar } from '../../getExternalAvatar';
import { getGroup } from '../../getGroup';
import { getPrefab } from '../../getPrefab';
import { pop3 } from '../../utils/pop3';
import { spinIt } from '../getVortex';
export const dancersVortex = {
    onEach: (info) => {
        const params = info.params || {};
        const spinDuration = 8;
        const spinning = params.spinning || false;
        const wrapper = getGroup({ p: [0, -10, 0] });
        const px = 13;
        const ry = 120;
        const rpmAvatar = getExternalAvatar({
            speed: 0.8,
            avatar: params.avatar ?? EXTERNAL_AVATARS.MattiasSir,
            p: [-px, 0, 0],
            r: [0, ry, 0],
            s: pop3(10),
            emot: animations.an_default_emote_spinstepdance,
        });
        const box = getPrefab({ id: 'hiberpunk_blocks_f1_01', p: [0, 0, 0] });
        // Place objects in wrapper
        addTo(wrapper, [rpmAvatar, getClone(rpmAvatar, { p: [px, 0, 0], r: [0, -ry, 0] })]);
        return spinning ? spinIt(wrapper, spinDuration, info) : wrapper;
    },
    depth: 10,
    repeats: 20,
    duration: 32,
};
//# sourceMappingURL=dancersVortex.js.map