PageSourceSearch

https://paradromics.com/wp-content/themes/paradromics/js/main.js?cache=1790912417

js paradromics.com collected 2026-10-02 04:06:22 UTC 31,453 bytes, 923 lines download raw bytes

1$(document).ready(function () {
2
3    $('#menuToggle').on('click', function () {
4        $(this).toggleClass('active');
5        $('#mobileMenu').toggleClass('active');
6        $('header').toggleClass('menu-open');
7    });
8
9    $('.mobile-menu .menu-item-has-children > a').on('click', function (e) {
10        e.preventDefault();
11        $(this).closest('.menu-item-has-children').toggleClass('active')
12            .find('.submenu').slideToggle();
13    });
14
15
16
17    
18    function initVideoPlay(videoSelector, btnSelector) {
19        var video = $(videoSelector).get(0);
20        var btn = $(btnSelector);
21        btn.on("click", function () {
22            if (video.paused) {
23                video.play();
24                btn.fadeOut();
25            } else {
26                video.pause();
27                btn.fadeIn();
28            }
29        });
30
31        $(videoSelector).on("pause", function () {
32            btn.fadeIn();
33        });
34    }
35
36    initVideoPlay("#dvVideo", "#dvPlayBtn");
37    initVideoPlay("#dvVideo2", "#dvPlayBtn2");
38
39    const swiper = new Swiper(".dv-history-slide", {
40        slidesPerView: 3.38,
41        spaceBetween: 24,
42        speed: 800,
43
44        navigation: {
45            nextEl: ".history-next",
46            prevEl: ".history-prev",
47        },
48
49        breakpoints: {
50            0: {
51                slidesPerView: 1.2,
52            },
53            768: {
54                slidesPerView: 2.2,
55            },
56            1200: {
57                slidesPerView: 3.38,
58            },
59        },
60
61        on: {
62            init: function () {
63                updateProgress(this);
64            },
65            slideChange: function () {
66                updateProgress(this);
67            },
68        },
69    });
70
71    function updateProgress(swiper) {
72        const progress = ((swiper.activeIndex + 1) / swiper.slides.length) * 100;
73
74        document.querySelector(".history-progressbar").style.width = progress + "%";
75    }
76
77    const $customVideoWrappers = $(".custom-video-wrapper");
78
79    $customVideoWrappers.each(function () {
80        const $customVideoWrapper = $(this);
81        const careerVideo = $customVideoWrapper.find(".custom-video")[0];
82        const $careerVideoPlayBtn = $customVideoWrapper.find(".video-play-btn");
83
84        $careerVideoPlayBtn.on("click", function () {
85            careerVideo.play();
86            $(careerVideo).attr("controls", true);
87        });
88
89        $(careerVideo).on("play", function () {
90            $customVideoWrapper.addClass("playing");
91        });
92
93        $(careerVideo).on("pause", function () {
94            $customVideoWrapper.removeClass("playing");
95        });
96
97        $(careerVideo).on("ended", function () {
98            $customVideoWrapper.removeClass("playing");
99        });
100    });
101
102
103    // document.querySelectorAll('.bounce-video').forEach(function (video) {
104    //     video.removeAttribute('loop');
105
106    //     var frameStep = 1 / 24;
107
108    //     function reverseOneFrame() {
109    //         var next = Math.max(0, video.currentTime - frameStep);
110
111    //         if (next <= 0) {
112    //             video.play();
113    //             return;
114    //         }
115
116    //         video.addEventListener('seeked', function onSeeked() {
117    //             video.removeEventListener('seeked', onSeeked);
118    //             reverseOneFrame();
119    //         });
120
121    //         video.currentTime = next;
122    //     }
123
124    //     video.addEventListener('ended', function () {
125    //         reverseOneFrame();
126    //     });
127    // });
128
129    const swiper2 = new Swiper(".mySwiper", {
130        direction: "vertical",
131        slidesPerView: 6,
132        centeredSlides: true,
133        loop: true,
134        mousewheel: false,
135        allowTouchMove: false,
136        initialSlide: 3,
137        loopAdditionalSlides: 0,
138        watchSlidesProgress: true,
139        autoplay: {
140            delay: 2000,
141            disableOnInteraction: false,
142        },
143        speed: 1000,
144        breakpoints: {
145            0: {
146                slidesPerView: 4,
147            },
148            768: {
149                slidesPerView: 6,
150            }
151        },
152    });
153
154
155});
156
157// (() => {
158//   const canvas = document.getElementById("c");
159//   if (!canvas) return;
160
161//   const gl = canvas.getContext("webgl", {
162//     antialias: false,
163//     alpha: false,
164//     preserveDrawingBuffer: false,
165//   });
166//   if (!gl) return;
167
168//   // ─── Baked-in settings (from screenshot) ──────────────────────────────────
169//   const params = {
170//     // Speed
171//     timeScale: 0.04,
172//     orbitSpeed: 0.62,
173//     foldSpeed: 0.74,
174//     warpSpeed: 0.74,
175//     foldTravel: 1.11,
176//     warpTravel: 1.0,
177//     worldSpin: -1.326,
178//     worldSpinSpeed: -0.324,
179
180//     // Object
181//     objRot: 0.0,
182//     panX: 0.0,
183//     panY: 0.0,
184
185//     // Camera
186//     zoom: 2.44,
187//     fov: 1.22,
188//     objectScale: 1.28,
189//     pitch: -0.3025,
190
191//     // Shape / Knot
192//     major: 0.7,
193//     minor: 0.41,
194//     flatten: 0.73,
195//     twist: 3.4,
196//     knotiness: 0.0,
197//     loopSpin: 0.31,
198
199//     // Warp Detail
200//     warpAmp: 0.0,
201//     warpFreq: 1.7,
202//     warpDetail: 0.94,
203
204//     // Hidden / internal
205//     foldAmp: 0.0,
206//     foldFreq: 0.0,
207//     foldSharp: 0.3,
208//     foldTighten: 0.5,
209//     rim: 0.0,
210//     shine: 0.0,
211//     bloomThreshold: 0.0,
212//     bloomIntensity: 0.0,
213//     bloomRadius: 0.0,
214//     vignette: 0.0,
215
216//     // Colors (from screenshot)
217//     bg: "#030826",
218//     c1: "#afb0af",
219//     c2: "#0d50cc",
220//     c3: "#010c86",
221//     c4: "#fd1c32",
222//     c5: "#f2c036",
223//   };
224
225//   // ─── Helpers ───────────────────────────────────────────────────────────────
226//   const hexToRgb01 = (hex) => {
227//     const h = (hex || "#000").replace("#", "").trim();
228//     const v =
229//       h.length === 3
230//         ? h
231//             .split("")
232//             .map((c) => c + c)
233//             .join("")
234//         : h.padEnd(6, "0").slice(0, 6);
235//     const n = parseInt(v, 16) || 0;
236//     return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];
237//   };
238
239//   const hexToRgb255 = (hex) => {
240//     const [r, g, b] = hexToRgb01(hex);
241//     return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
242//   };
243
244//   const clamp = (v, a, b) => Math.max(a, Math.min(b, v));
245
246//   // ─── GL helpers ────────────────────────────────────────────────────────────
247//   const compile = (type, src) => {
248//     const sh = gl.createShader(type);
249//     gl.shaderSource(sh, src);
250//     gl.compileShader(sh);
251//     if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) {
252//       const msg = gl.getShaderInfoLog(sh) || "Shader compile error";
253//       gl.deleteShader(sh);
254//       throw new Error(msg);
255//     }
256//     return sh;
257//   };
258
259//   const link = (vsSrc, fsSrc) => {
260//     const p = gl.createProgram();
261//     gl.attachShader(p, compile(gl.VERTEX_SHADER, vsSrc));
262//     gl.attachShader(p, compile(gl.FRAGMENT_SHADER, fsSrc));
263//     gl.linkProgram(p);
264//     if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {
265//       const msg = gl.getProgramInfoLog(p) || "Program link error";
266//       gl.deleteProgram(p);
267//       throw new Error(msg);
268//     }
269//     return p;
270//   };
271
272//   const U = (p, n) => gl.getUniformLocation(p, n);
273
274//   // Fullscreen quad
275//   const quad = gl.createBuffer();
276//   gl.bindBuffer(gl.ARRAY_BUFFER, quad);
277//   gl.bufferData(
278//     gl.ARRAY_BUFFER,
279//     new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]),
280//     gl.STATIC_DRAW,
281//   );
282
283//   const bindQuad = (p) => {
284//     gl.useProgram(p);
285//     const a = gl.getAttribLocation(p, "a_pos");
286//     gl.bindBuffer(gl.ARRAY_BUFFER, quad);
287//     gl.enableVertexAttribArray(a);
288//     gl.vertexAttribPointer(a, 2, gl.FLOAT, false, 0, 0);
289//   };
290
291//   // ─── Textures / FBOs ───────────────────────────────────────────────────────
292//   const makeTex = (w, h) => {
293//     const t = gl.createTexture();
294//     gl.bindTexture(gl.TEXTURE_2D, t);
295//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
296//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
297//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
298//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
299//     gl.texImage2D(
300//       gl.TEXTURE_2D,
301//       0,
302//       gl.RGBA,
303//       w,
304//       h,
305//       0,
306//       gl.RGBA,
307//       gl.UNSIGNED_BYTE,
308//       null,
309//     );
310//     return t;
311//   };
312
313//   const makeFBO = (tex) => {
314//     const f = gl.createFramebuffer();
315//     gl.bindFramebuffer(gl.FRAMEBUFFER, f);
316//     gl.framebufferTexture2D(
317//       gl.FRAMEBUFFER,
318//       gl.COLOR_ATTACHMENT0,
319//       gl.TEXTURE_2D,
320//       tex,
321//       0,
322//     );
323//     return f;
324//   };
325
326//   let W = 0,
327//     H = 0,
328//     BW = 0,
329//     BH = 0;
330//   let texScene,
331//     fboScene,
332//     texBright,
333//     fboBright,
334//     texBlurA,
335//     fboBlurA,
336//     texBlurB,
337//     fboBlurB;
338
339//   const ensureTargets = () => {
340//     const dpr = Math.min(2, window.devicePixelRatio || 1);
341//     const w = Math.floor(canvas.clientWidth * dpr);
342//     const h = Math.floor(canvas.clientHeight * dpr);
343
344//     if (canvas.width !== w || canvas.height !== h) {
345//       canvas.width = w;
346//       canvas.height = h;
347//     }
348
349//     const bw = Math.max(2, Math.floor(w * 0.5));
350//     const bh = Math.max(2, Math.floor(h * 0.5));
351
352//     if (w !== W || h !== H || bw !== BW || bh !== BH) {
353//       W = w;
354//       H = h;
355//       BW = bw;
356//       BH = bh;
357//       texScene = makeTex(W, H);
358//       fboScene = makeFBO(texScene);
359//       texBright = makeTex(BW, BH);
360//       fboBright = makeFBO(texBright);
361//       texBlurA = makeTex(BW, BH);
362//       fboBlurA = makeFBO(texBlurA);
363//       texBlurB = makeTex(BW, BH);
364//       fboBlurB = makeFBO(texBlurB);
365//     }
366//   };
367
368//   // ─── Gradient LUT ──────────────────────────────────────────────────────────
369//   const gradTex = gl.createTexture();
370
371//   const uploadGradient = (stopsHex) => {
372//     const stops = stopsHex.map(hexToRgb255);
373//     const size = 256;
374//     const data = new Uint8Array(size * 4);
375//     const lerp = (a, b, t) => a * (1 - t) + b * t;
376
377//     for (let i = 0; i < size; i++) {
378//       const t = i / (size - 1);
379//       const segs = stops.length - 1;
380//       const s = Math.min(segs - 1, Math.floor(t * segs));
381//       const localT = (t - s / segs) * segs;
382//       const A = stops[s],
383//         B = stops[s + 1];
384//       data[i * 4 + 0] = Math.round(lerp(A[0], B[0], localT));
385//       data[i * 4 + 1] = Math.round(lerp(A[1], B[1], localT));
386//       data[i * 4 + 2] = Math.round(lerp(A[2], B[2], localT));
387//       data[i * 4 + 3] = 255;
388//     }
389
390//     gl.activeTexture(gl.TEXTURE0);
391//     gl.bindTexture(gl.TEXTURE_2D, gradTex);
392//     gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
393//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
394//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
395//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
396//     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
397//     gl.texImage2D(
398//       gl.TEXTURE_2D,
399//       0,
400//       gl.RGBA,
401//       256,
402//       1,
403//       0,
404//       gl.RGBA,
405//       gl.UNSIGNED_BYTE,
406//       data,
407//     );
408//   };
409
410//   // ─── Shaders ───────────────────────────────────────────────────────────────
411//   const VS = `
412//     attribute vec2 a_pos;
413//     varying vec2 v_uv;
414//     void main(){
415//       v_uv = a_pos * 0.5 + 0.5;
416//       gl_Position = vec4(a_pos, 0.0, 1.0);
417//     }
418//   `;
419
420//   const SCENE_FS = `
421//     precision highp float;
422//     varying vec2 v_uv;
423
424//     uniform float u_time;
425//     uniform float u_w;
426//     uniform float u_h;
427//     uniform sampler2D u_gradient;
428//     uniform vec3  u_bg;
429//     uniform float u_timeScale;
430//     uniform float u_orbitSpeed;
431//     uniform float u_foldSpeed;
432//     uniform float u_warpSpeed;
433//     uniform float u_foldTravel;
434//     uniform float u_warpTravel;
435//     uniform float u_worldSpin;
436//     uniform float u_worldSpinSpeed;
437//     uniform float u_objRot;
438//     uniform float u_camDist;
439//     uniform float u_fov;
440//     uniform float u_objScale;
441//     uniform float u_pitch;
442//     uniform float u_major;
443//     uniform float u_minor;
444//     uniform float u_flatten;
445//     uniform float u_twist;
446//     uniform float u_knotiness;
447//     uniform float u_loopSpin;
448//     uniform float u_foldAmp;
449//     uniform float u_foldFreq;
450//     uniform float u_foldSharp;
451//     uniform float u_foldTighten;
452//     uniform float u_warpAmp;
453//     uniform float u_warpFreq;
454//     uniform float u_warpDetail;
455//     uniform float u_shine;
456//     uniform float u_rim;
457//     uniform float u_panX;
458//     uniform float u_panY;
459
460//     mat2 rot(float a){
461//       float s = sin(a), c = cos(a);
462//       return mat2(c,-s,s,c);
463//     }
464
465//     float sdTorus(vec3 p, vec2 t){
466//       vec2 q = vec2(length(p.xz) - t.x, p.y);
467//       return length(q) - t.y;
468//     }
469
470//     float smin(float a, float b, float k){
471//       float h = clamp(0.5 + 0.5*(b-a)/k, 0.0, 1.0);
472//       return mix(b, a, h) - k*h*(1.0-h);
473//     }
474
475//     vec3 pal(float t){
476//       t = clamp(t, 0.0, 1.0);
477//       return texture2D(u_gradient, vec2(t, 0.5)).rgb;
478//     }
479
480//     float hash21(vec2 p){
481//       p = fract(p*vec2(123.34,345.45));
482//       p += dot(p, p+34.345);
483//       return fract(p.x*p.y);
484//     }
485
486//     vec3 warp(vec3 p, float tWarp){
487//       float f = u_warpFreq;
488//       float ph = tWarp * u_warpTravel;
489//       float wx = sin(p.y*f + ph*1.25);
490//       float wy = sin(p.z*f - ph*1.10);
491//       float wz = sin(p.x*f + ph*1.15);
492//       p.xz *= rot(0.40*wx);
493//       p.xy *= rot(0.32*wy);
494//       p.yz *= rot(0.28*wz);
495//       p += vec3(
496//         sin(p.y*f + ph) * 0.30,
497//         sin(p.z*f - ph*1.05) * 0.22,
498//         sin(p.x*f + ph*0.98) * 0.30
499//       ) * u_warpAmp;
500//       float fd = f * 3.2;
501//       float micro = u_warpDetail;
502//       p += vec3(
503//         sin(p.y*fd + ph*2.1),
504//         sin(p.z*fd - ph*2.3),
505//         sin(p.x*fd + ph*1.9)
506//       ) * (0.06 * micro);
507//       return p;
508//     }
509
510//     float foldField(vec3 p, float tFold){
511//       float travel = tFold * u_foldTravel;
512//       float ang = atan(p.z, p.x);
513//       ang = fract(ang / (6.28318) + 0.5);
514//       float a1 = ang * u_foldFreq + p.y * (u_twist * 1.25) + travel;
515//       float a2 = ang * (u_foldFreq*1.65) - p.y * (u_twist * 0.70) - travel*0.72;
516//       float a3 = ang * (u_foldFreq*0.85) + p.y * (u_twist * 1.80) + travel*1.35;
517//       float bunch = sin(a1) + sin(a2)*0.55 + sin(a3)*0.35;
518//       bunch = clamp(bunch, -1.0, 1.0);
519//       bunch = sign(bunch) * pow(abs(bunch), max(0.001, u_foldTighten));
520//       float rid = pow(abs(bunch), max(0.01, u_foldSharp));
521//       rid += (hash21(p.xz*2.1) - 0.5) * 0.12;
522//       rid = clamp(rid, 0.0, 1.0);
523//       return (rid - 0.45) * u_foldAmp;
524//     }
525
526//     float map(vec3 p0){
527//       vec3 p = p0 / max(0.001, u_objScale);
528//       p.xz *= rot(u_objRot);
529//       p.xy *= rot(u_objRot * 0.35);
530//       float tBase = u_time * u_timeScale;
531//       float spin = u_worldSpin + tBase * u_worldSpinSpeed;
532//       p.xz *= rot(spin);
533//       p.xy *= rot(spin * 0.35);
534//       p.y *= u_flatten;
535//       p.xz *= rot(p.y * u_twist);
536//       float tWarp = tBase * u_warpSpeed;
537//       float tFold = tBase * u_foldSpeed;
538//       p = warp(p, tWarp);
539//       float sp = u_loopSpin * tBase * 0.30;
540//       float dA = sdTorus(p, vec2(u_major, u_minor));
541//       vec3 b = p; b.xy *= rot(1.10 + sp); b.xz *= rot(0.65);
542//       float dB = sdTorus(b, vec2(u_major*1.02, u_minor*0.92));
543//       vec3 c = p; c.yz *= rot(1.35); c.xz *= rot(-0.55 - sp*0.7);
544//       float dC = sdTorus(c, vec2(u_major*0.98, u_minor*0.88));
545//       vec3 d = p; d.xy *= rot(-0.90); d.yz *= rot(0.85 + sp*0.9);
546//       float dD = sdTorus(d, vec2(u_major*1.01, u_minor*0.86));
547//       float k = mix(0.60, 0.16, clamp(u_knotiness, 0.0, 1.0));
548//       float dist = smin(dA, dB, k);
549//       dist = smin(dist, dC, k);
550//       dist = smin(dist, dD, k);
551//       dist += foldField(p, tFold) * 0.26;
552//       return dist * max(0.001, u_objScale);
553//     }
554
555//     vec3 normal(vec3 p){
556//       float e = 0.0018;
557//       float dx = map(p + vec3(e,0,0)) - map(p - vec3(e,0,0));
558//       float dy = map(p + vec3(0,e,0)) - map(p - vec3(0,e,0));
559//       float dz = map(p + vec3(0,0,e)) - map(p - vec3(0,0,e));
560//       return normalize(vec3(dx,dy,dz));
561//     }
562
563//     void main(){
564//       vec2 uv = (gl_FragCoord.xy - 0.5*vec2(u_w,u_h)) / u_h;
565//       float tBase = u_time * u_timeScale;
566//       float camT = tBase * u_orbitSpeed;
567//       vec3 ro = vec3(0.0, 0.08, u_camDist);
568//       ro.yz = rot(u_pitch) * ro.yz;
569//       ro.xz = rot(camT) * ro.xz;
570//       vec3 ta = vec3(u_panX, u_panY, 0.0);
571//       vec3 ww = normalize(ta - ro);
572//       vec3 uu = normalize(cross(vec3(0.0,1.0,0.0), ww));
573//       vec3 vv = cross(ww, uu);
574//       vec3 rd = normalize(uv.x*uu + uv.y*vv + u_fov*ww);
575//       vec3 bg = u_bg;
576//       float t = 0.0;
577//       float hit = 0.0;
578//       vec3 p = ro;
579//       for(int i=0;i<128;i++){
580//         p = ro + rd*t;
581//         float d = map(p);
582//         if (d < 0.0025){ hit = 1.0; break; }
583//         t += d * 0.9;
584//         if (t > 11.0) break;
585//       }
586//       vec3 col = bg;
587//       if(hit > 0.5){
588//         vec3 n = normal(p);
589//         vec3 v = normalize(ro - p);
590//         float tcol =
591//           0.55
592//           + 0.26*n.x
593//           + 0.18*sin(p.y*2.3 + tBase*0.85)
594//           + 0.16*sin(p.x*2.0 - tBase*0.55);
595//         vec3 base = pal(tcol);
596//         float ndv = clamp(dot(n, v), 0.0, 1.0);
597//         float fres = pow(1.0 - ndv, 2.0);
598//         col = base;
599//         col += base * fres * u_rim;
600//         col = mix(col, base * 1.15, 0.35);
601//         col += base * pow(fres, 3.0) * (0.35 * u_shine);
602//         col = pow(clamp(col, 0.0, 1.0), vec3(0.92));
603//         float fog = smoothstep(0.0, 8.0, t);
604//         col = mix(col, bg, fog * 0.25);
605//       }
606//       gl_FragColor = vec4(col, 1.0);
607//     }
608//   `;
609
610//   const BRIGHT_FS = `
611//     precision highp float;
612//     varying vec2 v_uv;
613//     uniform sampler2D u_scene;
614//     uniform float u_threshold;
615//     void main(){
616//       vec3 c = texture2D(u_scene, v_uv).rgb;
617//       float b = max(max(c.r,c.g), c.b);
618//       float m = smoothstep(u_threshold, 1.0, b);
619//       gl_FragColor = vec4(c*m, 1.0);
620//     }
621//   `;
622
623//   const BLUR_FS = `
624//     precision highp float;
625//     varying vec2 v_uv;
626//     uniform sampler2D u_tex;
627//     uniform vec2 u_texel;
628//     uniform vec2 u_dir;
629//     uniform float u_radius;
630//     void main(){
631//       float w0 = 0.2270270270;
632//       float w1 = 0.1945945946;
633//       float w2 = 0.1216216216;
634//       float w3 = 0.0540540541;
635//       float w4 = 0.0162162162;
636//       vec2 stepv = u_dir * u_texel * u_radius;
637//       vec4 col = texture2D(u_tex, v_uv) * w0;
638//       col += texture2D(u_tex, v_uv + stepv*1.0) * w1;
639//       col += texture2D(u_tex, v_uv - stepv*1.0) * w1;
640//       col += texture2D(u_tex, v_uv + stepv*2.0) * w2;
641//       col += texture2D(u_tex, v_uv - stepv*2.0) * w2;
642//       col += texture2D(u_tex, v_uv + stepv*3.0) * w3;
643//       col += texture2D(u_tex, v_uv - stepv*3.0) * w3;
644//       col += texture2D(u_tex, v_uv + stepv*4.0) * w4;
645//       col += texture2D(u_tex, v_uv - stepv*4.0) * w4;
646//       gl_FragColor = col;
647//     }
648//   `;
649
650//   const COMP_FS = `
651//     precision highp float;
652//     varying vec2 v_uv;
653//     uniform sampler2D u_scene;
654//     uniform sampler2D u_bloom;
655//     uniform float u_bloomIntensity;
656//     uniform float u_vignette;
657//     void main(){
658//       vec3 scene = texture2D(u_scene, v_uv).rgb;
659//       vec3 bloom = texture2D(u_bloom, v_uv).rgb;
660//       vec3 col = scene + bloom * u_bloomIntensity;
661//       float d = distance(v_uv, vec2(0.5));
662//       float vig = smoothstep(0.95, 0.25, d);
663//       col *= mix(1.0 - u_vignette, 1.0, vig);
664//       gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);
665//     }
666//   `;
667
668//   // ─── Programs + uniforms ───────────────────────────────────────────────────
669//   let Pscene, Lscene, Pbright, Lbright, Pblur, Lblur, Pcomp, Lcomp;
670
671//   const buildPrograms = () => {
672//     Pscene = link(VS, SCENE_FS);
673//     Lscene = {
674//       u_time: U(Pscene, "u_time"),
675//       u_w: U(Pscene, "u_w"),
676//       u_h: U(Pscene, "u_h"),
677//       u_gradient: U(Pscene, "u_gradient"),
678//       u_bg: U(Pscene, "u_bg"),
679//       u_timeScale: U(Pscene, "u_timeScale"),
680//       u_orbitSpeed: U(Pscene, "u_orbitSpeed"),
681//       u_foldSpeed: U(Pscene, "u_foldSpeed"),
682//       u_warpSpeed: U(Pscene, "u_warpSpeed"),
683//       u_foldTravel: U(Pscene, "u_foldTravel"),
684//       u_warpTravel: U(Pscene, "u_warpTravel"),
685//       u_worldSpin: U(Pscene, "u_worldSpin"),
686//       u_worldSpinSpeed: U(Pscene, "u_worldSpinSpeed"),
687//       u_objRot: U(Pscene, "u_objRot"),
688//       u_camDist: U(Pscene, "u_camDist"),
689//       u_fov: U(Pscene, "u_fov"),
690//       u_objScale: U(Pscene, "u_objScale"),
691//       u_pitch: U(Pscene, "u_pitch"),
692//       u_major: U(Pscene, "u_major"),
693//       u_minor: U(Pscene, "u_minor"),
694//       u_flatten: U(Pscene, "u_flatten"),
695//       u_twist: U(Pscene, "u_twist"),
696//       u_knotiness: U(Pscene, "u_knotiness"),
697//       u_loopSpin: U(Pscene, "u_loopSpin"),
698//       u_foldAmp: U(Pscene, "u_foldAmp"),
699//       u_foldFreq: U(Pscene, "u_foldFreq"),
700//       u_foldSharp: U(Pscene, "u_foldSharp"),
701//       u_foldTighten: U(Pscene, "u_foldTighten"),
702//       u_warpAmp: U(Pscene, "u_warpAmp"),
703//       u_warpFreq: U(Pscene, "u_warpFreq"),
704//       u_warpDetail: U(Pscene, "u_warpDetail"),
705//       u_shine: U(Pscene, "u_shine"),
706//       u_rim: U(Pscene, "u_rim"),
707//       u_panX: U(Pscene, "u_panX"),
708//       u_panY: U(Pscene, "u_panY"),
709//     };
710
711//     bindQuad(Pscene);
712//     gl.uniform1i(Lscene.u_gradient, 0);
713
714//     Pbright = link(VS, BRIGHT_FS);
715//     Lbright = {
716//       u_scene: U(Pbright, "u_scene"),
717//       u_threshold: U(Pbright, "u_threshold"),
718//     };
719
720//     Pblur = link(VS, BLUR_FS);
721//     Lblur = {
722//       u_tex: U(Pblur, "u_tex"),
723//       u_texel: U(Pblur, "u_texel"),
724//       u_dir: U(Pblur, "u_dir"),
725//       u_radius: U(Pblur, "u_radius"),
726//     };
727
728//     Pcomp = link(VS, COMP_FS);
729//     Lcomp = {
730//       u_scene: U(Pcomp, "u_scene"),
731//       u_bloom: U(Pcomp, "u_bloom"),
732//       u_bloomIntensity: U(Pcomp, "u_bloomIntensity"),
733//       u_vignette: U(Pcomp, "u_vignette"),
734//     };
735//   };
736
737//   // ─── Mouse drag rotate + wheel zoom ───────────────────────────────────────
738//   let isDown = false,
739//     lastX = 0,
740//     lastY = 0;
741//   const ROTATE_SPEED = 0.008;
742//   const PITCH_SPEED = 0.006;
743//   const ZOOM_SPEED = 0.0015;
744
745//   canvas.style.touchAction = "none";
746
747//   canvas.addEventListener("pointerdown", (e) => {
748//     isDown = true;
749//     lastX = e.clientX;
750//     lastY = e.clientY;
751//     canvas.setPointerCapture(e.pointerId);
752//   });
753
754//   canvas.addEventListener("pointermove", (e) => {
755//     if (!isDown) return;
756//     const dx = e.clientX - lastX;
757//     const dy = e.clientY - lastY;
758//     lastX = e.clientX;
759//     lastY = e.clientY;
760//     params.objRot += dx * ROTATE_SPEED;
761//     params.pitch = clamp(params.pitch + dy * PITCH_SPEED, -0.55, 0.55);
762//   });
763
764//   const end = () => (isDown = false);
765//   canvas.addEventListener("pointerup", end);
766//   canvas.addEventListener("pointercancel", end);
767//   canvas.addEventListener("pointerleave", end);
768
769//   canvas.addEventListener(
770//     "wheel",
771//     (e) => {
772//       e.preventDefault();
773//       params.zoom = clamp(params.zoom + e.deltaY * ZOOM_SPEED, 1.8, 6.0);
774//     },
775//     { passive: false },
776//   );
777
778//   // ─── Render passes ─────────────────────────────────────────────────────────
779//   function passScene(t) {
780//     gl.bindFramebuffer(gl.FRAMEBUFFER, fboScene);
781//     gl.viewport(0, 0, W, H);
782//     const bg = hexToRgb01(params.bg);
783//     gl.clearColor(bg[0], bg[1], bg[2], 1);
784//     gl.clear(gl.COLOR_BUFFER_BIT);
785
786//     bindQuad(Pscene);
787//     gl.activeTexture(gl.TEXTURE0);
788//     gl.bindTexture(gl.TEXTURE_2D, gradTex);
789
790//     gl.uniform1f(Lscene.u_time, t);
791//     gl.uniform1f(Lscene.u_w, W);
792//     gl.uniform1f(Lscene.u_h, H);
793//     gl.uniform3f(Lscene.u_bg, bg[0], bg[1], bg[2]);
794//     gl.uniform1f(Lscene.u_timeScale, params.timeScale);
795//     gl.uniform1f(Lscene.u_orbitSpeed, params.orbitSpeed);
796//     gl.uniform1f(Lscene.u_foldSpeed, params.foldSpeed);
797//     gl.uniform1f(Lscene.u_warpSpeed, params.warpSpeed);
798//     gl.uniform1f(Lscene.u_foldTravel, params.foldTravel);
799//     gl.uniform1f(Lscene.u_warpTravel, params.warpTravel);
800//     gl.uniform1f(Lscene.u_worldSpin, params.worldSpin);
801//     gl.uniform1f(Lscene.u_worldSpinSpeed, params.worldSpinSpeed);
802//     gl.uniform1f(Lscene.u_objRot, params.objRot);
803//     gl.uniform1f(Lscene.u_camDist, params.zoom);
804//     gl.uniform1f(Lscene.u_fov, params.fov);
805//     gl.uniform1f(Lscene.u_objScale, params.objectScale);
806//     gl.uniform1f(Lscene.u_pitch, params.pitch);
807//     gl.uniform1f(Lscene.u_major, params.major);
808//     gl.uniform1f(Lscene.u_minor, params.minor);
809//     gl.uniform1f(Lscene.u_flatten, params.flatten);
810//     gl.uniform1f(Lscene.u_twist, params.twist);
811//     gl.uniform1f(Lscene.u_knotiness, params.knotiness);
812//     gl.uniform1f(Lscene.u_loopSpin, params.loopSpin);
813//     gl.uniform1f(Lscene.u_foldAmp, params.foldAmp);
814//     gl.uniform1f(Lscene.u_foldFreq, params.foldFreq);
815//     gl.uniform1f(Lscene.u_foldSharp, params.foldSharp);
816//     gl.uniform1f(Lscene.u_foldTighten, params.foldTighten);
817//     gl.uniform1f(Lscene.u_warpAmp, params.warpAmp);
818//     gl.uniform1f(Lscene.u_warpFreq, params.warpFreq);
819//     gl.uniform1f(Lscene.u_warpDetail, params.warpDetail);
820//     gl.uniform1f(Lscene.u_shine, params.shine);
821//     gl.uniform1f(Lscene.u_rim, params.rim);
822//     gl.uniform1f(Lscene.u_panX, params.panX);
823//     gl.uniform1f(Lscene.u_panY, params.panY);
824
825//     gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
826//   }
827
828//   function passBright() {
829//     gl.bindFramebuffer(gl.FRAMEBUFFER, fboBright);
830//     gl.viewport(0, 0, BW, BH);
831//     bindQuad(Pbright);
832//     gl.activeTexture(gl.TEXTURE0);
833//     gl.bindTexture(gl.TEXTURE_2D, texScene);
834//     gl.uniform1i(Lbright.u_scene, 0);
835//     gl.uniform1f(Lbright.u_threshold, params.bloomThreshold);
836//     gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
837//   }
838
839//   function passBlur(srcTex, dstFbo, dirX, dirY) {
840//     gl.bindFramebuffer(gl.FRAMEBUFFER, dstFbo);
841//     gl.viewport(0, 0, BW, BH);
842//     bindQuad(Pblur);
843//     gl.activeTexture(gl.TEXTURE0);
844//     gl.bindTexture(gl.TEXTURE_2D, srcTex);
845//     gl.uniform1i(Lblur.u_tex, 0);
846//     gl.uniform2f(Lblur.u_texel, 1 / BW, 1 / BH);
847//     gl.uniform2f(Lblur.u_dir, dirX, dirY);
848//     gl.uniform1f(Lblur.u_radius, params.bloomRadius);
849//     gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
850//   }
851
852//   function passComposite() {
853//     gl.bindFramebuffer(gl.FRAMEBUFFER, null);
854//     gl.viewport(0, 0, W, H);
855//     bindQuad(Pcomp);
856//     gl.activeTexture(gl.TEXTURE0);
857//     gl.bindTexture(gl.TEXTURE_2D, texScene);
858//     gl.uniform1i(Lcomp.u_scene, 0);
859//     gl.activeTexture(gl.TEXTURE1);
860//     gl.bindTexture(gl.TEXTURE_2D, texBlurB);
861//     gl.uniform1i(Lcomp.u_bloom, 1);
862//     gl.uniform1f(Lcomp.u_bloomIntensity, params.bloomIntensity);
863//     gl.uniform1f(Lcomp.u_vignette, params.vignette);
864//     gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
865//   }
866
867//   // ─── Init + loop ───────────────────────────────────────────────────────────
868//   buildPrograms();
869//   uploadGradient([params.c1, params.c2, params.c3, params.c4, params.c5]);
870
871//   const start = performance.now();
872
873//   function frame(now) {
874//     ensureTargets();
875//     if (!Pscene) return requestAnimationFrame(frame);
876//     const t = (now - start) / 1000;
877//     passScene(t);
878//     passBright();
879//     passBlur(texBright, fboBlurA, 1, 0);
880//     passBlur(texBlurA, fboBlurB, 0, 1);
881//     passComposite();
882//     requestAnimationFrame(frame);
883//   }
884
885//   requestAnimationFrame(frame);
886// })();
887
888// Wrap ™ and ® with <sup><small> unless already wrapped
889(function () {
890  var walker = document.createTreeWalker(
891    document.body,
892    NodeFilter.SHOW_TEXT,
893    {
894      acceptNode: function (node) {
895        if (!/[™®]/.test(node.nodeValue)) return NodeFilter.FILTER_REJECT;
896        var p = node.parentNode;
897        if (p && p.nodeName === 'SMALL' && p.parentNode && p.parentNode.nodeName === 'SUP') return NodeFilter.FILTER_REJECT;
898        if (p && p.nodeName === 'SUP') return NodeFilter.FILTER_REJECT;
899        return NodeFilter.FILTER_ACCEPT;
900      }
901    }
902  );
903
904  var nodes = [];
905  while (walker.nextNode()) nodes.push(walker.currentNode);
906
907  nodes.forEach(function (node) {
908    var frag = document.createDocumentFragment();
909    node.nodeValue.split(/(™|®)/).forEach(function (part) {
910      if (part === '™' || part === '®') {
911        var sup = document.createElement('sup');
912        var small = document.createElement('small');
913        small.textContent = part;
914        sup.appendChild(small);
915        frag.appendChild(sup);
916      } else if (part) {
917        frag.appendChild(document.createTextNode(part));
918      }
919    });
920    node.parentNode.replaceChild(frag, node);
921  });
922})();
923

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.