@widelab-nc/widehue 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widelab-nc/widehue",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Widelab starter template based on Finsweet template + add-ons.",
5
5
  "homepage": "https://widelab.co",
6
6
  "license": "ISC",
package/src/index.js CHANGED
@@ -1451,15 +1451,21 @@ window.animationTest4 = function(root) {
1451
1451
 
1452
1452
  videoTimeline = gsap.timeline();
1453
1453
 
1454
- videos.forEach((video, i) => {
1454
+ // Stwórz tablicę indeksów i wymieszaj
1455
+ const videoIndexes = Array.from({length: videos.length}, (_, i) => i);
1456
+ const shuffledIndexes = videoIndexes.sort(() => Math.random() - 0.5);
1457
+
1458
+ shuffledIndexes.forEach((videoIndex, timeIndex) => {
1459
+ const video = videos[videoIndex];
1460
+
1455
1461
  videoTimeline.add(() => {
1456
1462
  placeElementAtRandomVisiblePosition(video, mask);
1457
- }, i);
1463
+ }, timeIndex * 0.75);
1458
1464
 
1459
1465
  videoTimeline.to(video, {
1460
1466
  display: 'block',
1461
1467
  duration: 0
1462
- }, i);
1468
+ }, timeIndex * 0.75);
1463
1469
  });
1464
1470
 
1465
1471
  videoTimeline.play();