Update script.js
Browse files
script.js
CHANGED
|
@@ -2,61 +2,58 @@
|
|
| 2 |
const YOUTUBE_VIDEO_ID = "XGMdd38vHd0";
|
| 3 |
|
| 4 |
const stepsData = [
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
];
|
| 52 |
|
| 53 |
-
//
|
| 54 |
-
function parseTimestamp(ts
|
| 55 |
-
|
| 56 |
-
if (parts.length === 2) {
|
| 57 |
return parts[0] * 60 + parts[1];
|
| 58 |
-
}
|
| 59 |
-
return parts[0] * 3600 + parts[1] * 60 + parts[2];
|
| 60 |
}
|
| 61 |
|
| 62 |
// Create assembly steps with parsed timestamps
|
|
@@ -72,52 +69,7 @@ const TOTAL_STEPS = assemblySteps.length;
|
|
| 72 |
// Available step images
|
| 73 |
const availableImages = {
|
| 74 |
1: "assets/step1.jpg",
|
| 75 |
-
2: "assets/step2.jpg"
|
| 76 |
-
3: "assets/step3.jpg",
|
| 77 |
-
4: "assets/step4.jpg",
|
| 78 |
-
5: "assets/step5.jpg",
|
| 79 |
-
6: "assets/step6.jpg",
|
| 80 |
-
7: "assets/step7.jpg",
|
| 81 |
-
8: "assets/step8.jpg",
|
| 82 |
-
9: "assets/step9.jpg",
|
| 83 |
-
10: "assets/step10.jpg",
|
| 84 |
-
11: "assets/step11.jpg",
|
| 85 |
-
12: "assets/step12.jpg",
|
| 86 |
-
13: "assets/step13.jpg",
|
| 87 |
-
14: "assets/step14.jpg",
|
| 88 |
-
15: "assets/step15.jpg",
|
| 89 |
-
16: "assets/step16.jpg",
|
| 90 |
-
17: "assets/step17.jpg",
|
| 91 |
-
18: "assets/step18.jpg",
|
| 92 |
-
19: "assets/step19.jpg",
|
| 93 |
-
20: "assets/step20.jpg",
|
| 94 |
-
21: "assets/step21.jpg",
|
| 95 |
-
22: "assets/step22.jpg",
|
| 96 |
-
23: "assets/step23.jpg",
|
| 97 |
-
24: "assets/step24.jpg",
|
| 98 |
-
25: "assets/step25.jpg",
|
| 99 |
-
26: "assets/step26.jpg",
|
| 100 |
-
27: "assets/step27.jpg",
|
| 101 |
-
28: "assets/step28.jpg",
|
| 102 |
-
29: "assets/step29.jpg",
|
| 103 |
-
30: "assets/step30.jpg",
|
| 104 |
-
31: "assets/step31.jpg",
|
| 105 |
-
32: "assets/step32.jpg",
|
| 106 |
-
33: "assets/step33.jpg",
|
| 107 |
-
34: "assets/step34.jpg",
|
| 108 |
-
35: "assets/step35.jpg",
|
| 109 |
-
36: "assets/step36.jpg",
|
| 110 |
-
37: "assets/step37.jpg",
|
| 111 |
-
38: "assets/step38.jpg",
|
| 112 |
-
39: "assets/step39.jpg",
|
| 113 |
-
40: "assets/step40.jpg",
|
| 114 |
-
41: "assets/step41.jpg",
|
| 115 |
-
42: "assets/step42.jpg",
|
| 116 |
-
43: "assets/step43.jpg",
|
| 117 |
-
44: "assets/step44.jpg",
|
| 118 |
-
45: "assets/step45.jpg",
|
| 119 |
-
46: "assets/step46.jpg",
|
| 120 |
-
47: "assets/step47.jpg",
|
| 121 |
};
|
| 122 |
|
| 123 |
function getStepImage(stepId) {
|
|
|
|
| 2 |
const YOUTUBE_VIDEO_ID = "XGMdd38vHd0";
|
| 3 |
|
| 4 |
const stepsData = [
|
| 5 |
+
{ timestamp: "00:16", title: "Set all parts aside" },
|
| 6 |
+
{ timestamp: "00:30", title: "Stick Foot Pads" },
|
| 7 |
+
{ timestamp: "01:22", title: "Fix the USB Extension Cable and add the protective sleeve" },
|
| 8 |
+
{ timestamp: "02:58", title: "Insert the Power Board" },
|
| 9 |
+
{ timestamp: "03:17", title: "Fix the Power Board" },
|
| 10 |
+
{ timestamp: "04:06", title: "Connect the cables to the Power Board" },
|
| 11 |
+
{ timestamp: "05:26", title: "Position the Bottom Assembly" },
|
| 12 |
+
{ timestamp: "07:20", title: "Fix the Foot Assembly to the Bottom Assembly" },
|
| 13 |
+
{ timestamp: "08:15", title: "Connect the Foot Motor" },
|
| 14 |
+
{ timestamp: "09:15", title: "Screw the link rods onto the motors' arms" },
|
| 15 |
+
{ timestamp: "12:22", title: "Connect Motor 1 to 2" },
|
| 16 |
+
{ timestamp: "13:11", title: "Connect Motor 2 to 3" },
|
| 17 |
+
{ timestamp: "13:36", title: "Connect Motor 4 to 5" },
|
| 18 |
+
{ timestamp: "13:55", title: "Connect Motor 5 to 6" },
|
| 19 |
+
{ timestamp: "14:27", title: "Insert all motors into the Bottom Assembly" },
|
| 20 |
+
{ timestamp: "15:54", title: "Clip the motors' cables into the Bottom Assembly" },
|
| 21 |
+
{ timestamp: "19:00", title: "Position the Tricap" },
|
| 22 |
+
{ timestamp: "19:20", title: "Route the cables" },
|
| 23 |
+
{ timestamp: "19:51", title: "Connect Motor 3 to 4" },
|
| 24 |
+
{ timestamp: "20:40", title: "Route the cables" },
|
| 25 |
+
{ timestamp: "22:50", title: "Check rotation" },
|
| 26 |
+
{ timestamp: "24:36", title: "Screw the Tricap" },
|
| 27 |
+
{ timestamp: "26:05", title: "Screw the Bottom Head onto the link rods" },
|
| 28 |
+
{ timestamp: "30:00", title: "Route the cables through the Bottom Head" },
|
| 29 |
+
{ timestamp: "30:53", title: "Connect the flexible camera cable (step for reference only)" },
|
| 30 |
+
{ timestamp: "31:02", title: "Route the cables through the Head PCB" },
|
| 31 |
+
{ timestamp: "31:25", title: "Screw the Head PCB" },
|
| 32 |
+
{ timestamp: "32:31", title: "Position the Top Shell" },
|
| 33 |
+
{ timestamp: "33:02", title: "Screw the Top Shell" },
|
| 34 |
+
{ timestamp: "34:29", title: "Place the lenses in the Glasses Holder" },
|
| 35 |
+
{ timestamp: "34:39", title: "Insert the Fisheye Lenses into the caps" },
|
| 36 |
+
{ timestamp: "35:00", title: "Snap the Fisheye Lenses" },
|
| 37 |
+
{ timestamp: "35:47", title: "Screw the Glasses Assembly onto the Front Head Shell" },
|
| 38 |
+
{ timestamp: "36:49", title: "Attach the cases to Antennas' motors" },
|
| 39 |
+
{ timestamp: "37:07", title: "Fix Antennas' Assembly to Back Head Shell" },
|
| 40 |
+
{ timestamp: "38:39", title: "Connect the Antennas' motors" },
|
| 41 |
+
{ timestamp: "39:02", title: "Slide the Back Head Assembly onto the Reachy Mini body" },
|
| 42 |
+
{ timestamp: "39:22", title: "Screw the Back Head" },
|
| 43 |
+
{ timestamp: "40:07", title: "Fix the Cable Holder" },
|
| 44 |
+
{ timestamp: "41:53", title: "Connect Speaker and Motors' Cables" },
|
| 45 |
+
{ timestamp: "42:17", title: "Connect Power and USB Extension Cables" },
|
| 46 |
+
{ timestamp: "42:33", title: "Slide the Top Head Assembly onto the Back Head" },
|
| 47 |
+
{ timestamp: "42:49", title: "Connect the Flexible Printed Cable to the Head PCB" },
|
| 48 |
+
{ timestamp: "42:58", title: "Connect the Flexible Camera Cable on the Front Head" },
|
| 49 |
+
{ timestamp: "43:50", title: "Fix the Front Head" },
|
| 50 |
+
{ timestamp: "45:03", title: "Fix the Antennas" },
|
| 51 |
];
|
| 52 |
|
| 53 |
+
// Parse timestamp to seconds (MM:SS format)
|
| 54 |
+
function parseTimestamp(ts) {
|
| 55 |
+
const parts = ts.split(':').map(Number);
|
|
|
|
| 56 |
return parts[0] * 60 + parts[1];
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
// Create assembly steps with parsed timestamps
|
|
|
|
| 69 |
// Available step images
|
| 70 |
const availableImages = {
|
| 71 |
1: "assets/step1.jpg",
|
| 72 |
+
2: "assets/step2.jpg"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
};
|
| 74 |
|
| 75 |
function getStepImage(stepId) {
|