import * as utils from "../utils/index";
export async function PlayParticlesInRaycast(origin, direction, distance, particleSpacing, particleEffect, particleInterval) {
    for (let index = 0; index < distance; index += particleSpacing) {
        const magnitude = direction.multiply(new utils.Vector3(index));
        const destination = origin.add(magnitude);
        utils.runCommand(`particle ${particleEffect} ${destination.toCommandString()}`);
        if (particleInterval > 0) {
            await utils.waitForEvent(particleInterval, () => { });
        }
    }
}
