AK51 commited on
Commit
80bce2d
·
verified ·
1 Parent(s): dee68a5

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +82 -22
index.html CHANGED
@@ -725,7 +725,7 @@
725
  <line x1="440" y1="250" x2="630" y2="440" stroke="#4fd1c5" stroke-width="2.5"/>
726
  <line x1="90" y1="250" x2="790" y2="250" stroke="#c3c9d1" stroke-width="1.8" stroke-dasharray="8 6"/>
727
  <line x1="150" y1="134" x2="730" y2="366" stroke="#f2a93b" stroke-width="1.8" stroke-dasharray="8 6"/>
728
- <path d="M 430 472 C 434 400, 437 320, 440 250 C 443 190, 458 130, 505 66" fill="none" stroke="#f2efe6" stroke-width="3"/>
729
  <circle cx="440" cy="250" r="11" fill="none" stroke="#f2efe6" stroke-width="1.6"/>
730
  <circle cx="432" cy="430" r="4" fill="#f2efe6"/>
731
  <circle cx="436" cy="340" r="4" fill="#f2efe6"/>
@@ -758,22 +758,13 @@
758
  <text x="522" y="53" fill="#c3c9d1" font-size="12.5">沿白線飛 · 越飛越彎向 45°</text>
759
  <text x="522" y="70" fill="#ffb84d" font-size="12.5">尾焰越長越光</text>
760
  <text x="522" y="87" fill="#ffb84d" font-size="12.5">= 嗰一刻加速越大</text>
761
- <g id="accel-ship" aria-hidden="true">
762
- <animateMotion dur="8s" repeatCount="indefinite" rotate="auto" path="M 430 472 C 434 400, 437 320, 440 250 C 443 190, 458 130, 505 66"/>
763
- <circle cx="0" cy="0" r="13" fill="#f2a93b" opacity="0.07">
764
- <animate attributeName="r" values="13;13;12;12;12;13;23;24;25;26;26;26;25;25;24;23" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
765
- <animate attributeName="opacity" values="0.07;0.07;0.06;0.06;0.06;0.07;0.24;0.26;0.27;0.28;0.28;0.28;0.27;0.26;0.25;0.24" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
766
  </circle>
767
- <g>
768
- <animate attributeName="opacity" values="1;0.85;1" dur="0.35s" repeatCount="indefinite"/>
769
- <polygon points="-16,0 -22.4,-4.1 -20.6,0 -22.4,4.1" fill="#b06a1c" opacity="0.4">
770
- <animate attributeName="points" values="-16,0 -22.4,-4.1 -20.6,0 -22.4,4.1;-16,0 -21.9,-4 -20.2,0 -21.9,4;-16,0 -21.5,-3.9 -20,0 -21.5,3.9;-16,0 -21.2,-3.8 -19.7,0 -21.2,3.8;-16,0 -21.1,-3.8 -19.7,0 -21.1,3.8;-16,0 -21.5,-3.9 -20,0 -21.5,3.9;-16,0 -40.1,-8.5 -33.4,0 -40.1,8.5;-16,0 -42.3,-9.1 -34.9,0 -42.3,9.1;-16,0 -44.1,-9.5 -36.2,0 -44.1,9.5;-16,0 -45.3,-9.8 -37.1,0 -45.3,9.8;-16,0 -45.8,-10 -37.5,0 -45.8,10;-16,0 -45.7,-9.9 -37.4,0 -45.7,9.9;-16,0 -44.9,-9.7 -36.8,0 -44.9,9.7;-16,0 -43.7,-9.4 -35.9,0 -43.7,9.4;-16,0 -41.9,-9 -34.6,0 -41.9,9;-16,0 -39.9,-8.5 -33.2,0 -39.9,8.5" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
771
- <animate attributeName="fill" values="#b06a1c;#b06a1c;#ad651b;#ad651b;#ad651b;#b06a1c;#ff9d2e;#ffa733;#ffae3d;#ffb445;#ffb84d;#ffb84d;#ffb445;#ffae3d;#ffa733;#ff9d2e" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
772
- <animate attributeName="opacity" values="0.4;0.38;0.36;0.35;0.35;0.38;0.92;0.96;0.99;1;1;1;0.99;0.97;0.95;0.92" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
773
  </polygon>
