react-native-fiesta
Version:
A set of celebration animations powered by Skia. Engage more with your users by celebrating in your React Native application.
14 lines • 460 B
JavaScript
export function getBalloonsYPositions(itemsToRender, possibleYPositions) {
const newPositions = [];
let positionToPushIndex = 0;
new Array(itemsToRender).fill(0).map(() => {
if (positionToPushIndex === possibleYPositions.length - 1) {
positionToPushIndex = 0;
} else {
positionToPushIndex++;
}
newPositions.push(possibleYPositions[positionToPushIndex] ?? 0);
});
return newPositions;
}
//# sourceMappingURL=balloons.js.map