PageSourceSearch

https://creatorlanehq.com/_next/static/chunks/vanta-rings.2c420a428b57cd96.js

js creatorlanehq.com collected 2026-10-08 16:23:16 UTC 11,464 bytes, 1 lines download raw bytes

vendor: 7,514 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57021],{29636:function(t){"u">typeof self&&self,t.exports=(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(){return"u">typeof navigator?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<600:null}t.r(e),t.d(e,{default:()=>c}),Number.prototype.clamp=function(t,e){return Math.min(Math.max(this,t),e)};let s=t=>t[Math.floor(Math.random()*t.length)];function o(t,e){return null==t&&(t=0),null==e&&(e=1),t+Math.random()*(e-t)}function n(t,e){return null==t&&(t=0),null==e&&(e=1),Math.floor(t+Math.random()*(e-t+1))}let r="object"==typeof window,h=r&&window.THREE||{};r&&!window.VANTA&&(window.VANTA={});let a=r&&window.VANTA||{};a.register=(t,e)=>a[t]=t=>new e(t),a.version="0.5.24";let l=function(){return Array.prototype.unshift.call(arguments,"[VANTA]"),console.error.apply(this,arguments)};a.VantaBase=class{constructor(t={}){var e;if(!r)return!1;a.current=this,this.windowMouseMoveWrapper=this.windowMouseMoveWrapper.bind(this),this.windowTouchWrapper=this.windowTouchWrapper.bind(this),this.windowGyroWrapper=this.windowGyroWrapper.bind(this),this.resize=this.resize.bind(this),this.animationLoop=this.animationLoop.bind(this),this.restart=this.restart.bind(this);const i="function"==typeof this.getDefaultOptions?this.getDefaultOptions():this.defaultOptions;if(this.options=Object.assign({mouseControls:!0,touchControls:!0,gyroControls:!1,minHeight:200,minWidth:200,scale:1,scaleMobile:1},i),(t instanceof HTMLElement||"string"==typeof t)&&(t={el:t}),Object.assign(this.options,t),this.options.THREE&&(h=this.options.THREE),this.el=this.options.el,null==this.el)l('Instance needs "el" param!');else if(!(this.options.el instanceof HTMLElement)){const t=this.el;if(this.el=document.querySelector(t),!this.el)return void l("Cannot find element",t)}this.prepareEl(),this.initThree(),this.setSize();try{this.init()}catch(t){return l("Init error",t),this.renderer&&this.renderer.domElement&&this.el.removeChild(this.renderer.domElement),void(this.options.backgroundColor&&(console.log("[VANTA] Falling back to backgroundColor"),this.el.style.background="number"==typeof(e=this.options.backgroundColor)?"#"+("00000"+e.toString(16)).slice(-6):e))}this.initMouse(),this.resize(),this.animationLoop();const s=window.addEventListener;s("resize",this.resize),window.requestAnimationFrame(this.resize),this.options.mouseControls&&(s("scroll",this.windowMouseMoveWrapper),s("mousemove",this.windowMouseMoveWrapper)),this.options.touchControls&&(s("touchstart",this.windowTouchWrapper),s("touchmove",this.windowTouchWrapper)),this.options.gyroControls&&s("deviceorientation",this.windowGyroWrapper)}setOptions(t={}){Object.assign(this.options,t),this.triggerMouseMove()}prepareEl(){let t,e;if("u">typeof Node&&Node.TEXT_NODE)for(t=0;t<this.el.childNodes.length;t++){let e=this.el.childNodes[t];if(e.nodeType===Node.TEXT_NODE){let t=document.createElement("span");t.textContent=e.textContent,e.parentElement.insertBefore(t,e),e.remove()}}for(t=0;t<this.el.children.length;t++)"static"===getComputedStyle(e=this.el.children[t]).position&&(e.style.position="relative"),"auto"===getComputedStyle(e).zIndex&&(e.style.zIndex=1);"static"===getComputedStyle(this.el).position&&(this.el.style.position="relative")}applyCanvasStyles(t,e={}){Object.assign(t.style,{position:"absolute",zIndex:0,top:0,left:0,background:""}),Object.assign(t.style,e),t.classList.add("vanta-canvas")}initThree(){h.WebGLRenderer?(this.renderer=new h.WebGLRenderer({alpha:!0,antialias:!0}),this.el.appendChild(this.renderer.domElement),this.applyCanvasStyles(this.renderer.domElement),isNaN(this.options.backgroundAlpha)&&(this.options.backgroundAlpha=1),this.scene=new h.Scene):console.warn("[VANTA] No THREE defined on window")}getCanvasElement(){return this.renderer?this.renderer.domElement:this.p5renderer?this.p5renderer.canvas:void 0}getCanvasRect(){let t=this.getCanvasElement();return!!t&&t.getBoundingClientRect()}windowMouseMoveWrapper(t){let e=this.getCanvasRect();if(!e)return!1;let i=t.clientX-e.left,s=t.clientY-e.top;i>=0&&s>=0&&i<=e.width&&s<=e.height&&(this.mouseX=i,this.mouseY=s,this.options.mouseEase||this.triggerMouseMove(i,s))}windowTouchWrapper(t){let e=this.getCanvasRect();if(!e)return!1;if(1===t.touches.length){let i=t.touches[0].clientX-e.left,s=t.touches[0].clientY-e.top;i>=0&&s>=0&&i<=e.width&&s<=e.height&&(this.mouseX=i,this.mouseY=s,this.options.mouseEase||this.triggerMouseMove(i,s))}}windowGyroWrapper(t){let e=this.getCanvasRect();if(!e)return!1;let i=Math.round(2*t.alpha)-e.left,s=Math.round(2*t.beta)-e.top;i>=0&&s>=0&&i<=e.width&&s<=e.height&&(this.mouseX=i,this.mouseY=s,this.options.mouseEase||this.triggerMouseMove(i,s))}triggerMouseMove(t,e){void 0===t&&void 0===e&&(this.options.mouseEase?(t=this.mouseEaseX,e=this.mouseEaseY):(t=this.mouseX,e=this.mouseY)),this.uniforms&&(this.uniforms.iMouse.value.x=t/this.scale,this.uniforms.iMouse.value.y=e/this.scale);let i=t/this.width,s=e/this.height;"function"==typeof this.onMouseMove&&this.onMouseMove(i,s)}setSize(){this.scale||(this.scale=1),i()&&this.options.scaleMobile?this.scale=this.options.scaleMobile:this.options.scale&&(this.scale=this.options.scale),this.width=Math.max(this.el.offsetWidth,this.options.minWidth),this.height=Math.max(this.el.offsetHeight,this.options.minHeight)}initMouse(){(this.mouseX||this.mouseY)&&(this.mouseX!==this.options.minWidth/2||this.mouseY!==this.options.minHeight/2)||(this.mouseX=this.width/2,this.mouseY=this.height/2,this.triggerMouseMove(this.mouseX,this.mouseY))}resize(){this.setSize(),this.camera&&(this.camera.aspect=this.width/this.height,"function"==typeof this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix()),this.renderer&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(window.devicePixelRatio/this.scale)),"function"==typeof this.onResize&&this.onResize()}isOnScreen(){let t=this.el.offsetHeight,e=this.el.getBoundingClientRect(),i=window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop,s=e.top+i;return s-window.innerHeight<=i&&i<=s+t}animationLoop(){this.t||(this.t=0),this.t2||(this.t2=0);let t=performance.now();if(this.prevNow){let e=(t-this.prevNow)/(1e3/60);e=Math.max(.2,Math.min(e,5)),this.t+=e,this.t2+=(this.options.speed||1)*e,this.uniforms&&(this.uniforms.iTime.value=.016667*this.t2)}return this.prevNow=t,this.options.mouseEase&&(this.mouseEaseX=this.mouseEaseX||this.mouseX||0,this.mouseEaseY=this.mouseEaseY||this.mouseY||0,Math.abs(this.mouseEaseX-this.mouseX)+Math.abs(this.mouseEaseY-this.mouseY)>.1&&(this.mouseEaseX+=.05*(this.mouseX-this.mouseEaseX),this.mouseEaseY+=.05*(this.mouseY-this.mouseEaseY),this.triggerMouseMove(this.mouseEaseX,this.mouseEaseY))),(this.isOnScreen()||this.options.forceAnimate)&&("function"==typeof this.onUpdate&&this.onUpdate(),this.scene&&this.camera&&(this.renderer.render(this.scene,this.camera),this.renderer.setClearColor(this.options.backgroundColor,this.options.backgroundAlpha)),this.fps&&this.fps.update&&this.fps.update(),"function"==typeof this.afterRender&&this.afterRender()),this.req=window.requestAnimationFrame(this.animationLoop)}
1restart(){if(this.scene)for(;this.scene.children.length;)this.scene.remove(this.scene.children[0]);"function"==typeof this.onRestart&&this.onRestart(),this.init()}init(){"function"==typeof this.onInit&&this.onInit()}destroy(){"function"==typeof this.onDestroy&&this.onDestroy();let t=window.removeEventListener;t("touchstart",this.windowTouchWrapper),t("touchmove",this.windowTouchWrapper),t("scroll",this.windowMouseMoveWrapper),t("mousemove",this.windowMouseMoveWrapper),t("deviceorientation",this.windowGyroWrapper),t("resize",this.resize),window.cancelAnimationFrame(this.req);let e=this.scene;e&&e.children&&function t(e){for(;e.children&&e.children.length>0;)t(e.children[0]),e.remove(e.children[0]);e.geometry&&e.geometry.dispose(),e.material&&(Object.keys(e.material).forEach(t=>{e.material[t]&&null!==e.material[t]&&"function"==typeof e.material[t].dispose&&e.material[t].dispose()}),e.material.dispose())}(e),this.renderer&&(this.renderer.domElement&&this.el.removeChild(this.renderer.domElement),this.renderer=null,this.scene=null),a.current===this&&(a.current=null)}};let p=a.VantaBase,u="object"==typeof window&&window.THREE;class d extends p{static initClass(){this.prototype.defaultOptions={backgroundColor:2106408,color:8978176},this.prototype.colors=[0xff2255,0xff1199,0xff66cc,8978176,7851025,0xffff00,0xff7733,1179647,1149149,0xffdd22,2250188,7975100,5468283]}constructor(t){u=t.THREE||u,super(t)}material(t){return new u.MeshLambertMaterial({color:t})}genRing(t,e,i,r,h,a,l){null==r&&(r=0),null==h&&(h=1.4*Math.PI),null==a&&(a=0),null==l&&(l=1),this.rings||(this.rings=[]),e<1&&(e=1);let p={depth:.4,bevelEnabled:!1,steps:1,curveSegments:~~(64*h/6.14)},d=new u.Shape;d.absarc(0,0,e+i,0,h,!1),d.lineTo(e*Math.cos(h),e*Math.sin(h)),d.absarc(0,0,e,h,0,!0);let c=new u.ExtrudeGeometry(d,p),m=this.material(t);(0===n(0,1)||e>60)&&(m.transparent=!0,m.opacity=Math.max(50/e+o(-.3,.3),.1));let f=new u.Mesh(c,m);if(f.rotation.x=Math.PI/2,f.rotation.z=r,f.position.y=a,f.speed=.001*l,f.receiveShadow=!0,f.castShadow=!0,this.rings.push(f),this.cont.add(f),e<20&&h<1.3*Math.PI&&n(0,2))try{this.genRing(s(this.colors),e+o(-1,3),i+o(-2,0),r+h,h+o(-.5,.5),a+o(-3,1),l)}catch(t){}return f}onInit(){let t,{material:e}=this;this.cont=new u.Group,this.cont.position.set(30,0,0),this.cont.rotation.x=.06667,this.cont.rotation.z=.16667,this.scene.add(this.cont);let r=i()?30:60;for(let e=0;e<r;e++){let e;n(0,3)?(e=o(2,4)+o(1,30)*o(1,2)*o(1,2)*o(1,2),i()&&(e*=.5),t=o(0,3.5)+o(0,3.5)-n(0,e/4)-e/50):(e=o(1,3)*o(2,4),t=o(1,2)*o(1,2)*o(1.1,1.5));let r=.05*Math.pow(2,n(0,4));t<r&&(t=r),this.genRing(s(this.colors),e,t,o(0,1e3),o(1,6),o(0,50/(e+1)+5)+5/t/(e+.5),.25*Math.max(-o(.5,2),o(1,50-e/2)-e/2))}this.camera=new u.PerspectiveCamera(25,this.width/this.height,10,1e4),this.camera.position.set(0,150,200),this.scene.add(this.camera);let h=new u.AmbientLight(0xffffff,.5);return this.scene.add(h),this.pointLight=new u.PointLight(0xffffff,.5),this.pointLight.position.set(0,150,200),this.scene.add(this.pointLight),this.spot=new u.SpotLight(0xffffff,1),this.spot.position.set(-15,50,100),this.spot.penumbra=1,this.spot.angle=.5,this.spot.decay=1,this.spot.distance=300,this.spot.target=this.cont,this.scene.add(this.spot)}onUpdate(){let t;null!=this.helper&&this.helper.update(),null!=this.controls&&this.controls.update();let e=this.camera;for(let i of(Math.abs(e.tx-e.position.x)>.01&&(t=e.tx-e.position.x,e.position.x+=.02*t),Math.abs(e.ty-e.position.y)>.01&&(t=e.ty-e.position.y,e.position.y+=.02*t),e.lookAt(new u.Vector3(0,25,7)),e.near=Math.max(.5*e.position.z-20,1),e.updateProjectionMatrix(),Array.from(null!=this.rings?this.rings:[])))i.rotation.z+=i.speed;let i=.001*this.t;return this.cont.rotation.x+=1e-4*Math.sin(i),this.cont.rotation.z+=7e-5*Math.cos(i)}onMouseMove(t,e){let i=this.camera;return i.oy||(i.oy=i.position.y,i.ox=i.position.x),i.tx=i.ox+50*(t-.5),i.ty=i.oy-50*e}}d.initClass();let c=a.register("RINGS",d);return e})()}}]);

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.