774
- <polygon points="-16,0 -19.5,-2.1 -18.5,0 -19.5,2.1" fill="#ffe9a8" opacity="0.45">
775
- <animate attributeName="points" values="-16,0 -19.5,-2.1 -18.5,0 -19.5,2.1;-16,0 -19.2,-2 -18.2,0 -19.2,2;-16,0 -19,-2 -18.1,0 -19,2;-16,0 -18.9,-1.9 -18,0 -18.9,1.9;-16,0 -18.8,-1.9 -18,0 -18.8,1.9;-16,0 -19,-2 -18.1,0 -19,2;-16,0 -29.3,-4.3 -25.3,0 -29.3,4.3;-16,0 -30.5,-4.6 -26.2,0 -30.5,4.6;-16,0 -31.5,-4.8 -26.9,0 -31.5,4.8;-16,0 -32.1,-4.9 -27.3,0 -32.1,4.9;-16,0 -32.4,-5 -27.5,0 -32.4,5;-16,0 -32.3,-5 -27.4,0 -32.3,5;-16,0 -31.9,-4.9 -27.1,0 -31.9,4.9;-16,0 -31.2,-4.7 -26.6,0 -31.2,4.7;-16,0 -30.2,-4.5 -25.9,0 -30.2,4.5;-16,0 -29.1,-4.3 -25.2,0 -29.1,4.3" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
776
- <animate attributeName="opacity" values="0.45;0.43;0.42;0.4;0.4;0.43;0.95;0.97;0.99;1;1;1;0.99;0.98;0.96;0.95" keyTimes="0;0.105;0.212;0.32;0.426;0.529;0.567;0.61;0.654;0.698;0.743;0.79;0.838;0.887;0.939;1" dur="8s" repeatCount="indefinite"/>
777
  </polygon>
778
  </g>
779
  <polygon points="-11,-5.5 -20,-14 -7,-13.5 -5,-6" fill="#ff7a59" stroke="#0b0f14" stroke-width="0.8"/>
