three-low-poly 0.9.3 → 0.9.5

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
@@ -1,6 +1,6 @@
1
1
  # Three.js Low Poly
2
2
 
3
- Collection of procedurally generated low poly assets for Three.js.
3
+ Procedurally generated low poly modeling for Three.js.
4
4
 
5
5
  Example Graveyard Scene:
6
6
 
@@ -23,10 +23,10 @@ const rocks = new MossyRocks();
23
23
  scene.add(rocks);
24
24
  ```
25
25
 
26
- See the examples folder for more information.
26
+ See the [examples](https://jasonsturges.com/three-low-poly/) for more information.
27
27
 
28
28
  ## Usage
29
29
 
30
- Assets are procedurally generated and can be customized with parameters, generally featuring a base geometry that can be implemented as a mesh with material.
30
+ Assets are procedurally generated and customized via parameters, generally featuring a base geometry that implements a mesh with material.
31
31
 
32
- In addition to geometries are prefabricated models, either mesh or group that may be directly added to the scene with default materials.
32
+ In addition to geometries are prefabricated models, either mesh or group that may be directly added to the scene featuring default materials.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three"),S=require("three/addons/utils/BufferGeometryUtils.js");class q extends e.Group{constructor(){super();const t=[],o=20,s=new e.SphereGeometry(.1,6,6),n=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,n);l.position.set((Math.random()-.5)*1.5,Math.random()*3,(Math.random()-.5)*1.5),t.push(l),this.add(l)}function r(){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 a(){requestAnimationFrame(a),r()}a()}}class z extends e.BufferGeometry{constructor(t=2,o=.3,s=.6,n=5,r=5,a=Math.PI/4){super();const c=[],l=[];for(let G=0;G<n;G++){const d=G*o,f=d+o,y=G*s,p=y+s;c.push(-t/2,d,y,t/2,d,y,t/2,f,y,-t/2,f,y,-t/2,f,y,t/2,f,y,t/2,f,p,-t/2,f,p);const w=G*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 i=n*o,m=n*s,M=t*2;c.push(-M/2,i,m,M/2,i,m,M/2,i,m+s,-M/2,i,m+s);const u=n*8;l.push(u,u+1,u+2,u,u+2,u+3);for(let G=0;G<2;G++){const d=G===0?1:-1;for(let f=0;f<r;f++){const y=i+f*o,p=y+o,w=d*(M/4),b=m+s,P=f*s*Math.cos(a),F=f*s*Math.sin(a),B=w+d*P-t/2*Math.cos(a),v=w+d*P+t/2*Math.cos(a),g=b+F,L=B+d*s*Math.cos(a),A=v+d*s*Math.cos(a),I=g+s*Math.sin(a);c.push(B,y,g,v,y,g,v,p,g,B,p,g,B,p,g,v,p,g,A,p,I,L,p,I);const x=u+4+G*r*8+f*8;l.push(x,x+1,x+2,x,x+2,x+3),l.push(x+4,x+5,x+6,x+4,x+6,x+7)}}this.setIndex(l),this.setAttribute("position",new e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class R extends e.BufferGeometry{constructor(t=5,o=3,s=5,n=.2){super();const r=[-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],a=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11];this.setIndex(a),this.setAttribute("position",new e.Float32BufferAttribute(r,3)),this.computeVertexNormals()}}class N extends e.BufferGeometry{constructor(t=2,o=.3,s=.5,n=5,r=2){super();const a=[],c=[];for(let M=0;M<n;M++){const u=M*o,G=u+o,d=M*s,f=d+s;a.push(-t/2,u,d,t/2,u,d,t/2,G,d,-t/2,G,d,-t/2,G,d,t/2,G,d,t/2,G,f,-t/2,G,f);const y=M*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=n*o,i=n*s;a.push(-t/2,l,i,t/2,l,i,t/2,l,i+r,-t/2,l,i+r);const m=n*8;c.push(m,m+1,m+2,m,m+2,m+3);for(let M=0;M<n;M++){const u=l+M*o,G=u+o,d=-t/2-M*s,f=d-s;a.push(d,u,i+r,d,u,i+r-t,d,G,i+r-t,d,G,i+r,d,G,i+r,d,G,i+r-t,f,G,i+r-t,f,G,i+r);const y=m+4+M*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(a,3)),this.computeVertexNormals()}}class E extends e.BufferGeometry{constructor(t=1,o=.4,s=.2,n=20,r=2,a=Math.PI/8){super();const c=[],l=[];let i=0;for(let m=0;m<n;m++){const M=r*Math.cos(i),u=r*Math.sin(i),G=m*s,d=G+s;c.push(M-t/2*Math.cos(i),G,u-t/2*Math.sin(i),M+t/2*Math.cos(i),G,u+t/2*Math.sin(i),M+t/2*Math.cos(i),d,u+t/2*Math.sin(i),M-t/2*Math.cos(i),d,u-t/2*Math.sin(i)),c.push(M-t/2*Math.cos(i),d,u-t/2*Math.sin(i),M+t/2*Math.cos(i),d,u+t/2*Math.sin(i),M+t/2*Math.cos(i)-o*Math.sin(i),d,u+t/2*Math.sin(i)+o*Math.cos(i),M-t/2*Math.cos(i)-o*Math.sin(i),d,u-t/2*Math.sin(i)+o*Math.cos(i));const f=m*8;l.push(f,f+1,f+2,f,f+2,f+3),l.push(f+4,f+5,f+6,f+4,f+6,f+7),i+=a}this.setIndex(l),this.setAttribute("position",new e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class U extends e.BufferGeometry{constructor(t=2,o=.3,s=.5,n=10){super();const r=[],a=[];for(let c=0;c<n;c++){const l=c*o,i=l+o,m=c*s,M=m+s;r.push(-t/2,l,m,t/2,l,m,t/2,i,m,-t/2,i,m,-t/2,i,m,t/2,i,m,t/2,i,M,-t/2,i,M);const u=c*8;a.push(u,u+1,u+2,u,u+2,u+3),a.push(u+4,u+6,u+5,u+4,u+7,u+6)}this.setIndex(a),this.setAttribute("position",new e.Float32BufferAttribute(r,3)),this.computeVertexNormals()}}class _ extends e.BufferGeometry{constructor(t=.4,o=1.2,s=.2){super();const n=o*.6,r=new e.BoxGeometry(t/2,n,s);r.translate(0,n/2,0);const a=t*1.5,c=new e.BoxGeometry(a,t/4,s);c.translate(0,n*.75,0),this.copy(S.mergeGeometries([r,c],!0))}}class j extends e.BufferGeometry{constructor(t=1.75,o=.75){super();const s=t*.05,n=t*.15,r=t*.15,a=t*.75;let c=0;const l=new e.BoxGeometry(o,s,o);l.translate(0,c+s/2,0),c+=s;const i=new e.BoxGeometry(o*.8,n,o*.8);i.translate(0,c+n/2,0),c+=n;const m=new e.BoxGeometry(o*.6,r,o*.6);m.translate(0,c+r/2,0),c+=r;const M=new e.BoxGeometry(o*.4,a,o*.4);M.translate(0,c+a/2,0),c+=a;const u=new e.ConeGeometry(o*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);u.translate(0,c+.1/2,0),this.copy(S.mergeGeometries([l,i,m,M,u],!0))}}class O extends e.BufferGeometry{constructor(t=.6,o=1,s=.2){super();const n=o*.7,r=new e.BoxGeometry(t,n,s);r.translate(0,n/2,0);const a=o-n,c=new e.CylinderGeometry(t/2,t/2,s,16,1,!1,0,Math.PI);c.rotateY(Math.PI/2),c.rotateX(Math.PI/2),c.translate(0,n+a/2-s/2-.05,0),this.copy(S.mergeGeometries([r,c],!0))}}class Y extends e.BufferGeometry{constructor(t=.5,o=.8,s=.15){super();const n=new e.BoxGeometry(t,o,s);n.translate(0,o/2,0),this.copy(n)}}class Z extends e.BufferGeometry{constructor(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 n=new e.BoxGeometry(1.4,.3,1.4);n.translate(0,.5+t+.15,0),this.copy(S.mergeGeometries([o,s,n],!0))}}class X extends e.BufferGeometry{constructor(t=2,o=.05,s=.3){super();const n=new e.CylinderGeometry(o,o,t,8);n.translate(0,t/2,0);const r=new e.ConeGeometry(o*1.5,s,8);r.translate(0,t+s/2,0),this.copy(S.mergeGeometries([n,r],!0))}}class H extends e.BufferGeometry{constructor(t=.1){super();const o=[],s=[],n=[[0,1],[.5,.75],[.75,.25],[.5,-.5],[0,-1],[-.5,-.5],[-.75,.25],[-.5,.75]];for(let a=0;a<n.length;a++){const[c,l]=n[a];o.push(c*t,l*t,0)}for(let a=1;a<n.length-1;a++)s.push(0,a,a+1);s.push(0,n.length-1,1);const r=new e.Float32BufferAttribute(o,3);this.setAttribute("position",r),this.setIndex(s),this.computeVertexNormals()}}class J extends e.BufferGeometry{constructor(t=.1,o=.1,s=.4,n=8){super();const r=new e.CylinderGeometry(t*.6,o*.6,s,n);r.translate(0,0,0);const a=new e.SphereGeometry(t,n,n),c=a.clone(),l=a.clone(),i=a.clone(),m=a.clone();c.translate(0,s/2+t*.6,-t*.6),l.translate(0,s/2+t*.6,t*.6),i.translate(0,-s/2-o*.6,-o*.6),m.translate(0,-s/2-o*.6,o*.6),this.copy(S.mergeGeometries([r,c,l,i,m],!0))}}class C 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(S.mergeGeometries([t,o],!0))}}class T 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(S.mergeGeometries([o,s],!0))}}class k extends e.BufferGeometry{constructor(t=.2,o=.2,s=3,n=32,r=!0){super();const a=new e.CylinderGeometry(t,o,s,n,1,r),c=new e.SphereGeometry(o,n,n/2,0,Math.PI*2,Math.PI/2,Math.PI/2);c.translate(0,-(s/2),0),this.copy(S.mergeGeometries([a,c],!0))}}class V extends e.BufferGeometry{constructor({radius:t=.5,neckRadius:o=.2,height:s=3,neckHeight:n=1,segments:r=16}={}){super();const a=s-n,c=new e.CylinderGeometry(t,t,a,r);c.translate(0,a/2,0);const l=.3,i=new e.CylinderGeometry(o,t,l,r);i.translate(0,a+l/2,0);const m=new e.CylinderGeometry(o,o,n,r);m.translate(0,a+l+n/2,0),this.copy(S.mergeGeometries([c,i,m],!0))}}class K 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 e=require("three"),S=require("three/addons/utils/BufferGeometryUtils.js"),j=require("three/addons/objects/Sky.js");class H extends e.Group{constructor(){super();const t=[],s=20,o=new e.SphereGeometry(.1,6,6),n=new e.MeshStandardMaterial({color:16777215,transparent:!0,opacity:.6,roughness:.3,metalness:.3});for(let a=0;a<s;a++){const i=new e.Mesh(o,n);i.position.set((Math.random()-.5)*1.5,Math.random()*3,(Math.random()-.5)*1.5),t.push(i),this.add(i)}function c(){t.forEach(a=>{a.position.y+=.02,a.position.y>3&&(a.position.y=0,a.position.x=(Math.random()-.5)*1.5,a.position.z=(Math.random()-.5)*1.5)})}function r(){requestAnimationFrame(r),c()}r()}}class O extends e.BufferGeometry{constructor(t=2,s=.3,o=.6,n=5,c=5,r=Math.PI/4){super();const a=[],i=[];for(let f=0;f<n;f++){const u=f*s,p=u+s,d=f*o,w=d+o;a.push(-t/2,u,d,t/2,u,d,t/2,p,d,-t/2,p,d,-t/2,p,d,t/2,p,d,t/2,p,w,-t/2,p,w);const G=f*8;i.push(G,G+1,G+2,G,G+2,G+3),i.push(G+4,G+5,G+6,G+4,G+6,G+7)}const l=n*s,m=n*o,M=t*2;a.push(-M/2,l,m,M/2,l,m,M/2,l,m+o,-M/2,l,m+o);const y=n*8;i.push(y,y+1,y+2,y,y+2,y+3);for(let f=0;f<2;f++){const u=f===0?1:-1;for(let p=0;p<c;p++){const d=l+p*s,w=d+s,G=u*(M/4),g=m+o,I=p*o*Math.cos(r),U=p*o*Math.sin(r),b=G+u*I-t/2*Math.cos(r),B=G+u*I+t/2*Math.cos(r),v=g+U,_=b+u*o*Math.cos(r),z=B+u*o*Math.cos(r),T=v+o*Math.sin(r);a.push(b,d,v,B,d,v,B,w,v,b,w,v,b,w,v,B,w,v,z,w,T,_,w,T);const x=y+4+f*c*8+p*8;i.push(x,x+1,x+2,x,x+2,x+3),i.push(x+4,x+5,x+6,x+4,x+6,x+7)}}this.setIndex(i),this.setAttribute("position",new e.Float32BufferAttribute(a,3)),this.computeVertexNormals()}}class Y extends e.BufferGeometry{constructor(t=5,s=3,o=5,n=.2){super();const c=[-t/2,0,-o/2,t/2,0,-o/2,t/2,0,o/2,-t/2,0,o/2,-t/2,0,-o/2,t/2,0,-o/2,t/2,s,-o/2,-t/2,s,-o/2,-t/2,0,-o/2,-t/2,0,o/2,-t/2,s,o/2,-t/2,s,-o/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 e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class Z extends e.BufferGeometry{constructor(t=2,s=.3,o=.5,n=5,c=2){super();const r=[],a=[];for(let M=0;M<n;M++){const y=M*s,f=y+s,u=M*o,p=u+o;r.push(-t/2,y,u,t/2,y,u,t/2,f,u,-t/2,f,u,-t/2,f,u,t/2,f,u,t/2,f,p,-t/2,f,p);const d=M*8;a.push(d,d+1,d+2,d,d+2,d+3),a.push(d+4,d+5,d+6,d+4,d+6,d+7)}const i=n*s,l=n*o;r.push(-t/2,i,l,t/2,i,l,t/2,i,l+c,-t/2,i,l+c);const m=n*8;a.push(m,m+1,m+2,m,m+2,m+3);for(let M=0;M<n;M++){const y=i+M*s,f=y+s,u=-t/2-M*o,p=u-o;r.push(u,y,l+c,u,y,l+c-t,u,f,l+c-t,u,f,l+c,u,f,l+c,u,f,l+c-t,p,f,l+c-t,p,f,l+c);const d=m+4+M*8;a.push(d,d+1,d+2,d,d+2,d+3),a.push(d+4,d+5,d+6,d+4,d+6,d+7)}this.setIndex(a),this.setAttribute("position",new e.Float32BufferAttribute(r,3)),this.computeVertexNormals()}}class X extends e.BufferGeometry{constructor(t=1,s=.4,o=.2,n=20,c=2,r=Math.PI/8){super();const a=[],i=[];let l=0;for(let m=0;m<n;m++){const M=c*Math.cos(l),y=c*Math.sin(l),f=m*o,u=f+o;a.push(M-t/2*Math.cos(l),f,y-t/2*Math.sin(l),M+t/2*Math.cos(l),f,y+t/2*Math.sin(l),M+t/2*Math.cos(l),u,y+t/2*Math.sin(l),M-t/2*Math.cos(l),u,y-t/2*Math.sin(l)),a.push(M-t/2*Math.cos(l),u,y-t/2*Math.sin(l),M+t/2*Math.cos(l),u,y+t/2*Math.sin(l),M+t/2*Math.cos(l)-s*Math.sin(l),u,y+t/2*Math.sin(l)+s*Math.cos(l),M-t/2*Math.cos(l)-s*Math.sin(l),u,y-t/2*Math.sin(l)+s*Math.cos(l));const p=m*8;i.push(p,p+1,p+2,p,p+2,p+3),i.push(p+4,p+5,p+6,p+4,p+6,p+7),l+=r}this.setIndex(i),this.setAttribute("position",new e.Float32BufferAttribute(a,3)),this.computeVertexNormals()}}class J extends e.BufferGeometry{constructor(t=2,s=.3,o=.5,n=10){super();const c=[],r=[];for(let a=0;a<n;a++){const i=a*s,l=i+s,m=a*o,M=m+o;c.push(-t/2,i,m,t/2,i,m,t/2,l,m,-t/2,l,m,-t/2,l,m,t/2,l,m,t/2,l,M,-t/2,l,M);const y=a*8;r.push(y,y+1,y+2,y,y+2,y+3),r.push(y+4,y+6,y+5,y+4,y+7,y+6)}this.setIndex(r),this.setAttribute("position",new e.Float32BufferAttribute(c,3)),this.computeVertexNormals()}}class K extends e.BufferGeometry{constructor(t=.4,s=1.2,o=.2){super();const n=s*.6,c=new e.BoxGeometry(t/2,n,o);c.translate(0,n/2,0);const r=t*1.5,a=new e.BoxGeometry(r,t/4,o);a.translate(0,n*.75,0),this.copy(S.mergeGeometries([c,a],!1))}}class Q extends e.BufferGeometry{constructor(t=1.75,s=.75){super();const o=t*.05,n=t*.15,c=t*.15,r=t*.75;let a=0;const i=new e.BoxGeometry(s,o,s);i.translate(0,a+o/2,0),a+=o;const l=new e.BoxGeometry(s*.8,n,s*.8);l.translate(0,a+n/2,0),a+=n;const m=new e.BoxGeometry(s*.6,c,s*.6);m.translate(0,a+c/2,0),a+=c;const M=new e.BoxGeometry(s*.4,r,s*.4);M.translate(0,a+r/2,0),a+=r;const y=new e.ConeGeometry(s*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);y.translate(0,a+.1/2,0),this.copy(S.mergeGeometries([i,l,m,M,y],!1))}}class $ extends e.BufferGeometry{constructor(t=.6,s=1,o=.2){super();const n=s*.7,c=new e.BoxGeometry(t,n,o);c.translate(0,n/2,0);const r=s-n,a=new e.CylinderGeometry(t/2,t/2,o,16,1,!1,0,Math.PI);a.rotateY(Math.PI/2),a.rotateX(Math.PI/2),a.translate(0,n+r/2-o/2-.05,0),this.copy(S.mergeGeometries([c,a],!1))}}class D extends e.BufferGeometry{constructor(t=.5,s=.8,o=.15){super();const n=new e.BoxGeometry(t,s,o);n.translate(0,s/2,0),this.copy(n)}}class R extends e.BufferGeometry{constructor(t=2.25){super();const s=new e.BoxGeometry(1.2,.5,1.2);s.translate(0,.25,0);const o=new e.BoxGeometry(1,t,1);o.translate(0,.5+t/2,0);const n=new e.BoxGeometry(1.4,.3,1.4);n.translate(0,.5+t+.15,0),this.copy(S.mergeGeometries([s,o,n],!1))}}class W extends e.BufferGeometry{constructor(t=2,s=.05,o=.3){super();const n=new e.CylinderGeometry(s,s,t,8);n.translate(0,t/2,0);const c=new e.ConeGeometry(s*1.5,o,8);c.translate(0,t+o/2,0),this.copy(S.mergeGeometries([n,c],!1))}}class ee extends e.BufferGeometry{constructor(t=.1){super();const s=[],o=[],n=[[0,1],[.5,.75],[.75,.25],[.5,-.5],[0,-1],[-.5,-.5],[-.75,.25],[-.5,.75]];for(let r=0;r<n.length;r++){const[a,i]=n[r];s.push(a*t,i*t,0)}for(let r=1;r<n.length-1;r++)o.push(0,r,r+1);o.push(0,n.length-1,1);const c=new e.Float32BufferAttribute(s,3);this.setAttribute("position",c),this.setIndex(o),this.computeVertexNormals()}}class te extends e.BufferGeometry{constructor(t=.1,s=.1,o=.4,n=8){super();const c=new e.CylinderGeometry(t*.6,s*.6,o,n);c.translate(0,0,0);const r=new e.SphereGeometry(t,n,n),a=r.clone(),i=r.clone(),l=r.clone(),m=r.clone();a.translate(0,o/2+t*.6,-t*.6),i.translate(0,o/2+t*.6,t*.6),l.translate(0,-o/2-s*.6,-s*.6),m.translate(0,-o/2-s*.6,s*.6),this.copy(S.mergeGeometries([c,a,i,l,m],!1))}}class V extends e.BufferGeometry{constructor(){super();const t=new e.SphereGeometry(1,16,16),s=new e.CylinderGeometry(.2,.2,2,16,1,!0);s.translate(0,1.5,0),s.rotateX(Math.PI/2),this.copy(S.mergeGeometries([t,s],!1))}}class F 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)],s=new e.LatheGeometry(t,12),o=new e.CircleGeometry(1,12);o.rotateX(-Math.PI/2),o.translate(0,0,0),this.copy(S.mergeGeometries([s,o],!1))}}class P extends e.BufferGeometry{constructor(t=.2,s=.2,o=3,n=32,c=!0){super();const r=new e.CylinderGeometry(t,s,o,n,1,c),a=new e.SphereGeometry(s,n,n/2,0,Math.PI*2,Math.PI/2,Math.PI/2);a.translate(0,-(o/2),0),this.copy(S.mergeGeometries([r,a],!1))}}class L extends e.BufferGeometry{constructor({radius:t=.5,neckRadius:s=.2,height:o=3,neckHeight:n=1,segments:c=16}={}){super();const r=o-n,a=new e.CylinderGeometry(t,t,r,c);a.translate(0,r/2,0);const i=.3,l=new e.CylinderGeometry(s,t,i,c);l.translate(0,r+i/2,0);const m=new e.CylinderGeometry(s,s,n,c);m.translate(0,r+i+n/2,0),this.copy(S.mergeGeometries([a,l,m],!1))}}class oe extends e.Group{constructor(){super();const t=new e.SphereGeometry(5,32,32),s=new e.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
2
2
  varying vec3 vNormal;
3
3
  varying vec3 vPosition;
4
4
  void main() {
@@ -35,7 +35,21 @@
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 Q 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 n=new e.BoxGeometry(4,3,4),r=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),a=new e.Mesh(n,r);a.position.set(0,2.5,0),this.add(a);const c=new e.ConeGeometry(3.5,2,4),l=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),i=new e.Mesh(c,l);i.rotation.y=Math.PI/4,i.position.set(0,5,0),this.add(i);const m=new e.CylinderGeometry(.2,.2,3.5,16),M=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 b=new e.Mesh(m,M);b.position.set(...w),this.add(b)});const G=new e.Shape;G.moveTo(-1,0),G.lineTo(-1,2),G.absarc(0,2,1,Math.PI,0,!0),G.lineTo(1,0);const d={depth:.5,bevelEnabled:!1},f=new e.ExtrudeGeometry(G,d),y=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),p=new e.Mesh(f,y);p.position.set(0,.5,1.7),this.add(p)}}class $ 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 n=[];n.push(new e.Vector2(.2,0)),n.push(new e.Vector2(.25,.5)),n.push(new e.Vector2(.15,1.5)),n.push(new e.Vector2(.3,3));const r=new e.LatheGeometry(n,32),a=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 i=new e.Mesh(r,a);i.position.set(...l),this.add(i)}),this.add(s)}}class D 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),n=new e.MeshBasicMaterial({color:16753920});this.flame=new e.Mesh(s,n),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 W extends e.Group{constructor(t=1.3,o=.5){super();const s=new e.CylinderGeometry(o,o,.2,16),n=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),r=new e.Mesh(s,n);r.position.set(0,0,0),this.add(r);const a=new e.CylinderGeometry(o*.9,o*.9,t),c=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),l=new e.Mesh(a,c);l.position.set(0,t/2+.1,0),this.add(l);const i=new e.ConeGeometry(o*1.1,.5,8),m=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),M=new e.Mesh(i,m);M.position.set(0,t+.35,0),this.add(M);const u=new e.TorusGeometry(o*.8,.05,8,16),G=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),d=new e.Mesh(u,G);d.position.set(0,t+.85,0),this.add(d);const f=new e.PointLight(16755200,1.5,15);f.position.set(0,t/2+.1,0),f.castShadow=!0,this.add(f)}}class ee 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 n=0;n<5;n++){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);const a=new e.Mesh(t,s);a.scale.set(r.scale.x*.9,r.scale.y*.5,r.scale.z*.9),a.rotation.copy(r.rotation),a.position.copy(r.position),a.position.y+=.3,this.add(a)}}}class te 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 n=new e.Mesh(t,o);n.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),n.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),n.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(n)}}}class oe extends e.Group{constructor(){super();const t=new C,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 se extends e.Group{constructor(){super();const t=new e.BoxGeometry(1.6,.05,2.1),o=new e.MeshStandardMaterial({color:9109504}),s=new e.Mesh(t,o),n=new e.Mesh(t,o);s.position.set(0,.125,0),n.position.set(0,-.125,0);const r=new e.BoxGeometry(1.55,.2,2),a=new e.MeshStandardMaterial({color:16777215}),c=new e.Mesh(r,a);c.position.set(-.025,0,0);const l=new e.BoxGeometry(.05,.25,2.1),i=new e.MeshStandardMaterial({color:4915200}),m=new e.Mesh(l,i);m.position.set(-.8,0,0),this.add(s),this.add(n),this.add(c),this.add(m)}}class ne 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),n=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.5,roughness:.1,metalness:.3}),r=new e.MeshStandardMaterial({color:16724838,transparent:!0,opacity:.6}),a=new e.MeshStandardMaterial({color:9127187,roughness:1}),c=new e.Mesh(o,n),l=new e.Mesh(o,r),i=new e.Mesh(s,a);l.scale.set(.8,.8,.8),l.position.y=.1,i.position.y=2.5;const m=new e.Group;m.add(c,l,i),this.add(m)}}class re 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 n=new e.CylinderGeometry(.1,.1,.7,16),r=new e.MeshStandardMaterial({color:5592405,roughness:.5,metalness:.4}),a=new e.Mesh(n,r);a.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}),i=new e.Mesh(c,l);i.position.y=.8,this.add(s,a,i)}}class ae 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),n=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7}),r=new e.CylinderGeometry(.3,.3,.1,16),a=new e.MeshStandardMaterial({color:5592405,roughness:.7,metalness:.5}),c=new e.Mesh(t,o);for(let y=-1;y<=1;y++){const p=new e.Mesh(s,n);p.position.set(y,1.5,.1),c.add(p)}const l=new e.Mesh(r,a);l.rotation.x=Math.PI/2,l.position.set(0,.5,.15),c.add(l);const i=new e.SphereGeometry(.15,8,8),m=new e.MeshStandardMaterial({color:16711680,emissive:16711680,emissiveIntensity:.5}),M=new e.Mesh(i,m);M.position.set(0,-1,.1),c.add(M),this.add(c);let u=.015,G=.8,d=.2;function f(){requestAnimationFrame(f);const y=d+Math.abs(Math.sin(Date.now()*u))*(G-d);M.material.emissiveIntensity=y}f()}}class ce 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),n=new e.MeshStandardMaterial({color:8965290,transparent:!0,opacity:.4,roughness:.1,metalness:.5}),r=new e.MeshStandardMaterial({color:9127187,roughness:1}),a=new e.Mesh(o,n),c=new e.Mesh(s,r);c.position.y=3.5,this.add(a,c)}}class ie 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),n=new e.CylinderGeometry(.1,.1,.2,8),r=new e.CylinderGeometry(.05,.05,1,8),a=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7});for(let c=-.5;c<=.5;c+=.5){const l=new e.Mesh(n,a);l.position.set(c,1,.1);const i=new e.Mesh(r,a);i.position.y=.5,l.add(i),this.add(l)}this.add(s)}}class le 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 n=new e.BoxGeometry(.2,1,.2),r=new e.Mesh(n,o);r.position.set(0,.6,-.2);const a=new e.CylinderGeometry(.1,.1,.4,8),c=new e.MeshStandardMaterial({color:3355443,roughness:.5,metalness:.6}),l=new e.Mesh(a,c);l.position.set(0,1.1,-.35),l.rotation.x=-Math.PI/4;const i=new e.BoxGeometry(.6,.1,.6),m=new e.MeshStandardMaterial({color:5592405,roughness:.8,metalness:.2}),M=new e.Mesh(i,m);M.position.set(0,.6,0),this.add(s,r,l,M)}}class me extends e.Group{constructor(){super();const t=new T,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}),n=new e.MeshStandardMaterial({color:9132587,roughness:.8,metalness:.1}),r=new e.Mesh(t,s),a=new e.Mesh(o,n);a.position.set(.3,1.3,0),a.rotation.z=Math.PI/4,this.add(r,a)}}class ue extends e.Group{constructor(){super();const t=100,o=.05,s=new e.CatmullRomCurve3(Array.from({length:t},(i,m)=>{const M=m*.2;return new e.Vector3(Math.cos(M)*.4,m*o,Math.sin(M)*.4)})),n=new e.TubeGeometry(s,200,.1,8,!1),r=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.3,roughness:.1,metalness:.2,emissive:8965375}),a=new e.Mesh(n,r);this.add(a);function c(){r.emissiveIntensity=.2+Math.sin(Date.now()*.005)*.1}function l(){requestAnimationFrame(l),c()}l()}}class Me extends e.Group{constructor(){super();const t=new e.TorusGeometry(.3,.03,8,16),o=new e.MeshStandardMaterial({color:8947848,roughness:.7,metalness:.3}),s=new e.Mesh(t,o);s.rotation.x=Math.PI/2,s.position.y=.4;const n=new e.CylinderGeometry(.02,.02,.4,8),r=new e.MeshStandardMaterial({color:6710886,roughness:.8,metalness:.3}),a=[];for(let c=0;c<3;c++){const l=c/3*Math.PI*2,i=new e.Mesh(n,r);i.position.set(Math.cos(l)*.25,.2,Math.sin(l)*.25),a.push(i)}this.add(s,...a)}}class he 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 n=new e.CylinderGeometry(.15,.15,2,12,1,!0),r=new e.MeshStandardMaterial({color:16737792,roughness:.5,metalness:.8,side:e.DoubleSide}),a=new e.Mesh(n,r);a.position.y=1.3;const c=new e.SphereGeometry(.3,16,16),l=new e.Mesh(c,r);l.position.y=2.4,this.add(s,a,l);const i=[];for(let u=0;u<5;u++){const G=new e.LineBasicMaterial({color:10079487}),d=[new e.Vector3(0,2.4,0),new e.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)],f=new e.BufferGeometry().setFromPoints(d),y=new e.Line(f,G);this.add(y),i.push(y)}function m(){i.forEach(u=>{const G=[new e.Vector3(0,2.4,0),new e.Vector3((Math.random()-.5)*1.5,Math.random()*2.4,(Math.random()-.5)*1.5)];u.geometry.setFromPoints(G)})}function M(){requestAnimationFrame(M),m()}M()}}class ye extends e.Group{constructor(t=.2,o=.2,s=3,n=32){super();const r=new k(t,o,s,n),a=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide}),c=new e.Mesh(r,a);this.add(c)}}class de extends e.Group{constructor(t=3,o=[65450,16711850,11141375]){super();const s=new e.BoxGeometry(3,.2,1),n=new e.MeshStandardMaterial({color:9127187,roughness:.7,metalness:.3}),r=new e.Mesh(s,n);r.position.y=.5;const a=new k(.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 i=new e.Mesh(a,c),m=(l-(t-1)/2)*.8;i.position.set(m,1,0);const M=new k(.099,.099,.5,16,!1),u=o[l%o.length],G=new e.MeshStandardMaterial({color:u,emissive:u,emissiveIntensity:.5,transparent:!0,opacity:.6}),d=new e.Mesh(M,G);d.position.set(0,-.25,0),i.add(d),r.add(i)}this.add(r)}}class Ge extends e.Mesh{constructor(){super();const t=new V,o=new e.MeshPhysicalMaterial({color:5597999,roughness:.1,transmission:.9,thickness:.2,metalness:0,clearcoat:1,clearcoatRoughness:.1});this.geometry=t,this.material=o}}const fe={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
38
+ `}),o=new e.Mesh(t,s);this.add(o)}}class se extends e.Group{constructor(){super();const t=new e.BoxGeometry(5,1,5),s=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),o=new e.Mesh(t,s);o.position.set(0,.5,0),this.add(o);const n=new e.BoxGeometry(4,3,4),c=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),r=new e.Mesh(n,c);r.position.set(0,2.5,0),this.add(r);const a=new e.ConeGeometry(3.5,2,4),i=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),l=new e.Mesh(a,i);l.rotation.y=Math.PI/4,l.position.set(0,5,0),this.add(l);const m=new e.CylinderGeometry(.2,.2,3.5,16),M=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(G=>{const g=new e.Mesh(m,M);g.position.set(...G),this.add(g)});const f=new e.Shape;f.moveTo(-1,0),f.lineTo(-1,2),f.absarc(0,2,1,Math.PI,0,!0),f.lineTo(1,0);const u={depth:.5,bevelEnabled:!1},p=new e.ExtrudeGeometry(f,u),d=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),w=new e.Mesh(p,d);w.position.set(0,.5,1.7),this.add(w)}}class ne extends e.Group{constructor(){super();const t=new e.BoxGeometry(5,.3,3),s=new e.MeshStandardMaterial({color:9132587}),o=new e.Mesh(t,s);o.position.set(0,3.15,0);const n=[];n.push(new e.Vector2(.2,0)),n.push(new e.Vector2(.25,.5)),n.push(new e.Vector2(.15,1.5)),n.push(new e.Vector2(.3,3));const c=new e.LatheGeometry(n,32),r=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(i=>{const l=new e.Mesh(c,r);l.position.set(...i),this.add(l)}),this.add(o)}}class re extends e.Group{constructor(t=1,s=.2){super(),this.height=t,this.radius=s,this.createCandle(),this.animateFlicker()}createCandle(){const t=new e.CylinderGeometry(this.radius,this.radius,this.height,32),s=new e.MeshStandardMaterial({color:16777215});this.candle=new e.Mesh(t,s),this.candle.position.set(0,this.height/2,0),this.add(this.candle);const o=new e.SphereGeometry(.05,16,16),n=new e.MeshBasicMaterial({color:16753920});this.flame=new e.Mesh(o,n),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 ae extends e.Group{constructor(t=1.3,s=.5){super();const o=new e.CylinderGeometry(s,s,.2,16),n=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),c=new e.Mesh(o,n);c.position.set(0,0,0),this.add(c);const r=new e.CylinderGeometry(s*.9,s*.9,t),a=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),i=new e.Mesh(r,a);i.position.set(0,t/2+.1,0),this.add(i);const l=new e.ConeGeometry(s*1.1,.5,8),m=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),M=new e.Mesh(l,m);M.position.set(0,t+.35,0),this.add(M);const y=new e.TorusGeometry(s*.8,.05,8,16),f=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),u=new e.Mesh(y,f);u.position.set(0,t+.85,0),this.add(u);const p=new e.PointLight(16755200,1.5,15);p.position.set(0,t/2+.1,0),p.castShadow=!0,this.add(p)}}class ce extends e.Group{constructor(){super();const t=new e.DodecahedronGeometry(1,0),s=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),o=new e.MeshStandardMaterial({color:4950843,flatShading:!0,opacity:.8,transparent:!0});for(let n=0;n<5;n++){const c=new e.Mesh(t,s);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 e.Mesh(t,o);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 ie extends e.Group{constructor(){super();const t=new e.DodecahedronGeometry(1,0),s=new e.MeshStandardMaterial({color:8421504,flatShading:!0});for(let o=0;o<5;o++){const n=new e.Mesh(t,s);n.scale.set(.8+Math.random()*.4,.8+Math.random()*.4,.8+Math.random()*.4),n.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),n.position.set((Math.random()-.5)*4,0,(Math.random()-.5)*4),this.add(n)}}}class le extends e.Group{constructor(){super();const t=new V,s=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide}),o=new e.Mesh(t,s);o.rotation.x=-Math.PI/2,this.add(o)}}class me extends e.Group{constructor(){super();const t=new e.BoxGeometry(1.6,.05,2.1),s=new e.MeshStandardMaterial({color:9109504}),o=new e.Mesh(t,s),n=new e.Mesh(t,s);o.position.set(0,.125,0),n.position.set(0,-.125,0);const c=new e.BoxGeometry(1.55,.2,2),r=new e.MeshStandardMaterial({color:16777215}),a=new e.Mesh(c,r);a.position.set(-.025,0,0);const i=new e.BoxGeometry(.05,.25,2.1),l=new e.MeshStandardMaterial({color:4915200}),m=new e.Mesh(i,l);m.position.set(-.8,0,0),this.add(o),this.add(n),this.add(a),this.add(m)}}class he 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)],s=new e.LatheGeometry(t,10),o=new e.CylinderGeometry(.3,.4,.2,8),n=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.5,roughness:.1,metalness:.3}),c=new e.MeshStandardMaterial({color:16724838,transparent:!0,opacity:.6}),r=new e.MeshStandardMaterial({color:9127187,roughness:1}),a=new e.Mesh(s,n),i=new e.Mesh(s,c),l=new e.Mesh(o,r);i.scale.set(.8,.8,.8),i.position.y=.1,l.position.y=2.5;const m=new e.Group;m.add(a,i,l),this.add(m)}}class Me extends e.Group{constructor(){super();const t=new e.CylinderGeometry(.3,.4,.1,16),s=new e.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.3}),o=new e.Mesh(t,s);o.position.y=.05;const n=new e.CylinderGeometry(.1,.1,.7,16),c=new e.MeshStandardMaterial({color:5592405,roughness:.5,metalness:.4}),r=new e.Mesh(n,c);r.position.y=.4;const a=new e.ConeGeometry(.075,.2,16),i=new e.MeshStandardMaterial({color:16733440,emissive:16733440,emissiveIntensity:.6,transparent:!0,opacity:.8}),l=new e.Mesh(a,i);l.position.y=.8,this.add(o,r,l)}}class ye extends e.Group{constructor(){super();const t=new e.BoxGeometry(3,4,.1),s=new e.MeshStandardMaterial({color:3026478,roughness:.8,metalness:.6}),o=new e.BoxGeometry(.2,.5,.2),n=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7}),c=new e.CylinderGeometry(.3,.3,.1,16),r=new e.MeshStandardMaterial({color:5592405,roughness:.7,metalness:.5}),a=new e.Mesh(t,s);for(let d=-1;d<=1;d++){const w=new e.Mesh(o,n);w.position.set(d,1.5,.1),a.add(w)}const i=new e.Mesh(c,r);i.rotation.x=Math.PI/2,i.position.set(0,.5,.15),a.add(i);const l=new e.SphereGeometry(.15,8,8),m=new e.MeshStandardMaterial({color:16711680,emissive:16711680,emissiveIntensity:.5}),M=new e.Mesh(l,m);M.position.set(0,-1,.1),a.add(M),this.add(a);let y=.015,f=.8,u=.2;function p(){requestAnimationFrame(p);const d=u+Math.abs(Math.sin(Date.now()*y))*(f-u);M.material.emissiveIntensity=d}p()}}class de 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)],s=new e.LatheGeometry(t,12),o=new e.CylinderGeometry(.6,.7,.3,8),n=new e.MeshStandardMaterial({color:8965290,transparent:!0,opacity:.4,roughness:.1,metalness:.5}),c=new e.MeshStandardMaterial({color:9127187,roughness:1}),r=new e.Mesh(s,n),a=new e.Mesh(o,c);a.position.y=3.5,this.add(r,a)}}class ue extends e.Group{constructor(){super();const t=new e.BoxGeometry(2,3,.1),s=new e.MeshStandardMaterial({color:3355443,roughness:.8,metalness:.5}),o=new e.Mesh(t,s),n=new e.CylinderGeometry(.1,.1,.2,8),c=new e.CylinderGeometry(.05,.05,1,8),r=new e.MeshStandardMaterial({color:11184810,roughness:.5,metalness:.7});for(let a=-.5;a<=.5;a+=.5){const i=new e.Mesh(n,r);i.position.set(a,1,.1);const l=new e.Mesh(c,r);l.position.y=.5,i.add(l),this.add(i)}this.add(o)}}class fe extends e.Group{constructor(){super();const t=new e.BoxGeometry(1,.2,.5),s=new e.MeshStandardMaterial({color:4473924,roughness:.6,metalness:.3}),o=new e.Mesh(t,s);o.position.y=.1;const n=new e.BoxGeometry(.2,1,.2),c=new e.Mesh(n,s);c.position.set(0,.6,-.2);const r=new e.CylinderGeometry(.1,.1,.4,8),a=new e.MeshStandardMaterial({color:3355443,roughness:.5,metalness:.6}),i=new e.Mesh(r,a);i.position.set(0,1.1,-.35),i.rotation.x=-Math.PI/4;const l=new e.BoxGeometry(.6,.1,.6),m=new e.MeshStandardMaterial({color:5592405,roughness:.8,metalness:.2}),M=new e.Mesh(l,m);M.position.set(0,.6,0),this.add(o,c,i,M)}}class pe extends e.Group{constructor(){super();const t=new F,s=new e.CylinderGeometry(.2,.3,1.5,8);s.translate(0,.75,0);const o=new e.MeshStandardMaterial({color:6045747,roughness:1,metalness:0,side:e.DoubleSide}),n=new e.MeshStandardMaterial({color:9132587,roughness:.8,metalness:.1}),c=new e.Mesh(t,o),r=new e.Mesh(s,n);r.position.set(.3,1.3,0),r.rotation.z=Math.PI/4,this.add(c,r)}}class Ge extends e.Group{constructor(){super();const t=100,s=.05,o=new e.CatmullRomCurve3(Array.from({length:t},(l,m)=>{const M=m*.2;return new e.Vector3(Math.cos(M)*.4,m*s,Math.sin(M)*.4)})),n=new e.TubeGeometry(o,200,.1,8,!1),c=new e.MeshStandardMaterial({color:8965375,transparent:!0,opacity:.3,roughness:.1,metalness:.2,emissive:8965375}),r=new e.Mesh(n,c);this.add(r);function a(){c.emissiveIntensity=.2+Math.sin(Date.now()*.005)*.1}function i(){requestAnimationFrame(i),a()}i()}}class we extends e.Group{constructor(){super();const t=new e.TorusGeometry(.3,.03,8,16),s=new e.MeshStandardMaterial({color:8947848,roughness:.7,metalness:.3}),o=new e.Mesh(t,s);o.rotation.x=Math.PI/2,o.position.y=.4;const n=new e.CylinderGeometry(.02,.02,.4,8),c=new e.MeshStandardMaterial({color:6710886,roughness:.8,metalness:.3}),r=[];for(let a=0;a<3;a++){const i=a/3*Math.PI*2,l=new e.Mesh(n,c);l.position.set(Math.cos(i)*.25,.2,Math.sin(i)*.25),r.push(l)}this.add(o,...r)}}class xe extends e.Group{constructor(){super();const t=new e.CylinderGeometry(.5,.6,.3,16),s=new e.MeshStandardMaterial({color:3355443,roughness:.6,metalness:.5}),o=new e.Mesh(t,s);o.position.y=.15;const n=new e.CylinderGeometry(.15,.15,2,12,1,!0),c=new e.MeshStandardMaterial({color:16737792,roughness:.5,metalness:.8,side:e.DoubleSide}),r=new e.Mesh(n,c);r.position.y=1.3;const a=new e.SphereGeometry(.3,16,16),i=new e.Mesh(a,c);i.position.y=2.4,this.add(o,r,i);const l=[];for(let y=0;y<5;y++){const f=new e.LineBasicMaterial({color:10079487}),u=[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(u),d=new e.Line(p,f);this.add(d),l.push(d)}function m(){l.forEach(y=>{const 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)];y.geometry.setFromPoints(f)})}function M(){requestAnimationFrame(M),m()}M()}}class Se extends e.Group{constructor(t=.2,s=.2,o=3,n=32){super();const c=new P(t,s,o,n),r=new e.MeshPhysicalMaterial({color:8965375,transparent:!0,opacity:.4,roughness:.1,metalness:.1,reflectivity:.8,transmission:.9,side:e.DoubleSide}),a=new e.Mesh(c,r);this.add(a)}}class ve extends e.Group{constructor(t=3,s=[65450,16711850,11141375]){super();const o=new e.BoxGeometry(3,.2,1),n=new e.MeshStandardMaterial({color:9127187,roughness:.7,metalness:.3}),c=new e.Mesh(o,n);c.position.y=.5;const r=new P(.1,.1,1,16),a=new e.MeshStandardMaterial({color:11184810,transparent:!0,opacity:.4,roughness:.1,metalness:.5,side:e.DoubleSide});for(let i=0;i<t;i++){const l=new e.Mesh(r,a),m=(i-(t-1)/2)*.8;l.position.set(m,1,0);const M=new P(.099,.099,.5,16,!1),y=s[i%s.length],f=new e.MeshStandardMaterial({color:y,emissive:y,emissiveIntensity:.5,transparent:!0,opacity:.6}),u=new e.Mesh(M,f);u.position.set(0,-.25,0),l.add(u),c.add(l)}this.add(c)}}class ge extends e.Mesh{constructor(){super();const t=new L,s=new e.MeshPhysicalMaterial({color:5597999,roughness:.1,transmission:.9,thickness:.2,metalness:0,clearcoat:1,clearcoatRoughness:.1});this.geometry=t,this.material=s}}class q extends e.Shape{constructor(t=5,s=.5,o=1){super();const n=Math.PI*2/t,c=n/2,r=n/4;this.moveTo(Math.cos(0)*o,-Math.sin(0)*o);for(let a=1;a<=t;++a){let i=Math.cos(n*a-r*3)*(s/Math.cos(r)),l=-Math.sin(n*a-r*3)*(s/Math.cos(r)),m=Math.cos(n*a-c)*s,M=-Math.sin(n*a-c)*s;this.quadraticCurveTo(i,l,m,M),i=Math.cos(n*a-r)*(s/Math.cos(r)),l=-Math.sin(n*a-r)*(s/Math.cos(r)),m=Math.cos(n*a)*o,M=-Math.sin(n*a)*o,this.quadraticCurveTo(i,l,m,M)}this.closePath()}}class be extends e.Mesh{constructor(t=5,s=.5,o=1,n=.25){super();const c=new q(t,s,o),r=new e.ExtrudeGeometry(c,{depth:n,bevelEnabled:n>0,bevelThickness:0,bevelSize:0}),a=new e.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});r.center(),this.geometry=r,this.material=a}}class A extends e.Shape{constructor(t=5,s=.5,o=1,n=5,c=.25){super();const r=Math.PI*2/t,a=r/4;this.moveTo(Math.cos(0)*o,-Math.sin(0)*o);for(let i=1;i<=t;++i)this.lineTo(Math.cos(r*i-a*3)*s,-Math.sin(r*i-a*3)*s),this.lineTo(Math.cos(r*i-a*2)*s,-Math.sin(r*i-a*2)*s),this.lineTo(Math.cos(r*i-a)*o,-Math.sin(r*i-a)*o),this.lineTo(Math.cos(r*i)*o,-Math.sin(r*i)*o);if(this.closePath(),c>0&&n>2){const i=new e.Path,l=Math.PI*2/n;i.moveTo(Math.cos(0)*c,-Math.sin(0)*c);for(let m=1;m<n;++m)i.lineTo(Math.cos(l*m)*c,-Math.sin(l*m)*c);i.lineTo(Math.cos(0)*c,-Math.sin(0)*c),this.holes.push(i)}}}class Be extends e.Mesh{constructor(t=5,s=.5,o=1,n=5,c=.25,r=.25){super();const a=new A(t,s,o,n,c),i=new e.ExtrudeGeometry(a,{depth:r,bevelEnabled:r>0,bevelThickness:0,bevelSize:0}),l=new e.MeshStandardMaterial({color:11184810,metalness:.8,roughness:.2,reflectivity:.5});i.center(),this.geometry=i,this.material=l}}class E extends e.Shape{constructor(t=1,s=2.1,o=1.4,n=1.6){super(),this.moveTo(0,o*t/3),this.bezierCurveTo(-s*.375*t,o*t,-s*t,o*t/3,0,-n*t),this.bezierCurveTo(s*t,o*t/3,s*.375*t,o*t,0,o*t/3)}}class ke extends e.Mesh{constructor(t=1,s=1,o=1,n=10,c=.25){super();const r=new E(t,s,o,n),a=new e.ExtrudeGeometry(r,{depth:c,bevelEnabled:c>0,bevelThickness:0,bevelSize:0}),i=new e.MeshStandardMaterial({color:12986408,emissive:12981270,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});a.center(),this.geometry=a,this.material=i}}class N extends e.Shape{constructor(t=5,s=.5,o=1){super();const n=Math.PI*2/t,c=n/2;this.moveTo(Math.cos(0)*o,Math.sin(0)*o);for(let r=1;r<=t;++r)this.lineTo(Math.cos(n*r-c)*s,Math.sin(n*r-c)*s),this.lineTo(Math.cos(n*r)*o,Math.sin(n*r)*o);this.closePath()}}class Pe extends e.Mesh{constructor(t=5,s=.5,o=1,n=.25){super();const c=new N(t,s,o),r=new e.ExtrudeGeometry(c,{depth:n,bevelEnabled:n>0,bevelThickness:0,bevelSize:0}),a=new e.MeshStandardMaterial({color:16776960,emissive:16766720,emissiveIntensity:.25,metalness:.1,roughness:.3,flatShading:!0});r.center(),this.geometry=r,this.material=a}}const C={uniforms:{},vertexShader:`
39
+ varying vec3 vPosition;
40
+ void main() {
41
+ vPosition = position;
42
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
43
+ }
44
+ `,fragmentShader:`
45
+ varying vec3 vPosition;
46
+ void main() {
47
+ float y = normalize(vPosition).y * 0.5 + 0.5; // Normalizing y to range 0 to 1
48
+ vec3 topColor = vec3(0.5, 0.8, 1.0); // Light blue
49
+ vec3 bottomColor = vec3(1.0, 1.0, 1.0); // Light white/gray for the horizon
50
+ gl_FragColor = vec4(mix(bottomColor, topColor, y), 1.0);
51
+ }
52
+ `},Ce={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
39
53
  varying vec2 vUv;
40
54
  void main() {
41
55
  vUv = uv;
@@ -49,5 +63,22 @@
49
63
  vec4 texel = texture2D(tDiffuse, vUv);
50
64
  gl_FragColor = opacity * texel;
51
65
  }
52
- `},we=h=>{const t=new Uint8Array(4*h*h);for(let s=0;s<h*h;s++){const n=s*4,r=(s%h^Math.floor(s/h))&1?255:0;t[n]=r,t[n+1]=r,t[n+2]=r,t[n+3]=255}const o=new e.DataTexture(t,h,h,e.RGBAFormat,e.UnsignedByteType);return o.wrapS=e.RepeatWrapping,o.wrapT=e.RepeatWrapping,o.minFilter=e.NearestFilter,o.needsUpdate=!0,o};exports.Beaker=oe;exports.BeakerGeometry=C;exports.BifurcatedStaircaseGeometry=z;exports.BoneGeometry=J;exports.Book=se;exports.Bottle=ne;exports.Bubbling=q;exports.BunsenBurner=re;exports.Candle=D;exports.CrossHeadstoneGeometry=_;exports.Desk=$;exports.DioramaGeometry=R;exports.ElectricPanel=ae;exports.FenceColumn=Z;exports.Flask=ce;exports.LShapedStaircaseGeometry=N;exports.Lantern=W;exports.LeverPanel=ie;exports.Mausoleum=Q;exports.Microscope=le;exports.Moon=K;exports.MortarAndPestle=me;exports.MortarGeometry=T;exports.MossyRocks=ee;exports.ObeliskHeadstoneGeometry=j;exports.Rocks=te;exports.RoundedHeadstoneGeometry=O;exports.SimpleLeafGeometry=H;exports.SpiralStaircaseGeometry=E;exports.SpiralTube=ue;exports.SquareHeadstoneGeometry=Y;exports.StaircaseGeometry=U;exports.Stand=Me;exports.TeslaCoil=he;exports.TestTube=ye;exports.TestTubeGeometry=k;exports.TestTubeRack=de;exports.WineBottle=Ge;exports.WineBottleGeometry=V;exports.WroughtIronBarGeometry=X;exports.checkerboardTexture=we;exports.fadeShader=fe;
66
+ `},k={uniforms:{topColor:{value:new e.Color(51)},bottomColor:{value:new e.Color(17)},offset:{value:33},exponent:{value:.6}},vertexShader:`
67
+ varying vec3 vWorldPosition;
68
+ void main() {
69
+ vec4 worldPosition = modelMatrix * vec4(position, 1.0);
70
+ vWorldPosition = worldPosition.xyz;
71
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
72
+ }
73
+ `,fragmentShader:`
74
+ uniform vec3 topColor;
75
+ uniform vec3 bottomColor;
76
+ uniform float offset;
77
+ uniform float exponent;
78
+ varying vec3 vWorldPosition;
79
+ void main() {
80
+ float h = normalize(vWorldPosition + offset).y;
81
+ gl_FragColor = vec4(mix(bottomColor, topColor, max(pow(max(h, 0.0), exponent), 0.0)), 1.0);
82
+ }
83
+ `};class Ie extends e.Mesh{constructor(t=1e3){super(),this.geometry=new e.BoxGeometry(t,t,t),this.material=new e.ShaderMaterial({vertexShader:C.vertexShader,fragmentShader:C.fragmentShader,side:e.BackSide})}}class Te extends e.Mesh{constructor(t=1e3){super(),this.geometry=new e.SphereGeometry(t,32,15),this.material=new e.ShaderMaterial({vertexShader:k.vertexShader,fragmentShader:k.fragmentShader,uniforms:k.uniforms,side:e.BackSide})}}class Ve extends e.Mesh{constructor(t=Math.PI*.49,s=2*Math.PI*.25,o=10,n=2,c=.005,r=.8){super();const a=new j.Sky;a.scale.setScalar(45e4),this.add(a);const i=a.material.uniforms;i.turbidity.value=o,i.rayleigh.value=n,i.mieCoefficient.value=c,i.mieDirectionalG.value=r,this.skyUniforms=i,this.sunPosition(t,s)}sunPosition(t,s){const o=new e.Vector3,n=this.skyUniforms;o.setFromSphericalCoords(1,t,s),n.sunPosition.value.copy(o)}}const Fe=h=>{const t=new Uint8Array(4*h*h);for(let o=0;o<h*h;o++){const n=o*4,c=(o%h^Math.floor(o/h))&1?255:0;t[n]=c,t[n+1]=c,t[n+2]=c,t[n+3]=255}const s=new e.DataTexture(t,h,h,e.RGBAFormat,e.UnsignedByteType);return s.wrapS=e.RepeatWrapping,s.wrapT=e.RepeatWrapping,s.minFilter=e.NearestFilter,s.needsUpdate=!0,s};exports.Beaker=le;exports.BeakerGeometry=V;exports.BifurcatedStaircaseGeometry=O;exports.BoneGeometry=te;exports.Book=me;exports.Bottle=he;exports.Bubbling=H;exports.BunsenBurner=Me;exports.Burst=be;exports.BurstShape=q;exports.Candle=re;exports.CrossHeadstoneGeometry=K;exports.DaySkybox=Ie;exports.Desk=ne;exports.DioramaGeometry=Y;exports.ElectricPanel=ye;exports.FenceColumn=R;exports.Flask=de;exports.Gear=Be;exports.GearShape=A;exports.Heart=ke;exports.HeartShape=E;exports.LShapedStaircaseGeometry=Z;exports.Lantern=ae;exports.LeverPanel=ue;exports.Mausoleum=se;exports.Microscope=fe;exports.Moon=oe;exports.MortarAndPestle=pe;exports.MortarGeometry=F;exports.MossyRocks=ce;exports.NightSkybox=Te;exports.ObeliskHeadstoneGeometry=Q;exports.Rocks=ie;exports.RoundedHeadstoneGeometry=$;exports.SimpleLeafGeometry=ee;exports.SpiralStaircaseGeometry=X;exports.SpiralTube=Ge;exports.SquareHeadstoneGeometry=D;exports.StaircaseGeometry=J;exports.Stand=we;exports.Star=Pe;exports.StarShape=N;exports.TeslaCoil=xe;exports.TestTube=Se;exports.TestTubeGeometry=P;exports.TestTubeRack=ve;exports.TwilightSkybox=Ve;exports.WineBottle=ge;exports.WineBottleGeometry=L;exports.WroughtIronBarGeometry=W;exports.checkerboardTexture=Fe;exports.daySkyShader=C;exports.fadeShader=Ce;exports.nightSkyShader=k;
53
84
  //# sourceMappingURL=index.cjs.js.map