three-low-poly 0.9.10 → 0.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,16 +2,15 @@
2
2
 
3
3
  Procedurally generated low poly modeling for Three.js.
4
4
 
5
- Example Graveyard Scene:
6
-
7
- ![screen-capture](https://github.com/user-attachments/assets/d97345cc-bdaa-46d5-a267-531559919ee5)
5
+ ![screen-capture](https://github.com/user-attachments/assets/3285ed9a-da3c-4287-ad2f-0c7e82cd70fd)
6
+ _Example Library scene_
8
7
 
9
8
  ## Getting Started
10
9
 
11
10
  To install, execute:
12
11
 
13
12
  ```shell
14
- npm i lunarphase-js
13
+ npm i three-low-poly
15
14
  ```
16
15
 
17
16
  Then, import into a project and use as:
@@ -25,8 +24,11 @@ scene.add(rocks);
25
24
 
26
25
  See the [examples](https://jasonsturges.com/three-low-poly/) for more information.
27
26
 
27
+ ![screen-capture](https://github.com/user-attachments/assets/d97345cc-bdaa-46d5-a267-531559919ee5)
28
+ _Example Graveyard scene_
29
+
28
30
  ## Usage
29
31
 
30
- Assets are procedurally generated and customized via parameters, generally featuring a base geometry that implements a mesh with material.
32
+ Assets are procedurally generated and customizable through parameters, typically based on a core geometry that combines a mesh with a material.
31
33
 
32
- In addition to geometries are prefabricated models, either mesh or group that may be directly added to the scene featuring default materials.
34
+ Alongside these geometries, there are prefabricated models that can be added directly to the scene, as well as factory methods for bulk creation.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three"),G=require("three/addons/utils/BufferGeometryUtils.js"),Me=require("three/addons/objects/Sky.js"),ye=require("three/addons/postprocessing/EffectComposer.js"),L=require("three/addons/postprocessing/RenderPass.js"),pe=require("three/addons/postprocessing/ShaderPass.js"),g={UP:new e.Vector3(0,1,0),DOWN:new e.Vector3(0,-1,0),LEFT:new e.Vector3(-1,0,0),RIGHT:new e.Vector3(1,0,0),FORWARD:new e.Vector3(0,0,1),BACKWARD:new e.Vector3(0,0,-1),X:new e.Vector3(1,0,0),Y:new e.Vector3(0,1,0),Z:new e.Vector3(0,0,1),XY:new e.Vector3(1,1,0).normalize(),XZ:new e.Vector3(1,0,1).normalize(),YZ:new e.Vector3(0,1,1).normalize(),XYZ:new e.Vector3(1,1,1).normalize()},k={LINEAR:(a,t)=>1-a/t,QUADRATIC:(a,t)=>Math.pow(1-a/t,2),SQUARE_ROOT:(a,t)=>Math.pow(1-a/t,.5),LOGARITHMIC:(a,t)=>Math.log(1+(t-a))/Math.log(1+t),SINE:(a,t)=>Math.cos(a/t*Math.PI/2),EXPONENTIAL:(a,t)=>Math.exp(-a/t),CUBIC:(a,t)=>Math.pow(1-a/t,3),GAUSSIAN:(a,t)=>Math.exp(-Math.pow(a,2)/(2*Math.pow(t/3,2))),INVERSE:(a,t)=>t/(t+a),SMOOTHSTEP:(a,t)=>{const o=Math.max(0,Math.min(1,1-a/t));return o*o*(3-2*o)}},xe=(a,t,o,s,r=g.UP,i=k.LINEAR)=>{const n=a.attributes.position;for(let c=0;c<n.count;c++){const l=new e.Vector3;l.fromBufferAttribute(n,c);const m=l.distanceTo(t);if(m<o){const h=i(m,o)*s;l.add(r.clone().multiplyScalar(h)),n.setXYZ(c,l.x,l.y,l.z)}}n.needsUpdate=!0},we=(a,t,o,s,r,i=g.UP,n=k.LINEAR)=>{const c=a.attributes.position;for(let l=0;l<c.count;l++){const m=new e.Vector3;m.fromBufferAttribute(c,l);const u=m.distanceTo(t);if(u<o){const d=n(u,o)*r,M=m.dot(i.normalize()),f=s-M;m.add(i.clone().multiplyScalar(f*d)),c.setXYZ(l,m.x,m.y,m.z)}}c.needsUpdate=!0},Ge=(a,t,o,s,r=g.UP,i=k.LINEAR)=>{const n=a.attributes.position;for(let c=0;c<n.count;c++){const l=new e.Vector3;l.fromBufferAttribute(n,c);const m=l.distanceTo(t);if(m<o){const u=i(m,o),h=s*u,d=r.clone().normalize();l.x+=e.MathUtils.randFloatSpread(h)*d.x,l.y+=e.MathUtils.randFloatSpread(h)*d.y,l.z+=e.MathUtils.randFloatSpread(h)*d.z,n.setXYZ(c,l.x,l.y,l.z)}}n.needsUpdate=!0},Se=(a,t,o,s)=>{const r=a.attributes.position,i=new e.Vector3;for(let n=0;n<r.count;n++){const c=new e.Vector3;if(c.fromBufferAttribute(r,n),c.distanceTo(t)<o){let m=new e.Vector3,u=0;for(let h=0;h<r.count;h++)i.fromBufferAttribute(r,h),i.distanceTo(c)<o&&(m.add(i),u++);u>0&&(m.divideScalar(u),c.lerp(m,s),r.setXYZ(n,c.x,c.y,c.z))}}r.needsUpdate=!0},ve=(a,t,o,s,r=!1,i=k.LINEAR)=>{const n=a.attributes.position;for(let c=0;c<n.count;c++){const l=new e.Vector3;l.fromBufferAttribute(n,c);const m=l.distanceTo(t);if(m<o){const h=i(m,o)*s*(r?-1:1),d=l.clone().sub(t).normalize();l.add(d.multiplyScalar(h)),n.setXYZ(c,l.x,l.y,l.z)}}n.needsUpdate=!0},ge=(a,t,o,s,r=g.UP,i=k.LINEAR)=>{const n=a.attributes.position,c=new e.Quaternion;for(let l=0;l<n.count;l++){const m=new e.Vector3;m.fromBufferAttribute(n,l);const u=m.distanceTo(t);if(u<o){const d=i(u,o)*s;c.setFromAxisAngle(r,d),m.sub(t).applyQuaternion(c).add(t),n.setXYZ(l,m.x,m.y,m.z)}}n.needsUpdate=!0},be={LINEAR:a=>a,QUADRATIC_EASE_IN:a=>a*a,QUADRATIC_EASE_OUT:a=>1-Math.pow(1-a,2),SQUARE_ROOT_EASING:a=>Math.sqrt(a),LOGARITHMIC_EASING:a=>Math.log(1+a)/Math.log(2),SINE_EASE_IN:a=>1-Math.cos(a*Math.PI/2),SINE_EASE_OUT:a=>Math.sin(a*Math.PI/2),EXPONENTIAL_EASE_IN:a=>Math.pow(2,10*(a-1)),EXPONENTIAL_EASE_OUT:a=>1-Math.pow(2,-10*a),CUBIC_EASE_IN:a=>a*a*a,CUBIC_EASE_OUT:a=>1-Math.pow(1-a,3),GAUSSIAN_EASING:a=>Math.exp(-Math.pow(a-.5,2)/(2*.1)),INVERSE_EASING:a=>1/(1+a),SMOOTHSTEP_EASING:a=>a*a*(3-2*a)};class Be extends e.Group{constructor(){super();const t=[],o=20,s=new e.SphereGeometry(.1,6,6),r=new e.MeshStandardMaterial({color:16777215,transparent:!0,opacity:.6,roughness:.3,metalness:.3});for(let c=0;c<o;c++){const l=new e.Mesh(s,r);l.position.set((Math.random()-.5)*1.5,Math.random()*3,(Math.random()-.5)*1.5),t.push(l),this.add(l)}function i(){t.forEach(c=>{c.position.y+=.02,c.position.y>3&&(c.position.y=0,c.position.x=(Math.random()-.5)*1.5,c.position.z=(Math.random()-.5)*1.5)})}function n(){requestAnimationFrame(n),i()}n()}}class F extends e.BufferGeometry{constructor(t=1,o=1.5,s=.5,r=.05,i=.05){super();const n=t,c=o,l=s,m=r,u=i,h=[0,0,0,n,0,0,n,c,0,0,c,0,n,0,-l,0,0,-l,0,c,-l,n,c,-l,0,0,-l,0,0,0,0,c,0,0,c,-l,n,0,-m,m,0,-m,m,c,-m,n,c,-m,m,0,-l+m,n,0,-l+m,n,c,-l+m,m,c,-l+m,m,0,-m,m,0,-l+m,m,c,-l+m,m,c,-m,0,c,0,n,c,0,n,c,-m,m,c,-m,0,c,-l,m,c,-l+m,n,c,-l+m,n,c,-l,0,c,0,m,c,-m,m,c,-l+m,0,c,-l,0,0,0,m,0,-m,n,0,-m,n,0,0,0,0,-l,n,0,-l,n,0,-l+m,m,0,-l+m,0,0,0,0,0,-l,m,0,-l+m,m,0,-m,n,0,0,n,0,-m,n,c,-m,n,c,0,n,0,-l,n,c,-l,n,c,-l+m,n,0,-l+m],d=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0],M=t/(t*2+s),f=(t+s)/(t*2+s),p=[f,0,1,0,1,1,f,1,0,0,M,0,M,1,0,1,M,0,f,0,f,1,M,1,1,0,f,0,f,1,1,1,M,0,0,0,0,1,M,1,f,0,M,0,M,1,f,1,f,0,1,0,1,1,f,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1],y=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23,24,25,26,24,26,27,28,29,30,28,30,31,32,33,34,32,34,35,36,37,38,36,38,39,40,41,42,40,42,43,44,45,46,44,46,47,48,49,50,48,50,51,52,53,54,52,54,55],x=new Float32Array(h),w=new Float32Array(d),v=new Float32Array(p),b=new Uint16Array(y),B=new e.BufferGeometry;B.setAttribute("position",new e.BufferAttribute(x,3)),B.setAttribute("normal",new e.BufferAttribute(w,3)),B.setAttribute("uv",new e.BufferAttribute(v,2)),B.setIndex(new e.BufferAttribute(b,1));const I=new e.BoxGeometry(t-m-u,c-u*2,l-m*2);I.translate((t-m-u)/2+m,c/2,-l/2),this.copy(G.mergeGeometries([B,I],!0))}}function _(a=0,t=1){return Math.random()*(t-a)+a}function Ie(a=0,t=1){return Math.floor(Math.random()*(t-a+1))+a}function q(a=.5,t=0,o=1){return t+(o-t)*Math.pow(Math.random(),a)}function O(a=.5,t=0,o=1){return t+(o-t)*Math.pow(1-Math.random(),a)}function D({scaleXMin:a=.4,scaleXMax:t=.7,scaleYMin:o=.3,scaleYMax:s=.95,scaleZMin:r=.1,scaleZMax:i=.5}={}){return new e.Vector3(_(a,t),q(.25,o,s),O(.8,r,i))}function E({coverMaterial:a,pagesMaterial:t,scales:o=[]}={}){const s=new F,r=new e.InstancedMesh(s,[a,t],o.length),i=new e.Matrix4;let n=0;for(let c=0;c<o.length;c++){const l=o[c],m=new e.Matrix4;m.makeScale(l.x,l.y,l.z),i.identity(),i.multiply(m),i.setPosition(.01+Math.random()*.1,0,n+l.z*.5),r.setMatrixAt(c,i),n+=l.z*.5}return r}function Pe({coverMaterial:a,pagesMaterial:t,count:o=10,scaleXMin:s=.4,scaleXMax:r=.7,scaleYMin:i=.3,scaleYMax:n=.95,scaleZMin:c=.1,scaleZMax:l=.5}={}){const m=Array.from({length:o},()=>D({scaleXMin:s,scaleXMax:r,scaleYMin:i,scaleYMax:n,scaleZMin:c,scaleZMax:l}));return E({coverMaterial:a,pagesMaterial:t,scales:m})}function ke({coverMaterial:a,pagesMaterial:t,length:o=10,scaleXMin:s=.4,scaleXMax:r=.7,scaleYMin:i=.3,scaleYMax:n=.95,scaleZMin:c=.1,scaleZMax:l=.5}={}){const m=[];let u=o;for(;u>0;){const h=D({scaleXMin:s,scaleXMax:r,scaleYMin:i,scaleYMax:n,scaleZMin:c,scaleZMax:l});h.z=Math.min(h.z,u),m.push(h),u-=h.z}return E({coverMaterial:a,pagesMaterial:t,scales:m})}class Ae extends e.BufferGeometry{constructor(t=2,o=.3,s=.6,r=5,i=5,n=Math.PI/4){super();const c=[],l=[];for(let M=0;M<r;M++){const f=M*o,p=f+o,y=M*s,x=y+s;c.push(-t/2,f,y,t/2,f,y,t/2,p,y,-t/2,p,y,-t/2,p,y,t/2,p,y,t/2,p,x,-t/2,p,x);const w=M*8;l.push(w,w+1,w+2,w,w+2,w+3),l.push(w+4,w+5,w+6,w+4,w+6,w+7)}const m=r*o,u=r*s,h=t*2;c.push(-h/2,m,u,h/2,m,u,h/2,m,u+s,-h/2,m,u+s);const d=r*8;l.push(d,d+1,d+2,d,d+2,d+3);for(let M=0;M<2;M++){const f=M===0?1:-1;for(let p=0;p<i;p++){const y=m+p*o,x=y+o,w=f*(h/4),v=u+s,b=p*s*Math.cos(n),B=p*s*Math.sin(n),I=w+f*b-t/2*Math.cos(n),A=w+f*b+t/2*Math.cos(n),P=v+B,de=I+f*s*Math.cos(n),fe=A+f*s*Math.cos(n),U=P+s*Math.sin(n);c.push(I,y,P,A,y,P,A,x,P,I,x,P,I,x,P,A,x,P,fe,x,U,de,x,U);const S=d+4+M*i*8+p*8;l.push(S,S+1,S+2,S,S+2,S+3),l.push(S+4,S+5,S+6,S+4,S+6,S+7)}}this.setIndex(l),this.setAttribute("position",new e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class Ce extends e.BufferGeometry{constructor(t=5,o=3,s=5,r=.2){super();const i=[-t/2,0,-s/2,t/2,0,-s/2,t/2,0,s/2,-t/2,0,s/2,-t/2,0,-s/2,t/2,0,-s/2,t/2,o,-s/2,-t/2,o,-s/2,-t/2,0,-s/2,-t/2,0,s/2,-t/2,o,s/2,-t/2,o,-s/2],n=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11];this.setIndex(n),this.setAttribute("position",new e.Float32BufferAttribute(i,3)),this.computeVertexNormals()}}class Te extends e.BufferGeometry{constructor(t=2,o=.3,s=.5,r=5,i=2){super();const n=[],c=[];for(let h=0;h<r;h++){const d=h*o,M=d+o,f=h*s,p=f+s;n.push(-t/2,d,f,t/2,d,f,t/2,M,f,-t/2,M,f,-t/2,M,f,t/2,M,f,t/2,M,p,-t/2,M,p);const y=h*8;c.push(y,y+1,y+2,y,y+2,y+3),c.push(y+4,y+5,y+6,y+4,y+6,y+7)}const l=r*o,m=r*s;n.push(-t/2,l,m,t/2,l,m,t/2,l,m+i,-t/2,l,m+i);const u=r*8;c.push(u,u+1,u+2,u,u+2,u+3);for(let h=0;h<r;h++){const d=l+h*o,M=d+o,f=-t/2-h*s,p=f-s;n.push(f,d,m+i,f,d,m+i-t,f,M,m+i-t,f,M,m+i,f,M,m+i,f,M,m+i-t,p,M,m+i-t,p,M,m+i);const y=u+4+h*8;c.push(y,y+1,y+2,y,y+2,y+3),c.push(y+4,y+5,y+6,y+4,y+6,y+7)}this.setIndex(c),this.setAttribute("position",new e.Float32BufferAttribute(n,3)),this.computeVertexNormals()}}class Ve extends e.BufferGeometry{constructor(t=1,o=.4,s=.2,r=20,i=2,n=Math.PI/8){super();const c=[],l=[];let m=0;for(let u=0;u<r;u++){const h=i*Math.cos(m),d=i*Math.sin(m),M=u*s,f=M+s;c.push(h-t/2*Math.cos(m),M,d-t/2*Math.sin(m),h+t/2*Math.cos(m),M,d+t/2*Math.sin(m),h+t/2*Math.cos(m),f,d+t/2*Math.sin(m),h-t/2*Math.cos(m),f,d-t/2*Math.sin(m)),c.push(h-t/2*Math.cos(m),f,d-t/2*Math.sin(m),h+t/2*Math.cos(m),f,d+t/2*Math.sin(m),h+t/2*Math.cos(m)-o*Math.sin(m),f,d+t/2*Math.sin(m)+o*Math.cos(m),h-t/2*Math.cos(m)-o*Math.sin(m),f,d-t/2*Math.sin(m)+o*Math.cos(m));const p=u*8;l.push(p,p+1,p+2,p,p+2,p+3),l.push(p+4,p+5,p+6,p+4,p+6,p+7),m+=n}this.setIndex(l),this.setAttribute("position",new e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class Fe extends e.BufferGeometry{constructor(t=2,o=.3,s=.5,r=10){super();const i=[],n=[];for(let c=0;c<r;c++){const l=c*o,m=l+o,u=c*s,h=u+s;i.push(-t/2,l,u,t/2,l,u,t/2,m,u,-t/2,m,u,-t/2,m,u,t/2,m,u,t/2,m,h,-t/2,m,h);const d=c*8;n.push(d,d+1,d+2,d,d+2,d+3),n.push(d+4,d+6,d+5,d+4,d+7,d+6)}this.setIndex(n),this.setAttribute("position",new e.Float32BufferAttribute(i,3)),this.computeVertexNormals()}}class R extends e.BufferGeometry{constructor(t=.4,o=1.2,s=.2){super();const r=o*.6,i=new e.BoxGeometry(t/2,r,s);i.translate(0,r/2,0);const n=t*1.5,c=new e.BoxGeometry(n,t/4,s);c.translate(0,r*.75,0),this.copy(G.mergeGeometries([i,c],!1)),this.computeVertexNormals()}}class H extends e.BufferGeometry{constructor(t=1.75,o=.75){super();const s=t*.05,r=t*.15,i=t*.15,n=t*.75;let c=0;const l=new e.BoxGeometry(o,s,o);l.translate(0,c+s/2,0),c+=s;const m=new e.BoxGeometry(o*.8,r,o*.8);m.translate(0,c+r/2,0),c+=r;const u=new e.BoxGeometry(o*.6,i,o*.6);u.translate(0,c+i/2,0),c+=i;const h=new e.BoxGeometry(o*.4,n,o*.4);h.translate(0,c+n/2,0),c+=n;const d=new e.ConeGeometry(o*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);d.translate(0,c+.1/2,0),this.copy(G.mergeGeometries([l,m,u,h,d],!1)),this.computeVertexNormals()}}class X extends e.BufferGeometry{constructor(t=.6,o=1,s=.2,r=.6){super();const i=o-r/2,n=new e.BoxGeometry(t,i,s);n.translate(0,i/2,0);const c=new e.CylinderGeometry(r/2,r/2,s,16,1,!1,0,Math.PI);c.rotateY(Math.PI/2),c.rotateX(Math.PI/2),c.translate(0,i,0),this.copy(G.mergeGeometries([n,c],!1)),this.computeVertexNormals()}}class Z extends e.BufferGeometry{constructor(t=.5,o=.8,s=.15){super();const r=new e.BoxGeometry(t,o,s);r.translate(0,o/2,0),this.copy(r)}}class Y extends e.BufferGeometry{constructor({height:t=2.25}={}){super();const o=new e.BoxGeometry(1.2,.5,1.2);o.translate(0,.25,0);const s=new e.BoxGeometry(1,t,1);s.translate(0,.5+t/2,0);const r=new e.BoxGeometry(1.4,.3,1.4);r.translate(0,.5+t+.15,0),this.copy(G.mergeGeometries([o,s,r],!1))}}class N extends e.BufferGeometry{constructor({barHeight:t=2,barRadius:o=.05,spikeHeight:s=.3,spikeRadius:r=.075,spikeScaleZ:i=1,radialSegments:n=8}={}){super();const c=new e.CylinderGeometry(o,o,t,n);c.translate(0,t/2,0);const l=new e.ConeGeometry(r,s,n);l.translate(0,t+s/2,0),l.scale(1,1,i),this.copy(G.mergeGeometries([c,l],!1))}}class j extends e.BufferGeometry{constructor({count:t=20,spacing:o=.4,barHeight:s=2,barRadius:r=.05,spikeHeight:i=.3,spikeRadius:n=.075,spikeScaleZ:c=1,railHeight:l=.1,railDepth:m=.05,railOffset:u=0,radialSegments:h=8}={}){super();const d=[],M=new N({barHeight:s,barRadius:r,spikeHeight:i,spikeRadius:n,spikeScaleZ:c,radialSegments:h}),f=new e.BoxGeometry(t*o,l,m);for(let x=0;x<t;x++){const w=M.clone();w.translate(x*o,0,0),d.push(w)}const p=f.clone();p.translate(o*(t-1)/2,s-u-l/2,0),d.push(p);const y=f.clone();y.translate(o*(t-1)/2,l/2,0),d.push(y),this.copy(G.mergeGeometries(d))}}class Q extends e.BufferGeometry{constructor({width:t=5,height:o=8,depth:s=1,shelves:r=4,frameThickness:i=.1,open:n=!1}={}){super();const c=o,l=t,m=s,u=new e.BoxGeometry(i,c,m),h=new e.BoxGeometry(l-2*i,i,m),d=u.clone();d.translate(-l/2+i/2,c/2,0);const M=u.clone();M.translate(l/2-i/2,c/2,0);const f=h.clone();f.translate(0,c-i/2,0);const p=h.clone();p.translate(0,i/2,0);const y=new e.BoxGeometry(l,c,i);y.translate(0,c/2,-m/2+i/2);const x=[],w=(c-i)/(r+1);for(let v=1;v<=r;v++){const b=h.clone();b.translate(0,i/2+v*w,0),x.push(b)}this.copy(G.mergeGeometries([d,M,f,p,...n?[]:[y],...x],!1))}}class Ee extends e.BufferGeometry{constructor(t=.1){super();const o=[],s=[],r=[[0,1],[.5,.75],[.75,.25],[.5,-.5],[0,-1],[-.5,-.5],[-.75,.25],[-.5,.75]];for(let n=0;n<r.length;n++){const[c,l]=r[n];o.push(c*t,l*t,0)}for(let n=1;n<r.length-1;n++)s.push(0,n,n+1);s.push(0,r.length-1,1);const i=new e.Float32BufferAttribute(o,3);this.setAttribute("position",i),this.setIndex(s),this.computeVertexNormals()}}function K(a,t=g.XYZ,o=.5,s=2){a.deleteAttribute("uv"),a.deleteAttribute("normal"),a=G.mergeVertices(a),a.computeVertexNormals();const r=a.getAttribute("position");for(let i=0;i<r.count;i++){const n=new e.Vector3().fromBufferAttribute(r,i),c=Math.random()*(s-o)+o,l=t.clone().multiplyScalar(c);n.add(l),r.setXYZ(i,n.x,n.y,n.z)}return r.needsUpdate=!0,a.computeVertexNormals(),a}class J extends e.BufferGeometry{constructor(t=1,o=4,s=4){super();const r=new e.SphereGeometry(t,o,s);this.copy(K(r,g.XYZ,.5,1)),this.computeVertexNormals(),this.center()}}class $ extends e.BufferGeometry{constructor(t=.1,o=.1,s=.4,r=8){super();const i=new e.CylinderGeometry(t*.6,o*.6,s,r);i.translate(0,0,0);const n=new e.SphereGeometry(t,r,r),c=n.clone(),l=n.clone(),m=n.clone(),u=n.clone();c.translate(0,s/2+t*.6,-t*.6),l.translate(0,s/2+t*.6,t*.6),m.translate(0,-s/2-o*.6,-o*.6),u.translate(0,-s/2-o*.6,o*.6),this.copy(G.mergeGeometries([i,c,l,m,u],!1))}}class W extends e.BufferGeometry{constructor(){super();const t=new e.SphereGeometry(1,16,16),o=new e.CylinderGeometry(.2,.2,2,16,1,!0);o.translate(0,1.5,0),o.rotateX(Math.PI/2),this.copy(G.mergeGeometries([t,o],!1))}}class ee extends e.BufferGeometry{constructor({flaskRadius:t=1,neckRadius:o=.3,height:s=2.5,neckHeight:r=1,radialSegments:i=16}={}){super();const n=[new e.Vector2(0,0),new e.Vector2(t*.875,0),new e.Vector2(t,.1),new e.Vector2(o,s),new e.Vector2(o,s+r),new e.Vector2(o*1.1,s+r+.3)],c=new e.LatheGeometry(n,i);this.copy(G.mergeGeometries([c],!1))}}class te extends e.BufferGeometry{constructor(){super();const t=[new e.Vector2(1,0),new e.Vector2(1.2,.5),new e.Vector2(1.4,1.5),new e.Vector2(1.3,1.8),new e.Vector2(.8,1.8)],o=new e.LatheGeometry(t,12),s=new e.CircleGeometry(1,12);s.rotateX(-Math.PI/2),s.translate(0,0,0),this.copy(G.mergeGeometries([o,s],!1))}}class oe extends e.BufferGeometry{constructor({radius:t=.3,height:o=.4,count:s=3,thickness:r=.03,radialSegments:i=16}={}){super();const n=new e.TorusGeometry(t,r,8,i);n.rotateX(Math.PI/2),n.translate(0,o,0);const c=new e.CylinderGeometry(r*.6,r*.6,o,i),l=[];for(let m=0;m<s;m++){const u=m/s*Math.PI*2,h=c.clone();h.translate(Math.cos(u)*t,o/2,Math.sin(u)*t),l.push(h)}this.copy(G.mergeGeometries([n,...l],!1))}}class T extends e.BufferGeometry{constructor(t=.2,o=.2,s=3,r=32,i=!0){super();const n=new e.CylinderGeometry(t,o,s,r,1,i),c=new e.SphereGeometry(o,r,r/2,0,Math.PI*2,Math.PI/2,Math.PI/2);c.translate(0,-(s/2),0),this.copy(G.mergeGeometries([n,c],!1))}}class se extends e.BufferGeometry{constructor({radius:t=.5,neckRadius:o=.2,height:s=3,neckHeight:r=1,segments:i=16}={}){super();const n=s-r,c=new e.CylinderGeometry(t,t,n,i);c.translate(0,n/2,0);const l=.3,m=new e.CylinderGeometry(o,t,l,i);m.translate(0,n+l/2,0);const u=new e.CylinderGeometry(o,o,r,i);u.translate(0,n+l+r/2,0),this.copy(G.mergeGeometries([c,m,u],!1))}}class ne extends e.BufferGeometry{constructor({radius:t=3,height:o=.6,widthSegments:s=64,heightSegments:r=16,phiStart:i=0,phiLength:n=Math.PI*2}={}){super(),this.copy(new e.SphereGeometry(t,s,r,i,n,0,Math.PI/2)),this.scale(1,o/t,1)}}const Ne=(a,t)=>a/(1-Math.cos(t)),z=(a,t)=>a/(2*Math.sin(t)),re=(a,t)=>a*(1-Math.cos(t)),ze=(a,t)=>2*a*Math.sin(t),Ue=(a,t,o)=>({x:a*Math.sin(o)*Math.cos(t),y:a*Math.sin(o)*Math.sin(t),z:a*Math.cos(o)}),Le=(a,t,o)=>{const s=Math.sqrt(a*a+t*t+o*o),r=Math.atan2(t,a),i=Math.acos(o/s);return{radius:s,theta:r,phi:i}};class ae extends e.BufferGeometry{constructor({radius:t=z(5,Math.PI/10),widthSegments:o=64,heightSegments:s=32,phiStart:r=0,phiLength:i=Math.PI*2,thetaLength:n=Math.PI/10}={}){super(),this.copy(new e.SphereGeometry(t,o,s,r,i,0,n));const c=re(t,n);this.translate(0,-t+c,0)}}class ce extends e.BufferGeometry{constructor({trunkRadiusTop:t=.25,trunkRadiusBottom:o=.4,trunkHeight:s=2.5,trunkSegments:r=14,leafSize:i=.8,leafCount:n=6,leafDetail:c=0,leafSpreadRadius:l=1.5}={}){super();const m=new e.CylinderGeometry(t,o,s,r);m.translate(0,s/2,0);const u=[];for(let h=0;h<n;h++){const d=new e.DodecahedronGeometry(i,c);d.translate((Math.random()-.5)*l,(Math.random()-.5)*i+s,(Math.random()-.5)*l),u.push(d)}this.copy(G.mergeGeometries([m.toNonIndexed(),G.mergeGeometries(u,!1)],!0)),this.computeVertexNormals()}}class _e extends e.Group{constructor(){super();const t=new e.SphereGeometry(5,32,32),o=new e.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("three"),G=require("three/addons/utils/BufferGeometryUtils.js"),rt=require("three/addons/objects/Sky.js"),at=require("three/addons/postprocessing/EffectComposer.js"),q=require("three/addons/postprocessing/RenderPass.js"),ct=require("three/addons/postprocessing/ShaderPass.js"),b={UP:new t.Vector3(0,1,0),DOWN:new t.Vector3(0,-1,0),LEFT:new t.Vector3(-1,0,0),RIGHT:new t.Vector3(1,0,0),FORWARD:new t.Vector3(0,0,1),BACKWARD:new t.Vector3(0,0,-1),X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1),XY:new t.Vector3(1,1,0).normalize(),XZ:new t.Vector3(1,0,1).normalize(),YZ:new t.Vector3(0,1,1).normalize(),XYZ:new t.Vector3(1,1,1).normalize()},E={LINEAR:(o,e)=>1-o/e,QUADRATIC:(o,e)=>Math.pow(1-o/e,2),SQUARE_ROOT:(o,e)=>Math.pow(1-o/e,.5),LOGARITHMIC:(o,e)=>Math.log(1+(e-o))/Math.log(1+e),SINE:(o,e)=>Math.cos(o/e*Math.PI/2),EXPONENTIAL:(o,e)=>Math.exp(-o/e),CUBIC:(o,e)=>Math.pow(1-o/e,3),GAUSSIAN:(o,e)=>Math.exp(-Math.pow(o,2)/(2*Math.pow(e/3,2))),INVERSE:(o,e)=>e/(e+o),SMOOTHSTEP:(o,e)=>{const n=Math.max(0,Math.min(1,1-o/e));return n*n*(3-2*n)}},it=(o,e,n,s,a=b.UP,c=E.LINEAR)=>{const r=o.attributes.position;for(let i=0;i<r.count;i++){const l=new t.Vector3;l.fromBufferAttribute(r,i);const u=l.distanceTo(e);if(u<n){const h=c(u,n)*s;l.add(a.clone().multiplyScalar(h)),r.setXYZ(i,l.x,l.y,l.z)}}r.needsUpdate=!0},lt=(o,e,n,s,a,c=b.UP,r=E.LINEAR)=>{const i=o.attributes.position;for(let l=0;l<i.count;l++){const u=new t.Vector3;u.fromBufferAttribute(i,l);const m=u.distanceTo(e);if(m<n){const d=r(m,n)*a,y=u.dot(c.normalize()),M=s-y;u.add(c.clone().multiplyScalar(M*d)),i.setXYZ(l,u.x,u.y,u.z)}}i.needsUpdate=!0},ut=(o,e,n,s,a=b.UP,c=E.LINEAR)=>{const r=o.attributes.position;for(let i=0;i<r.count;i++){const l=new t.Vector3;l.fromBufferAttribute(r,i);const u=l.distanceTo(e);if(u<n){const m=c(u,n),h=s*m,d=a.clone().normalize();l.x+=t.MathUtils.randFloatSpread(h)*d.x,l.y+=t.MathUtils.randFloatSpread(h)*d.y,l.z+=t.MathUtils.randFloatSpread(h)*d.z,r.setXYZ(i,l.x,l.y,l.z)}}r.needsUpdate=!0},mt=(o,e,n,s)=>{const a=o.attributes.position,c=new t.Vector3;for(let r=0;r<a.count;r++){const i=new t.Vector3;if(i.fromBufferAttribute(a,r),i.distanceTo(e)<n){let u=new t.Vector3,m=0;for(let h=0;h<a.count;h++)c.fromBufferAttribute(a,h),c.distanceTo(i)<n&&(u.add(c),m++);m>0&&(u.divideScalar(m),i.lerp(u,s),a.setXYZ(r,i.x,i.y,i.z))}}a.needsUpdate=!0},ht=(o,e,n,s,a=!1,c=E.LINEAR)=>{const r=o.attributes.position;for(let i=0;i<r.count;i++){const l=new t.Vector3;l.fromBufferAttribute(r,i);const u=l.distanceTo(e);if(u<n){const h=c(u,n)*s*(a?-1:1),d=l.clone().sub(e).normalize();l.add(d.multiplyScalar(h)),r.setXYZ(i,l.x,l.y,l.z)}}r.needsUpdate=!0},dt=(o,e,n,s,a=b.UP,c=E.LINEAR)=>{const r=o.attributes.position,i=new t.Quaternion;for(let l=0;l<r.count;l++){const u=new t.Vector3;u.fromBufferAttribute(r,l);const m=u.distanceTo(e);if(m<n){const d=c(m,n)*s;i.setFromAxisAngle(a,d),u.sub(e).applyQuaternion(i).add(e),r.setXYZ(l,u.x,u.y,u.z)}}r.needsUpdate=!0},L=o=>1-Math.cos(o*Math.PI/2),z=o=>Math.sin(o*Math.PI/2),R=o=>-.5*(Math.cos(Math.PI*o)-1),D=o=>o*o,X=o=>1-Math.pow(1-o,2),H=o=>o<.5?2*o*o:1-Math.pow(-2*o+2,2)/2,Z=o=>o*o*o,Y=o=>1-Math.pow(1-o,3),Q=o=>o<.5?4*o*o*o:1-Math.pow(-2*o+2,3)/2,j=o=>o*o*o*o,K=o=>1-Math.pow(1-o,4),J=o=>o<.5?8*o*o*o*o:1-Math.pow(-2*o+2,4)/2,$=o=>o*o*o*o*o,W=o=>1-Math.pow(1-o,5),ee=o=>o<.5?16*o*o*o*o*o:1-Math.pow(-2*o+2,5)/2,te=o=>o===0?0:Math.pow(2,10*o-10),oe=o=>o===1?1:1-Math.pow(2,-10*o),ne=o=>o===0?0:o===1?1:o<.5?Math.pow(2,20*o-10)/2:(2-Math.pow(2,-20*o+10))/2,se=o=>1-Math.sqrt(1-Math.pow(o,2)),re=o=>Math.sqrt(1-Math.pow(o-1,2)),ae=o=>o<.5?(1-Math.sqrt(1-Math.pow(2*o,2)))/2:(Math.sqrt(1-Math.pow(-2*o+2,2))+1)/2,ce=o=>o,ie=o=>o*o*(3-2*o),le=o=>1-Math.pow(1-o,.3),ue=o=>Math.pow(o,.3),me=o=>Math.log(Math.max(.01,o))/Math.log(2),he=o=>Math.sqrt(o),de=o=>1-o,Me=o=>Math.exp(-Math.pow(o-.5,2)/(2*.5)),Mt={SINE_EASE_IN:L,SINE_EASE_OUT:z,SINE_EASE_IN_OUT:R,QUADRATIC_EASE_IN:D,QUADRATIC_EASE_OUT:X,QUADRATIC_EASE_IN_OUT:H,CUBIC_EASE_IN:Z,CUBIC_EASE_OUT:Y,CUBIC_EASE_IN_OUT:Q,QUARTIC_EASE_IN:j,QUARTIC_EASE_OUT:K,QUARTIC_EASE_IN_OUT:J,QUINTIC_EASE_IN:$,QUINTIC_EASE_OUT:W,QUINTIC_EASE_IN_OUT:ee,EXPONENTIAL_EASE_IN:te,EXPONENTIAL_EASE_OUT:oe,EXPONENTIAL_EASE_IN_OUT:ne,CIRCULAR_EASE_IN:se,CIRCULAR_EASE_OUT:re,CIRCULAR_EASE_IN_OUT:ae,LINEAR:ce,SMOOTHSTEP:ie,CONCAVE:le,CONVEX:ue,LOGARITHMIC:me,SQUARE_ROOT:he,INVERSE:de,GAUSSIAN:Me},ye=(o,e=1,n=0,s=0)=>{const a=Math.max(0,Math.min(1,o));return e*a*a+n*a+s},fe=(o,e=1)=>{const n=Math.max(.001,e);return(1-Math.exp(-n*o))/(1-Math.exp(-n))},pe=(o,e,n,s)=>{const a=Math.max(0,Math.min(1,o)),c=1-a;return c*c*e+2*c*a*n+a*a*s},xe=(o,e,n,s,a)=>{const c=Math.max(0,Math.min(1,o)),r=1-c;return r*r*r*e+3*r*r*c*n+3*r*c*c*s+c*c*c*a},we=(o,e=1,n=1)=>{const s=Math.max(0,Math.min(1,o));return e*Math.pow(s,n)},Ge=(o,e=1,n=1)=>{const s=Math.max(.001,Math.min(1,o));return e*Math.log(n*s+1)},ve=(o,e=10)=>{const n=Math.max(0,Math.min(1,o));return 1/(1+Math.exp(-e*(n-.5)))},g={PARABOLIC:ye,DAMPED:fe,QUADRATIC:pe,CUBIC:xe,EXPONENTIAL:we,LOGARITHMIC:Ge,SIGMOID:ve};class yt extends t.Group{constructor(){super();const e=[],n=20,s=new t.SphereGeometry(.1,6,6),a=new t.MeshStandardMaterial({color:16777215,transparent:!0,opacity:.6,roughness:.3,metalness:.3});for(let i=0;i<n;i++){const l=new t.Mesh(s,a);l.position.set((Math.random()-.5)*1.5,Math.random()*3,(Math.random()-.5)*1.5),e.push(l),this.add(l)}function c(){e.forEach(i=>{i.position.y+=.02,i.position.y>3&&(i.position.y=0,i.position.x=(Math.random()-.5)*1.5,i.position.z=(Math.random()-.5)*1.5)})}function r(){requestAnimationFrame(r),c()}r()}}class O extends t.BufferGeometry{constructor(e=1,n=1.5,s=.5,a=.05,c=.05){super();const r=e,i=n,l=s,u=a,m=c,h=[0,0,0,r,0,0,r,i,0,0,i,0,r,0,-l,0,0,-l,0,i,-l,r,i,-l,0,0,-l,0,0,0,0,i,0,0,i,-l,r,0,-u,u,0,-u,u,i,-u,r,i,-u,u,0,-l+u,r,0,-l+u,r,i,-l+u,u,i,-l+u,u,0,-u,u,0,-l+u,u,i,-l+u,u,i,-u,0,i,0,r,i,0,r,i,-u,u,i,-u,0,i,-l,u,i,-l+u,r,i,-l+u,r,i,-l,0,i,0,u,i,-u,u,i,-l+u,0,i,-l,0,0,0,u,0,-u,r,0,-u,r,0,0,0,0,-l,r,0,-l,r,0,-l+u,u,0,-l+u,0,0,0,0,0,-l,u,0,-l+u,u,0,-u,r,0,0,r,0,-u,r,i,-u,r,i,0,r,0,-l,r,i,-l,r,i,-l+u,r,0,-l+u],d=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0],y=e/(e*2+s),M=(e+s)/(e*2+s),p=[M,0,1,0,1,1,M,1,0,0,y,0,y,1,0,1,y,0,M,0,M,1,y,1,1,0,M,0,M,1,1,1,y,0,0,0,0,1,y,1,M,0,y,0,y,1,M,1,M,0,1,0,1,1,M,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1],f=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23,24,25,26,24,26,27,28,29,30,28,30,31,32,33,34,32,34,35,36,37,38,36,38,39,40,41,42,40,42,43,44,45,46,44,46,47,48,49,50,48,50,51,52,53,54,52,54,55],x=new Float32Array(h),w=new Float32Array(d),S=new Float32Array(p),I=new Uint16Array(f),B=new t.BufferGeometry;B.setAttribute("position",new t.BufferAttribute(x,3)),B.setAttribute("normal",new t.BufferAttribute(w,3)),B.setAttribute("uv",new t.BufferAttribute(S,2)),B.setIndex(new t.BufferAttribute(I,1));const C=new t.BoxGeometry(e-u-m,i-m*2,l-u*2);C.translate((e-u-m)/2+u,i/2,-l/2),this.copy(G.mergeGeometries([B,C],!0))}}function Se(o=0,e=1){return Math.random()*(e-o)+o}function ft(o=0,e=1){return Math.floor(Math.random()*(e-o+1))+o}function ge(o=.5,e=0,n=1){return e+(n-e)*Math.pow(Math.random(),o)}function be(o=.5,e=0,n=1){return e+(n-e)*Math.pow(1-Math.random(),o)}function Ie({scaleXMin:o=.4,scaleXMax:e=.7,scaleYMin:n=.3,scaleYMax:s=.95,scaleZMin:a=.1,scaleZMax:c=.5}={}){return new t.Vector3(Se(o,e),ge(.25,n,s),be(.8,a,c))}function F({coverMaterial:o,pagesMaterial:e,scales:n=[]}={}){const s=new O,a=new t.InstancedMesh(s,[o,e],n.length),c=new t.Matrix4;let r=0;for(let i=0;i<n.length;i++){const l=n[i],u=new t.Matrix4;u.makeScale(l.x,l.y,l.z),c.identity(),c.multiply(u),c.setPosition(.01+Math.random()*.1,0,r+l.z*.5),a.setMatrixAt(i,c),r+=l.z*.5}return a}function pt({coverMaterial:o,pagesMaterial:e,count:n=10,scaleXMin:s=.4,scaleXMax:a=.7,scaleYMin:c=.3,scaleYMax:r=.95,scaleZMin:i=.1,scaleZMax:l=.5}={}){const u=Array.from({length:n},()=>Ie({scaleXMin:s,scaleXMax:a,scaleYMin:c,scaleYMax:r,scaleZMin:i,scaleZMax:l}));return F({coverMaterial:o,pagesMaterial:e,scales:u})}function xt({coverMaterial:o,pagesMaterial:e,length:n=10,scaleXMin:s=.4,scaleXMax:a=.7,scaleYMin:c=.3,scaleYMax:r=.95,scaleZMin:i=.1,scaleZMax:l=.5}={}){const u=[];let m=n;for(;m>0;){const h=Ie({scaleXMin:s,scaleXMax:a,scaleYMin:c,scaleYMax:r,scaleZMin:i,scaleZMax:l});h.z=Math.min(h.z,m),u.push(h),m-=h.z}return F({coverMaterial:o,pagesMaterial:e,scales:u})}class wt extends t.BufferGeometry{constructor(e=2,n=.3,s=.6,a=5,c=5,r=Math.PI/4){super();const i=[],l=[];for(let y=0;y<a;y++){const M=y*n,p=M+n,f=y*s,x=f+s;i.push(-e/2,M,f,e/2,M,f,e/2,p,f,-e/2,p,f,-e/2,p,f,e/2,p,f,e/2,p,x,-e/2,p,x);const w=y*8;l.push(w,w+1,w+2,w,w+2,w+3),l.push(w+4,w+5,w+6,w+4,w+6,w+7)}const u=a*n,m=a*s,h=e*2;i.push(-h/2,u,m,h/2,u,m,h/2,u,m+s,-h/2,u,m+s);const d=a*8;l.push(d,d+1,d+2,d,d+2,d+3);for(let y=0;y<2;y++){const M=y===0?1:-1;for(let p=0;p<c;p++){const f=u+p*n,x=f+n,w=M*(h/4),S=m+s,I=p*s*Math.cos(r),B=p*s*Math.sin(r),C=w+M*I-e/2*Math.cos(r),A=w+M*I+e/2*Math.cos(r),P=S+B,nt=C+M*s*Math.cos(r),st=A+M*s*Math.cos(r),_=P+s*Math.sin(r);i.push(C,f,P,A,f,P,A,x,P,C,x,P,C,x,P,A,x,P,st,x,_,nt,x,_);const v=d+4+y*c*8+p*8;l.push(v,v+1,v+2,v,v+2,v+3),l.push(v+4,v+5,v+6,v+4,v+6,v+7)}}this.setIndex(l),this.setAttribute("position",new t.Float32BufferAttribute(i,3)),this.computeVertexNormals()}}class Gt extends t.BufferGeometry{constructor(e=5,n=3,s=5,a=.2){super();const c=[-e/2,0,-s/2,e/2,0,-s/2,e/2,0,s/2,-e/2,0,s/2,-e/2,0,-s/2,e/2,0,-s/2,e/2,n,-s/2,-e/2,n,-s/2,-e/2,0,-s/2,-e/2,0,s/2,-e/2,n,s/2,-e/2,n,-s/2],r=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11];this.setIndex(r),this.setAttribute("position",new t.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class vt extends t.BufferGeometry{constructor(e=2,n=.3,s=.5,a=5,c=2){super();const r=[],i=[];for(let h=0;h<a;h++){const d=h*n,y=d+n,M=h*s,p=M+s;r.push(-e/2,d,M,e/2,d,M,e/2,y,M,-e/2,y,M,-e/2,y,M,e/2,y,M,e/2,y,p,-e/2,y,p);const f=h*8;i.push(f,f+1,f+2,f,f+2,f+3),i.push(f+4,f+5,f+6,f+4,f+6,f+7)}const l=a*n,u=a*s;r.push(-e/2,l,u,e/2,l,u,e/2,l,u+c,-e/2,l,u+c);const m=a*8;i.push(m,m+1,m+2,m,m+2,m+3);for(let h=0;h<a;h++){const d=l+h*n,y=d+n,M=-e/2-h*s,p=M-s;r.push(M,d,u+c,M,d,u+c-e,M,y,u+c-e,M,y,u+c,M,y,u+c,M,y,u+c-e,p,y,u+c-e,p,y,u+c);const f=m+4+h*8;i.push(f,f+1,f+2,f,f+2,f+3),i.push(f+4,f+5,f+6,f+4,f+6,f+7)}this.setIndex(i),this.setAttribute("position",new t.Float32BufferAttribute(r,3)),this.computeVertexNormals()}}class St extends t.BufferGeometry{constructor(e=1,n=.4,s=.2,a=20,c=2,r=Math.PI/8){super();const i=[],l=[];let u=0;for(let m=0;m<a;m++){const h=c*Math.cos(u),d=c*Math.sin(u),y=m*s,M=y+s;i.push(h-e/2*Math.cos(u),y,d-e/2*Math.sin(u),h+e/2*Math.cos(u),y,d+e/2*Math.sin(u),h+e/2*Math.cos(u),M,d+e/2*Math.sin(u),h-e/2*Math.cos(u),M,d-e/2*Math.sin(u)),i.push(h-e/2*Math.cos(u),M,d-e/2*Math.sin(u),h+e/2*Math.cos(u),M,d+e/2*Math.sin(u),h+e/2*Math.cos(u)-n*Math.sin(u),M,d+e/2*Math.sin(u)+n*Math.cos(u),h-e/2*Math.cos(u)-n*Math.sin(u),M,d-e/2*Math.sin(u)+n*Math.cos(u));const p=m*8;l.push(p,p+1,p+2,p,p+2,p+3),l.push(p+4,p+5,p+6,p+4,p+6,p+7),u+=r}this.setIndex(l),this.setAttribute("position",new t.Float32BufferAttribute(i,3)),this.computeVertexNormals()}}class gt extends t.BufferGeometry{constructor(e=2,n=.3,s=.5,a=10){super();const c=[],r=[];for(let i=0;i<a;i++){const l=i*n,u=l+n,m=i*s,h=m+s;c.push(-e/2,l,m,e/2,l,m,e/2,u,m,-e/2,u,m,-e/2,u,m,e/2,u,m,e/2,u,h,-e/2,u,h);const d=i*8;r.push(d,d+1,d+2,d,d+2,d+3),r.push(d+4,d+6,d+5,d+4,d+7,d+6)}this.setIndex(r),this.setAttribute("position",new t.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class Be extends t.BufferGeometry{constructor(e=.4,n=1.2,s=.2){super();const a=n*.6,c=new t.BoxGeometry(e/2,a,s);c.translate(0,a/2,0);const r=e*1.5,i=new t.BoxGeometry(r,e/4,s);i.translate(0,a*.75,0),this.copy(G.mergeGeometries([c,i],!1)),this.computeVertexNormals()}}class Ce extends t.BufferGeometry{constructor(e=1.75,n=.75){super();const s=e*.05,a=e*.15,c=e*.15,r=e*.75;let i=0;const l=new t.BoxGeometry(n,s,n);l.translate(0,i+s/2,0),i+=s;const u=new t.BoxGeometry(n*.8,a,n*.8);u.translate(0,i+a/2,0),i+=a;const m=new t.BoxGeometry(n*.6,c,n*.6);m.translate(0,i+c/2,0),i+=c;const h=new t.BoxGeometry(n*.4,r,n*.4);h.translate(0,i+r/2,0),i+=r;const d=new t.ConeGeometry(n*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);d.translate(0,i+.1/2,0),this.copy(G.mergeGeometries([l,u,m,h,d],!1)),this.computeVertexNormals()}}class Pe extends t.BufferGeometry{constructor(e=.6,n=1,s=.2,a=.6){super();const c=n-a/2,r=new t.BoxGeometry(e,c,s);r.translate(0,c/2,0);const i=new t.CylinderGeometry(a/2,a/2,s,16,1,!1,0,Math.PI);i.rotateY(Math.PI/2),i.rotateX(Math.PI/2),i.translate(0,c,0),this.copy(G.mergeGeometries([r,i],!1)),this.computeVertexNormals()}}class Ee extends t.BufferGeometry{constructor(e=.5,n=.8,s=.15){super();const a=new t.BoxGeometry(e,n,s);a.translate(0,n/2,0),this.copy(a)}}class Ae extends t.BufferGeometry{constructor({height:e=2.25}={}){super();const n=new t.BoxGeometry(1.2,.5,1.2);n.translate(0,.25,0);const s=new t.BoxGeometry(1,e,1);s.translate(0,.5+e/2,0);const a=new t.BoxGeometry(1.4,.3,1.4);a.translate(0,.5+e+.15,0),this.copy(G.mergeGeometries([n,s,a],!1))}}class N extends t.BufferGeometry{constructor({barHeight:e=2,barRadius:n=.05,spikeHeight:s=.3,spikeRadius:a=.075,spikeScaleZ:c=1,radialSegments:r=8}={}){super();const i=new t.CylinderGeometry(n,n,e,r);i.translate(0,e/2,0);const l=new t.ConeGeometry(a,s,r);l.translate(0,e+s/2,0),l.scale(1,1,c),this.copy(G.mergeGeometries([i,l],!1))}}class Te extends t.BufferGeometry{constructor({count:e=20,spacing:n=.4,barHeight:s=2,barRadius:a=.05,spikeHeight:c=.3,spikeRadius:r=.075,spikeScaleZ:i=1,railHeight:l=.1,railDepth:u=.05,railOffset:m=0,radialSegments:h=8}={}){super();const d=[],y=new N({barHeight:s,barRadius:a,spikeHeight:c,spikeRadius:r,spikeScaleZ:i,radialSegments:h}),M=new t.BoxGeometry(e*n,l,u);for(let x=0;x<e;x++){const w=y.clone();w.translate(x*n,0,0),d.push(w)}const p=M.clone();p.translate(n*(e-1)/2,s-m-l/2,0),d.push(p);const f=M.clone();f.translate(n*(e-1)/2,l/2,0),d.push(f),this.copy(G.mergeGeometries(d))}}class ke extends t.BufferGeometry{constructor({width:e=5,height:n=8,depth:s=1,shelves:a=4,frameThickness:c=.1,open:r=!1}={}){super();const i=n,l=e,u=s,m=new t.BoxGeometry(c,i,u),h=new t.BoxGeometry(l-2*c,c,u),d=m.clone();d.translate(-l/2+c/2,i/2,0);const y=m.clone();y.translate(l/2-c/2,i/2,0);const M=h.clone();M.translate(0,i-c/2,0);const p=h.clone();p.translate(0,c/2,0);const f=new t.BoxGeometry(l,i,c);f.translate(0,i/2,-u/2+c/2);const x=[],w=(i-c)/(a+1);for(let S=1;S<=a;S++){const I=h.clone();I.translate(0,c/2+S*w,0),x.push(I)}this.copy(G.mergeGeometries([d,y,M,p,...r?[]:[f],...x],!1))}}class bt extends t.BufferGeometry{constructor(e=.1){super();const n=[],s=[],a=[[0,1],[.5,.75],[.75,.25],[.5,-.5],[0,-1],[-.5,-.5],[-.75,.25],[-.5,.75]];for(let r=0;r<a.length;r++){const[i,l]=a[r];n.push(i*e,l*e,0)}for(let r=1;r<a.length-1;r++)s.push(0,r,r+1);s.push(0,a.length-1,1);const c=new t.Float32BufferAttribute(n,3);this.setAttribute("position",c),this.setIndex(s),this.computeVertexNormals()}}function Ve(o,e=b.XYZ,n=.5,s=2){o.deleteAttribute("uv"),o.deleteAttribute("normal"),o=G.mergeVertices(o),o.computeVertexNormals();const a=o.getAttribute("position");for(let c=0;c<a.count;c++){const r=new t.Vector3().fromBufferAttribute(a,c),i=Math.random()*(s-n)+n,l=e.clone().multiplyScalar(i);r.add(l),a.setXYZ(c,r.x,r.y,r.z)}return a.needsUpdate=!0,o.computeVertexNormals(),o}class Oe extends t.BufferGeometry{constructor(e=1,n=4,s=4){super();const a=new t.SphereGeometry(e,n,s);this.copy(Ve(a,b.XYZ,.5,1)),this.computeVertexNormals(),this.center()}}class Fe extends t.BufferGeometry{constructor(e=.1,n=.1,s=.4,a=8){super();const c=new t.CylinderGeometry(e*.6,n*.6,s,a);c.translate(0,0,0);const r=new t.SphereGeometry(e,a,a),i=r.clone(),l=r.clone(),u=r.clone(),m=r.clone();i.translate(0,s/2+e*.6,-e*.6),l.translate(0,s/2+e*.6,e*.6),u.translate(0,-s/2-n*.6,-n*.6),m.translate(0,-s/2-n*.6,n*.6),this.copy(G.mergeGeometries([c,i,l,u,m],!1))}}class Ne extends t.BufferGeometry{constructor(){super();const e=new t.SphereGeometry(1,16,16),n=new t.CylinderGeometry(.2,.2,2,16,1,!0);n.translate(0,1.5,0),n.rotateX(Math.PI/2),this.copy(G.mergeGeometries([e,n],!1))}}class Ue extends t.BufferGeometry{constructor({flaskRadius:e=1,neckRadius:n=.3,height:s=2.5,neckHeight:a=1,radialSegments:c=16}={}){super();const r=[new t.Vector2(0,0),new t.Vector2(e*.875,0),new t.Vector2(e,.1),new t.Vector2(n,s),new t.Vector2(n,s+a),new t.Vector2(n*1.1,s+a+.3)],i=new t.LatheGeometry(r,c);this.copy(G.mergeGeometries([i],!1))}}class _e extends t.BufferGeometry{constructor(){super();const e=[new t.Vector2(1,0),new t.Vector2(1.2,.5),new t.Vector2(1.4,1.5),new t.Vector2(1.3,1.8),new t.Vector2(.8,1.8)],n=new t.LatheGeometry(e,12),s=new t.CircleGeometry(1,12);s.rotateX(-Math.PI/2),s.translate(0,0,0),this.copy(G.mergeGeometries([n,s],!1))}}class qe extends t.BufferGeometry{constructor({radius:e=.3,height:n=.4,count:s=3,thickness:a=.03,radialSegments:c=16}={}){super();const r=new t.TorusGeometry(e,a,8,c);r.rotateX(Math.PI/2),r.translate(0,n,0);const i=new t.CylinderGeometry(a*.6,a*.6,n,c),l=[];for(let u=0;u<s;u++){const m=u/s*Math.PI*2,h=i.clone();h.translate(Math.cos(m)*e,n/2,Math.sin(m)*e),l.push(h)}this.copy(G.mergeGeometries([r,...l],!1))}}class k extends t.BufferGeometry{constructor(e=.2,n=.2,s=3,a=32,c=!0){super();const r=new t.CylinderGeometry(e,n,s,a,1,c),i=new t.SphereGeometry(n,a,a/2,0,Math.PI*2,Math.PI/2,Math.PI/2);i.translate(0,-(s/2),0),this.copy(G.mergeGeometries([r,i],!1))}}class Le extends t.BufferGeometry{constructor({radius:e=.5,neckRadius:n=.2,height:s=3,neckHeight:a=1,segments:c=16}={}){super();const r=s-a,i=new t.CylinderGeometry(e,e,r,c);i.translate(0,r/2,0);const l=.3,u=new t.CylinderGeometry(n,e,l,c);u.translate(0,r+l/2,0);const m=new t.CylinderGeometry(n,n,a,c);m.translate(0,r+l+a/2,0),this.copy(G.mergeGeometries([i,u,m],!1))}}class ze extends t.BufferGeometry{constructor({radius:e=3,height:n=.6,widthSegments:s=64,heightSegments:a=16,phiStart:c=0,phiLength:r=Math.PI*2}={}){super(),this.copy(new t.SphereGeometry(e,s,a,c,r,0,Math.PI/2)),this.scale(1,n/e,1)}}const It=(o,e)=>o/(1-Math.cos(e)),U=(o,e)=>o/(2*Math.sin(e)),Re=(o,e)=>o*(1-Math.cos(e)),Bt=(o,e)=>2*o*Math.sin(e),Ct=(o,e,n)=>({x:o*Math.sin(n)*Math.cos(e),y:o*Math.sin(n)*Math.sin(e),z:o*Math.cos(n)}),Pt=(o,e,n)=>{const s=Math.sqrt(o*o+e*e+n*n),a=Math.atan2(e,o),c=Math.acos(n/s);return{radius:s,theta:a,phi:c}};class De extends t.BufferGeometry{constructor({radius:e=U(5,Math.PI/10),widthSegments:n=64,heightSegments:s=32,phiStart:a=0,phiLength:c=Math.PI*2,thetaLength:r=Math.PI/10}={}){super(),this.copy(new t.SphereGeometry(e,n,s,a,c,0,r));const i=Re(e,r);this.translate(0,-e+i,0)}}class Xe extends t.BufferGeometry{constructor({trunkRadiusTop:e=.25,trunkRadiusBottom:n=.4,trunkHeight:s=2.5,trunkSegments:a=14,leafSize:c=.8,leafCount:r=6,leafDetail:i=0,leafSpreadRadius:l=1.5}={}){super();const u=new t.CylinderGeometry(e,n,s,a);u.translate(0,s/2,0);const m=[];for(let h=0;h<r;h++){const d=new t.DodecahedronGeometry(c,i);d.translate((Math.random()-.5)*l,(Math.random()-.5)*c+s,(Math.random()-.5)*l),m.push(d)}this.copy(G.mergeGeometries([u.toNonIndexed(),G.mergeGeometries(m,!1)],!0)),this.computeVertexNormals()}}class Et extends t.Group{constructor(){super();const e=new t.SphereGeometry(5,32,32),n=new t.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
2
2
  varying vec3 vNormal;
3
3
  varying vec3 vPosition;
4
4
  void main() {
@@ -35,7 +35,7 @@
35
35
  color *= 0.8 + 0.2 * n; // Modulate color by noise
36
36
  gl_FragColor = vec4(color, 1.0);
37
37
  }
38
- `}),s=new e.Mesh(t,o);this.add(s)}}class qe extends e.Mesh{constructor({width:t=1,height:o=1.5,depth:s=.5,coverThickness:r=.05,pageIndent:i=.05,coverColor:n=9109504,pageColor:c=16777215}={}){super(),this.geometry=new F(t,o,s,r,i),this.material=[new e.MeshStandardMaterial({color:n,metalness:.1,roughness:.7,flatShading:!0}),new e.MeshStandardMaterial({color:c,flatShading:!0})]}}class Oe extends e.Mesh{constructor(t=.4,o=1.2,s=.2){super(),this.geometry=new R(t,o,s),this.material=new e.MeshStandardMaterial({color:7829367,roughness:.8})}}class De extends e.Group{constructor(){super();const t=new e.BoxGeometry(5,1,5),o=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),s=new e.Mesh(t,o);s.position.set(0,.5,0),this.add(s);const r=new e.BoxGeometry(4,3,4),i=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),n=new e.Mesh(r,i);n.position.set(0,2.5,0),this.add(n);const c=new e.ConeGeometry(3.5,2,4),l=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),m=new e.Mesh(c,l);m.rotation.y=Math.PI/4,m.position.set(0,5,0),this.add(m);const u=new e.CylinderGeometry(.2,.2,3.5,16),h=new e.MeshStandardMaterial({color:6908265,flatShading:!0});[[-1.8,2.3,-2.2],[1.8,2.3,-2.2],[-1.8,2.3,2.2],[1.8,2.3,2.2]].forEach(w=>{const v=new e.Mesh(u,h);v.position.set(...w),this.add(v)});const M=new e.Shape;M.moveTo(-1,0),M.lineTo(-1,2),M.absarc(0,2,1,Math.PI,0,!0),M.lineTo(1,0);const f={depth:.5,bevelEnabled:!1},p=new e.ExtrudeGeometry(M,f),y=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),x=new e.Mesh(p,y);x.position.set(0,.5,1.7),this.add(x)}}class Re extends e.Mesh{constructor(t=1.75,o=.75){super(),this.geometry=new H(t,o),this.material=new e.MeshStandardMaterial({color:7829367,roughness:.8})}}class He extends e.Mesh{constructor(t=.6,o=1,s=.2,r=.6){super(),this.geometry=new X(t,o,s,r),this.material=new e.MeshStandardMaterial({color:7829367,roughness:.8})}}class Xe extends e.Mesh{constructor(t=.5,o=.8,s=.15){super(),this.geometry=new Z(t,o,s),this.material=new e.MeshStandardMaterial({color:7829367,roughness:.8})}}class Ze extends e.Mesh{constructor({height:t=2.25}={}){super(),this.geometry=new Y({height:t}),this.material=new e.MeshStandardMaterial({color:9141627,flatShading:!0})}}class Ye extends e.Mesh{constructor({barHeight:t=2,barRadius:o=.05,spikeHeight:s=.3,spikeRadius:r=.075,spikeScaleZ:i=1,radialSegments:n=8}={}){super(),this.geometry=new N({barHeight:t,barRadius:o,spikeHeight:s,spikeRadius:r,spikeScaleZ:i,radialSegments:n}),this.material=new e.MeshStandardMaterial({color:3355443,metalness:.8,roughness:.4})}}class je extends e.Mesh{constructor({count:t=20,spacing:o=.4,barHeight:s=2,barRadius:r=.05,spikeHeight:i=.3,spikeRadius:n=.075,spikeScaleZ:c=1,railHeight:l=.1,railDepth:m=.05,railOffset:u=0,radialSegments:h=8}={}){super(),this.geometry=new j({count:t,spacing:o,barHeight:s,barRadius:r,spikeHeight:i,spikeRadius:n,spikeScaleZ:c,railHeight:l,railDepth:m,railOffset:u,radialSegments:h}),this.material=new e.MeshStandardMaterial({color:3355443,metalness:.8,roughness:.4})}}class Qe extends e.Mesh{constructor({width:t=5,height:o=8,depth:s=1,shelves:r=4,frameThickness:i=.1,open:n=!1}={}){super(),this.geometry=new Q({width:t,height:o,depth:s,shelves:r,frameThickness:i,open:n}),this.material=new e.MeshStandardMaterial({color:9127187})}}class Ke extends e.Group{constructor(){super();const t=new e.BoxGeometry(5,.3,3),o=new e.MeshStandardMaterial({color:9132587}),s=new e.Mesh(t,o);s.position.set(0,3.15,0);const r=[];r.push(new e.Vector2(.2,0)),r.push(new e.Vector2(.25,.5)),r.push(new e.Vector2(.15,1.5)),r.push(new e.Vector2(.3,3));const i=new e.LatheGeometry(r,32),n=new e.MeshStandardMaterial({color:4929057});[[2.2,0,1.2],[-2.2,0,1.2],[2.2,0,-1.2],[-2.2,0,-1.2]].forEach(l=>{const m=new e.Mesh(i,n);m.position.set(...l),this.add(m)}),this.add(s)}}class Je extends e.Group{constructor(t=1,o=.2){super(),this.height=t,this.radius=o,this.createCandle(),this.animateFlicker()}createCandle(){const t=new e.CylinderGeometry(this.radius,this.radius,this.height,32),o=new e.MeshStandardMaterial({color:16777215});this.candle=new e.Mesh(t,o),this.candle.position.set(0,this.height/2,0),this.add(this.candle);const s=new e.SphereGeometry(.05,16,16),r=new e.MeshBasicMaterial({color:16753920});this.flame=new e.Mesh(s,r),this.flame.position.set(0,this.height+.05,0),this.add(this.flame),this.candleLight=new e.PointLight(16753920,1,5),this.candleLight.position.set(0,this.height+.05,0),this.candleLight.castShadow=!0,this.add(this.candleLight)}animateFlicker(){const t=()=>{this.candleLight.intensity=1+(Math.random()*.4-.2),this.candleLight.position.x=Math.random()*.02-.01,this.candleLight.position.z=Math.random()*.02-.01,requestAnimationFrame(t)};t()}}class $e extends e.Group{constructor(t=1.3,o=.5){super();const s=new e.CylinderGeometry(o,o,.2,16),r=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),i=new e.Mesh(s,r);i.position.set(0,0,0),this.add(i);const n=new e.CylinderGeometry(o*.9,o*.9,t),c=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),l=new e.Mesh(n,c);l.position.set(0,t/2+.1,0),this.add(l);const m=new e.ConeGeometry(o*1.1,.5,8),u=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),h=new e.Mesh(m,u);h.position.set(0,t+.35,0),this.add(h);const d=new e.TorusGeometry(o*.8,.05,8,16),M=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),f=new e.Mesh(d,M);f.position.set(0,t+.85,0),this.add(f);const p=new e.PointLight(16755200,1.5,15);p.position.set(0,t/2+.1,0),p.castShadow=!0,this.add(p)}}class We extends e.Group{constructor(){super();const t=new e.DodecahedronGeometry(1,0),o=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),s=new e.MeshStandardMaterial({color:4950843,flatShading:!0,opacity:.8,transparent:!0});for(let r=0;r<5;r++){const i=new e.Mesh(t,o);i.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),i.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),i.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(i);const n=new e.Mesh(t,s);n.scale.set(i.scale.x*.9,i.scale.y*.5,i.scale.z*.9),n.rotation.copy(i.rotation),n.position.copy(i.position),n.position.y+=.3,this.add(n)}}}class et extends e.Mesh{constructor(t=1,o=4,s=4){super(),this.geometry=new J(t,o,s),this.material=new e.MeshStandardMaterial({color:8421504,flatShading:!0})}}class tt extends e.Group{constructor(){super();const t=new e.DodecahedronGeometry(1,0),o=new e.MeshStandardMaterial({color:8421504,flatShading:!0});for(let s=0;s<5;s++){const r=new e.Mesh(t,o);r.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),r.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),r.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(r)}}}class ot extends e.Group{constructor(){super();const t=new W,o=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide}),s=new e.Mesh(t,o);s.rotation.x=-Math.PI/2,this.add(s)}}class st extends e.Group{constructor(){super();const t=[new e.Vector2(0,0),new e.Vector2(.8,0),new e.Vector2(1,1.5),new e.Vector2(.5,2.2),new e.Vector2(.6,2.5)],o=new e.LatheGeometry(t,10),s=new e.CylinderGeometry(.3,.4,.2,8),r=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.5,roughness:.1,metalness:.3}),i=new e.MeshStandardMaterial({color:16724838,transparent:!0,opacity:.6}),n=new e.MeshStandardMaterial({color:9127187,roughness:1}),c=new e.Mesh(o,r),l=new e.Mesh(o,i),m=new e.Mesh(s,n);l.scale.set(.8,.8,.8),l.position.y=.1,m.position.y=2.5;const u=new e.Group;u.add(c,l,m),this.add(u)}}class nt extends e.Group{constructor(){super();const t=new e.CylinderGeometry(.3,.4,.1,16),o=new e.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.3}),s=new e.Mesh(t,o);s.position.y=.05;const r=new e.CylinderGeometry(.1,.1,.7,16),i=new e.MeshStandardMaterial({color:5592405,roughness:.5,metalness:.4}),n=new e.Mesh(r,i);n.position.y=.4;const c=new e.ConeGeometry(.075,.2,16),l=new e.MeshStandardMaterial({color:16733440,emissive:16733440,emissiveIntensity:.6,transparent:!0,opacity:.8}),m=new e.Mesh(c,l);m.position.y=.8,this.add(s,n,m)}}class rt extends e.Group{constructor(){super();const t=new e.BoxGeometry(3,4,.1),o=new e.MeshStandardMaterial({color:3026478,roughness:.8,metalness:.6}),s=new e.BoxGeometry(.2,.5,.2),r=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7}),i=new e.CylinderGeometry(.3,.3,.1,16),n=new e.MeshStandardMaterial({color:5592405,roughness:.7,metalness:.5}),c=new e.Mesh(t,o);for(let y=-1;y<=1;y++){const x=new e.Mesh(s,r);x.position.set(y,1.5,.1),c.add(x)}const l=new e.Mesh(i,n);l.rotation.x=Math.PI/2,l.position.set(0,.5,.15),c.add(l);const m=new e.SphereGeometry(.15,8,8),u=new e.MeshStandardMaterial({color:16711680,emissive:16711680,emissiveIntensity:.5}),h=new e.Mesh(m,u);h.position.set(0,-1,.1),c.add(h),this.add(c);let d=.015,M=.8,f=.2;function p(){requestAnimationFrame(p);const y=f+Math.abs(Math.sin(Date.now()*d))*(M-f);h.material.emissiveIntensity=y}p()}}class at extends e.Mesh{constructor({flaskRadius:t=1,neckRadius:o=.3,height:s=2.5,neckHeight:r=1,radialSegments:i=16}={}){super(),this.geometry=new ee({flaskRadius:t,neckRadius:o,height:s,neckHeight:r,radialSegments:i}),this.material=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide,wireframe:!1})}}class ct extends e.Group{constructor(){super();const t=[new e.Vector2(0,0),new e.Vector2(1.2,0),new e.Vector2(1.5,1.5),new e.Vector2(1,3),new e.Vector2(.6,3.5)],o=new e.LatheGeometry(t,12),s=new e.CylinderGeometry(.6,.7,.3,8),r=new e.MeshStandardMaterial({color:8965290,transparent:!0,opacity:.4,roughness:.1,metalness:.5}),i=new e.MeshStandardMaterial({color:9127187,roughness:1}),n=new e.Mesh(o,r),c=new e.Mesh(s,i);c.position.y=3.5,this.add(n,c)}}class it extends e.Group{constructor(){super();const t=new e.BoxGeometry(2,3,.1),o=new e.MeshStandardMaterial({color:3355443,roughness:.8,metalness:.5}),s=new e.Mesh(t,o),r=new e.CylinderGeometry(.1,.1,.2,8),i=new e.CylinderGeometry(.05,.05,1,8),n=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7});for(let c=-.5;c<=.5;c+=.5){const l=new e.Mesh(r,n);l.position.set(c,1,.1);const m=new e.Mesh(i,n);m.position.y=.5,l.add(m),this.add(l)}this.add(s)}}class lt extends e.Group{constructor(){super();const t=new e.BoxGeometry(1,.2,.5),o=new e.MeshStandardMaterial({color:4473924,roughness:.6,metalness:.3}),s=new e.Mesh(t,o);s.position.y=.1;const r=new e.BoxGeometry(.2,1,.2),i=new e.Mesh(r,o);i.position.set(0,.6,-.2);const n=new e.CylinderGeometry(.1,.1,.4,8),c=new e.MeshStandardMaterial({color:3355443,roughness:.5,metalness:.6}),l=new e.Mesh(n,c);l.position.set(0,1.1,-.35),l.rotation.x=-Math.PI/4;const m=new e.BoxGeometry(.6,.1,.6),u=new e.MeshStandardMaterial({color:5592405,roughness:.8,metalness:.2}),h=new e.Mesh(m,u);h.position.set(0,.6,0),this.add(s,i,l,h)}}class mt extends e.Group{constructor(){super();const t=new te,o=new e.CylinderGeometry(.2,.3,1.5,8);o.translate(0,.75,0);const s=new e.MeshStandardMaterial({color:6045747,roughness:1,metalness:0,side:e.DoubleSide}),r=new e.MeshStandardMaterial({color:9132587,roughness:.8,metalness:.1}),i=new e.Mesh(t,s),n=new e.Mesh(o,r);n.position.set(.3,1.3,0),n.rotation.z=Math.PI/4,this.add(i,n)}}class ut extends e.Group{constructor(){super();const t=100,o=.05,s=new e.CatmullRomCurve3(Array.from({length:t},(m,u)=>{const h=u*.2;return new e.Vector3(Math.cos(h)*.4,u*o,Math.sin(h)*.4)})),r=new e.TubeGeometry(s,200,.1,8,!1),i=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.3,roughness:.1,metalness:.2,emissive:8965375}),n=new e.Mesh(r,i);this.add(n);function c(){i.emissiveIntensity=.2+Math.sin(Date.now()*.005)*.1}function l(){requestAnimationFrame(l),c()}l()}}class ht extends e.Mesh{constructor({radius:t=.3,height:o=.4,count:s=3,thickness:r=.03,radialSegments:i=16}={}){super(),this.geometry=new oe({radius:t,height:o,count:s,thickness:r,radialSegments:i}),this.material=new e.MeshStandardMaterial({color:8947848,roughness:.7,metalness:.3})}}class dt extends e.Group{constructor(){super();const t=new e.CylinderGeometry(.5,.6,.3,16),o=new e.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.5}),s=new e.Mesh(t,o);s.position.y=.15;const r=new e.CylinderGeometry(.15,.15,2,12,1,!0),i=new e.MeshStandardMaterial({color:16737792,roughness:.5,metalness:.8,side:e.DoubleSide}),n=new e.Mesh(r,i);n.position.y=1.3;const c=new e.SphereGeometry(.3,16,16),l=new e.Mesh(c,i);l.position.y=2.4,this.add(s,n,l);const m=[];for(let d=0;d<5;d++){const M=new e.LineBasicMaterial({color:10079487}),f=[new e.Vector3(0,2.4,0),new e.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)],p=new e.BufferGeometry().setFromPoints(f),y=new e.Line(p,M);this.add(y),m.push(y)}function u(){m.forEach(d=>{const M=[new e.Vector3(0,2.4,0),new e.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)];d.geometry.setFromPoints(M)})}function h(){requestAnimationFrame(h),u()}h()}}class ft extends e.Group{constructor(t=.2,o=.2,s=3,r=32){super();const i=new T(t,o,s,r),n=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide}),c=new e.Mesh(i,n);this.add(c)}}class Mt extends e.Group{constructor(t=3,o=[65450,16711850,11141375]){super();const s=new e.BoxGeometry(3,.2,1),r=new e.MeshStandardMaterial({color:9127187,roughness:.7,metalness:.3}),i=new e.Mesh(s,r);i.position.y=.5;const n=new T(.1,.1,1,16),c=new e.MeshStandardMaterial({color:11184810,transparent:!0,opacity:.4,roughness:.1,metalness:.5,side:e.DoubleSide});for(let l=0;l<t;l++){const m=new e.Mesh(n,c),u=(l-(t-1)/2)*.8;m.position.set(u,1,0);const h=new T(.099,.099,.5,16,!1),d=o[l%o.length],M=new e.MeshStandardMaterial({color:d,emissive:d,emissiveIntensity:.5,transparent:!0,opacity:.6}),f=new e.Mesh(h,M);f.position.set(0,-.25,0),m.add(f),i.add(m)}this.add(i)}}class yt extends e.Mesh{constructor(){super();const t=new se,o=new e.MeshPhysicalMaterial({color:5597999,roughness:.1,transmission:.9,thickness:.2,metalness:0,clearcoat:1,clearcoatRoughness:.1});this.geometry=t,this.material=o}}class ie extends e.Shape{constructor(t=5,o=.5,s=1){super();const r=Math.PI*2/t,i=r/2,n=r/4;this.moveTo(Math.cos(0)*s,-Math.sin(0)*s);for(let c=1;c<=t;++c){let l=Math.cos(r*c-n*3)*(o/Math.cos(n)),m=-Math.sin(r*c-n*3)*(o/Math.cos(n)),u=Math.cos(r*c-i)*o,h=-Math.sin(r*c-i)*o;this.quadraticCurveTo(l,m,u,h),l=Math.cos(r*c-n)*(o/Math.cos(n)),m=-Math.sin(r*c-n)*(o/Math.cos(n)),u=Math.cos(r*c)*s,h=-Math.sin(r*c)*s,this.quadraticCurveTo(l,m,u,h)}this.closePath()}}class pt extends e.Mesh{constructor(t=5,o=.5,s=1,r=.25){super();const i=new ie(t,o,s),n=new e.ExtrudeGeometry(i,{depth:r,bevelEnabled:r>0,bevelThickness:0,bevelSize:0}),c=new e.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});n.center(),this.geometry=n,this.material=c}}class le extends e.Shape{constructor(t=5,o=.5,s=1,r=5,i=.25){super();const n=Math.PI*2/t,c=n/4;this.moveTo(Math.cos(0)*s,-Math.sin(0)*s);for(let l=1;l<=t;++l)this.lineTo(Math.cos(n*l-c*3)*o,-Math.sin(n*l-c*3)*o),this.lineTo(Math.cos(n*l-c*2)*o,-Math.sin(n*l-c*2)*o),this.lineTo(Math.cos(n*l-c)*s,-Math.sin(n*l-c)*s),this.lineTo(Math.cos(n*l)*s,-Math.sin(n*l)*s);if(this.closePath(),i>0&&r>2){const l=new e.Path,m=Math.PI*2/r;l.moveTo(Math.cos(0)*i,-Math.sin(0)*i);for(let u=1;u<r;++u)l.lineTo(Math.cos(m*u)*i,-Math.sin(m*u)*i);l.lineTo(Math.cos(0)*i,-Math.sin(0)*i),this.holes.push(l)}}}class xt extends e.Mesh{constructor(t=5,o=.5,s=1,r=5,i=.25,n=.25){super();const c=new le(t,o,s,r,i),l=new e.ExtrudeGeometry(c,{depth:n,bevelEnabled:n>0,bevelThickness:0,bevelSize:0}),m=new e.MeshStandardMaterial({color:11184810,metalness:.8,roughness:.2,reflectivity:.5});l.center(),this.geometry=l,this.material=m}}class me extends e.Shape{constructor(t=1,o=2.1,s=1.4,r=1.6){super(),this.moveTo(0,s*t/3),this.bezierCurveTo(-o*.375*t,s*t,-o*t,s*t/3,0,-r*t),this.bezierCurveTo(o*t,s*t/3,o*.375*t,s*t,0,s*t/3)}}class wt extends e.Mesh{constructor(t=1,o=1,s=1,r=10,i=.25){super();const n=new me(t,o,s,r),c=new e.ExtrudeGeometry(n,{depth:i,bevelEnabled:i>0,bevelThickness:0,bevelSize:0}),l=new e.MeshStandardMaterial({color:12986408,emissive:12981270,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});c.center(),this.geometry=c,this.material=l}}class ue extends e.Shape{constructor(t=5,o=.5,s=1){super();const r=Math.PI*2/t,i=r/2;this.moveTo(Math.cos(0)*s,Math.sin(0)*s);for(let n=1;n<=t;++n)this.lineTo(Math.cos(r*n-i)*o,Math.sin(r*n-i)*o),this.lineTo(Math.cos(r*n)*s,Math.sin(r*n)*s);this.closePath()}}class Gt extends e.Mesh{constructor(t=5,o=.5,s=1,r=.25){super();const i=new ue(t,o,s),n=new e.ExtrudeGeometry(i,{depth:r,bevelEnabled:r>0,bevelThickness:0,bevelSize:0}),c=new e.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});n.center(),this.geometry=n,this.material=c}}class St extends e.Mesh{constructor(){super(),this.geometry=new $,this.material=new e.MeshStandardMaterial({color:16777215})}}class vt extends e.Mesh{constructor({trunkRadiusTop:t=.25,trunkRadiusBottom:o=.4,trunkHeight:s=2.5,trunkSegments:r=14,trunkColor:i=9127187,leafSize:n=.8,leafCount:c=6,leafDetail:l=0,leafSpreadRadius:m=1.5,leafColor:u=2263842}={}){super();const h=new ce({trunkRadiusTop:t,trunkRadiusBottom:o,trunkHeight:s,trunkSegments:r,trunkColor:i,leafSize:n,leafCount:c,leafDetail:l,leafSpreadRadius:m,leafColor:u}),d=new e.MeshStandardMaterial({color:i,roughness:.9,metalness:0,flatShading:!0}),M=new e.MeshStandardMaterial({color:u,roughness:.8,metalness:0,flatShading:!0});this.geometry=h,this.material=[d,M]}}class gt extends e.Mesh{constructor({radius:t=3,height:o=.6,widthSegments:s=64,heightSegments:r=16,phiStart:i=0,phiLength:n=Math.PI*2}={}){super(),this.geometry=new ne({radius:t,height:o,widthSegments:s,heightSegments:r,phiStart:i,phiLength:n}),this.material=new e.MeshStandardMaterial({color:65280,flatShading:!0})}}class bt extends e.Mesh{constructor({radius:t=z(5,Math.PI/10),widthSegments:o=64,heightSegments:s=32,phiStart:r=0,phiLength:i=Math.PI*2,thetaLength:n=Math.PI/10}={}){super(),this.geometry=new ae({radius:t,widthSegments:o,heightSegments:s,phiStart:r,phiLength:i,thetaLength:n}),this.material=new e.MeshStandardMaterial({color:65280,flatShading:!0})}}function Bt(a,{time:t=0,waveFrequency:o=.2,waveAmplitude:s=.5}={}){a.onBeforeCompile=r=>{r.uniforms.time={value:t},r.uniforms.waveFrequency={value:o},r.uniforms.waveAmplitude={value:s},r.vertexShader=`
38
+ `}),s=new t.Mesh(e,n);this.add(s)}}class At extends t.Mesh{constructor({width:e=1,height:n=1.5,depth:s=.5,coverThickness:a=.05,pageIndent:c=.05,coverColor:r=9109504,pageColor:i=16777215}={}){super(),this.geometry=new O(e,n,s,a,c),this.material=[new t.MeshStandardMaterial({color:r,metalness:.1,roughness:.7,flatShading:!0}),new t.MeshStandardMaterial({color:i,flatShading:!0})]}}class Tt extends t.Mesh{constructor(e=.4,n=1.2,s=.2){super(),this.geometry=new Be(e,n,s),this.material=new t.MeshStandardMaterial({color:7829367,roughness:.8})}}class kt extends t.Group{constructor(){super();const e=new t.BoxGeometry(5,1,5),n=new t.MeshStandardMaterial({color:8421504,flatShading:!0}),s=new t.Mesh(e,n);s.position.set(0,.5,0),this.add(s);const a=new t.BoxGeometry(4,3,4),c=new t.MeshStandardMaterial({color:6908265,flatShading:!0}),r=new t.Mesh(a,c);r.position.set(0,2.5,0),this.add(r);const i=new t.ConeGeometry(3.5,2,4),l=new t.MeshStandardMaterial({color:5263440,flatShading:!0}),u=new t.Mesh(i,l);u.rotation.y=Math.PI/4,u.position.set(0,5,0),this.add(u);const m=new t.CylinderGeometry(.2,.2,3.5,16),h=new t.MeshStandardMaterial({color:6908265,flatShading:!0});[[-1.8,2.3,-2.2],[1.8,2.3,-2.2],[-1.8,2.3,2.2],[1.8,2.3,2.2]].forEach(w=>{const S=new t.Mesh(m,h);S.position.set(...w),this.add(S)});const y=new t.Shape;y.moveTo(-1,0),y.lineTo(-1,2),y.absarc(0,2,1,Math.PI,0,!0),y.lineTo(1,0);const M={depth:.5,bevelEnabled:!1},p=new t.ExtrudeGeometry(y,M),f=new t.MeshStandardMaterial({color:4210752,flatShading:!0}),x=new t.Mesh(p,f);x.position.set(0,.5,1.7),this.add(x)}}class Vt extends t.Mesh{constructor(e=1.75,n=.75){super(),this.geometry=new Ce(e,n),this.material=new t.MeshStandardMaterial({color:7829367,roughness:.8})}}class Ot extends t.Mesh{constructor(e=.6,n=1,s=.2,a=.6){super(),this.geometry=new Pe(e,n,s,a),this.material=new t.MeshStandardMaterial({color:7829367,roughness:.8})}}class Ft extends t.Mesh{constructor(e=.5,n=.8,s=.15){super(),this.geometry=new Ee(e,n,s),this.material=new t.MeshStandardMaterial({color:7829367,roughness:.8})}}class Nt extends t.Mesh{constructor({height:e=2.25}={}){super(),this.geometry=new Ae({height:e}),this.material=new t.MeshStandardMaterial({color:9141627,flatShading:!0})}}class Ut extends t.Mesh{constructor({barHeight:e=2,barRadius:n=.05,spikeHeight:s=.3,spikeRadius:a=.075,spikeScaleZ:c=1,radialSegments:r=8}={}){super(),this.geometry=new N({barHeight:e,barRadius:n,spikeHeight:s,spikeRadius:a,spikeScaleZ:c,radialSegments:r}),this.material=new t.MeshStandardMaterial({color:3355443,metalness:.8,roughness:.4})}}class _t extends t.Mesh{constructor({count:e=20,spacing:n=.4,barHeight:s=2,barRadius:a=.05,spikeHeight:c=.3,spikeRadius:r=.075,spikeScaleZ:i=1,railHeight:l=.1,railDepth:u=.05,railOffset:m=0,radialSegments:h=8}={}){super(),this.geometry=new Te({count:e,spacing:n,barHeight:s,barRadius:a,spikeHeight:c,spikeRadius:r,spikeScaleZ:i,railHeight:l,railDepth:u,railOffset:m,radialSegments:h}),this.material=new t.MeshStandardMaterial({color:3355443,metalness:.8,roughness:.4})}}class qt extends t.Mesh{constructor({width:e=5,height:n=8,depth:s=1,shelves:a=4,frameThickness:c=.1,open:r=!1}={}){super(),this.geometry=new ke({width:e,height:n,depth:s,shelves:a,frameThickness:c,open:r}),this.material=new t.MeshStandardMaterial({color:9127187})}}class Lt extends t.Group{constructor(){super();const e=new t.BoxGeometry(5,.3,3),n=new t.MeshStandardMaterial({color:9132587}),s=new t.Mesh(e,n);s.position.set(0,3.15,0);const a=[];a.push(new t.Vector2(.2,0)),a.push(new t.Vector2(.25,.5)),a.push(new t.Vector2(.15,1.5)),a.push(new t.Vector2(.3,3));const c=new t.LatheGeometry(a,32),r=new t.MeshStandardMaterial({color:4929057});[[2.2,0,1.2],[-2.2,0,1.2],[2.2,0,-1.2],[-2.2,0,-1.2]].forEach(l=>{const u=new t.Mesh(c,r);u.position.set(...l),this.add(u)}),this.add(s)}}class zt extends t.Group{constructor(e=1,n=.2){super(),this.height=e,this.radius=n,this.createCandle(),this.animateFlicker()}createCandle(){const e=new t.CylinderGeometry(this.radius,this.radius,this.height,32),n=new t.MeshStandardMaterial({color:16777215});this.candle=new t.Mesh(e,n),this.candle.position.set(0,this.height/2,0),this.add(this.candle);const s=new t.SphereGeometry(.05,16,16),a=new t.MeshBasicMaterial({color:16753920});this.flame=new t.Mesh(s,a),this.flame.position.set(0,this.height+.05,0),this.add(this.flame),this.candleLight=new t.PointLight(16753920,1,5),this.candleLight.position.set(0,this.height+.05,0),this.candleLight.castShadow=!0,this.add(this.candleLight)}animateFlicker(){const e=()=>{this.candleLight.intensity=1+(Math.random()*.4-.2),this.candleLight.position.x=Math.random()*.02-.01,this.candleLight.position.z=Math.random()*.02-.01,requestAnimationFrame(e)};e()}}class Rt extends t.Group{constructor(e=1.3,n=.5){super();const s=new t.CylinderGeometry(n,n,.2,16),a=new t.MeshStandardMaterial({color:9127187,flatShading:!0}),c=new t.Mesh(s,a);c.position.set(0,0,0),this.add(c);const r=new t.CylinderGeometry(n*.9,n*.9,e),i=new t.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),l=new t.Mesh(r,i);l.position.set(0,e/2+.1,0),this.add(l);const u=new t.ConeGeometry(n*1.1,.5,8),m=new t.MeshStandardMaterial({color:9127187,flatShading:!0}),h=new t.Mesh(u,m);h.position.set(0,e+.35,0),this.add(h);const d=new t.TorusGeometry(n*.8,.05,8,16),y=new t.MeshStandardMaterial({color:9127187,flatShading:!0}),M=new t.Mesh(d,y);M.position.set(0,e+.85,0),this.add(M);const p=new t.PointLight(16755200,1.5,15);p.position.set(0,e/2+.1,0),p.castShadow=!0,this.add(p)}}class Dt extends t.Group{constructor(){super();const e=new t.DodecahedronGeometry(1,0),n=new t.MeshStandardMaterial({color:8421504,flatShading:!0}),s=new t.MeshStandardMaterial({color:4950843,flatShading:!0,opacity:.8,transparent:!0});for(let a=0;a<5;a++){const c=new t.Mesh(e,n);c.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),c.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),c.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(c);const r=new t.Mesh(e,s);r.scale.set(c.scale.x*.9,c.scale.y*.5,c.scale.z*.9),r.rotation.copy(c.rotation),r.position.copy(c.position),r.position.y+=.3,this.add(r)}}}class Xt extends t.Mesh{constructor(e=1,n=4,s=4){super(),this.geometry=new Oe(e,n,s),this.material=new t.MeshStandardMaterial({color:8421504,flatShading:!0})}}class Ht extends t.Group{constructor(){super();const e=new t.DodecahedronGeometry(1,0),n=new t.MeshStandardMaterial({color:8421504,flatShading:!0});for(let s=0;s<5;s++){const a=new t.Mesh(e,n);a.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),a.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),a.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(a)}}}class Zt extends t.Group{constructor(){super();const e=new Ne,n=new t.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:t.DoubleSide}),s=new t.Mesh(e,n);s.rotation.x=-Math.PI/2,this.add(s)}}class Yt extends t.Group{constructor(){super();const e=[new t.Vector2(0,0),new t.Vector2(.8,0),new t.Vector2(1,1.5),new t.Vector2(.5,2.2),new t.Vector2(.6,2.5)],n=new t.LatheGeometry(e,10),s=new t.CylinderGeometry(.3,.4,.2,8),a=new t.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.5,roughness:.1,metalness:.3}),c=new t.MeshStandardMaterial({color:16724838,transparent:!0,opacity:.6}),r=new t.MeshStandardMaterial({color:9127187,roughness:1}),i=new t.Mesh(n,a),l=new t.Mesh(n,c),u=new t.Mesh(s,r);l.scale.set(.8,.8,.8),l.position.y=.1,u.position.y=2.5;const m=new t.Group;m.add(i,l,u),this.add(m)}}class Qt extends t.Group{constructor(){super();const e=new t.CylinderGeometry(.3,.4,.1,16),n=new t.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.3}),s=new t.Mesh(e,n);s.position.y=.05;const a=new t.CylinderGeometry(.1,.1,.7,16),c=new t.MeshStandardMaterial({color:5592405,roughness:.5,metalness:.4}),r=new t.Mesh(a,c);r.position.y=.4;const i=new t.ConeGeometry(.075,.2,16),l=new t.MeshStandardMaterial({color:16733440,emissive:16733440,emissiveIntensity:.6,transparent:!0,opacity:.8}),u=new t.Mesh(i,l);u.position.y=.8,this.add(s,r,u)}}class jt extends t.Group{constructor(){super();const e=new t.BoxGeometry(3,4,.1),n=new t.MeshStandardMaterial({color:3026478,roughness:.8,metalness:.6}),s=new t.BoxGeometry(.2,.5,.2),a=new t.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7}),c=new t.CylinderGeometry(.3,.3,.1,16),r=new t.MeshStandardMaterial({color:5592405,roughness:.7,metalness:.5}),i=new t.Mesh(e,n);for(let f=-1;f<=1;f++){const x=new t.Mesh(s,a);x.position.set(f,1.5,.1),i.add(x)}const l=new t.Mesh(c,r);l.rotation.x=Math.PI/2,l.position.set(0,.5,.15),i.add(l);const u=new t.SphereGeometry(.15,8,8),m=new t.MeshStandardMaterial({color:16711680,emissive:16711680,emissiveIntensity:.5}),h=new t.Mesh(u,m);h.position.set(0,-1,.1),i.add(h),this.add(i);let d=.015,y=.8,M=.2;function p(){requestAnimationFrame(p);const f=M+Math.abs(Math.sin(Date.now()*d))*(y-M);h.material.emissiveIntensity=f}p()}}class Kt extends t.Mesh{constructor({flaskRadius:e=1,neckRadius:n=.3,height:s=2.5,neckHeight:a=1,radialSegments:c=16}={}){super(),this.geometry=new Ue({flaskRadius:e,neckRadius:n,height:s,neckHeight:a,radialSegments:c}),this.material=new t.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:t.DoubleSide,wireframe:!1})}}class Jt extends t.Group{constructor(){super();const e=[new t.Vector2(0,0),new t.Vector2(1.2,0),new t.Vector2(1.5,1.5),new t.Vector2(1,3),new t.Vector2(.6,3.5)],n=new t.LatheGeometry(e,12),s=new t.CylinderGeometry(.6,.7,.3,8),a=new t.MeshStandardMaterial({color:8965290,transparent:!0,opacity:.4,roughness:.1,metalness:.5}),c=new t.MeshStandardMaterial({color:9127187,roughness:1}),r=new t.Mesh(n,a),i=new t.Mesh(s,c);i.position.y=3.5,this.add(r,i)}}class $t extends t.Group{constructor(){super();const e=new t.BoxGeometry(2,3,.1),n=new t.MeshStandardMaterial({color:3355443,roughness:.8,metalness:.5}),s=new t.Mesh(e,n),a=new t.CylinderGeometry(.1,.1,.2,8),c=new t.CylinderGeometry(.05,.05,1,8),r=new t.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7});for(let i=-.5;i<=.5;i+=.5){const l=new t.Mesh(a,r);l.position.set(i,1,.1);const u=new t.Mesh(c,r);u.position.y=.5,l.add(u),this.add(l)}this.add(s)}}class Wt extends t.Group{constructor(){super();const e=new t.BoxGeometry(1,.2,.5),n=new t.MeshStandardMaterial({color:4473924,roughness:.6,metalness:.3}),s=new t.Mesh(e,n);s.position.y=.1;const a=new t.BoxGeometry(.2,1,.2),c=new t.Mesh(a,n);c.position.set(0,.6,-.2);const r=new t.CylinderGeometry(.1,.1,.4,8),i=new t.MeshStandardMaterial({color:3355443,roughness:.5,metalness:.6}),l=new t.Mesh(r,i);l.position.set(0,1.1,-.35),l.rotation.x=-Math.PI/4;const u=new t.BoxGeometry(.6,.1,.6),m=new t.MeshStandardMaterial({color:5592405,roughness:.8,metalness:.2}),h=new t.Mesh(u,m);h.position.set(0,.6,0),this.add(s,c,l,h)}}class eo extends t.Group{constructor(){super();const e=new _e,n=new t.CylinderGeometry(.2,.3,1.5,8);n.translate(0,.75,0);const s=new t.MeshStandardMaterial({color:6045747,roughness:1,metalness:0,side:t.DoubleSide}),a=new t.MeshStandardMaterial({color:9132587,roughness:.8,metalness:.1}),c=new t.Mesh(e,s),r=new t.Mesh(n,a);r.position.set(.3,1.3,0),r.rotation.z=Math.PI/4,this.add(c,r)}}class to extends t.Group{constructor(){super();const e=100,n=.05,s=new t.CatmullRomCurve3(Array.from({length:e},(u,m)=>{const h=m*.2;return new t.Vector3(Math.cos(h)*.4,m*n,Math.sin(h)*.4)})),a=new t.TubeGeometry(s,200,.1,8,!1),c=new t.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.3,roughness:.1,metalness:.2,emissive:8965375}),r=new t.Mesh(a,c);this.add(r);function i(){c.emissiveIntensity=.2+Math.sin(Date.now()*.005)*.1}function l(){requestAnimationFrame(l),i()}l()}}class oo extends t.Mesh{constructor({radius:e=.3,height:n=.4,count:s=3,thickness:a=.03,radialSegments:c=16}={}){super(),this.geometry=new qe({radius:e,height:n,count:s,thickness:a,radialSegments:c}),this.material=new t.MeshStandardMaterial({color:8947848,roughness:.7,metalness:.3})}}class no extends t.Group{constructor(){super();const e=new t.CylinderGeometry(.5,.6,.3,16),n=new t.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.5}),s=new t.Mesh(e,n);s.position.y=.15;const a=new t.CylinderGeometry(.15,.15,2,12,1,!0),c=new t.MeshStandardMaterial({color:16737792,roughness:.5,metalness:.8,side:t.DoubleSide}),r=new t.Mesh(a,c);r.position.y=1.3;const i=new t.SphereGeometry(.3,16,16),l=new t.Mesh(i,c);l.position.y=2.4,this.add(s,r,l);const u=[];for(let d=0;d<5;d++){const y=new t.LineBasicMaterial({color:10079487}),M=[new t.Vector3(0,2.4,0),new t.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)],p=new t.BufferGeometry().setFromPoints(M),f=new t.Line(p,y);this.add(f),u.push(f)}function m(){u.forEach(d=>{const y=[new t.Vector3(0,2.4,0),new t.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)];d.geometry.setFromPoints(y)})}function h(){requestAnimationFrame(h),m()}h()}}class so extends t.Group{constructor(e=.2,n=.2,s=3,a=32){super();const c=new k(e,n,s,a),r=new t.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:t.DoubleSide}),i=new t.Mesh(c,r);this.add(i)}}class ro extends t.Group{constructor(e=3,n=[65450,16711850,11141375]){super();const s=new t.BoxGeometry(3,.2,1),a=new t.MeshStandardMaterial({color:9127187,roughness:.7,metalness:.3}),c=new t.Mesh(s,a);c.position.y=.5;const r=new k(.1,.1,1,16),i=new t.MeshStandardMaterial({color:11184810,transparent:!0,opacity:.4,roughness:.1,metalness:.5,side:t.DoubleSide});for(let l=0;l<e;l++){const u=new t.Mesh(r,i),m=(l-(e-1)/2)*.8;u.position.set(m,1,0);const h=new k(.099,.099,.5,16,!1),d=n[l%n.length],y=new t.MeshStandardMaterial({color:d,emissive:d,emissiveIntensity:.5,transparent:!0,opacity:.6}),M=new t.Mesh(h,y);M.position.set(0,-.25,0),u.add(M),c.add(u)}this.add(c)}}class ao extends t.Mesh{constructor(){super();const e=new Le,n=new t.MeshPhysicalMaterial({color:5597999,roughness:.1,transmission:.9,thickness:.2,metalness:0,clearcoat:1,clearcoatRoughness:.1});this.geometry=e,this.material=n}}class He extends t.Shape{constructor(e=5,n=.5,s=1){super();const a=Math.PI*2/e,c=a/2,r=a/4;this.moveTo(Math.cos(0)*s,-Math.sin(0)*s);for(let i=1;i<=e;++i){let l=Math.cos(a*i-r*3)*(n/Math.cos(r)),u=-Math.sin(a*i-r*3)*(n/Math.cos(r)),m=Math.cos(a*i-c)*n,h=-Math.sin(a*i-c)*n;this.quadraticCurveTo(l,u,m,h),l=Math.cos(a*i-r)*(n/Math.cos(r)),u=-Math.sin(a*i-r)*(n/Math.cos(r)),m=Math.cos(a*i)*s,h=-Math.sin(a*i)*s,this.quadraticCurveTo(l,u,m,h)}this.closePath()}}class co extends t.Mesh{constructor(e=5,n=.5,s=1,a=.25){super();const c=new He(e,n,s),r=new t.ExtrudeGeometry(c,{depth:a,bevelEnabled:a>0,bevelThickness:0,bevelSize:0}),i=new t.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});r.center(),this.geometry=r,this.material=i}}class Ze extends t.Shape{constructor(e=5,n=.5,s=1,a=5,c=.25){super();const r=Math.PI*2/e,i=r/4;this.moveTo(Math.cos(0)*s,-Math.sin(0)*s);for(let l=1;l<=e;++l)this.lineTo(Math.cos(r*l-i*3)*n,-Math.sin(r*l-i*3)*n),this.lineTo(Math.cos(r*l-i*2)*n,-Math.sin(r*l-i*2)*n),this.lineTo(Math.cos(r*l-i)*s,-Math.sin(r*l-i)*s),this.lineTo(Math.cos(r*l)*s,-Math.sin(r*l)*s);if(this.closePath(),c>0&&a>2){const l=new t.Path,u=Math.PI*2/a;l.moveTo(Math.cos(0)*c,-Math.sin(0)*c);for(let m=1;m<a;++m)l.lineTo(Math.cos(u*m)*c,-Math.sin(u*m)*c);l.lineTo(Math.cos(0)*c,-Math.sin(0)*c),this.holes.push(l)}}}class io extends t.Mesh{constructor(e=5,n=.5,s=1,a=5,c=.25,r=.25){super();const i=new Ze(e,n,s,a,c),l=new t.ExtrudeGeometry(i,{depth:r,bevelEnabled:r>0,bevelThickness:0,bevelSize:0}),u=new t.MeshStandardMaterial({color:11184810,metalness:.8,roughness:.2,reflectivity:.5});l.center(),this.geometry=l,this.material=u}}class Ye extends t.Shape{constructor(e=1,n=2.1,s=1.4,a=1.6){super(),this.moveTo(0,s*e/3),this.bezierCurveTo(-n*.375*e,s*e,-n*e,s*e/3,0,-a*e),this.bezierCurveTo(n*e,s*e/3,n*.375*e,s*e,0,s*e/3)}}class lo extends t.Mesh{constructor(e=1,n=1,s=1,a=10,c=.25){super();const r=new Ye(e,n,s,a),i=new t.ExtrudeGeometry(r,{depth:c,bevelEnabled:c>0,bevelThickness:0,bevelSize:0}),l=new t.MeshStandardMaterial({color:12986408,emissive:12981270,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});i.center(),this.geometry=i,this.material=l}}class Qe extends t.Shape{constructor(e=5,n=.5,s=1){super();const a=Math.PI*2/e,c=a/2;this.moveTo(Math.cos(0)*s,Math.sin(0)*s);for(let r=1;r<=e;++r)this.lineTo(Math.cos(a*r-c)*n,Math.sin(a*r-c)*n),this.lineTo(Math.cos(a*r)*s,Math.sin(a*r)*s);this.closePath()}}class uo extends t.Mesh{constructor(e=5,n=.5,s=1,a=.25){super();const c=new Qe(e,n,s),r=new t.ExtrudeGeometry(c,{depth:a,bevelEnabled:a>0,bevelThickness:0,bevelSize:0}),i=new t.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});r.center(),this.geometry=r,this.material=i}}class mo extends t.Mesh{constructor(){super(),this.geometry=new Fe,this.material=new t.MeshStandardMaterial({color:16777215})}}class ho extends t.Mesh{constructor({trunkRadiusTop:e=.25,trunkRadiusBottom:n=.4,trunkHeight:s=2.5,trunkSegments:a=14,trunkColor:c=9127187,leafSize:r=.8,leafCount:i=6,leafDetail:l=0,leafSpreadRadius:u=1.5,leafColor:m=2263842}={}){super();const h=new Xe({trunkRadiusTop:e,trunkRadiusBottom:n,trunkHeight:s,trunkSegments:a,trunkColor:c,leafSize:r,leafCount:i,leafDetail:l,leafSpreadRadius:u,leafColor:m}),d=new t.MeshStandardMaterial({color:c,roughness:.9,metalness:0,flatShading:!0}),y=new t.MeshStandardMaterial({color:m,roughness:.8,metalness:0,flatShading:!0});this.geometry=h,this.material=[d,y]}}class Mo extends t.Mesh{constructor({radius:e=3,height:n=.6,widthSegments:s=64,heightSegments:a=16,phiStart:c=0,phiLength:r=Math.PI*2}={}){super(),this.geometry=new ze({radius:e,height:n,widthSegments:s,heightSegments:a,phiStart:c,phiLength:r}),this.material=new t.MeshStandardMaterial({color:65280,flatShading:!0})}}class yo extends t.Mesh{constructor({radius:e=U(5,Math.PI/10),widthSegments:n=64,heightSegments:s=32,phiStart:a=0,phiLength:c=Math.PI*2,thetaLength:r=Math.PI/10}={}){super(),this.geometry=new De({radius:e,widthSegments:n,heightSegments:s,phiStart:a,phiLength:c,thetaLength:r}),this.material=new t.MeshStandardMaterial({color:65280,flatShading:!0})}}function fo(o,{time:e=0,waveFrequency:n=.2,waveAmplitude:s=.5}={}){o.onBeforeCompile=a=>{a.uniforms.time={value:e},a.uniforms.waveFrequency={value:n},a.uniforms.waveAmplitude={value:s},a.vertexShader=`
39
39
  uniform float time;
40
40
  uniform float waveFrequency;
41
41
  uniform float waveAmplitude;
@@ -49,9 +49,9 @@
49
49
 
50
50
  return displaced;
51
51
  }
52
- `+r.vertexShader,r.vertexShader=r.vertexShader.replace("#include <begin_vertex>",`
52
+ `+a.vertexShader,a.vertexShader=a.vertexShader.replace("#include <begin_vertex>",`
53
53
  vec3 transformed = waterDisplacement(position, normal);
54
- `),a.userData.shader=r}}function It(a,t){a.userData.shader&&(a.userData.shader.uniforms.time.value+=t)}function Pt(a,{time:t=0,intensity:o=1,direction:s=g.XYZ,scale:r=10}={}){a.onBeforeCompile=i=>{i.uniforms.time={value:t},i.uniforms.direction={value:s},i.uniforms.intensity={value:o},i.uniforms.scale={value:r},i.vertexShader=`
54
+ `),o.userData.shader=a}}function po(o,e){o.userData.shader&&(o.userData.shader.uniforms.time.value+=e)}function xo(o,{time:e=0,intensity:n=1,direction:s=b.XYZ,scale:a=10}={}){o.onBeforeCompile=c=>{c.uniforms.time={value:e},c.uniforms.direction={value:s},c.uniforms.intensity={value:n},c.uniforms.scale={value:a},c.vertexShader=`
55
55
  uniform float time;
56
56
  uniform vec3 direction;
57
57
  uniform float intensity;
@@ -82,12 +82,12 @@
82
82
 
83
83
  return o4.y * d.y + o4.x * (1.0 - d.y);
84
84
  }
85
- `+i.vertexShader,i.vertexShader=i.vertexShader.replace("#include <begin_vertex>",`
85
+ `+c.vertexShader,c.vertexShader=c.vertexShader.replace("#include <begin_vertex>",`
86
86
  vec3 transformed = vec3(position);
87
87
  float n = noise(transformed * scale + time);
88
88
  transformed += normalize(direction) * n * intensity;
89
89
  vec3 transformedNormal = normal;
90
- `),a.userData.shader=i}}function kt(a,t){a.userData.shader&&(a.userData.shader.uniforms.time.value+=t)}const V={uniforms:{},vertexShader:`
90
+ `),o.userData.shader=c}}function wo(o,e){o.userData.shader&&(o.userData.shader.uniforms.time.value+=e)}const V={uniforms:{},vertexShader:`
91
91
  varying vec3 vPosition;
92
92
  void main() {
93
93
  vPosition = position;
@@ -101,7 +101,7 @@
101
101
  vec3 bottomColor = vec3(1.0, 1.0, 1.0); // Light white/gray for the horizon
102
102
  gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
103
103
  }
104
- `},he={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
104
+ `},je={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
105
105
  varying vec2 vUv;
106
106
  void main() {
107
107
  vUv = uv;
@@ -115,7 +115,7 @@
115
115
  vec4 texel = texture2D(tDiffuse, vUv);
116
116
  gl_FragColor = opacity * texel;
117
117
  }
118
- `},C={uniforms:{topColor:{value:new e.Color(51)},bottomColor:{value:new e.Color(17)},offset:{value:33},exponent:{value:.6}},vertexShader:`
118
+ `},T={uniforms:{topColor:{value:new t.Color(51)},bottomColor:{value:new t.Color(17)},offset:{value:33},exponent:{value:.6}},vertexShader:`
119
119
  varying vec3 vWorldPosition;
120
120
  void main() {
121
121
  vec4 worldPosition = modelMatrix * vec4(position, 1.0);
@@ -132,5 +132,5 @@
132
132
  float h = normalize(vWorldPosition + offset).y;
133
133
  gl_FragColor = vec4(mix(bottomColor, topColor, max(pow(max(h, 0.0), exponent), 0.0)), 1.0);
134
134
  }
135
- `};class At extends e.Mesh{constructor(t=1e3){super(),this.geometry=new e.BoxGeometry(t,t,t),this.material=new e.ShaderMaterial({vertexShader:V.vertexShader,fragmentShader:V.fragmentShader,side:e.BackSide})}}class Ct extends e.Mesh{constructor(t=1e3){super(),this.geometry=new e.SphereGeometry(t,32,15),this.material=new e.ShaderMaterial({vertexShader:C.vertexShader,fragmentShader:C.fragmentShader,uniforms:C.uniforms,side:e.BackSide})}}class Tt extends e.Mesh{constructor(t=Math.PI*.49,o=2*Math.PI*.25,s=10,r=2,i=.005,n=.8){super();const c=new Me.Sky;c.scale.setScalar(45e4),this.add(c);const l=c.material.uniforms;l.turbidity.value=s,l.rayleigh.value=r,l.mieCoefficient.value=i,l.mieDirectionalG.value=n,this.skyUniforms=l,this.sunPosition(t,o)}sunPosition(t,o){const s=new e.Vector3,r=this.skyUniforms;s.setFromSphericalCoords(1,t,o),r.sunPosition.value.copy(s)}}const Vt=a=>{const t=new Uint8Array(4*a*a);for(let s=0;s<a*a;s++){const r=s*4,i=(s%a^Math.floor(s/a))&1?255:0;t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=255}const o=new e.DataTexture(t,a,a,e.RGBAFormat,e.UnsignedByteType);return o.wrapS=e.RepeatWrapping,o.wrapT=e.RepeatWrapping,o.minFilter=e.NearestFilter,o.needsUpdate=!0,o};function Ft(a){const t=new e.Box3().setFromObject(a),o=new e.Vector3;t.getCenter(o),a.position.sub(o)}function Et(a,t=new e.Vector3(0,0,0)){const o=new e.Box3().setFromObject(a),s=new e.Vector3;o.getCenter(s);const r=new e.Vector3().subVectors(t,s);a.position.add(r)}function Nt(a){a.computeBoundingBox();const o=a.boundingBox.getCenter(new e.Vector3);a.translateX(-o.x),a.translateY(-o.y),a.translateZ(-o.z)}function zt(a){const o=new e.Box3().setFromObject(a).getCenter(new e.Vector3);a.translateX(-o.x),a.translateY(-o.y),a.translateZ(-o.z),a.updateMatrixWorld(!0)}function Ut(a){a.geometry.computeBoundingBox();const o=a.geometry.boundingBox.getCenter(new e.Vector3);a.geometry.translate(-o.x,-o.y,-o.z)}class Lt{static dispose(t){t==null||t.traverse(o=>{o.geometry&&o.geometry.dispose(),o.material&&(Array.isArray(o.material)?o.material.forEach(s=>s.dispose()):o.material.dispose())})}static fadeBetween(t,o,s,r,i=1){const n=new ye.EffectComposer(t),c=new L.RenderPass(s,o);n.addPass(c);const l=new pe.ShaderPass(he);l.uniforms.opacity.value=1,n.addPass(l);let m=null;function u(d){m||(m=d);const f=(d-m)/1e3/i;l.uniforms.opacity.value=Math.max(1-f,0),f<1?(n.render(),requestAnimationFrame(u)):(n.passes[0]=new L.RenderPass(r,o),m=null,requestAnimationFrame(h))}function h(d){m||(m=d);const f=(d-m)/1e3/i;l.uniforms.opacity.value=Math.min(f,1),f<1&&(n.render(),requestAnimationFrame(h))}requestAnimationFrame(u)}}exports.Beaker=ot;exports.BeakerGeometry=W;exports.BifurcatedStaircaseGeometry=Ae;exports.Bone=St;exports.BoneGeometry=$;exports.Book=qe;exports.BookGeometry=F;exports.Bookshelf=Qe;exports.BookshelfGeometry=Q;exports.Bottle=st;exports.Bubbling=Be;exports.BunsenBurner=nt;exports.Burst=pt;exports.BurstShape=ie;exports.Candle=Je;exports.CrossHeadstone=Oe;exports.CrossHeadstoneGeometry=R;exports.DaySkybox=At;exports.Desk=Ke;exports.DioramaGeometry=Ce;exports.Direction=g;exports.Easing=be;exports.ElectricPanel=rt;exports.ErlenmeyerFlask=at;exports.ErlenmeyerFlaskGeometry=ee;exports.Falloff=k;exports.FenceColumn=Ze;exports.FenceColumnGeometry=Y;exports.Flask=ct;exports.Gear=xt;exports.GearShape=le;exports.Heart=wt;exports.HeartShape=me;exports.Hill=gt;exports.HillGeometry=ne;exports.LShapedStaircaseGeometry=Te;exports.Lantern=$e;exports.LeverPanel=it;exports.Mausoleum=De;exports.Microscope=lt;exports.Moon=_e;exports.MortarAndPestle=mt;exports.MortarGeometry=te;exports.MossyRocks=We;exports.Mound=bt;exports.MoundGeometry=ae;exports.NightSkybox=Ct;exports.ObeliskHeadstone=Re;exports.ObeliskHeadstoneGeometry=H;exports.Rock=et;exports.RockGeometry=J;exports.Rocks=tt;exports.RoundedHeadstone=He;exports.RoundedHeadstoneGeometry=X;exports.SceneUtils=Lt;exports.SimpleLeafGeometry=Ee;exports.SpiralStaircaseGeometry=Ve;exports.SpiralTube=ut;exports.SquareHeadstone=Xe;exports.SquareHeadstoneGeometry=Z;exports.StaircaseGeometry=Fe;exports.Stand=ht;exports.StandGeometry=oe;exports.Star=Gt;exports.StarShape=ue;exports.TeslaCoil=dt;exports.TestTube=ft;exports.TestTubeGeometry=T;exports.TestTubeRack=Mt;exports.Tree=vt;exports.TreeGeometry=ce;exports.TwilightSkybox=Tt;exports.WineBottle=yt;exports.WineBottleGeometry=se;exports.WroughtIronBar=Ye;exports.WroughtIronBarGeometry=N;exports.WroughtIronFence=je;exports.WroughtIronFenceGeometry=j;exports.addNoiseDisplacement=Pt;exports.addWaterDisplacement=Bt;exports.capHeightFromRadius=re;exports.capWidthFromRadius=ze;exports.cartesianToSpherical=Le;exports.centerGroup=Ft;exports.centerGroupAtTarget=Et;exports.centerInstancedMesh=Nt;exports.centerMesh=zt;exports.centerMeshGeometry=Ut;exports.checkerboardTexture=Vt;exports.daySkyShader=V;exports.displacementBrush=xe;exports.fadeShader=he;exports.flattenBrush=we;exports.logarithmicRandomMax=q;exports.logarithmicRandomMin=O;exports.nightSkyShader=C;exports.noiseBrush=Ge;exports.radiusFromCapHeight=Ne;exports.radiusFromCapWidth=z;exports.randomFloat=_;exports.randomInteger=Ie;exports.randomTransformVertices=K;exports.rowOfBooksByCount=Pe;exports.rowOfBooksByLength=ke;exports.rowOfBooksByScales=E;exports.smoothBrush=Se;exports.sphericalToCartesian=Ue;exports.spikeBrush=ve;exports.twistBrush=ge;exports.updateNoiseDisplacementTime=kt;exports.updateWaterDisplacementTime=It;
135
+ `};class Go extends t.Mesh{constructor(e=1e3){super(),this.geometry=new t.BoxGeometry(e,e,e),this.material=new t.ShaderMaterial({vertexShader:V.vertexShader,fragmentShader:V.fragmentShader,side:t.BackSide})}}class vo extends t.Mesh{constructor(e=1e3){super(),this.geometry=new t.SphereGeometry(e,32,15),this.material=new t.ShaderMaterial({vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,uniforms:T.uniforms,side:t.BackSide})}}class So extends t.Mesh{constructor(e=Math.PI*.49,n=2*Math.PI*.25,s=10,a=2,c=.005,r=.8){super();const i=new rt.Sky;i.scale.setScalar(45e4),this.add(i);const l=i.material.uniforms;l.turbidity.value=s,l.rayleigh.value=a,l.mieCoefficient.value=c,l.mieDirectionalG.value=r,this.skyUniforms=l,this.sunPosition(e,n)}sunPosition(e,n){const s=new t.Vector3,a=this.skyUniforms;s.setFromSphericalCoords(1,e,n),a.sunPosition.value.copy(s)}}const go=o=>{const e=new Uint8Array(4*o*o);for(let s=0;s<o*o;s++){const a=s*4,c=(s%o^Math.floor(s/o))&1?255:0;e[a]=c,e[a+1]=c,e[a+2]=c,e[a+3]=255}const n=new t.DataTexture(e,o,o,t.RGBAFormat,t.UnsignedByteType);return n.wrapS=t.RepeatWrapping,n.wrapT=t.RepeatWrapping,n.minFilter=t.NearestFilter,n.needsUpdate=!0,n};function bo(o){const e=new t.Box3().setFromObject(o),n=new t.Vector3;e.getCenter(n),o.position.sub(n)}function Io(o,e=new t.Vector3(0,0,0)){const n=new t.Box3().setFromObject(o),s=new t.Vector3;n.getCenter(s);const a=new t.Vector3().subVectors(e,s);o.position.add(a)}function Bo(o){o.computeBoundingBox();const n=o.boundingBox.getCenter(new t.Vector3);o.translateX(-n.x),o.translateY(-n.y),o.translateZ(-n.z)}function Co(o,e,n){return Math.max(0,Math.min(1,(o-e)/(n-e)))}function Po(o,e,n,s,a,c=20,r=0,i=1){const l=[];for(let u=0;u<=c;u++){const m=u/c,h=o(Co(m,r,i)),d=e+h*(n-e),y=s+m*(a-s);l.push(new t.Vector2(d,y))}return l}function Eo(o){const n=new t.Box3().setFromObject(o).getCenter(new t.Vector3);o.translateX(-n.x),o.translateY(-n.y),o.translateZ(-n.z),o.updateMatrixWorld(!0)}function Ao(o){o.geometry.computeBoundingBox();const n=o.geometry.boundingBox.getCenter(new t.Vector3);o.geometry.translate(-n.x,-n.y,-n.z)}const Ke=(o,e,n,s,a=24)=>{let c=[];for(let r=0;r<=a;r++){const i=r/a,l=g.CUBIC(i,o.x,e.x,n.x,s.x),u=g.CUBIC(i,o.y,e.y,n.y,s.y);c.push(new t.Vector2(l,u))}return c},Je=(o,e,n,s=24)=>{let a=[];for(let c=0;c<=s;c++){const r=c/s,i=g.DAMPED(r,n)*(e.x-o.x)+o.x,l=o.y+r*(e.y-o.y);a.push(new t.Vector2(i,l))}return a},$e=(o,e,n,s,a=24)=>{let c=[];for(let r=0;r<=a;r++){const i=r/a,l=g.EXPONENTIAL(i,n,s)*(e.x-o.x)+o.x,u=o.y+i*(e.y-o.y);c.push(new t.Vector2(l,u))}return c},We=(o,e,n,s,a=24)=>{let c=[];for(let r=0;r<=a;r++){const i=r/a,l=g.LOGARITHMIC(i,n,s)*(e.x-o.x)+o.x,u=o.y+i*(e.y-o.y);c.push(new t.Vector2(l,u))}return c},et=(o,e,n,s,a,c=24)=>{let r=[];for(let i=0;i<=c;i++){const l=i/c,u=n*l*l+s*l+a+o.x,m=o.y+l*(e.y-o.y);r.push(new t.Vector2(u,m))}return r},tt=(o,e,n,s=24)=>{let a=[];for(let c=0;c<=s;c++){const r=c/s,i=g.QUADRATIC(r,o.x,e.x,n.x),l=g.QUADRATIC(r,o.y,e.y,n.y);a.push(new t.Vector2(i,l))}return a},ot=(o,e,n,s=24)=>{let a=[];for(let c=0;c<=s;c++){const r=c/s,i=g.SIGMOID(r,n)*(e.x-o.x)+o.x,l=o.y+r*(e.y-o.y);a.push(new t.Vector2(i,l))}return a},To={createCubicCurvePoints:Ke,createDampedCurvePoints:Je,createExponentialCurvePoints:$e,createLogarithmicCurvePoints:We,createParabolicCurvePoints:et,createQuadraticCurvePoints:tt,createSigmoidCurvePoints:ot};class ko{static dispose(e){e==null||e.traverse(n=>{n.geometry&&n.geometry.dispose(),n.material&&(Array.isArray(n.material)?n.material.forEach(s=>s.dispose()):n.material.dispose())})}static fadeBetween(e,n,s,a,c=1){const r=new at.EffectComposer(e),i=new q.RenderPass(s,n);r.addPass(i);const l=new ct.ShaderPass(je);l.uniforms.opacity.value=1,r.addPass(l);let u=null;function m(d){u||(u=d);const M=(d-u)/1e3/c;l.uniforms.opacity.value=Math.max(1-M,0),M<1?(r.render(),requestAnimationFrame(m)):(r.passes[0]=new q.RenderPass(a,n),u=null,requestAnimationFrame(h))}function h(d){u||(u=d);const M=(d-u)/1e3/c;l.uniforms.opacity.value=Math.min(M,1),M<1&&(r.render(),requestAnimationFrame(h))}requestAnimationFrame(m)}}exports.Beaker=Zt;exports.BeakerGeometry=Ne;exports.BifurcatedStaircaseGeometry=wt;exports.Bone=mo;exports.BoneGeometry=Fe;exports.Book=At;exports.BookGeometry=O;exports.Bookshelf=qt;exports.BookshelfGeometry=ke;exports.Bottle=Yt;exports.Bubbling=yt;exports.BunsenBurner=Qt;exports.Burst=co;exports.BurstShape=He;exports.Candle=zt;exports.CrossHeadstone=Tt;exports.CrossHeadstoneGeometry=Be;exports.DaySkybox=Go;exports.Desk=Lt;exports.DioramaGeometry=Gt;exports.Direction=b;exports.Easing=Mt;exports.ElectricPanel=jt;exports.ErlenmeyerFlask=Kt;exports.ErlenmeyerFlaskGeometry=Ue;exports.Falloff=E;exports.FenceColumn=Nt;exports.FenceColumnGeometry=Ae;exports.Flask=Jt;exports.Gear=io;exports.GearShape=Ze;exports.Heart=lo;exports.HeartShape=Ye;exports.Hill=Mo;exports.HillGeometry=ze;exports.LShapedStaircaseGeometry=vt;exports.Lantern=Rt;exports.LeverPanel=$t;exports.Mausoleum=kt;exports.Microscope=Wt;exports.Moon=Et;exports.MortarAndPestle=eo;exports.MortarGeometry=_e;exports.MossyRocks=Dt;exports.Mound=yo;exports.MoundGeometry=De;exports.NightSkybox=vo;exports.ObeliskHeadstone=Vt;exports.ObeliskHeadstoneGeometry=Ce;exports.ParametricCurve=g;exports.ParametricCurveUtils=To;exports.Rock=Xt;exports.RockGeometry=Oe;exports.Rocks=Ht;exports.RoundedHeadstone=Ot;exports.RoundedHeadstoneGeometry=Pe;exports.SceneUtils=ko;exports.SimpleLeafGeometry=bt;exports.SpiralStaircaseGeometry=St;exports.SpiralTube=to;exports.SquareHeadstone=Ft;exports.SquareHeadstoneGeometry=Ee;exports.StaircaseGeometry=gt;exports.Stand=oo;exports.StandGeometry=qe;exports.Star=uo;exports.StarShape=Qe;exports.TeslaCoil=no;exports.TestTube=so;exports.TestTubeGeometry=k;exports.TestTubeRack=ro;exports.Tree=ho;exports.TreeGeometry=Xe;exports.TwilightSkybox=So;exports.WineBottle=ao;exports.WineBottleGeometry=Le;exports.WroughtIronBar=Ut;exports.WroughtIronBarGeometry=N;exports.WroughtIronFence=_t;exports.WroughtIronFenceGeometry=Te;exports.addNoiseDisplacement=xo;exports.addWaterDisplacement=fo;exports.capHeightFromRadius=Re;exports.capWidthFromRadius=Bt;exports.cartesianToSpherical=Pt;exports.centerGroup=bo;exports.centerGroupAtTarget=Io;exports.centerInstancedMesh=Bo;exports.centerMesh=Eo;exports.centerMeshGeometry=Ao;exports.checkerboardTexture=go;exports.circularEaseIn=se;exports.circularEaseInOut=ae;exports.circularEaseOut=re;exports.concave=le;exports.convex=ue;exports.createCubicCurvePoints=Ke;exports.createDampedCurvePoints=Je;exports.createExponentialCurvePoints=$e;exports.createLogarithmicCurvePoints=We;exports.createParabolicCurvePoints=et;exports.createQuadraticCurvePoints=tt;exports.createSigmoidCurvePoints=ot;exports.cubicCurve=xe;exports.cubicEaseIn=Z;exports.cubicEaseInOut=Q;exports.cubicEaseOut=Y;exports.dampedCurve=fe;exports.daySkyShader=V;exports.displacementBrush=it;exports.exponentialCurve=we;exports.exponentialEaseIn=te;exports.exponentialEaseInOut=ne;exports.exponentialEaseOut=oe;exports.fadeShader=je;exports.flattenBrush=lt;exports.gaussian=Me;exports.interpolateCurve=Po;exports.inverse=de;exports.linear=ce;exports.logarithmic=me;exports.logarithmicCurve=Ge;exports.logarithmicRandomMax=ge;exports.logarithmicRandomMin=be;exports.nightSkyShader=T;exports.noiseBrush=ut;exports.parabolicCurve=ye;exports.quadraticCurve=pe;exports.quadraticEaseIn=D;exports.quadraticEaseInOut=H;exports.quadraticEaseOut=X;exports.quarticEaseIn=j;exports.quarticEaseInOut=J;exports.quarticEaseOut=K;exports.quinticEaseIn=$;exports.quinticEaseInOut=ee;exports.quinticEaseOut=W;exports.radiusFromCapHeight=It;exports.radiusFromCapWidth=U;exports.randomFloat=Se;exports.randomInteger=ft;exports.randomTransformVertices=Ve;exports.rowOfBooksByCount=pt;exports.rowOfBooksByLength=xt;exports.rowOfBooksByScales=F;exports.sigmoidCurve=ve;exports.sineEaseIn=L;exports.sineEaseInOut=R;exports.sineEaseOut=z;exports.smoothBrush=mt;exports.smoothstep=ie;exports.sphericalToCartesian=Ct;exports.spikeBrush=ht;exports.squareRoot=he;exports.twistBrush=dt;exports.updateNoiseDisplacementTime=wo;exports.updateWaterDisplacementTime=po;
136
136
  //# sourceMappingURL=index.cjs.js.map