@@ -2227,6 +2218,74 @@
2227
  (function () {
2228
  "use strict";
2229
  var reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2230
 
2231
  /* ============ LAB A: film strip ============ */
2232
  (function () {
@@ -2243,21 +2302,22 @@
2243
  function miniFigure(i) {
2244
  // stick runner inside one frame: position along the mini track = race progress
2245
  var pr = i / (N - 1);
2246
- var gx = (5 + pr * 30).toFixed(1);
 
2247
  var col = "#e9e6dd";
2248
  var legs = (i % 2 === 0)
2249
- ? "M " + gx + " 40 L " + (gx + 3) + " 44 L " + (gx + 2.4) + " 48 M " + gx + " 40 L " + (gx - 3.4) + " 43 L " + (gx - 4.4) + " 48"
2250
- : "M " + gx + " 40 L " + (gx + 4) + " 43 L " + (gx + 5) + " 47 M " + gx + " 40 L " + (gx - 2.6) + " 44 L " + (gx - 1) + " 48";
2251
  var arms = (i % 2 === 0)
2252
- ? "M " + gx + " 34 L " + (gx + 3.4) + " 37 M " + gx + " 34 L " + (gx - 3.4) + " 36"
2253
- : "M " + gx + " 34 L " + (gx - 3) + " 37 M " + gx + " 34 L " + (gx + 3.6) + " 35";
2254
  return '<svg viewBox="0 0 40 56" aria-hidden="true">' +
2255
  '<line x1="2" y1="48" x2="38" y2="48" stroke="#3d4a5e" stroke-width="1.4"/>' +
2256
  '<line x1="4" y1="42" x2="4" y2="48" stroke="#8b95a3" stroke-width="1.4"/>' +
2257
  '<line x1="36" y1="42" x2="36" y2="48" stroke="#8b95a3" stroke-width="1.4"/>' +
2258
  '<g stroke="' + col + '" stroke-width="1.6" stroke-linecap="round" fill="none">' +
2259
- '<circle cx="' + gx + '" cy="29" r="2.4"/>' +
2260
- '<path d="M ' + gx + ' 31.4 L ' + gx + ' 40"/>' +
2261
  '<path d="' + arms + '"/><path d="' + legs + '"/></g></svg>';
2262
  }
2263
  for (var i = 0; i < N; i++) {
 
725
  <line x1="440" y1="250" x2="630" y2="440" stroke="#4fd1c5" stroke-width="2.5"/>
726
  <line x1="90" y1="250" x2="790" y2="250" stroke="#c3c9d1" stroke-width="1.8" stroke-dasharray="8 6"/>
727
  <line x1="150" y1="134" x2="730" y2="366" stroke="#f2a93b" stroke-width="1.8" stroke-dasharray="8 6"/>
728
+ <path id="worldline-path" d="M 430 472 C 434 400, 437 320, 440 250 C 443 190, 458 130, 505 66" fill="none" stroke="#f2efe6" stroke-width="3"/>
729
  <circle cx="440" cy="250" r="11" fill="none" stroke="#f2efe6" stroke-width="1.6"/>
730
  <circle cx="432" cy="430" r="4" fill="#f2efe6"/>
731
  <circle cx="436" cy="340" r="4" fill="#f2efe6"/>
 
758
  <text x="522" y="53" fill="#c3c9d1" font-size="12.5">沿白線飛 · 越飛越彎向 45°</text>
759
  <text x="522" y="70" fill="#ffb84d" font-size="12.5">尾焰越長越光</text>
760
  <text x="522" y="87" fill="#ffb84d" font-size="12.5">= 嗰一刻加速越大</text>
761
+ <g id="accel-ship" aria-hidden="true" transform="translate(430 472) rotate(-86.8)">
762
+ <circle id="ship-glow" cx="0" cy="0" r="13" fill="#f2a93b" opacity="0.07">
 
 
 
763
  </circle>
764
+ <g id="ship-flicker">
765
+ <polygon id="flame-outer" points="-16,0 -22.4,-4.1 -20.6,0 -22.4,4.1" fill="#b06a1c" opacity="0.4">
 
 
 
 
766
  </polygon>
767
+ <polygon id="flame-inner" points="-16,0 -19.5,-2.1 -18.5,0 -19.5,2.1" fill="#ffe9a8" opacity="0.45">
 
 
768
  </polygon>
769
  </g>
770
  <polygon points="-11,-5.5 -20,-14 -7,-13.5 -5,-6" fill="#ff7a59" stroke="#0b0f14" stroke-width="0.8"/>
 
2218
  (function () {
2219
  "use strict";
2220
  var reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2221
+ /* ============ Light-cone spaceship: JS-driven (converted from SMIL) ============ */
2222
+ (function () {
2223
+ var ship = document.getElementById("accel-ship");
2224
+ var wl = document.getElementById("worldline-path");
2225
+ var glow = document.getElementById("ship-glow");
2226
+ var flick = document.getElementById("ship-flicker");
2227
+ var fo = document.getElementById("flame-outer");
2228
+ var fi = document.getElementById("flame-inner");
2229
+ if (!ship || !wl || !glow || !flick || !fo || !fi) return;
2230
+ var KT = [0, 0.105, 0.212, 0.32, 0.426, 0.529, 0.567, 0.61, 0.654, 0.698, 0.743, 0.79, 0.838, 0.887, 0.939, 1];
2231
+ var GLOW_R = [13, 13, 12, 12, 12, 13, 23, 24, 25, 26, 26, 26, 25, 25, 24, 23];
2232
+ var GLOW_O = [0.07, 0.07, 0.06, 0.06, 0.06, 0.07, 0.24, 0.26, 0.27, 0.28, 0.28, 0.28, 0.27, 0.26, 0.25, 0.24];
2233
+ var FO_O = [0.4, 0.38, 0.36, 0.35, 0.35, 0.38, 0.92, 0.96, 0.99, 1, 1, 1, 0.99, 0.97, 0.95, 0.92];
2234
+ var FI_O = [0.45, 0.43, 0.42, 0.4, 0.4, 0.43, 0.95, 0.97, 0.99, 1, 1, 1, 0.99, 0.98, 0.96, 0.95];
2235
+ function parsePts(s) {
2236
+ return s.split(";").map(function (fr) {
2237
+ return fr.trim().split(/[\s,]+/).map(Number);
2238
+ });
2239
+ }
2240
+ var FO_P = parsePts("-16,0 -22.4,-4.1 -20.6,0 -22.4,4.1;-16,0 -21.9,-4 -20.2,0 -21.9,4;-16,0 -21.5,-3.9 -20,0 -21.5,3.9;-16,0 -21.2,-3.8 -19.7,0 -21.2,3.8;-16,0 -21.1,-3.8 -19.7,0 -21.1,3.8;-16,0 -21.5,-3.9 -20,0 -21.5,3.9;-16,0 -40.1,-8.5 -33.4,0 -40.1,8.5;-16,0 -42.3,-9.1 -34.9,0 -42.3,9.1;-16,0 -44.1,-9.5 -36.2,0 -44.1,9.5;-16,0 -45.3,-9.8 -37.1,0 -45.3,9.8;-16,0 -45.8,-10 -37.5,0 -45.8,10;-16,0 -45.7,-9.9 -37.4,0 -45.7,9.9;-16,0 -44.9,-9.7 -36.8,0 -44.9,9.7;-16,0 -43.7,-9.4 -35.9,0 -43.7,9.4;-16,0 -41.9,-9 -34.6,0 -41.9,9;-16,0 -39.9,-8.5 -33.2,0 -39.9,8.5");
2241
+ var FI_P = parsePts("-16,0 -19.5,-2.1 -18.5,0 -19.5,2.1;-16,0 -19.2,-2 -18.2,0 -19.2,2;-16,0 -19,-2 -18.1,0 -19,2;-16,0 -18.9,-1.9 -18,0 -18.9,1.9;-16,0 -18.8,-1.9 -18,0 -18.8,1.9;-16,0 -19,-2 -18.1,0 -19,2;-16,0 -29.3,-4.3 -25.3,0 -29.3,4.3;-16,0 -30.5,-4.6 -26.2,0 -30.5,4.6;-16,0 -31.5,-4.8 -26.9,0 -31.5,4.8;-16,0 -32.1,-4.9 -27.3,0 -32.1,4.9;-16,0 -32.4,-5 -27.5,0 -32.4,5;-16,0 -32.3,-5 -27.4,0 -32.3,5;-16,0 -31.9,-4.9 -27.1,0 -31.9,4.9;-16,0 -31.2,-4.7 -26.6,0 -31.2,4.7;-16,0 -30.2,-4.5 -25.9,0 -30.2,4.5;-16,0 -29.1,-4.3 -25.2,0 -29.1,4.3");
2242
+ var FO_RGB = "#b06a1c;#b06a1c;#ad651b;#ad651b;#ad651b;#b06a1c;#ff9d2e;#ffa733;#ffae3d;#ffb445;#ffb84d;#ffb84d;#ffb445;#ffae3d;#ffa733;#ff9d2e".split(";").map(function (hex) {
2243
+ return [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16)];
2244
+ });
2245
+ var L = wl.getTotalLength();
2246
+ function lp(a, b, f) { return a + (b - a) * f; }
2247
+ function segOf(t) {
2248
+ for (var i = 0; i < KT.length - 1; i++) {
2249
+ if (t <= KT[i + 1]) return [i, (t - KT[i]) / (KT[i + 1] - KT[i])];
2250
+ }
2251
+ return [KT.length - 2, 1];
2252
+ }
2253
+ function sampleNum(arr, i, f) { return lp(arr[i], arr[i + 1], f); }
2254
+ function samplePts(arr, i, f) {
2255
+ var a = arr[i], b = arr[i + 1], out = [];
2256
+ for (var k = 0; k < a.length; k += 2) {
2257
+ out.push(lp(a[k], b[k], f).toFixed(1) + "," + lp(a[k + 1], b[k + 1], f).toFixed(1));
2258
+ }
2259
+ return out.join(" ");
2260
+ }
2261
+ function sampleFill(i, f) {
2262
+ var a = FO_RGB[i], b = FO_RGB[i + 1];
2263
+ return "rgb(" + Math.round(lp(a[0], b[0], f)) + "," + Math.round(lp(a[1], b[1], f)) + "," + Math.round(lp(a[2], b[2], f)) + ")";
2264
+ }
2265
+ function frame(now) {
2266
+ var t = (now % 8000) / 8000;
2267
+ var d = t * L;
2268
+ var p = wl.getPointAtLength(d);
2269
+ var pa = wl.getPointAtLength(Math.max(0, d - 0.5));
2270
+ var pb = wl.getPointAtLength(Math.min(L, d + 0.5));
2271
+ var ang = Math.atan2(pb.y - pa.y, pb.x - pa.x) * 180 / Math.PI;
2272
+ ship.setAttribute("transform", "translate(" + p.x.toFixed(1) + " " + p.y.toFixed(1) + ") rotate(" + ang.toFixed(1) + ")");
2273
+ var sf = segOf(t), i = sf[0], f = sf[1];
2274
+ glow.setAttribute("r", sampleNum(GLOW_R, i, f).toFixed(2));
2275
+ glow.setAttribute("opacity", sampleNum(GLOW_O, i, f).toFixed(3));
2276
+ fo.setAttribute("points", samplePts(FO_P, i, f));
2277
+ fo.setAttribute("fill", sampleFill(i, f));
2278
+ fo.setAttribute("opacity", sampleNum(FO_O, i, f).toFixed(3));
2279
+ fi.setAttribute("points", samplePts(FI_P, i, f));
2280
+ fi.setAttribute("opacity", sampleNum(FI_O, i, f).toFixed(3));
2281
+ var fp = (now % 350) / 350;
2282
+ var fl = fp < 0.5 ? 1 - 0.3 * fp : 0.85 + 0.3 * (fp - 0.5);
2283
+ flick.setAttribute("opacity", fl.toFixed(3));
2284
+ requestAnimationFrame(frame);
2285
+ }
2286
+ requestAnimationFrame(frame);
2287
+ })();
2288
+
2289
 
2290
  /* ============ LAB A: film strip ============ */
2291
  (function () {
 
2302
  function miniFigure(i) {
2303
  // stick runner inside one frame: position along the mini track = race progress
2304
  var pr = i / (N - 1);
2305
+ var gx = 5 + pr * 30;
2306
+ function n(v) { return v.toFixed(1); }
2307
  var col = "#e9e6dd";
2308
  var legs = (i % 2 === 0)
2309
+ ? "M " + n(gx) + " 40 L " + n(gx + 3) + " 44 L " + n(gx + 2.4) + " 48 M " + n(gx) + " 40 L " + n(gx - 3.4) + " 43 L " + n(gx - 4.4) + " 48"
2310
+ : "M " + n(gx) + " 40 L " + n(gx + 4) + " 43 L " + n(gx + 5) + " 47 M " + n(gx) + " 40 L " + n(gx - 2.6) + " 44 L " + n(gx - 1) + " 48";
2311
  var arms = (i % 2 === 0)
2312
+ ? "M " + n(gx) + " 34 L " + n(gx + 3.4) + " 37 M " + n(gx) + " 34 L " + n(gx - 3.4) + " 36"
2313
+ : "M " + n(gx) + " 34 L " + n(gx - 3) + " 37 M " + n(gx) + " 34 L " + n(gx + 3.6) + " 35";
2314
  return '<svg viewBox="0 0 40 56" aria-hidden="true">' +
2315
  '<line x1="2" y1="48" x2="38" y2="48" stroke="#3d4a5e" stroke-width="1.4"/>' +
2316
  '<line x1="4" y1="42" x2="4" y2="48" stroke="#8b95a3" stroke-width="1.4"/>' +
2317
  '<line x1="36" y1="42" x2="36" y2="48" stroke="#8b95a3" stroke-width="1.4"/>' +
2318
  '<g stroke="' + col + '" stroke-width="1.6" stroke-linecap="round" fill="none">' +
2319
+ '<circle cx="' + n(gx) + '" cy="29" r="2.4"/>' +
2320
+ '<path d="M ' + n(gx) + ' 31.4 L ' + n(gx) + ' 40"/>' +
2321
  '<path d="' + arms + '"/><path d="' + legs + '"/></g></svg>';
2322
  }
2323
  for (var i = 0; i < N; i++) {