PageSourceSearch

https://lime-coyote-145483.hostingersite.com/wp-content/plugins/ne…/js/next_iridescence.min.js?ver=2.0.2

js lime-coyote-145483.hostingersite.com collected 2026-10-03 04:38:49 UTC 2,973 bytes, 39 lines download raw bytes

1import{Renderer,Program,Mesh,Triangle}from 'https://cdn.skypack.dev/ogl';function next_iridescence(){document.querySelectorAll('.nb-iridescence').forEach(iridescence=>{var canvas=iridescence.querySelector('.nb-iridescence__canvas');var renderer=new Renderer({canvas,dpr:2});var gl=renderer.gl;function resize(){renderer.setSize(iridescence.clientWidth,iridescence.clientHeight)}
2window.addEventListener('resize',resize);resize();var vertexShader=`
3            attribute vec2 uv;
4            attribute vec2 position;
5            varying vec2 vUv;
6            void main() {
7            vUv = uv;
8            gl_Position = vec4(position, 0, 1);
9            }
10        `;var fragmentShader=`
11            precision highp float;
12            uniform float uTime;
13            uniform vec3 uColor;
14            uniform vec3 uResolution;
15            uniform vec2 uMouse;
16            uniform float uAmplitude;
17            uniform float uSpeed;
18            varying vec2 vUv;
19
20            void main() {
21            float mr = min(uResolution.x, uResolution.y);
22            vec2 uv = (vUv.xy * 2.0 - 1.0) * uResolution.xy / mr;
23            uv += (uMouse - vec2(0.5)) * uAmplitude;
24
25            float d = -uTime * 0.5 * uSpeed;
26            float a = 0.0;
27            for (float i = 0.0; i < 8.0; ++i) {
28                a += cos(i - d - a * uv.x);
29                d += sin(uv.y * i + a);
30            }
31            d += uTime * 0.5 * uSpeed;
32
33            vec3 col = vec3(cos(uv * vec2(d, a)) * 0.6 + 0.4, cos(a + d) * 0.5 + 0.5);
34            col = cos(col * cos(vec3(d, a, 2.5)) * 0.5 + 0.5) * uColor;
35            gl_FragColor = vec4(col, 1.0);
36            }
37        `;var r=parseFloat(iridescence.getAttribute('data-r'));var g=parseFloat(iridescence.getAttribute('data-g'));var b=parseFloat(iridescence.getAttribute('data-b'));var speed=parseFloat(iridescence.getAttribute('data-speed'));var amplitude=parseFloat(iridescence.getAttribute('data-amplitude'));var program=new Program(gl,{vertex:vertexShader,fragment:fragmentShader,uniforms:{uTime:{value:0},uMouse:{value:[0.5,0.5]},uResolution:{value:[canvas.width,canvas.height,0]},uAmplitude:{value:amplitude},uSpeed:{value:speed},uColor:{value:[r,g,b]}}});var mesh=new Mesh(gl,{geometry:new Triangle(gl),program});var interactivity=iridescence.getAttribute('data-interactivity');if(interactivity==='enabled'){canvas.addEventListener('mousemove',(event)=>{const rect=canvas.getBoundingClientRect();const mouseX=(event.clientX-rect.left)/rect.width;const mouseY=(event.clientY-rect.top)/rect.height;program.uniforms.uMouse.value=[mouseX,mouseY]})}
38let t=0;requestAnimationFrame(function update(){requestAnimationFrame(update);program.uniforms.uTime.value=t;program.uniforms.uResolution.value=[iridescence.clientWidth,iridescence.clientHeight,0];renderer.render({scene:mesh});t+=0.01});iridescence.removeAttribute('data-iridescence-flickering')})}
39document.addEventListener("DOMContentLoaded",function(t){bricksIsFrontend&&next_iridescence()})

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.