import { getValueInRange, } from './math' export function getSizes({ pageWindowElement, particlesContainerChildren, particlesToShow, }) { const pageWindowWidth = pageWindowElement.clientWidth const particleWidth = pageWindowWidth / particlesToShow const particlesCount = particlesContainerChildren.length return { pageWindowWidth, particleWidth, particlesCount, } } export function applyParticleSizes({ particlesContainerChildren, particleWidth, }) { for (let particleIndex=0; particleIndex