three-low-poly 0.9.0 → 0.9.1
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 +4 -0
- package/dist/index.cjs.js +38 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +239 -15
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +38 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +38 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +18 -16
- package/dist/index.d.ts +0 -7
package/README.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three");class
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("three"),p=require("three/addons/utils/BufferGeometryUtils.js");class g extends e.BufferGeometry{constructor(t=.4,o=1.2,r=.2){super();const n=o*.6,i=new e.BoxGeometry(t/2,n,r);i.translate(0,n/2,0);const s=t*1.5,a=new e.BoxGeometry(s,t/4,r);a.translate(0,n*.75,0),this.copy(p.mergeGeometries([i,a],!0))}}class v extends e.BufferGeometry{constructor(t=1.75,o=.75){super();const r=t*.05,n=t*.15,i=t*.15,s=t*.75;let a=0;const l=new e.BoxGeometry(o,r,o);l.translate(0,a+r/2,0),a+=r;const m=new e.BoxGeometry(o*.8,n,o*.8);m.translate(0,a+n/2,0),a+=n;const h=new e.BoxGeometry(o*.6,i,o*.6);h.translate(0,a+i/2,0),a+=i;const d=new e.BoxGeometry(o*.4,s,o*.4);d.translate(0,a+s/2,0),a+=s;const u=new e.ConeGeometry(o*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);u.translate(0,a+.1/2,0),this.copy(p.mergeGeometries([l,m,h,d,u],!0))}}class B extends e.BufferGeometry{constructor(t=.6,o=1,r=.2){super();const n=o*.7,i=new e.BoxGeometry(t,n,r);i.translate(0,n/2,0);const s=o-n,a=new e.CylinderGeometry(t/2,t/2,r,16,1,!1,0,Math.PI);a.rotateY(Math.PI/2),a.rotateX(Math.PI/2),a.translate(0,n+s/2-r/2-.05,0),this.copy(p.mergeGeometries([i,a],!0))}}class C extends e.BufferGeometry{constructor(t=.5,o=.8,r=.15){super();const n=new e.BoxGeometry(t,o,r);n.translate(0,o/2,0),this.copy(n)}}class P extends e.BufferGeometry{constructor(t=2.25){super();const o=new e.BoxGeometry(1.2,.5,1.2);o.translate(0,.25,0);const r=new e.BoxGeometry(1,t,1);r.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(p.mergeGeometries([o,r,n],!0))}}class b extends e.BufferGeometry{constructor(t=2,o=.05,r=.3){super();const n=new e.CylinderGeometry(o,o,t,8);n.translate(0,t/2,0);const i=new e.ConeGeometry(o*1.5,r,8);i.translate(0,t+r/2,0),this.copy(p.mergeGeometries([n,i],!0))}}class L extends e.BufferGeometry{constructor(t=.1){super();const o=[],r=[],n=[[0,1],[.5,.75],[.75,.25],[.5,-.5],[0,-1],[-.5,-.5],[-.75,.25],[-.5,.75]];for(let s=0;s<n.length;s++){const[a,l]=n[s];o.push(a*t,l*t,0)}for(let s=1;s<n.length-1;s++)r.push(0,s,s+1);r.push(0,n.length-1,1);const i=new e.Float32BufferAttribute(o,3);this.setAttribute("position",i),this.setIndex(r),this.computeVertexNormals()}}class I extends e.BufferGeometry{constructor(t=.1,o=.1,r=.4,n=8){super();const i=new e.CylinderGeometry(t*.6,o*.6,r,n);i.translate(0,0,0);const s=new e.SphereGeometry(t,n,n),a=s.clone(),l=s.clone(),m=s.clone(),h=s.clone();a.translate(0,r/2+t*.6,-t*.6),l.translate(0,r/2+t*.6,t*.6),m.translate(0,-r/2-o*.6,-o*.6),h.translate(0,-r/2-o*.6,o*.6),this.copy(p.mergeGeometries([i,a,l,m,h],!0))}}class H extends e.Group{constructor(){super();const t=new e.SphereGeometry(5,32,32),o=new e.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
|
|
2
|
+
varying vec3 vNormal;
|
|
3
|
+
varying vec3 vPosition;
|
|
4
|
+
void main() {
|
|
5
|
+
vNormal = normalize(normal);
|
|
6
|
+
vPosition = position;
|
|
7
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
8
|
+
}
|
|
9
|
+
`,fragmentShader:`
|
|
10
|
+
varying vec3 vNormal;
|
|
11
|
+
varying vec3 vPosition;
|
|
12
|
+
|
|
13
|
+
// Simple 3D noise function
|
|
14
|
+
float hash(vec3 p) {
|
|
15
|
+
p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
|
|
16
|
+
p *= 17.0;
|
|
17
|
+
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
float noise(vec3 p) {
|
|
21
|
+
vec3 ip = floor(p);
|
|
22
|
+
vec3 fp = fract(p);
|
|
23
|
+
fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
|
|
24
|
+
return mix(
|
|
25
|
+
mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
|
|
26
|
+
mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
|
|
27
|
+
mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
|
|
28
|
+
mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
|
|
29
|
+
fp.z);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
void main() {
|
|
33
|
+
vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
|
|
34
|
+
float n = noise(vPosition * 0.5); // Apply noise with frequency
|
|
35
|
+
color *= 0.8 + 0.2 * n; // Modulate color by noise
|
|
36
|
+
gl_FragColor = vec4(color, 1.0);
|
|
37
|
+
}
|
|
38
|
+
`,flatShading:!0}),r=new e.Mesh(t,o);this.add(r)}}class k extends e.Group{constructor(){super();const t=new e.BoxGeometry(5,1,5),o=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),r=new e.Mesh(t,o);r.position.set(0,.5,0),this.add(r);const n=new e.BoxGeometry(4,3,4),i=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),s=new e.Mesh(n,i);s.position.set(0,2.5,0),this.add(s);const a=new e.ConeGeometry(3.5,2,4),l=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),m=new e.Mesh(a,l);m.rotation.y=Math.PI/4,m.position.set(0,5,0),this.add(m);const h=new e.CylinderGeometry(.2,.2,3.5,16),d=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(S=>{const w=new e.Mesh(h,d);w.position.set(...S),this.add(w)});const y=new e.Shape;y.moveTo(-1,0),y.lineTo(-1,2),y.absarc(0,2,1,Math.PI,0,!0),y.lineTo(1,0);const f={depth:.5,bevelEnabled:!1},G=new e.ExtrudeGeometry(y,f),x=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),M=new e.Mesh(G,x);M.position.set(0,.5,1.7),this.add(M)}}class q 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 r=new e.SphereGeometry(.05,16,16),n=new e.MeshBasicMaterial({color:16753920});this.flame=new e.Mesh(r,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 F extends e.Group{constructor(t=1.3,o=.5){super();const r=new e.CylinderGeometry(o,o,.2,16),n=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),i=new e.Mesh(r,n);i.position.set(0,0,0),this.add(i);const s=new e.CylinderGeometry(o*.9,o*.9,t),a=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),l=new e.Mesh(s,a);l.position.set(0,t/2+.1,0),this.add(l);const m=new e.ConeGeometry(o*1.1,.5,8),h=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),d=new e.Mesh(m,h);d.position.set(0,t+.35,0),this.add(d);const u=new e.TorusGeometry(o*.8,.05,8,16),y=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),f=new e.Mesh(u,y);f.position.set(0,t+.85,0),this.add(f);const G=new e.PointLight(16755200,1.5,15);G.position.set(0,t/2+.1,0),G.castShadow=!0,this.add(G)}}class z extends e.Group{constructor(){super();const t=new e.DodecahedronGeometry(1,0),o=new e.MeshStandardMaterial({color:8421504,flatShading:!0});for(let r=0;r<5;r++){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)}}}exports.BoneGeometry=I;exports.Candle=q;exports.CrossHeadstoneGeometry=g;exports.FenceColumn=P;exports.Lantern=F;exports.Mausoleum=k;exports.Moon=H;exports.ObeliskHeadstoneGeometry=v;exports.RoundedHeadstoneGeometry=B;exports.SimpleLeafGeometry=L;exports.SquareHeadstoneGeometry=C;exports.Stones=z;exports.WroughtIronBarGeometry=b;
|
|
2
39
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/geometry/Bone.ts"],"sourcesContent":["import { CylinderGeometry, Group, Mesh, MeshStandardMaterial, SphereGeometry } from \"three\";\n\nexport class Bone extends Group {\n constructor(radiusTop = 0.5, radiusBottom = 0.5, height = 2, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(\n radiusTop * 0.6, // slightly narrower for the shaft\n radiusBottom * 0.6,\n height,\n radialSegments,\n );\n const material = new MeshStandardMaterial({ color: 0xffffff });\n const cylinderMesh = new Mesh(cylinderGeometry, material);\n cylinderMesh.position.y = 0;\n this.add(cylinderMesh);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = new Mesh(sphereGeometry, material);\n const topSphere2 = new Mesh(sphereGeometry, material);\n const bottomSphere1 = new Mesh(sphereGeometry, material);\n const bottomSphere2 = new Mesh(sphereGeometry, material);\n\n // Position the spheres at each end of the cylinder\n topSphere1.position.set(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.position.set(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.position.set(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.position.set(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Add the spheres to the bone\n this.add(topSphere1);\n this.add(topSphere2);\n this.add(bottomSphere1);\n this.add(bottomSphere2);\n }\n}\n"],"names":["Bone","Group","radiusTop","radiusBottom","height","radialSegments","cylinderGeometry","CylinderGeometry","material","MeshStandardMaterial","cylinderMesh","Mesh","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2"],"mappings":"yGAEO,MAAMA,UAAaC,EAAAA,KAAM,CAC9B,YAAYC,EAAY,GAAKC,EAAe,GAAKC,EAAS,EAAGC,EAAiB,EAAG,CACzE,QAGN,MAAMC,EAAmB,IAAIC,EAAA,iBAC3BL,EAAY,GACZC,EAAe,GACfC,EACAC,CAAA,EAEIG,EAAW,IAAIC,EAAA,qBAAqB,CAAE,MAAO,QAAU,CAAA,EACvDC,EAAe,IAAIC,EAAAA,KAAKL,EAAkBE,CAAQ,EACxDE,EAAa,SAAS,EAAI,EAC1B,KAAK,IAAIA,CAAY,EAGrB,MAAME,EAAiB,IAAIC,EAAe,eAAAX,EAAWG,EAAgBA,CAAc,EAC7ES,EAAa,IAAIH,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CO,EAAa,IAAIJ,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CQ,EAAgB,IAAIL,EAAAA,KAAKC,EAAgBJ,CAAQ,EACjDS,EAAgB,IAAIN,EAAAA,KAAKC,EAAgBJ,CAAQ,EAG5CM,EAAA,SAAS,IAAI,EAAGV,EAAS,EAAIF,EAAY,GAAK,CAACA,EAAY,EAAG,EAC9Da,EAAA,SAAS,IAAI,EAAGX,EAAS,EAAIF,EAAY,GAAKA,EAAY,EAAG,EAC1Dc,EAAA,SAAS,IAAI,EAAG,CAACZ,EAAS,EAAID,EAAe,GAAK,CAACA,EAAe,EAAG,EACrEc,EAAA,SAAS,IAAI,EAAG,CAACb,EAAS,EAAID,EAAe,GAAKA,EAAe,EAAG,EAGlF,KAAK,IAAIW,CAAU,EACnB,KAAK,IAAIC,CAAU,EACnB,KAAK,IAAIC,CAAa,EACtB,KAAK,IAAIC,CAAa,CACxB,CACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/geometry/cemetery/CrossHeadstoneGeometry.js","../src/geometry/cemetery/ObeliskHeadstoneGeometry.js","../src/geometry/cemetery/RoundedHeadstoneGeometry.js","../src/geometry/cemetery/SquareHeadstoneGeometry.js","../src/geometry/fence/FenceColumn.js","../src/geometry/fence/WroughtIronBarGeometry.js","../src/geometry/leafs/SimpleLeafGeometry.js","../src/geometry/skeleton/BoneGeometry.js","../src/group/astronomy/Moon.js","../src/group/cemetery/Mausoleum.js","../src/group/lighting/Candle.js","../src/group/lighting/Lantern.js","../src/group/rocks/Stones.js"],"sourcesContent":["import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass CrossHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.4, height = 1.2, depth = 0.2) {\n super();\n\n // Create the vertical part of the cross\n const verticalHeight = height * 0.6;\n const verticalGeometry = new BoxGeometry(width / 2, verticalHeight, depth);\n verticalGeometry.translate(0, verticalHeight / 2, 0);\n\n // Create the horizontal part of the cross\n const horizontalWidth = width * 1.5;\n const horizontalGeometry = new BoxGeometry(horizontalWidth, width / 4, depth);\n horizontalGeometry.translate(0, verticalHeight * 0.75, 0);\n\n // Merge both parts into a cross\n this.copy(mergeGeometries([verticalGeometry, horizontalGeometry], true));\n }\n}\n\nexport { CrossHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, ConeGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass ObeliskHeadstoneGeometry extends BufferGeometry {\n constructor(totalHeight = 1.75, baseWidth = 0.75) {\n super();\n\n // Define height proportions relative to the total height\n const baseHeight = totalHeight * 0.05;\n const lowerSegmentHeight = totalHeight * 0.15;\n const middleSegmentHeight = totalHeight * 0.15;\n const topSegmentHeight = totalHeight * 0.75;\n\n let currentHeight = 0;\n\n // Base of the Headstone (a wide box)\n const baseGeometry = new BoxGeometry(baseWidth, baseHeight, baseWidth);\n baseGeometry.translate(0, currentHeight + baseHeight / 2, 0);\n currentHeight += baseHeight;\n\n // Lower Segment (a slightly narrower box)\n const lowerSegmentGeometry = new BoxGeometry(baseWidth * 0.8, lowerSegmentHeight, baseWidth * 0.8);\n lowerSegmentGeometry.translate(0, currentHeight + lowerSegmentHeight / 2, 0);\n currentHeight += lowerSegmentHeight;\n\n // Middle Segment (an even narrower box)\n const middleSegmentGeometry = new BoxGeometry(baseWidth * 0.6, middleSegmentHeight, baseWidth * 0.6);\n middleSegmentGeometry.translate(0, currentHeight + middleSegmentHeight / 2, 0);\n currentHeight += middleSegmentHeight;\n\n // Top Segment (a tall, thin box to form the obelisk shape)\n const topSegmentGeometry = new BoxGeometry(baseWidth * 0.4, topSegmentHeight, baseWidth * 0.4);\n topSegmentGeometry.translate(0, currentHeight + topSegmentHeight / 2, 0);\n currentHeight += topSegmentHeight;\n\n // Pyramid Top (a cone to form the pointed top of the obelisk)\n const pyramidGeometry = new ConeGeometry((baseWidth * 0.4) / Math.sqrt(2), 0.1, 4, 1, false, Math.PI / 4);\n pyramidGeometry.translate(0, currentHeight + 0.1 / 2, 0);\n\n this.copy(\n mergeGeometries([baseGeometry, lowerSegmentGeometry, middleSegmentGeometry, topSegmentGeometry, pyramidGeometry], true),\n );\n }\n}\n\nexport { ObeliskHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass RoundedHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.6, height = 1.0, depth = 0.2) {\n super();\n\n // Create the base of the headstone (a box)\n const baseHeight = height * 0.7;\n const baseGeometry = new BoxGeometry(width, baseHeight, depth);\n baseGeometry.translate(0, baseHeight / 2, 0);\n\n // Create the rounded top part (a half cylinder with caps)\n const topHeight = height - baseHeight;\n const topGeometry = new CylinderGeometry(width / 2, width / 2, depth, 16, 1, false, 0, Math.PI);\n topGeometry.rotateY(Math.PI / 2);\n topGeometry.rotateX(Math.PI / 2);\n topGeometry.translate(0, baseHeight + topHeight / 2 - depth / 2 - 0.05, 0);\n\n // Merge base and top into a single geometry\n this.copy(mergeGeometries([baseGeometry, topGeometry], true));\n }\n}\n\nexport { RoundedHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\n\nclass SquareHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.5, height = 0.8, depth = 0.15) {\n super();\n\n // Create a rectangular slab\n const slabGeometry = new BoxGeometry(width, height, depth);\n slabGeometry.translate(0, height / 2, 0); // Shift up to stand on the ground\n\n this.copy(slabGeometry);\n }\n}\nexport { SquareHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Fence Column Geometry, a simple fence column shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a fence column\n * const columnGeometry = new FenceColumn();\n * const columnMaterial = new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true });\n * const column = new Mesh(columnGeometry, columnMaterial);\n * scene.add(column);\n */\nclass FenceColumn extends BufferGeometry {\n constructor(height = 2.25) {\n super();\n\n // Column Base (a wider base for stability)\n const baseGeometry = new BoxGeometry(1.2, 0.5, 1.2);\n baseGeometry.translate(0, 0.25, 0);\n\n // Main Column (a tall rectangular shape, adjustable height)\n const columnGeometry = new BoxGeometry(1, height, 1);\n columnGeometry.translate(0, 0.5 + height / 2, 0);\n\n // Column Cap (a slightly wider cap on top)\n const capGeometry = new BoxGeometry(1.4, 0.3, 1.4);\n capGeometry.translate(0, 0.5 + height + 0.15, 0);\n\n this.copy(mergeGeometries([baseGeometry, columnGeometry, capGeometry], true));\n }\n}\n\nexport { FenceColumn };\n","import { BufferGeometry, ConeGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Wrought Iron Bar Geometry, a simple wrought iron bar shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a wrought iron bar\n * const barGeometry = new WroughtIronBarGeometry();\n * const barMaterial = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });\n * const bar = new Mesh(barGeometry, barMaterial);\n * scene.add(bar);\n */\nclass WroughtIronBarGeometry extends BufferGeometry {\n constructor(barHeight = 2.0, barRadius = 0.05, spikeHeight = 0.3) {\n super();\n\n // Create a cylinder for the vertical bar\n const barGeometry = new CylinderGeometry(barRadius, barRadius, barHeight, 8);\n barGeometry.translate(0, barHeight / 2, 0); // Shift up to stand on the ground\n\n // Create a cone for the spike on top\n const spikeGeometry = new ConeGeometry(barRadius * 1.5, spikeHeight, 8);\n spikeGeometry.translate(0, barHeight + spikeHeight / 2, 0); // Place on top of the bar\n\n // Merge bar and spike into one geometry\n this.copy(mergeGeometries([barGeometry, spikeGeometry], true));\n }\n}\n\nexport { WroughtIronBarGeometry };\n","import { BufferGeometry, Float32BufferAttribute } from \"three\";\n\nclass SimpleLeafGeometry extends BufferGeometry {\n constructor(size = 0.1) {\n super();\n\n const vertices = [];\n const indices = [];\n\n // Define vertices to approximate a simple, elongated, oval leaf shape\n const leafPoints = [\n [0, 1], // Top point\n [0.5, 0.75], // Right upper middle\n [0.75, 0.25], // Right lower middle\n [0.5, -0.5], // Right bottom middle\n [0, -1], // Bottom point\n [-0.5, -0.5], // Left bottom middle\n [-0.75, 0.25], // Left lower middle\n [-0.5, 0.75], // Left upper middle\n ];\n\n // Add vertices to the geometry, scaling them with the `size` parameter\n for (let i = 0; i < leafPoints.length; i++) {\n const [x, y] = leafPoints[i];\n vertices.push(x * size, y * size, 0);\n }\n\n // Define indices to form triangular faces of the leaf\n // Create a fan-like structure connecting the top vertex (index 0) to other neighboring vertices\n for (let i = 1; i < leafPoints.length - 1; i++) {\n indices.push(0, i, i + 1);\n }\n // Close the fan with the last triangle\n indices.push(0, leafPoints.length - 1, 1);\n\n // Convert the vertices and indices to buffer attributes\n const positionAttribute = new Float32BufferAttribute(vertices, 3);\n this.setAttribute('position', positionAttribute);\n this.setIndex(indices);\n\n this.computeVertexNormals();\n }\n}\n\nexport { SimpleLeafGeometry };\n","import { BufferGeometry, CylinderGeometry, SphereGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Bone Geometry, a simple bone shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a bone\n * const boneGeometry = new Bone();\n * const boneMaterial = new MeshStandardMaterial({ color: 0xffffff });\n * const bone = new Mesh(boneGeometry, boneMaterial);\n * scene.add(bone);\n */\nclass BoneGeometry extends BufferGeometry {\n constructor(radiusTop = 0.1, radiusBottom = 0.1, height = 0.4, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(radiusTop * 0.6, radiusBottom * 0.6, height, radialSegments);\n cylinderGeometry.translate(0, 0, 0);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = sphereGeometry.clone();\n const topSphere2 = sphereGeometry.clone();\n const bottomSphere1 = sphereGeometry.clone();\n const bottomSphere2 = sphereGeometry.clone();\n\n // Position the spheres at each end of the cylinder\n topSphere1.translate(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.translate(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.translate(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.translate(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Merge the parts\n this.copy(mergeGeometries([cylinderGeometry, topSphere1, topSphere2, bottomSphere1, bottomSphere2], true));\n }\n}\n\nexport { BoneGeometry };\n","import { Group, Mesh, ShaderMaterial, SphereGeometry } from \"three\";\n\nclass Moon extends Group {\n constructor() {\n super();\n\n // Create moon geometry\n const moonGeometry = new SphereGeometry(5, 32, 32);\n\n // Custom ShaderMaterial\n const moonMaterial = new ShaderMaterial({\n uniforms: {\n time: { value: 0.0 },\n },\n vertexShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n void main() {\n vNormal = normalize(normal);\n vPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n\n // Simple 3D noise function\n float hash(vec3 p) {\n p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));\n p *= 17.0;\n return fract(p.x * p.y * p.z * (p.x + p.y + p.z));\n }\n\n float noise(vec3 p) {\n vec3 ip = floor(p);\n vec3 fp = fract(p);\n fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep\n return mix(\n mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),\n mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),\n fp.z);\n }\n\n void main() {\n vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color\n float n = noise(vPosition * 0.5); // Apply noise with frequency\n color *= 0.8 + 0.2 * n; // Modulate color by noise\n gl_FragColor = vec4(color, 1.0);\n }\n `,\n flatShading: true,\n });\n\n // Create the moon mesh and add it to the scene\n const moon = new Mesh(moonGeometry, moonMaterial);\n this.add(moon);\n }\n}\n\nexport { Moon };\n","import { BoxGeometry, ConeGeometry, CylinderGeometry, ExtrudeGeometry, Group, Mesh, MeshStandardMaterial, Shape } from \"three\";\n\nclass Mausoleum extends Group {\n constructor() {\n super();\n\n // Base of the Mausoleum\n const baseGeometry = new BoxGeometry(5, 1, 5);\n const baseMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0.5, 0);\n this.add(baseMesh);\n\n // Main Building Structure\n const buildingGeometry = new BoxGeometry(4, 3, 4);\n const buildingMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n const buildingMesh = new Mesh(buildingGeometry, buildingMaterial);\n buildingMesh.position.set(0, 2.5, 0);\n this.add(buildingMesh);\n\n // Roof (Peaked)\n const roofGeometry = new ConeGeometry(3.5, 2, 4);\n const roofMaterial = new MeshStandardMaterial({ color: 0x505050, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.rotation.y = Math.PI / 4;\n roofMesh.position.set(0, 5, 0);\n this.add(roofMesh);\n\n // Pillars\n const pillarGeometry = new CylinderGeometry(0.2, 0.2, 3.5, 16);\n const pillarMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n\n const pillarPositions = [\n [-1.8, 2.3, -2.2],\n [1.8, 2.3, -2.2],\n [-1.8, 2.3, 2.2],\n [1.8, 2.3, 2.2],\n ];\n\n pillarPositions.forEach((position) => {\n const pillarMesh = new Mesh(pillarGeometry, pillarMaterial);\n pillarMesh.position.set(...position);\n this.add(pillarMesh);\n });\n\n // Corrected Arched Entrance\n const archShape = new Shape();\n archShape.moveTo(-1, 0);\n archShape.lineTo(-1, 2);\n archShape.absarc(0, 2, 1, Math.PI, 0, true);\n archShape.lineTo(1, 0);\n\n const extrudeSettings = {\n depth: 0.5,\n bevelEnabled: false,\n };\n const archGeometry = new ExtrudeGeometry(archShape, extrudeSettings);\n const archMaterial = new MeshStandardMaterial({ color: 0x404040, flatShading: true });\n const archMesh = new Mesh(archGeometry, archMaterial);\n archMesh.position.set(0, 0.5, 1.7);\n this.add(archMesh);\n }\n}\n\nexport { Mausoleum };\n","import { CylinderGeometry, Group, Mesh, MeshBasicMaterial, MeshStandardMaterial, PointLight, SphereGeometry } from \"three\";\n\nclass Candle extends Group {\n constructor(height = 1, radius = 0.2) {\n super();\n this.height = height;\n this.radius = radius;\n this.createCandle();\n this.animateFlicker();\n }\n\n createCandle() {\n // Candle Geometry\n const candleGeometry = new CylinderGeometry(this.radius, this.radius, this.height, 32);\n const candleMaterial = new MeshStandardMaterial({ color: 0xffffff });\n this.candle = new Mesh(candleGeometry, candleMaterial);\n this.candle.position.set(0, this.height / 2, 0);\n this.add(this.candle);\n\n // Flame Geometry\n const flameGeometry = new SphereGeometry(0.05, 16, 16);\n const flameMaterial = new MeshBasicMaterial({ color: 0xffa500 });\n this.flame = new Mesh(flameGeometry, flameMaterial);\n this.flame.position.set(0, this.height + 0.05, 0);\n this.add(this.flame);\n\n // Candlelight\n this.candleLight = new PointLight(0xffa500, 1, 5);\n this.candleLight.position.set(0, this.height + 0.05, 0);\n this.candleLight.castShadow = true;\n this.add(this.candleLight);\n }\n\n animateFlicker() {\n const flicker = () => {\n // Random flicker intensity between 0.8 and 1.2\n this.candleLight.intensity = 1 + (Math.random() * 0.4 - 0.2);\n\n // Optional: slight random movement to simulate a flickering flame\n this.candleLight.position.x = Math.random() * 0.02 - 0.01;\n this.candleLight.position.z = Math.random() * 0.02 - 0.01;\n\n requestAnimationFrame(flicker);\n };\n flicker();\n }\n}\n\nexport { Candle };\n","import { ConeGeometry, CylinderGeometry, Group, Mesh, MeshStandardMaterial, PointLight, TorusGeometry } from \"three\";\n\n// Class for Lantern Geometry\nclass Lantern extends Group {\n constructor(height = 1.3, baseWidth = 0.5) {\n super();\n\n // Lantern Base (cylinder)\n const baseGeometry = new CylinderGeometry(baseWidth, baseWidth, 0.2, 16);\n const baseMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0, 0);\n this.add(baseMesh);\n\n // Lantern Body (a rectangular frame)\n const bodyGeometry = new CylinderGeometry(baseWidth * 0.9, baseWidth * 0.9, height);\n const bodyMaterial = new MeshStandardMaterial({ color: 0xffd700, flatShading: true, transparent: true, opacity: 0.6 });\n const bodyMesh = new Mesh(bodyGeometry, bodyMaterial);\n bodyMesh.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n this.add(bodyMesh);\n\n // Lantern Roof (a cone)\n const roofGeometry = new ConeGeometry(baseWidth * 1.1, 0.5, 8);\n const roofMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.position.set(0, height + 0.35, 0); // Adjusted position based on height\n this.add(roofMesh);\n\n // Lantern Handle (a torus)\n const handleGeometry = new TorusGeometry(baseWidth * 0.8, 0.05, 8, 16);\n const handleMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const handleMesh = new Mesh(handleGeometry, handleMaterial);\n handleMesh.position.set(0, height + 0.85, 0); // Adjusted to sit above the roof\n this.add(handleMesh);\n\n // Lantern Light (point light inside)\n const light = new PointLight(0xffaa00, 1.5, 15);\n light.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n light.castShadow = true;\n this.add(light);\n }\n}\n\nexport { Lantern };\n","import { DodecahedronGeometry, Group, Mesh, MeshStandardMaterial } from \"three\";\n\nclass Stones extends Group {\n constructor() {\n super();\n\n // Rock Geometry (using Dodecahedron for a low-poly random rock-like shape)\n const rockGeometry = new DodecahedronGeometry(1, 0); // Low-poly shape\n const rockMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n\n // Create multiple random rocks with slight variations\n for (let i = 0; i < 5; i++) {\n const rockMesh = new Mesh(rockGeometry, rockMaterial);\n rockMesh.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4); // Scale randomly to make each rock unique\n rockMesh.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI); // Random rotation for variation\n rockMesh.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4); // Keep rocks at ground level\n this.add(rockMesh);\n }\n }\n}\n\nexport { Stones };\n"],"names":["CrossHeadstoneGeometry","BufferGeometry","width","height","depth","verticalHeight","verticalGeometry","BoxGeometry","horizontalWidth","horizontalGeometry","mergeGeometries","ObeliskHeadstoneGeometry","totalHeight","baseWidth","baseHeight","lowerSegmentHeight","middleSegmentHeight","topSegmentHeight","currentHeight","baseGeometry","lowerSegmentGeometry","middleSegmentGeometry","topSegmentGeometry","pyramidGeometry","ConeGeometry","RoundedHeadstoneGeometry","topHeight","topGeometry","CylinderGeometry","SquareHeadstoneGeometry","slabGeometry","FenceColumn","columnGeometry","capGeometry","WroughtIronBarGeometry","barHeight","barRadius","spikeHeight","barGeometry","spikeGeometry","SimpleLeafGeometry","size","vertices","indices","leafPoints","i","x","y","positionAttribute","Float32BufferAttribute","BoneGeometry","radiusTop","radiusBottom","radialSegments","cylinderGeometry","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2","Moon","Group","moonGeometry","moonMaterial","ShaderMaterial","moon","Mesh","Mausoleum","baseMaterial","MeshStandardMaterial","baseMesh","buildingGeometry","buildingMaterial","buildingMesh","roofGeometry","roofMaterial","roofMesh","pillarGeometry","pillarMaterial","position","pillarMesh","archShape","Shape","extrudeSettings","archGeometry","ExtrudeGeometry","archMaterial","archMesh","Candle","radius","candleGeometry","candleMaterial","flameGeometry","flameMaterial","MeshBasicMaterial","PointLight","flicker","Lantern","bodyGeometry","bodyMaterial","bodyMesh","handleGeometry","TorusGeometry","handleMaterial","handleMesh","light","Stones","rockGeometry","DodecahedronGeometry","rockMaterial","rockMesh"],"mappings":"gKAGA,MAAMA,UAA+BC,EAAAA,cAAe,CAClD,YAAYC,EAAQ,GAAKC,EAAS,IAAKC,EAAQ,GAAK,CAClD,QAGA,MAAMC,EAAiBF,EAAS,GAC1BG,EAAmB,IAAIC,cAAYL,EAAQ,EAAGG,EAAgBD,CAAK,EACzEE,EAAiB,UAAU,EAAGD,EAAiB,EAAG,CAAC,EAGnD,MAAMG,EAAkBN,EAAQ,IAC1BO,EAAqB,IAAIF,cAAYC,EAAiBN,EAAQ,EAAGE,CAAK,EAC5EK,EAAmB,UAAU,EAAGJ,EAAiB,IAAM,CAAC,EAGxD,KAAK,KAAKK,kBAAgB,CAACJ,EAAkBG,CAAkB,EAAG,EAAI,CAAC,CACxE,CACH,CCjBA,MAAME,UAAiCV,EAAAA,cAAe,CACpD,YAAYW,EAAc,KAAMC,EAAY,IAAM,CAChD,QAGA,MAAMC,EAAaF,EAAc,IAC3BG,EAAqBH,EAAc,IACnCI,EAAsBJ,EAAc,IACpCK,EAAmBL,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10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { BufferGeometry as f, BoxGeometry as i, ConeGeometry as S, CylinderGeometry as w, Float32BufferAttribute as z, SphereGeometry as P, Group as v, ShaderMaterial as F, Mesh as c, MeshStandardMaterial as p, Shape as H, ExtrudeGeometry as A, MeshBasicMaterial as q, PointLight as L, TorusGeometry as N, DodecahedronGeometry as B } from "three";
|
|
2
|
+
import { mergeGeometries as M } from "three/addons/utils/BufferGeometryUtils.js";
|
|
3
|
+
class V extends f {
|
|
4
|
+
constructor(e = 0.4, t = 1.2, n = 0.2) {
|
|
5
|
+
super();
|
|
6
|
+
const o = t * 0.6, a = new i(e / 2, o, n);
|
|
7
|
+
a.translate(0, o / 2, 0);
|
|
8
|
+
const s = e * 1.5, r = new i(s, e / 4, n);
|
|
9
|
+
r.translate(0, o * 0.75, 0), this.copy(M([a, r], !0));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
class _ extends f {
|
|
13
|
+
constructor(e = 1.75, t = 0.75) {
|
|
14
|
+
super();
|
|
15
|
+
const n = e * 0.05, o = e * 0.15, a = e * 0.15, s = e * 0.75;
|
|
16
|
+
let r = 0;
|
|
17
|
+
const h = new i(t, n, t);
|
|
18
|
+
h.translate(0, r + n / 2, 0), r += n;
|
|
19
|
+
const m = new i(t * 0.8, o, t * 0.8);
|
|
20
|
+
m.translate(0, r + o / 2, 0), r += o;
|
|
21
|
+
const d = new i(t * 0.6, a, t * 0.6);
|
|
22
|
+
d.translate(0, r + a / 2, 0), r += a;
|
|
23
|
+
const y = new i(t * 0.4, s, t * 0.4);
|
|
24
|
+
y.translate(0, r + s / 2, 0), r += s;
|
|
25
|
+
const x = new S(t * 0.4 / Math.sqrt(2), 0.1, 4, 1, !1, Math.PI / 4);
|
|
26
|
+
x.translate(0, r + 0.1 / 2, 0), this.copy(
|
|
27
|
+
M([h, m, d, y, x], !0)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class j extends f {
|
|
32
|
+
constructor(e = 0.6, t = 1, n = 0.2) {
|
|
33
|
+
super();
|
|
34
|
+
const o = t * 0.7, a = new i(e, o, n);
|
|
35
|
+
a.translate(0, o / 2, 0);
|
|
36
|
+
const s = t - o, r = new w(e / 2, e / 2, n, 16, 1, !1, 0, Math.PI);
|
|
37
|
+
r.rotateY(Math.PI / 2), r.rotateX(Math.PI / 2), r.translate(0, o + s / 2 - n / 2 - 0.05, 0), this.copy(M([a, r], !0));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class O extends f {
|
|
41
|
+
constructor(e = 0.5, t = 0.8, n = 0.15) {
|
|
42
|
+
super();
|
|
43
|
+
const o = new i(e, t, n);
|
|
44
|
+
o.translate(0, t / 2, 0), this.copy(o);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
class X extends f {
|
|
48
|
+
constructor(e = 2.25) {
|
|
49
|
+
super();
|
|
50
|
+
const t = new i(1.2, 0.5, 1.2);
|
|
51
|
+
t.translate(0, 0.25, 0);
|
|
52
|
+
const n = new i(1, e, 1);
|
|
53
|
+
n.translate(0, 0.5 + e / 2, 0);
|
|
54
|
+
const o = new i(1.4, 0.3, 1.4);
|
|
55
|
+
o.translate(0, 0.5 + e + 0.15, 0), this.copy(M([t, n, o], !0));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class Y extends f {
|
|
59
|
+
constructor(e = 2, t = 0.05, n = 0.3) {
|
|
60
|
+
super();
|
|
61
|
+
const o = new w(t, t, e, 8);
|
|
62
|
+
o.translate(0, e / 2, 0);
|
|
63
|
+
const a = new S(t * 1.5, n, 8);
|
|
64
|
+
a.translate(0, e + n / 2, 0), this.copy(M([o, a], !0));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
class J extends f {
|
|
68
|
+
constructor(e = 0.1) {
|
|
69
|
+
super();
|
|
70
|
+
const t = [], n = [], o = [
|
|
71
|
+
[0, 1],
|
|
72
|
+
// Top point
|
|
73
|
+
[0.5, 0.75],
|
|
74
|
+
// Right upper middle
|
|
75
|
+
[0.75, 0.25],
|
|
76
|
+
// Right lower middle
|
|
77
|
+
[0.5, -0.5],
|
|
78
|
+
// Right bottom middle
|
|
79
|
+
[0, -1],
|
|
80
|
+
// Bottom point
|
|
81
|
+
[-0.5, -0.5],
|
|
82
|
+
// Left bottom middle
|
|
83
|
+
[-0.75, 0.25],
|
|
84
|
+
// Left lower middle
|
|
85
|
+
[-0.5, 0.75]
|
|
86
|
+
// Left upper middle
|
|
87
|
+
];
|
|
88
|
+
for (let s = 0; s < o.length; s++) {
|
|
89
|
+
const [r, h] = o[s];
|
|
90
|
+
t.push(r * e, h * e, 0);
|
|
91
|
+
}
|
|
92
|
+
for (let s = 1; s < o.length - 1; s++)
|
|
93
|
+
n.push(0, s, s + 1);
|
|
94
|
+
n.push(0, o.length - 1, 1);
|
|
95
|
+
const a = new z(t, 3);
|
|
96
|
+
this.setAttribute("position", a), this.setIndex(n), this.computeVertexNormals();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
class K extends f {
|
|
100
|
+
constructor(e = 0.1, t = 0.1, n = 0.4, o = 8) {
|
|
101
|
+
super();
|
|
102
|
+
const a = new w(e * 0.6, t * 0.6, n, o);
|
|
103
|
+
a.translate(0, 0, 0);
|
|
104
|
+
const s = new P(e, o, o), r = s.clone(), h = s.clone(), m = s.clone(), d = s.clone();
|
|
105
|
+
r.translate(0, n / 2 + e * 0.6, -e * 0.6), h.translate(0, n / 2 + e * 0.6, e * 0.6), m.translate(0, -n / 2 - t * 0.6, -t * 0.6), d.translate(0, -n / 2 - t * 0.6, t * 0.6), this.copy(M([a, r, h, m, d], !0));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
class Q extends v {
|
|
109
|
+
constructor() {
|
|
110
|
+
super();
|
|
111
|
+
const e = new P(5, 32, 32), t = new F({
|
|
112
|
+
uniforms: {
|
|
113
|
+
time: { value: 0 }
|
|
114
|
+
},
|
|
115
|
+
vertexShader: `
|
|
116
|
+
varying vec3 vNormal;
|
|
117
|
+
varying vec3 vPosition;
|
|
118
|
+
void main() {
|
|
119
|
+
vNormal = normalize(normal);
|
|
120
|
+
vPosition = position;
|
|
121
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
122
|
+
}
|
|
123
|
+
`,
|
|
124
|
+
fragmentShader: `
|
|
125
|
+
varying vec3 vNormal;
|
|
126
|
+
varying vec3 vPosition;
|
|
127
|
+
|
|
128
|
+
// Simple 3D noise function
|
|
129
|
+
float hash(vec3 p) {
|
|
130
|
+
p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
|
|
131
|
+
p *= 17.0;
|
|
132
|
+
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
float noise(vec3 p) {
|
|
136
|
+
vec3 ip = floor(p);
|
|
137
|
+
vec3 fp = fract(p);
|
|
138
|
+
fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
|
|
139
|
+
return mix(
|
|
140
|
+
mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
|
|
141
|
+
mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
|
|
142
|
+
mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
|
|
143
|
+
mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
|
|
144
|
+
fp.z);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
void main() {
|
|
148
|
+
vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
|
|
149
|
+
float n = noise(vPosition * 0.5); // Apply noise with frequency
|
|
150
|
+
color *= 0.8 + 0.2 * n; // Modulate color by noise
|
|
151
|
+
gl_FragColor = vec4(color, 1.0);
|
|
152
|
+
}
|
|
153
|
+
`,
|
|
154
|
+
flatShading: !0
|
|
155
|
+
}), n = new c(e, t);
|
|
156
|
+
this.add(n);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
class U extends v {
|
|
160
|
+
constructor() {
|
|
161
|
+
super();
|
|
162
|
+
const e = new i(5, 1, 5), t = new p({ color: 8421504, flatShading: !0 }), n = new c(e, t);
|
|
163
|
+
n.position.set(0, 0.5, 0), this.add(n);
|
|
164
|
+
const o = new i(4, 3, 4), a = new p({ color: 6908265, flatShading: !0 }), s = new c(o, a);
|
|
165
|
+
s.position.set(0, 2.5, 0), this.add(s);
|
|
166
|
+
const r = new S(3.5, 2, 4), h = new p({ color: 5263440, flatShading: !0 }), m = new c(r, h);
|
|
167
|
+
m.rotation.y = Math.PI / 4, m.position.set(0, 5, 0), this.add(m);
|
|
168
|
+
const d = new w(0.2, 0.2, 3.5, 16), y = new p({ color: 6908265, flatShading: !0 });
|
|
169
|
+
[
|
|
170
|
+
[-1.8, 2.3, -2.2],
|
|
171
|
+
[1.8, 2.3, -2.2],
|
|
172
|
+
[-1.8, 2.3, 2.2],
|
|
173
|
+
[1.8, 2.3, 2.2]
|
|
174
|
+
].forEach((k) => {
|
|
175
|
+
const I = new c(d, y);
|
|
176
|
+
I.position.set(...k), this.add(I);
|
|
177
|
+
});
|
|
178
|
+
const u = new H();
|
|
179
|
+
u.moveTo(-1, 0), u.lineTo(-1, 2), u.absarc(0, 2, 1, Math.PI, 0, !0), u.lineTo(1, 0);
|
|
180
|
+
const g = {
|
|
181
|
+
depth: 0.5,
|
|
182
|
+
bevelEnabled: !1
|
|
183
|
+
}, G = new A(u, g), C = new p({ color: 4210752, flatShading: !0 }), b = new c(G, C);
|
|
184
|
+
b.position.set(0, 0.5, 1.7), this.add(b);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
class Z extends v {
|
|
188
|
+
constructor(e = 1, t = 0.2) {
|
|
189
|
+
super(), this.height = e, this.radius = t, this.createCandle(), this.animateFlicker();
|
|
190
|
+
}
|
|
191
|
+
createCandle() {
|
|
192
|
+
const e = new w(this.radius, this.radius, this.height, 32), t = new p({ color: 16777215 });
|
|
193
|
+
this.candle = new c(e, t), this.candle.position.set(0, this.height / 2, 0), this.add(this.candle);
|
|
194
|
+
const n = new P(0.05, 16, 16), o = new q({ color: 16753920 });
|
|
195
|
+
this.flame = new c(n, o), this.flame.position.set(0, this.height + 0.05, 0), this.add(this.flame), this.candleLight = new L(16753920, 1, 5), this.candleLight.position.set(0, this.height + 0.05, 0), this.candleLight.castShadow = !0, this.add(this.candleLight);
|
|
196
|
+
}
|
|
197
|
+
animateFlicker() {
|
|
198
|
+
const e = () => {
|
|
199
|
+
this.candleLight.intensity = 1 + (Math.random() * 0.4 - 0.2), this.candleLight.position.x = Math.random() * 0.02 - 0.01, this.candleLight.position.z = Math.random() * 0.02 - 0.01, requestAnimationFrame(e);
|
|
200
|
+
};
|
|
201
|
+
e();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
class $ extends v {
|
|
205
|
+
constructor(e = 1.3, t = 0.5) {
|
|
206
|
+
super();
|
|
207
|
+
const n = new w(t, t, 0.2, 16), o = new p({ color: 9127187, flatShading: !0 }), a = new c(n, o);
|
|
208
|
+
a.position.set(0, 0, 0), this.add(a);
|
|
209
|
+
const s = new w(t * 0.9, t * 0.9, e), r = new p({ color: 16766720, flatShading: !0, transparent: !0, opacity: 0.6 }), h = new c(s, r);
|
|
210
|
+
h.position.set(0, e / 2 + 0.1, 0), this.add(h);
|
|
211
|
+
const m = new S(t * 1.1, 0.5, 8), d = new p({ color: 9127187, flatShading: !0 }), y = new c(m, d);
|
|
212
|
+
y.position.set(0, e + 0.35, 0), this.add(y);
|
|
213
|
+
const x = new N(t * 0.8, 0.05, 8, 16), u = new p({ color: 9127187, flatShading: !0 }), g = new c(x, u);
|
|
214
|
+
g.position.set(0, e + 0.85, 0), this.add(g);
|
|
215
|
+
const G = new L(16755200, 1.5, 15);
|
|
216
|
+
G.position.set(0, e / 2 + 0.1, 0), G.castShadow = !0, this.add(G);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
class R extends v {
|
|
220
|
+
constructor() {
|
|
221
|
+
super();
|
|
222
|
+
const e = new B(1, 0), t = new p({ color: 8421504, flatShading: !0 });
|
|
223
|
+
for (let n = 0; n < 5; n++) {
|
|
224
|
+
const o = new c(e, t);
|
|
225
|
+
o.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4), o.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI), o.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4), this.add(o);
|
|
226
|
+
}
|
|
15
227
|
}
|
|
16
228
|
}
|
|
17
229
|
export {
|
|
18
|
-
|
|
230
|
+
K as BoneGeometry,
|
|
231
|
+
Z as Candle,
|
|
232
|
+
V as CrossHeadstoneGeometry,
|
|
233
|
+
X as FenceColumn,
|
|
234
|
+
$ as Lantern,
|
|
235
|
+
U as Mausoleum,
|
|
236
|
+
Q as Moon,
|
|
237
|
+
_ as ObeliskHeadstoneGeometry,
|
|
238
|
+
j as RoundedHeadstoneGeometry,
|
|
239
|
+
J as SimpleLeafGeometry,
|
|
240
|
+
O as SquareHeadstoneGeometry,
|
|
241
|
+
R as Stones,
|
|
242
|
+
Y as WroughtIronBarGeometry
|
|
19
243
|
};
|
|
20
244
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/geometry/Bone.ts"],"sourcesContent":["import { CylinderGeometry, Group, Mesh, MeshStandardMaterial, SphereGeometry } from \"three\";\n\nexport class Bone extends Group {\n constructor(radiusTop = 0.5, radiusBottom = 0.5, height = 2, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(\n radiusTop * 0.6, // slightly narrower for the shaft\n radiusBottom * 0.6,\n height,\n radialSegments,\n );\n const material = new MeshStandardMaterial({ color: 0xffffff });\n const cylinderMesh = new Mesh(cylinderGeometry, material);\n cylinderMesh.position.y = 0;\n this.add(cylinderMesh);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = new Mesh(sphereGeometry, material);\n const topSphere2 = new Mesh(sphereGeometry, material);\n const bottomSphere1 = new Mesh(sphereGeometry, material);\n const bottomSphere2 = new Mesh(sphereGeometry, material);\n\n // Position the spheres at each end of the cylinder\n topSphere1.position.set(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.position.set(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.position.set(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.position.set(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Add the spheres to the bone\n this.add(topSphere1);\n this.add(topSphere2);\n this.add(bottomSphere1);\n this.add(bottomSphere2);\n }\n}\n"],"names":["Bone","Group","radiusTop","radiusBottom","height","radialSegments","cylinderGeometry","CylinderGeometry","material","MeshStandardMaterial","cylinderMesh","Mesh","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2"],"mappings":";AAEO,MAAMA,UAAaC,EAAM;AAAA,EAC9B,YAAYC,IAAY,KAAKC,IAAe,KAAKC,IAAS,GAAGC,IAAiB,GAAG;AACzE;AAGN,UAAMC,IAAmB,IAAIC;AAAA,MAC3BL,IAAY;AAAA;AAAA,MACZC,IAAe;AAAA,MACfC;AAAA,MACAC;AAAA,IAAA,GAEIG,IAAW,IAAIC,EAAqB,EAAE,OAAO,SAAU,CAAA,GACvDC,IAAe,IAAIC,EAAKL,GAAkBE,CAAQ;AACxD,IAAAE,EAAa,SAAS,IAAI,GAC1B,KAAK,IAAIA,CAAY;AAGrB,UAAME,IAAiB,IAAIC,EAAeX,GAAWG,GAAgBA,CAAc,GAC7ES,IAAa,IAAIH,EAAKC,GAAgBJ,CAAQ,GAC9CO,IAAa,IAAIJ,EAAKC,GAAgBJ,CAAQ,GAC9CQ,IAAgB,IAAIL,EAAKC,GAAgBJ,CAAQ,GACjDS,IAAgB,IAAIN,EAAKC,GAAgBJ,CAAQ;AAG5C,IAAAM,EAAA,SAAS,IAAI,GAAGV,IAAS,IAAIF,IAAY,KAAK,CAACA,IAAY,GAAG,GAC9Da,EAAA,SAAS,IAAI,GAAGX,IAAS,IAAIF,IAAY,KAAKA,IAAY,GAAG,GAC1Dc,EAAA,SAAS,IAAI,GAAG,CAACZ,IAAS,IAAID,IAAe,KAAK,CAACA,IAAe,GAAG,GACrEc,EAAA,SAAS,IAAI,GAAG,CAACb,IAAS,IAAID,IAAe,KAAKA,IAAe,GAAG,GAGlF,KAAK,IAAIW,CAAU,GACnB,KAAK,IAAIC,CAAU,GACnB,KAAK,IAAIC,CAAa,GACtB,KAAK,IAAIC,CAAa;AAAA,EACxB;AACF;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/geometry/cemetery/CrossHeadstoneGeometry.js","../src/geometry/cemetery/ObeliskHeadstoneGeometry.js","../src/geometry/cemetery/RoundedHeadstoneGeometry.js","../src/geometry/cemetery/SquareHeadstoneGeometry.js","../src/geometry/fence/FenceColumn.js","../src/geometry/fence/WroughtIronBarGeometry.js","../src/geometry/leafs/SimpleLeafGeometry.js","../src/geometry/skeleton/BoneGeometry.js","../src/group/astronomy/Moon.js","../src/group/cemetery/Mausoleum.js","../src/group/lighting/Candle.js","../src/group/lighting/Lantern.js","../src/group/rocks/Stones.js"],"sourcesContent":["import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass CrossHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.4, height = 1.2, depth = 0.2) {\n super();\n\n // Create the vertical part of the cross\n const verticalHeight = height * 0.6;\n const verticalGeometry = new BoxGeometry(width / 2, verticalHeight, depth);\n verticalGeometry.translate(0, verticalHeight / 2, 0);\n\n // Create the horizontal part of the cross\n const horizontalWidth = width * 1.5;\n const horizontalGeometry = new BoxGeometry(horizontalWidth, width / 4, depth);\n horizontalGeometry.translate(0, verticalHeight * 0.75, 0);\n\n // Merge both parts into a cross\n this.copy(mergeGeometries([verticalGeometry, horizontalGeometry], true));\n }\n}\n\nexport { CrossHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, ConeGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass ObeliskHeadstoneGeometry extends BufferGeometry {\n constructor(totalHeight = 1.75, baseWidth = 0.75) {\n super();\n\n // Define height proportions relative to the total height\n const baseHeight = totalHeight * 0.05;\n const lowerSegmentHeight = totalHeight * 0.15;\n const middleSegmentHeight = totalHeight * 0.15;\n const topSegmentHeight = totalHeight * 0.75;\n\n let currentHeight = 0;\n\n // Base of the Headstone (a wide box)\n const baseGeometry = new BoxGeometry(baseWidth, baseHeight, baseWidth);\n baseGeometry.translate(0, currentHeight + baseHeight / 2, 0);\n currentHeight += baseHeight;\n\n // Lower Segment (a slightly narrower box)\n const lowerSegmentGeometry = new BoxGeometry(baseWidth * 0.8, lowerSegmentHeight, baseWidth * 0.8);\n lowerSegmentGeometry.translate(0, currentHeight + lowerSegmentHeight / 2, 0);\n currentHeight += lowerSegmentHeight;\n\n // Middle Segment (an even narrower box)\n const middleSegmentGeometry = new BoxGeometry(baseWidth * 0.6, middleSegmentHeight, baseWidth * 0.6);\n middleSegmentGeometry.translate(0, currentHeight + middleSegmentHeight / 2, 0);\n currentHeight += middleSegmentHeight;\n\n // Top Segment (a tall, thin box to form the obelisk shape)\n const topSegmentGeometry = new BoxGeometry(baseWidth * 0.4, topSegmentHeight, baseWidth * 0.4);\n topSegmentGeometry.translate(0, currentHeight + topSegmentHeight / 2, 0);\n currentHeight += topSegmentHeight;\n\n // Pyramid Top (a cone to form the pointed top of the obelisk)\n const pyramidGeometry = new ConeGeometry((baseWidth * 0.4) / Math.sqrt(2), 0.1, 4, 1, false, Math.PI / 4);\n pyramidGeometry.translate(0, currentHeight + 0.1 / 2, 0);\n\n this.copy(\n mergeGeometries([baseGeometry, lowerSegmentGeometry, middleSegmentGeometry, topSegmentGeometry, pyramidGeometry], true),\n );\n }\n}\n\nexport { ObeliskHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass RoundedHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.6, height = 1.0, depth = 0.2) {\n super();\n\n // Create the base of the headstone (a box)\n const baseHeight = height * 0.7;\n const baseGeometry = new BoxGeometry(width, baseHeight, depth);\n baseGeometry.translate(0, baseHeight / 2, 0);\n\n // Create the rounded top part (a half cylinder with caps)\n const topHeight = height - baseHeight;\n const topGeometry = new CylinderGeometry(width / 2, width / 2, depth, 16, 1, false, 0, Math.PI);\n topGeometry.rotateY(Math.PI / 2);\n topGeometry.rotateX(Math.PI / 2);\n topGeometry.translate(0, baseHeight + topHeight / 2 - depth / 2 - 0.05, 0);\n\n // Merge base and top into a single geometry\n this.copy(mergeGeometries([baseGeometry, topGeometry], true));\n }\n}\n\nexport { RoundedHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\n\nclass SquareHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.5, height = 0.8, depth = 0.15) {\n super();\n\n // Create a rectangular slab\n const slabGeometry = new BoxGeometry(width, height, depth);\n slabGeometry.translate(0, height / 2, 0); // Shift up to stand on the ground\n\n this.copy(slabGeometry);\n }\n}\nexport { SquareHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Fence Column Geometry, a simple fence column shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a fence column\n * const columnGeometry = new FenceColumn();\n * const columnMaterial = new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true });\n * const column = new Mesh(columnGeometry, columnMaterial);\n * scene.add(column);\n */\nclass FenceColumn extends BufferGeometry {\n constructor(height = 2.25) {\n super();\n\n // Column Base (a wider base for stability)\n const baseGeometry = new BoxGeometry(1.2, 0.5, 1.2);\n baseGeometry.translate(0, 0.25, 0);\n\n // Main Column (a tall rectangular shape, adjustable height)\n const columnGeometry = new BoxGeometry(1, height, 1);\n columnGeometry.translate(0, 0.5 + height / 2, 0);\n\n // Column Cap (a slightly wider cap on top)\n const capGeometry = new BoxGeometry(1.4, 0.3, 1.4);\n capGeometry.translate(0, 0.5 + height + 0.15, 0);\n\n this.copy(mergeGeometries([baseGeometry, columnGeometry, capGeometry], true));\n }\n}\n\nexport { FenceColumn };\n","import { BufferGeometry, ConeGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Wrought Iron Bar Geometry, a simple wrought iron bar shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a wrought iron bar\n * const barGeometry = new WroughtIronBarGeometry();\n * const barMaterial = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });\n * const bar = new Mesh(barGeometry, barMaterial);\n * scene.add(bar);\n */\nclass WroughtIronBarGeometry extends BufferGeometry {\n constructor(barHeight = 2.0, barRadius = 0.05, spikeHeight = 0.3) {\n super();\n\n // Create a cylinder for the vertical bar\n const barGeometry = new CylinderGeometry(barRadius, barRadius, barHeight, 8);\n barGeometry.translate(0, barHeight / 2, 0); // Shift up to stand on the ground\n\n // Create a cone for the spike on top\n const spikeGeometry = new ConeGeometry(barRadius * 1.5, spikeHeight, 8);\n spikeGeometry.translate(0, barHeight + spikeHeight / 2, 0); // Place on top of the bar\n\n // Merge bar and spike into one geometry\n this.copy(mergeGeometries([barGeometry, spikeGeometry], true));\n }\n}\n\nexport { WroughtIronBarGeometry };\n","import { BufferGeometry, Float32BufferAttribute } from \"three\";\n\nclass SimpleLeafGeometry extends BufferGeometry {\n constructor(size = 0.1) {\n super();\n\n const vertices = [];\n const indices = [];\n\n // Define vertices to approximate a simple, elongated, oval leaf shape\n const leafPoints = [\n [0, 1], // Top point\n [0.5, 0.75], // Right upper middle\n [0.75, 0.25], // Right lower middle\n [0.5, -0.5], // Right bottom middle\n [0, -1], // Bottom point\n [-0.5, -0.5], // Left bottom middle\n [-0.75, 0.25], // Left lower middle\n [-0.5, 0.75], // Left upper middle\n ];\n\n // Add vertices to the geometry, scaling them with the `size` parameter\n for (let i = 0; i < leafPoints.length; i++) {\n const [x, y] = leafPoints[i];\n vertices.push(x * size, y * size, 0);\n }\n\n // Define indices to form triangular faces of the leaf\n // Create a fan-like structure connecting the top vertex (index 0) to other neighboring vertices\n for (let i = 1; i < leafPoints.length - 1; i++) {\n indices.push(0, i, i + 1);\n }\n // Close the fan with the last triangle\n indices.push(0, leafPoints.length - 1, 1);\n\n // Convert the vertices and indices to buffer attributes\n const positionAttribute = new Float32BufferAttribute(vertices, 3);\n this.setAttribute('position', positionAttribute);\n this.setIndex(indices);\n\n this.computeVertexNormals();\n }\n}\n\nexport { SimpleLeafGeometry };\n","import { BufferGeometry, CylinderGeometry, SphereGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Bone Geometry, a simple bone shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a bone\n * const boneGeometry = new Bone();\n * const boneMaterial = new MeshStandardMaterial({ color: 0xffffff });\n * const bone = new Mesh(boneGeometry, boneMaterial);\n * scene.add(bone);\n */\nclass BoneGeometry extends BufferGeometry {\n constructor(radiusTop = 0.1, radiusBottom = 0.1, height = 0.4, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(radiusTop * 0.6, radiusBottom * 0.6, height, radialSegments);\n cylinderGeometry.translate(0, 0, 0);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = sphereGeometry.clone();\n const topSphere2 = sphereGeometry.clone();\n const bottomSphere1 = sphereGeometry.clone();\n const bottomSphere2 = sphereGeometry.clone();\n\n // Position the spheres at each end of the cylinder\n topSphere1.translate(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.translate(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.translate(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.translate(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Merge the parts\n this.copy(mergeGeometries([cylinderGeometry, topSphere1, topSphere2, bottomSphere1, bottomSphere2], true));\n }\n}\n\nexport { BoneGeometry };\n","import { Group, Mesh, ShaderMaterial, SphereGeometry } from \"three\";\n\nclass Moon extends Group {\n constructor() {\n super();\n\n // Create moon geometry\n const moonGeometry = new SphereGeometry(5, 32, 32);\n\n // Custom ShaderMaterial\n const moonMaterial = new ShaderMaterial({\n uniforms: {\n time: { value: 0.0 },\n },\n vertexShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n void main() {\n vNormal = normalize(normal);\n vPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n\n // Simple 3D noise function\n float hash(vec3 p) {\n p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));\n p *= 17.0;\n return fract(p.x * p.y * p.z * (p.x + p.y + p.z));\n }\n\n float noise(vec3 p) {\n vec3 ip = floor(p);\n vec3 fp = fract(p);\n fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep\n return mix(\n mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),\n mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),\n fp.z);\n }\n\n void main() {\n vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color\n float n = noise(vPosition * 0.5); // Apply noise with frequency\n color *= 0.8 + 0.2 * n; // Modulate color by noise\n gl_FragColor = vec4(color, 1.0);\n }\n `,\n flatShading: true,\n });\n\n // Create the moon mesh and add it to the scene\n const moon = new Mesh(moonGeometry, moonMaterial);\n this.add(moon);\n }\n}\n\nexport { Moon };\n","import { BoxGeometry, ConeGeometry, CylinderGeometry, ExtrudeGeometry, Group, Mesh, MeshStandardMaterial, Shape } from \"three\";\n\nclass Mausoleum extends Group {\n constructor() {\n super();\n\n // Base of the Mausoleum\n const baseGeometry = new BoxGeometry(5, 1, 5);\n const baseMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0.5, 0);\n this.add(baseMesh);\n\n // Main Building Structure\n const buildingGeometry = new BoxGeometry(4, 3, 4);\n const buildingMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n const buildingMesh = new Mesh(buildingGeometry, buildingMaterial);\n buildingMesh.position.set(0, 2.5, 0);\n this.add(buildingMesh);\n\n // Roof (Peaked)\n const roofGeometry = new ConeGeometry(3.5, 2, 4);\n const roofMaterial = new MeshStandardMaterial({ color: 0x505050, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.rotation.y = Math.PI / 4;\n roofMesh.position.set(0, 5, 0);\n this.add(roofMesh);\n\n // Pillars\n const pillarGeometry = new CylinderGeometry(0.2, 0.2, 3.5, 16);\n const pillarMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n\n const pillarPositions = [\n [-1.8, 2.3, -2.2],\n [1.8, 2.3, -2.2],\n [-1.8, 2.3, 2.2],\n [1.8, 2.3, 2.2],\n ];\n\n pillarPositions.forEach((position) => {\n const pillarMesh = new Mesh(pillarGeometry, pillarMaterial);\n pillarMesh.position.set(...position);\n this.add(pillarMesh);\n });\n\n // Corrected Arched Entrance\n const archShape = new Shape();\n archShape.moveTo(-1, 0);\n archShape.lineTo(-1, 2);\n archShape.absarc(0, 2, 1, Math.PI, 0, true);\n archShape.lineTo(1, 0);\n\n const extrudeSettings = {\n depth: 0.5,\n bevelEnabled: false,\n };\n const archGeometry = new ExtrudeGeometry(archShape, extrudeSettings);\n const archMaterial = new MeshStandardMaterial({ color: 0x404040, flatShading: true });\n const archMesh = new Mesh(archGeometry, archMaterial);\n archMesh.position.set(0, 0.5, 1.7);\n this.add(archMesh);\n }\n}\n\nexport { Mausoleum };\n","import { CylinderGeometry, Group, Mesh, MeshBasicMaterial, MeshStandardMaterial, PointLight, SphereGeometry } from \"three\";\n\nclass Candle extends Group {\n constructor(height = 1, radius = 0.2) {\n super();\n this.height = height;\n this.radius = radius;\n this.createCandle();\n this.animateFlicker();\n }\n\n createCandle() {\n // Candle Geometry\n const candleGeometry = new CylinderGeometry(this.radius, this.radius, this.height, 32);\n const candleMaterial = new MeshStandardMaterial({ color: 0xffffff });\n this.candle = new Mesh(candleGeometry, candleMaterial);\n this.candle.position.set(0, this.height / 2, 0);\n this.add(this.candle);\n\n // Flame Geometry\n const flameGeometry = new SphereGeometry(0.05, 16, 16);\n const flameMaterial = new MeshBasicMaterial({ color: 0xffa500 });\n this.flame = new Mesh(flameGeometry, flameMaterial);\n this.flame.position.set(0, this.height + 0.05, 0);\n this.add(this.flame);\n\n // Candlelight\n this.candleLight = new PointLight(0xffa500, 1, 5);\n this.candleLight.position.set(0, this.height + 0.05, 0);\n this.candleLight.castShadow = true;\n this.add(this.candleLight);\n }\n\n animateFlicker() {\n const flicker = () => {\n // Random flicker intensity between 0.8 and 1.2\n this.candleLight.intensity = 1 + (Math.random() * 0.4 - 0.2);\n\n // Optional: slight random movement to simulate a flickering flame\n this.candleLight.position.x = Math.random() * 0.02 - 0.01;\n this.candleLight.position.z = Math.random() * 0.02 - 0.01;\n\n requestAnimationFrame(flicker);\n };\n flicker();\n }\n}\n\nexport { Candle };\n","import { ConeGeometry, CylinderGeometry, Group, Mesh, MeshStandardMaterial, PointLight, TorusGeometry } from \"three\";\n\n// Class for Lantern Geometry\nclass Lantern extends Group {\n constructor(height = 1.3, baseWidth = 0.5) {\n super();\n\n // Lantern Base (cylinder)\n const baseGeometry = new CylinderGeometry(baseWidth, baseWidth, 0.2, 16);\n const baseMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0, 0);\n this.add(baseMesh);\n\n // Lantern Body (a rectangular frame)\n const bodyGeometry = new CylinderGeometry(baseWidth * 0.9, baseWidth * 0.9, height);\n const bodyMaterial = new MeshStandardMaterial({ color: 0xffd700, flatShading: true, transparent: true, opacity: 0.6 });\n const bodyMesh = new Mesh(bodyGeometry, bodyMaterial);\n bodyMesh.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n this.add(bodyMesh);\n\n // Lantern Roof (a cone)\n const roofGeometry = new ConeGeometry(baseWidth * 1.1, 0.5, 8);\n const roofMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.position.set(0, height + 0.35, 0); // Adjusted position based on height\n this.add(roofMesh);\n\n // Lantern Handle (a torus)\n const handleGeometry = new TorusGeometry(baseWidth * 0.8, 0.05, 8, 16);\n const handleMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const handleMesh = new Mesh(handleGeometry, handleMaterial);\n handleMesh.position.set(0, height + 0.85, 0); // Adjusted to sit above the roof\n this.add(handleMesh);\n\n // Lantern Light (point light inside)\n const light = new PointLight(0xffaa00, 1.5, 15);\n light.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n light.castShadow = true;\n this.add(light);\n }\n}\n\nexport { Lantern };\n","import { DodecahedronGeometry, Group, Mesh, MeshStandardMaterial } from \"three\";\n\nclass Stones extends Group {\n constructor() {\n super();\n\n // Rock Geometry (using Dodecahedron for a low-poly random rock-like shape)\n const rockGeometry = new DodecahedronGeometry(1, 0); // Low-poly shape\n const rockMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n\n // Create multiple random rocks with slight variations\n for (let i = 0; i < 5; i++) {\n const rockMesh = new Mesh(rockGeometry, rockMaterial);\n rockMesh.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4); // Scale randomly to make each rock unique\n rockMesh.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI); // Random rotation for variation\n rockMesh.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4); // Keep rocks at ground level\n this.add(rockMesh);\n }\n }\n}\n\nexport { Stones };\n"],"names":["CrossHeadstoneGeometry","BufferGeometry","width","height","depth","verticalHeight","verticalGeometry","BoxGeometry","horizontalWidth","horizontalGeometry","mergeGeometries","ObeliskHeadstoneGeometry","totalHeight","baseWidth","baseHeight","lowerSegmentHeight","middleSegmentHeight","topSegmentHeight","currentHeight","baseGeometry","lowerSegmentGeometry","middleSegmentGeometry","topSegmentGeometry","pyramidGeometry","ConeGeometry","RoundedHeadstoneGeometry","topHeight","topGeometry","CylinderGeometry","SquareHeadstoneGeometry","slabGeometry","FenceColumn","columnGeometry","capGeometry","WroughtIronBarGeometry","barHeight","barRadius","spikeHeight","barGeometry","spikeGeometry","SimpleLeafGeometry","size","vertices","indices","leafPoints","i","x","y","positionAttribute","Float32BufferAttribute","BoneGeometry","radiusTop","radiusBottom","radialSegments","cylinderGeometry","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2","Moon","Group","moonGeometry","moonMaterial","ShaderMaterial","moon","Mesh","Mausoleum","baseMaterial","MeshStandardMaterial","baseMesh","buildingGeometry","buildingMaterial","buildingMesh","roofGeometry","roofMaterial","roofMesh","pillarGeometry","pillarMaterial","position","pillarMesh","archShape","Shape","extrudeSettings","archGeometry","ExtrudeGeometry","archMaterial","archMesh","Candle","radius","candleGeometry","candleMaterial","flameGeometry","flameMaterial","MeshBasicMaterial","PointLight","flicker","Lantern","bodyGeometry","bodyMaterial","bodyMesh","handleGeometry","TorusGeometry","handleMaterial","handleMesh","light","Stones","rockGeometry","DodecahedronGeometry","rockMaterial","rockMesh"],"mappings":";;AAGA,MAAMA,UAA+BC,EAAe;AAAA,EAClD,YAAYC,IAAQ,KAAKC,IAAS,KAAKC,IAAQ,KAAK;AAClD;AAGA,UAAMC,IAAiBF,IAAS,KAC1BG,IAAmB,IAAIC,EAAYL,IAAQ,GAAGG,GAAgBD,CAAK;AACzE,IAAAE,EAAiB,UAAU,GAAGD,IAAiB,GAAG,CAAC;AAGnD,UAAMG,IAAkBN,IAAQ,KAC1BO,IAAqB,IAAIF,EAAYC,GAAiBN,IAAQ,GAAGE,CAAK;AAC5E,IAAAK,EAAmB,UAAU,GAAGJ,IAAiB,MAAM,CAAC,GAGxD,KAAK,KAAKK,EAAgB,CAACJ,GAAkBG,CAAkB,GAAG,EAAI,CAAC;AAAA,EACxE;AACH;ACjBA,MAAME,UAAiCV,EAAe;AAAA,EACpD,YAAYW,IAAc,MAAMC,IAAY,MAAM;AAChD;AAGA,UAAMC,IAAaF,IAAc,MAC3BG,IAAqBH,IAAc,MACnCI,IAAsBJ,IAAc,MACpCK,IAAmBL,IAAc;AAEvC,QAAIM,IAAgB;AAGpB,UAAMC,IAAe,IAAIZ,EAAYM,GAAWC,GAAYD,CAAS;AACrE,IAAAM,EAAa,UAAU,GAAGD,IAAgBJ,IAAa,GAAG,CAAC,GAC3DI,KAAiBJ;AAGjB,UAAMM,IAAuB,IAAIb,EAAYM,IAAY,KAAKE,GAAoBF,IAAY,GAAG;AACjG,IAA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C,IAAa,IAAItC,EAAKmC,GAAgBE,CAAc;AAC1D,IAAAC,EAAW,SAAS,IAAI,GAAGtG,IAAS,MAAM,CAAC,GAC3C,KAAK,IAAIsG,CAAU;AAGnB,UAAMC,IAAQ,IAAIV,EAAW,UAAU,KAAK,EAAE;AAC9C,IAAAU,EAAM,SAAS,IAAI,GAAGvG,IAAS,IAAI,KAAK,CAAC,GACzCuG,EAAM,aAAa,IACnB,KAAK,IAAIA,CAAK;AAAA,EACf;AACH;ACvCA,MAAMC,UAAe7C,EAAM;AAAA,EACzB,cAAc;AACZ;AAGA,UAAM8C,IAAe,IAAIC,EAAqB,GAAG,CAAC,GAC5CC,IAAe,IAAIxC,EAAqB,EAAE,OAAO,SAAU,aAAa,GAAI,CAAE;AAGpF,aAASzB,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,YAAMkE,IAAW,IAAI5C,EAAKyC,GAAcE,CAAY;AACpD,MAAAC,EAAS,MAAM,IAAI,MAAM,KAAK,OAAQ,IAAG,KAAK,MAAM,KAAK,OAAQ,IAAG,KAAK,MAAM,KAAK,OAAM,IAAK,GAAG,GAClGA,EAAS,SAAS,IAAI,KAAK,OAAQ,IAAG,KAAK,IAAI,KAAK,OAAQ,IAAG,KAAK,IAAI,KAAK,WAAW,KAAK,EAAE,GAC/FA,EAAS,SAAS,KAAK,KAAK,OAAQ,IAAG,OAAO,GAAG,IAAI,KAAK,OAAQ,IAAG,OAAO,CAAC,GAC7E,KAAK,IAAIA,CAAQ;AAAA,IAClB;AAAA,EACF;AACH;"}
|
package/dist/index.iife.js
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
var ThreeLowPoly=function(
|
|
1
|
+
var ThreeLowPoly=function(c,e,u){"use strict";class x extends e.BufferGeometry{constructor(o=.4,t=1.2,s=.2){super();const n=t*.6,i=new e.BoxGeometry(o/2,n,s);i.translate(0,n/2,0);const a=o*1.5,r=new e.BoxGeometry(a,o/4,s);r.translate(0,n*.75,0),this.copy(u.mergeGeometries([i,r],!0))}}class g extends e.BufferGeometry{constructor(o=1.75,t=.75){super();const s=o*.05,n=o*.15,i=o*.15,a=o*.75;let r=0;const m=new e.BoxGeometry(t,s,t);m.translate(0,r+s/2,0),r+=s;const d=new e.BoxGeometry(t*.8,n,t*.8);d.translate(0,r+n/2,0),r+=n;const y=new e.BoxGeometry(t*.6,i,t*.6);y.translate(0,r+i/2,0),r+=i;const p=new e.BoxGeometry(t*.4,a,t*.4);p.translate(0,r+a/2,0),r+=a;const G=new e.ConeGeometry(t*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);G.translate(0,r+.05,0),this.copy(u.mergeGeometries([m,d,y,p,G],!0))}}class v extends e.BufferGeometry{constructor(o=.6,t=1,s=.2){super();const n=t*.7,i=new e.BoxGeometry(o,n,s);i.translate(0,n/2,0);const a=t-n,r=new e.CylinderGeometry(o/2,o/2,s,16,1,!1,0,Math.PI);r.rotateY(Math.PI/2),r.rotateX(Math.PI/2),r.translate(0,n+a/2-s/2-.05,0),this.copy(u.mergeGeometries([i,r],!0))}}class P extends e.BufferGeometry{constructor(o=.5,t=.8,s=.15){super();const n=new e.BoxGeometry(o,t,s);n.translate(0,t/2,0),this.copy(n)}}class B extends e.BufferGeometry{constructor(o=2.25){super();const t=new e.BoxGeometry(1.2,.5,1.2);t.translate(0,.25,0);const s=new e.BoxGeometry(1,o,1);s.translate(0,.5+o/2,0);const n=new e.BoxGeometry(1.4,.3,1.4);n.translate(0,.5+o+.15,0),this.copy(u.mergeGeometries([t,s,n],!0))}}class C extends e.BufferGeometry{constructor(o=2,t=.05,s=.3){super();const n=new e.CylinderGeometry(t,t,o,8);n.translate(0,o/2,0);const i=new e.ConeGeometry(t*1.5,s,8);i.translate(0,o+s/2,0),this.copy(u.mergeGeometries([n,i],!0))}}class b extends e.BufferGeometry{constructor(o=.1){super();const t=[],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[r,m]=n[a];t.push(r*o,m*o,0)}for(let a=1;a<n.length-1;a++)s.push(0,a,a+1);s.push(0,n.length-1,1);const i=new e.Float32BufferAttribute(t,3);this.setAttribute("position",i),this.setIndex(s),this.computeVertexNormals()}}class L extends e.BufferGeometry{constructor(o=.1,t=.1,s=.4,n=8){super();const i=new e.CylinderGeometry(o*.6,t*.6,s,n);i.translate(0,0,0);const a=new e.SphereGeometry(o,n,n),r=a.clone(),m=a.clone(),d=a.clone(),y=a.clone();r.translate(0,s/2+o*.6,-o*.6),m.translate(0,s/2+o*.6,o*.6),d.translate(0,-s/2-t*.6,-t*.6),y.translate(0,-s/2-t*.6,t*.6),this.copy(u.mergeGeometries([i,r,m,d,y],!0))}}class I extends e.Group{constructor(){super();const o=new e.SphereGeometry(5,32,32),t=new e.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
|
|
2
|
+
varying vec3 vNormal;
|
|
3
|
+
varying vec3 vPosition;
|
|
4
|
+
void main() {
|
|
5
|
+
vNormal = normalize(normal);
|
|
6
|
+
vPosition = position;
|
|
7
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
8
|
+
}
|
|
9
|
+
`,fragmentShader:`
|
|
10
|
+
varying vec3 vNormal;
|
|
11
|
+
varying vec3 vPosition;
|
|
12
|
+
|
|
13
|
+
// Simple 3D noise function
|
|
14
|
+
float hash(vec3 p) {
|
|
15
|
+
p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
|
|
16
|
+
p *= 17.0;
|
|
17
|
+
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
float noise(vec3 p) {
|
|
21
|
+
vec3 ip = floor(p);
|
|
22
|
+
vec3 fp = fract(p);
|
|
23
|
+
fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
|
|
24
|
+
return mix(
|
|
25
|
+
mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
|
|
26
|
+
mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
|
|
27
|
+
mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
|
|
28
|
+
mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
|
|
29
|
+
fp.z);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
void main() {
|
|
33
|
+
vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
|
|
34
|
+
float n = noise(vPosition * 0.5); // Apply noise with frequency
|
|
35
|
+
color *= 0.8 + 0.2 * n; // Modulate color by noise
|
|
36
|
+
gl_FragColor = vec4(color, 1.0);
|
|
37
|
+
}
|
|
38
|
+
`,flatShading:!0}),s=new e.Mesh(o,t);this.add(s)}}class H extends e.Group{constructor(){super();const o=new e.BoxGeometry(5,1,5),t=new e.MeshStandardMaterial({color:8421504,flatShading:!0}),s=new e.Mesh(o,t);s.position.set(0,.5,0),this.add(s);const n=new e.BoxGeometry(4,3,4),i=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),a=new e.Mesh(n,i);a.position.set(0,2.5,0),this.add(a);const r=new e.ConeGeometry(3.5,2,4),m=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),d=new e.Mesh(r,m);d.rotation.y=Math.PI/4,d.position.set(0,5,0),this.add(d);const y=new e.CylinderGeometry(.2,.2,3.5,16),p=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(A=>{const S=new e.Mesh(y,p);S.position.set(...A),this.add(S)});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 h={depth:.5,bevelEnabled:!1},f=new e.ExtrudeGeometry(M,h),q=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),w=new e.Mesh(f,q);w.position.set(0,.5,1.7),this.add(w)}}class k extends e.Group{constructor(o=1,t=.2){super(),this.height=o,this.radius=t,this.createCandle(),this.animateFlicker()}createCandle(){const o=new e.CylinderGeometry(this.radius,this.radius,this.height,32),t=new e.MeshStandardMaterial({color:16777215});this.candle=new e.Mesh(o,t),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 o=()=>{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(o)};o()}}class F extends e.Group{constructor(o=1.3,t=.5){super();const s=new e.CylinderGeometry(t,t,.2,16),n=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),i=new e.Mesh(s,n);i.position.set(0,0,0),this.add(i);const a=new e.CylinderGeometry(t*.9,t*.9,o),r=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),m=new e.Mesh(a,r);m.position.set(0,o/2+.1,0),this.add(m);const d=new e.ConeGeometry(t*1.1,.5,8),y=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),p=new e.Mesh(d,y);p.position.set(0,o+.35,0),this.add(p);const G=new e.TorusGeometry(t*.8,.05,8,16),M=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),h=new e.Mesh(G,M);h.position.set(0,o+.85,0),this.add(h);const f=new e.PointLight(16755200,1.5,15);f.position.set(0,o/2+.1,0),f.castShadow=!0,this.add(f)}}class z extends e.Group{constructor(){super();const o=new e.DodecahedronGeometry(1,0),t=new e.MeshStandardMaterial({color:8421504,flatShading:!0});for(let s=0;s<5;s++){const n=new e.Mesh(o,t);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)}}}return c.BoneGeometry=L,c.Candle=k,c.CrossHeadstoneGeometry=x,c.FenceColumn=B,c.Lantern=F,c.Mausoleum=H,c.Moon=I,c.ObeliskHeadstoneGeometry=g,c.RoundedHeadstoneGeometry=v,c.SimpleLeafGeometry=b,c.SquareHeadstoneGeometry=P,c.Stones=z,c.WroughtIronBarGeometry=C,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),c}({},THREE,BufferGeometryUtils);
|
|
2
39
|
//# sourceMappingURL=index.iife.js.map
|
package/dist/index.iife.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.iife.js","sources":["../src/geometry/Bone.ts"],"sourcesContent":["import { CylinderGeometry, Group, Mesh, MeshStandardMaterial, SphereGeometry } from \"three\";\n\nexport class Bone extends Group {\n constructor(radiusTop = 0.5, radiusBottom = 0.5, height = 2, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(\n radiusTop * 0.6, // slightly narrower for the shaft\n radiusBottom * 0.6,\n height,\n radialSegments,\n );\n const material = new MeshStandardMaterial({ color: 0xffffff });\n const cylinderMesh = new Mesh(cylinderGeometry, material);\n cylinderMesh.position.y = 0;\n this.add(cylinderMesh);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = new Mesh(sphereGeometry, material);\n const topSphere2 = new Mesh(sphereGeometry, material);\n const bottomSphere1 = new Mesh(sphereGeometry, material);\n const bottomSphere2 = new Mesh(sphereGeometry, material);\n\n // Position the spheres at each end of the cylinder\n topSphere1.position.set(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.position.set(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.position.set(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.position.set(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Add the spheres to the bone\n this.add(topSphere1);\n this.add(topSphere2);\n this.add(bottomSphere1);\n this.add(bottomSphere2);\n }\n}\n"],"names":["Bone","Group","radiusTop","radiusBottom","height","radialSegments","cylinderGeometry","CylinderGeometry","material","MeshStandardMaterial","cylinderMesh","Mesh","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2"],"mappings":"4CAEO,MAAMA,UAAaC,EAAAA,KAAM,CAC9B,YAAYC,EAAY,GAAKC,EAAe,GAAKC,EAAS,EAAGC,EAAiB,EAAG,CACzE,QAGN,MAAMC,EAAmB,IAAIC,EAAA,iBAC3BL,EAAY,GACZC,EAAe,GACfC,EACAC,CAAA,EAEIG,EAAW,IAAIC,EAAA,qBAAqB,CAAE,MAAO,QAAU,CAAA,EACvDC,EAAe,IAAIC,EAAAA,KAAKL,EAAkBE,CAAQ,EACxDE,EAAa,SAAS,EAAI,EAC1B,KAAK,IAAIA,CAAY,EAGrB,MAAME,EAAiB,IAAIC,EAAe,eAAAX,EAAWG,EAAgBA,CAAc,EAC7ES,EAAa,IAAIH,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CO,EAAa,IAAIJ,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CQ,EAAgB,IAAIL,EAAAA,KAAKC,EAAgBJ,CAAQ,EACjDS,EAAgB,IAAIN,EAAAA,KAAKC,EAAgBJ,CAAQ,EAG5CM,EAAA,SAAS,IAAI,EAAGV,EAAS,EAAIF,EAAY,GAAK,CAACA,EAAY,EAAG,EAC9Da,EAAA,SAAS,IAAI,EAAGX,EAAS,EAAIF,EAAY,GAAKA,EAAY,EAAG,EAC1Dc,EAAA,SAAS,IAAI,EAAG,CAACZ,EAAS,EAAID,EAAe,GAAK,CAACA,EAAe,EAAG,EACrEc,EAAA,SAAS,IAAI,EAAG,CAACb,EAAS,EAAID,EAAe,GAAKA,EAAe,EAAG,EAGlF,KAAK,IAAIW,CAAU,EACnB,KAAK,IAAIC,CAAU,EACnB,KAAK,IAAIC,CAAa,EACtB,KAAK,IAAIC,CAAa,CACxB,CACF"}
|
|
1
|
+
{"version":3,"file":"index.iife.js","sources":["../src/geometry/cemetery/CrossHeadstoneGeometry.js","../src/geometry/cemetery/ObeliskHeadstoneGeometry.js","../src/geometry/cemetery/RoundedHeadstoneGeometry.js","../src/geometry/cemetery/SquareHeadstoneGeometry.js","../src/geometry/fence/FenceColumn.js","../src/geometry/fence/WroughtIronBarGeometry.js","../src/geometry/leafs/SimpleLeafGeometry.js","../src/geometry/skeleton/BoneGeometry.js","../src/group/astronomy/Moon.js","../src/group/cemetery/Mausoleum.js","../src/group/lighting/Candle.js","../src/group/lighting/Lantern.js","../src/group/rocks/Stones.js"],"sourcesContent":["import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass CrossHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.4, height = 1.2, depth = 0.2) {\n super();\n\n // Create the vertical part of the cross\n const verticalHeight = height * 0.6;\n const verticalGeometry = new BoxGeometry(width / 2, verticalHeight, depth);\n verticalGeometry.translate(0, verticalHeight / 2, 0);\n\n // Create the horizontal part of the cross\n const horizontalWidth = width * 1.5;\n const horizontalGeometry = new BoxGeometry(horizontalWidth, width / 4, depth);\n horizontalGeometry.translate(0, verticalHeight * 0.75, 0);\n\n // Merge both parts into a cross\n this.copy(mergeGeometries([verticalGeometry, horizontalGeometry], true));\n }\n}\n\nexport { CrossHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, ConeGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass ObeliskHeadstoneGeometry extends BufferGeometry {\n constructor(totalHeight = 1.75, baseWidth = 0.75) {\n super();\n\n // Define height proportions relative to the total height\n const baseHeight = totalHeight * 0.05;\n const lowerSegmentHeight = totalHeight * 0.15;\n const middleSegmentHeight = totalHeight * 0.15;\n const topSegmentHeight = totalHeight * 0.75;\n\n let currentHeight = 0;\n\n // Base of the Headstone (a wide box)\n const baseGeometry = new BoxGeometry(baseWidth, baseHeight, baseWidth);\n baseGeometry.translate(0, currentHeight + baseHeight / 2, 0);\n currentHeight += baseHeight;\n\n // Lower Segment (a slightly narrower box)\n const lowerSegmentGeometry = new BoxGeometry(baseWidth * 0.8, lowerSegmentHeight, baseWidth * 0.8);\n lowerSegmentGeometry.translate(0, currentHeight + lowerSegmentHeight / 2, 0);\n currentHeight += lowerSegmentHeight;\n\n // Middle Segment (an even narrower box)\n const middleSegmentGeometry = new BoxGeometry(baseWidth * 0.6, middleSegmentHeight, baseWidth * 0.6);\n middleSegmentGeometry.translate(0, currentHeight + middleSegmentHeight / 2, 0);\n currentHeight += middleSegmentHeight;\n\n // Top Segment (a tall, thin box to form the obelisk shape)\n const topSegmentGeometry = new BoxGeometry(baseWidth * 0.4, topSegmentHeight, baseWidth * 0.4);\n topSegmentGeometry.translate(0, currentHeight + topSegmentHeight / 2, 0);\n currentHeight += topSegmentHeight;\n\n // Pyramid Top (a cone to form the pointed top of the obelisk)\n const pyramidGeometry = new ConeGeometry((baseWidth * 0.4) / Math.sqrt(2), 0.1, 4, 1, false, Math.PI / 4);\n pyramidGeometry.translate(0, currentHeight + 0.1 / 2, 0);\n\n this.copy(\n mergeGeometries([baseGeometry, lowerSegmentGeometry, middleSegmentGeometry, topSegmentGeometry, pyramidGeometry], true),\n );\n }\n}\n\nexport { ObeliskHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass RoundedHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.6, height = 1.0, depth = 0.2) {\n super();\n\n // Create the base of the headstone (a box)\n const baseHeight = height * 0.7;\n const baseGeometry = new BoxGeometry(width, baseHeight, depth);\n baseGeometry.translate(0, baseHeight / 2, 0);\n\n // Create the rounded top part (a half cylinder with caps)\n const topHeight = height - baseHeight;\n const topGeometry = new CylinderGeometry(width / 2, width / 2, depth, 16, 1, false, 0, Math.PI);\n topGeometry.rotateY(Math.PI / 2);\n topGeometry.rotateX(Math.PI / 2);\n topGeometry.translate(0, baseHeight + topHeight / 2 - depth / 2 - 0.05, 0);\n\n // Merge base and top into a single geometry\n this.copy(mergeGeometries([baseGeometry, topGeometry], true));\n }\n}\n\nexport { RoundedHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\n\nclass SquareHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.5, height = 0.8, depth = 0.15) {\n super();\n\n // Create a rectangular slab\n const slabGeometry = new BoxGeometry(width, height, depth);\n slabGeometry.translate(0, height / 2, 0); // Shift up to stand on the ground\n\n this.copy(slabGeometry);\n }\n}\nexport { SquareHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Fence Column Geometry, a simple fence column shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a fence column\n * const columnGeometry = new FenceColumn();\n * const columnMaterial = new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true });\n * const column = new Mesh(columnGeometry, columnMaterial);\n * scene.add(column);\n */\nclass FenceColumn extends BufferGeometry {\n constructor(height = 2.25) {\n super();\n\n // Column Base (a wider base for stability)\n const baseGeometry = new BoxGeometry(1.2, 0.5, 1.2);\n baseGeometry.translate(0, 0.25, 0);\n\n // Main Column (a tall rectangular shape, adjustable height)\n const columnGeometry = new BoxGeometry(1, height, 1);\n columnGeometry.translate(0, 0.5 + height / 2, 0);\n\n // Column Cap (a slightly wider cap on top)\n const capGeometry = new BoxGeometry(1.4, 0.3, 1.4);\n capGeometry.translate(0, 0.5 + height + 0.15, 0);\n\n this.copy(mergeGeometries([baseGeometry, columnGeometry, capGeometry], true));\n }\n}\n\nexport { FenceColumn };\n","import { BufferGeometry, ConeGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Wrought Iron Bar Geometry, a simple wrought iron bar shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a wrought iron bar\n * const barGeometry = new WroughtIronBarGeometry();\n * const barMaterial = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });\n * const bar = new Mesh(barGeometry, barMaterial);\n * scene.add(bar);\n */\nclass WroughtIronBarGeometry extends BufferGeometry {\n constructor(barHeight = 2.0, barRadius = 0.05, spikeHeight = 0.3) {\n super();\n\n // Create a cylinder for the vertical bar\n const barGeometry = new CylinderGeometry(barRadius, barRadius, barHeight, 8);\n barGeometry.translate(0, barHeight / 2, 0); // Shift up to stand on the ground\n\n // Create a cone for the spike on top\n const spikeGeometry = new ConeGeometry(barRadius * 1.5, spikeHeight, 8);\n spikeGeometry.translate(0, barHeight + spikeHeight / 2, 0); // Place on top of the bar\n\n // Merge bar and spike into one geometry\n this.copy(mergeGeometries([barGeometry, spikeGeometry], true));\n }\n}\n\nexport { WroughtIronBarGeometry };\n","import { BufferGeometry, Float32BufferAttribute } from \"three\";\n\nclass SimpleLeafGeometry extends BufferGeometry {\n constructor(size = 0.1) {\n super();\n\n const vertices = [];\n const indices = [];\n\n // Define vertices to approximate a simple, elongated, oval leaf shape\n const leafPoints = [\n [0, 1], // Top point\n [0.5, 0.75], // Right upper middle\n [0.75, 0.25], // Right lower middle\n [0.5, -0.5], // Right bottom middle\n [0, -1], // Bottom point\n [-0.5, -0.5], // Left bottom middle\n [-0.75, 0.25], // Left lower middle\n [-0.5, 0.75], // Left upper middle\n ];\n\n // Add vertices to the geometry, scaling them with the `size` parameter\n for (let i = 0; i < leafPoints.length; i++) {\n const [x, y] = leafPoints[i];\n vertices.push(x * size, y * size, 0);\n }\n\n // Define indices to form triangular faces of the leaf\n // Create a fan-like structure connecting the top vertex (index 0) to other neighboring vertices\n for (let i = 1; i < leafPoints.length - 1; i++) {\n indices.push(0, i, i + 1);\n }\n // Close the fan with the last triangle\n indices.push(0, leafPoints.length - 1, 1);\n\n // Convert the vertices and indices to buffer attributes\n const positionAttribute = new Float32BufferAttribute(vertices, 3);\n this.setAttribute('position', positionAttribute);\n this.setIndex(indices);\n\n this.computeVertexNormals();\n }\n}\n\nexport { SimpleLeafGeometry };\n","import { BufferGeometry, CylinderGeometry, SphereGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Bone Geometry, a simple bone shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a bone\n * const boneGeometry = new Bone();\n * const boneMaterial = new MeshStandardMaterial({ color: 0xffffff });\n * const bone = new Mesh(boneGeometry, boneMaterial);\n * scene.add(bone);\n */\nclass BoneGeometry extends BufferGeometry {\n constructor(radiusTop = 0.1, radiusBottom = 0.1, height = 0.4, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(radiusTop * 0.6, radiusBottom * 0.6, height, radialSegments);\n cylinderGeometry.translate(0, 0, 0);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = sphereGeometry.clone();\n const topSphere2 = sphereGeometry.clone();\n const bottomSphere1 = sphereGeometry.clone();\n const bottomSphere2 = sphereGeometry.clone();\n\n // Position the spheres at each end of the cylinder\n topSphere1.translate(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.translate(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.translate(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.translate(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Merge the parts\n this.copy(mergeGeometries([cylinderGeometry, topSphere1, topSphere2, bottomSphere1, bottomSphere2], true));\n }\n}\n\nexport { BoneGeometry };\n","import { Group, Mesh, ShaderMaterial, SphereGeometry } from \"three\";\n\nclass Moon extends Group {\n constructor() {\n super();\n\n // Create moon geometry\n const moonGeometry = new SphereGeometry(5, 32, 32);\n\n // Custom ShaderMaterial\n const moonMaterial = new ShaderMaterial({\n uniforms: {\n time: { value: 0.0 },\n },\n vertexShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n void main() {\n vNormal = normalize(normal);\n vPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n\n // Simple 3D noise function\n float hash(vec3 p) {\n p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));\n p *= 17.0;\n return fract(p.x * p.y * p.z * (p.x + p.y + p.z));\n }\n\n float noise(vec3 p) {\n vec3 ip = floor(p);\n vec3 fp = fract(p);\n fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep\n return mix(\n mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),\n mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),\n fp.z);\n }\n\n void main() {\n vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color\n float n = noise(vPosition * 0.5); // Apply noise with frequency\n color *= 0.8 + 0.2 * n; // Modulate color by noise\n gl_FragColor = vec4(color, 1.0);\n }\n `,\n flatShading: true,\n });\n\n // Create the moon mesh and add it to the scene\n const moon = new Mesh(moonGeometry, moonMaterial);\n this.add(moon);\n }\n}\n\nexport { Moon };\n","import { BoxGeometry, ConeGeometry, CylinderGeometry, ExtrudeGeometry, Group, Mesh, MeshStandardMaterial, Shape } from \"three\";\n\nclass Mausoleum extends Group {\n constructor() {\n super();\n\n // Base of the Mausoleum\n const baseGeometry = new BoxGeometry(5, 1, 5);\n const baseMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0.5, 0);\n this.add(baseMesh);\n\n // Main Building Structure\n const buildingGeometry = new BoxGeometry(4, 3, 4);\n const buildingMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n const buildingMesh = new Mesh(buildingGeometry, buildingMaterial);\n buildingMesh.position.set(0, 2.5, 0);\n this.add(buildingMesh);\n\n // Roof (Peaked)\n const roofGeometry = new ConeGeometry(3.5, 2, 4);\n const roofMaterial = new MeshStandardMaterial({ color: 0x505050, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.rotation.y = Math.PI / 4;\n roofMesh.position.set(0, 5, 0);\n this.add(roofMesh);\n\n // Pillars\n const pillarGeometry = new CylinderGeometry(0.2, 0.2, 3.5, 16);\n const pillarMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n\n const pillarPositions = [\n [-1.8, 2.3, -2.2],\n [1.8, 2.3, -2.2],\n [-1.8, 2.3, 2.2],\n [1.8, 2.3, 2.2],\n ];\n\n pillarPositions.forEach((position) => {\n const pillarMesh = new Mesh(pillarGeometry, pillarMaterial);\n pillarMesh.position.set(...position);\n this.add(pillarMesh);\n });\n\n // Corrected Arched Entrance\n const archShape = new Shape();\n archShape.moveTo(-1, 0);\n archShape.lineTo(-1, 2);\n archShape.absarc(0, 2, 1, Math.PI, 0, true);\n archShape.lineTo(1, 0);\n\n const extrudeSettings = {\n depth: 0.5,\n bevelEnabled: false,\n };\n const archGeometry = new ExtrudeGeometry(archShape, extrudeSettings);\n const archMaterial = new MeshStandardMaterial({ color: 0x404040, flatShading: true });\n const archMesh = new Mesh(archGeometry, archMaterial);\n archMesh.position.set(0, 0.5, 1.7);\n this.add(archMesh);\n }\n}\n\nexport { Mausoleum };\n","import { CylinderGeometry, Group, Mesh, MeshBasicMaterial, MeshStandardMaterial, PointLight, SphereGeometry } from \"three\";\n\nclass Candle extends Group {\n constructor(height = 1, radius = 0.2) {\n super();\n this.height = height;\n this.radius = radius;\n this.createCandle();\n this.animateFlicker();\n }\n\n createCandle() {\n // Candle Geometry\n const candleGeometry = new CylinderGeometry(this.radius, this.radius, this.height, 32);\n const candleMaterial = new MeshStandardMaterial({ color: 0xffffff });\n this.candle = new Mesh(candleGeometry, candleMaterial);\n this.candle.position.set(0, this.height / 2, 0);\n this.add(this.candle);\n\n // Flame Geometry\n const flameGeometry = new SphereGeometry(0.05, 16, 16);\n const flameMaterial = new MeshBasicMaterial({ color: 0xffa500 });\n this.flame = new Mesh(flameGeometry, flameMaterial);\n this.flame.position.set(0, this.height + 0.05, 0);\n this.add(this.flame);\n\n // Candlelight\n this.candleLight = new PointLight(0xffa500, 1, 5);\n this.candleLight.position.set(0, this.height + 0.05, 0);\n this.candleLight.castShadow = true;\n this.add(this.candleLight);\n }\n\n animateFlicker() {\n const flicker = () => {\n // Random flicker intensity between 0.8 and 1.2\n this.candleLight.intensity = 1 + (Math.random() * 0.4 - 0.2);\n\n // Optional: slight random movement to simulate a flickering flame\n this.candleLight.position.x = Math.random() * 0.02 - 0.01;\n this.candleLight.position.z = Math.random() * 0.02 - 0.01;\n\n requestAnimationFrame(flicker);\n };\n flicker();\n }\n}\n\nexport { Candle };\n","import { ConeGeometry, CylinderGeometry, Group, Mesh, MeshStandardMaterial, PointLight, TorusGeometry } from \"three\";\n\n// Class for Lantern Geometry\nclass Lantern extends Group {\n constructor(height = 1.3, baseWidth = 0.5) {\n super();\n\n // Lantern Base (cylinder)\n const baseGeometry = new CylinderGeometry(baseWidth, baseWidth, 0.2, 16);\n const baseMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0, 0);\n this.add(baseMesh);\n\n // Lantern Body (a rectangular frame)\n const bodyGeometry = new CylinderGeometry(baseWidth * 0.9, baseWidth * 0.9, height);\n const bodyMaterial = new MeshStandardMaterial({ color: 0xffd700, flatShading: true, transparent: true, opacity: 0.6 });\n const bodyMesh = new Mesh(bodyGeometry, bodyMaterial);\n bodyMesh.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n this.add(bodyMesh);\n\n // Lantern Roof (a cone)\n const roofGeometry = new ConeGeometry(baseWidth * 1.1, 0.5, 8);\n const roofMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.position.set(0, height + 0.35, 0); // Adjusted position based on height\n this.add(roofMesh);\n\n // Lantern Handle (a torus)\n const handleGeometry = new TorusGeometry(baseWidth * 0.8, 0.05, 8, 16);\n const handleMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const handleMesh = new Mesh(handleGeometry, handleMaterial);\n handleMesh.position.set(0, height + 0.85, 0); // Adjusted to sit above the roof\n this.add(handleMesh);\n\n // Lantern Light (point light inside)\n const light = new PointLight(0xffaa00, 1.5, 15);\n light.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n light.castShadow = true;\n this.add(light);\n }\n}\n\nexport { Lantern };\n","import { DodecahedronGeometry, Group, Mesh, MeshStandardMaterial } from \"three\";\n\nclass Stones extends Group {\n constructor() {\n super();\n\n // Rock Geometry (using Dodecahedron for a low-poly random rock-like shape)\n const rockGeometry = new DodecahedronGeometry(1, 0); // Low-poly shape\n const rockMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n\n // Create multiple random rocks with slight variations\n for (let i = 0; i < 5; i++) {\n const rockMesh = new Mesh(rockGeometry, rockMaterial);\n rockMesh.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4); // Scale randomly to make each rock unique\n rockMesh.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI); // Random rotation for variation\n rockMesh.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4); // Keep rocks at ground level\n this.add(rockMesh);\n }\n }\n}\n\nexport { Stones };\n"],"names":["CrossHeadstoneGeometry","BufferGeometry","width","height","depth","verticalHeight","verticalGeometry","BoxGeometry","horizontalWidth","horizontalGeometry","mergeGeometries","ObeliskHeadstoneGeometry","totalHeight","baseWidth","baseHeight","lowerSegmentHeight","middleSegmentHeight","topSegmentHeight","currentHeight","baseGeometry","lowerSegmentGeometry","middleSegmentGeometry","topSegmentGeometry","pyramidGeometry","ConeGeometry","RoundedHeadstoneGeometry","topHeight","topGeometry","CylinderGeometry","SquareHeadstoneGeometry","slabGeometry","FenceColumn","columnGeometry","capGeometry","WroughtIronBarGeometry","barHeight","barRadius","spikeHeight","barGeometry","spikeGeometry","SimpleLeafGeometry","size","vertices","indices","leafPoints","i","x","y","positionAttribute","Float32BufferAttribute","BoneGeometry","radiusTop","radiusBottom","radialSegments","cylinderGeometry","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2","Moon","Group","moonGeometry","moonMaterial","ShaderMaterial","moon","Mesh","Mausoleum","baseMaterial","MeshStandardMaterial","baseMesh","buildingGeometry","buildingMaterial","buildingMesh","roofGeometry","roofMaterial","roofMesh","pillarGeometry","pillarMaterial","position","pillarMesh","archShape","Shape","extrudeSettings","archGeometry","ExtrudeGeometry","archMaterial","archMesh","Candle","radius","candleGeometry","candleMaterial","flameGeometry","flameMaterial","MeshBasicMaterial","PointLight","flicker","Lantern","bodyGeometry","bodyMaterial","bodyMesh","handleGeometry","TorusGeometry","handleMaterial","handleMesh","light","Stones","rockGeometry","DodecahedronGeometry","rockMaterial","rockMesh"],"mappings":"8CAGA,MAAMA,UAA+BC,EAAAA,cAAe,CAClD,YAAYC,EAAQ,GAAKC,E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AcE,CAAY,EACpDC,EAAS,MAAM,IAAI,GAAM,KAAK,OAAQ,EAAG,GAAK,GAAM,KAAK,OAAQ,EAAG,GAAK,GAAM,KAAK,OAAM,EAAK,EAAG,EAClGA,EAAS,SAAS,IAAI,KAAK,OAAQ,EAAG,KAAK,GAAI,KAAK,OAAQ,EAAG,KAAK,GAAI,KAAK,SAAW,KAAK,EAAE,EAC/FA,EAAS,SAAS,KAAK,KAAK,OAAQ,EAAG,IAAO,EAAG,GAAI,KAAK,OAAQ,EAAG,IAAO,CAAC,EAC7E,KAAK,IAAIA,CAAQ,CAClB,CACF,CACH"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("three"),require("three/addons/utils/BufferGeometryUtils.js")):typeof define=="function"&&define.amd?define(["exports","three","three/addons/utils/BufferGeometryUtils.js"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.ThreeLowPoly={},c.THREE,c.BufferGeometryUtils))})(this,function(c,e,f){"use strict";class S extends e.BufferGeometry{constructor(t=.4,o=1.2,s=.2){super();const n=o*.6,i=new e.BoxGeometry(t/2,n,s);i.translate(0,n/2,0);const a=t*1.5,r=new e.BoxGeometry(a,t/4,s);r.translate(0,n*.75,0),this.copy(f.mergeGeometries([i,r],!0))}}class g extends e.BufferGeometry{constructor(t=1.75,o=.75){super();const s=t*.05,n=t*.15,i=t*.15,a=t*.75;let r=0;const m=new e.BoxGeometry(o,s,o);m.translate(0,r+s/2,0),r+=s;const d=new e.BoxGeometry(o*.8,n,o*.8);d.translate(0,r+n/2,0),r+=n;const y=new e.BoxGeometry(o*.6,i,o*.6);y.translate(0,r+i/2,0),r+=i;const p=new e.BoxGeometry(o*.4,a,o*.4);p.translate(0,r+a/2,0),r+=a;const G=new e.ConeGeometry(o*.4/Math.sqrt(2),.1,4,1,!1,Math.PI/4);G.translate(0,r+.1/2,0),this.copy(f.mergeGeometries([m,d,y,p,G],!0))}}class v extends e.BufferGeometry{constructor(t=.6,o=1,s=.2){super();const n=o*.7,i=new e.BoxGeometry(t,n,s);i.translate(0,n/2,0);const a=o-n,r=new e.CylinderGeometry(t/2,t/2,s,16,1,!1,0,Math.PI);r.rotateY(Math.PI/2),r.rotateX(Math.PI/2),r.translate(0,n+a/2-s/2-.05,0),this.copy(f.mergeGeometries([i,r],!0))}}class B 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 P 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(f.mergeGeometries([o,s,n],!0))}}class C 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 i=new e.ConeGeometry(o*1.5,s,8);i.translate(0,t+s/2,0),this.copy(f.mergeGeometries([n,i],!0))}}class b 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[r,m]=n[a];o.push(r*t,m*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 i=new e.Float32BufferAttribute(o,3);this.setAttribute("position",i),this.setIndex(s),this.computeVertexNormals()}}class L extends e.BufferGeometry{constructor(t=.1,o=.1,s=.4,n=8){super();const i=new e.CylinderGeometry(t*.6,o*.6,s,n);i.translate(0,0,0);const a=new e.SphereGeometry(t,n,n),r=a.clone(),m=a.clone(),d=a.clone(),y=a.clone();r.translate(0,s/2+t*.6,-t*.6),m.translate(0,s/2+t*.6,t*.6),d.translate(0,-s/2-o*.6,-o*.6),y.translate(0,-s/2-o*.6,o*.6),this.copy(f.mergeGeometries([i,r,m,d,y],!0))}}class I extends e.Group{constructor(){super();const t=new e.SphereGeometry(5,32,32),o=new e.ShaderMaterial({uniforms:{time:{value:0}},vertexShader:`
|
|
2
|
+
varying vec3 vNormal;
|
|
3
|
+
varying vec3 vPosition;
|
|
4
|
+
void main() {
|
|
5
|
+
vNormal = normalize(normal);
|
|
6
|
+
vPosition = position;
|
|
7
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
8
|
+
}
|
|
9
|
+
`,fragmentShader:`
|
|
10
|
+
varying vec3 vNormal;
|
|
11
|
+
varying vec3 vPosition;
|
|
12
|
+
|
|
13
|
+
// Simple 3D noise function
|
|
14
|
+
float hash(vec3 p) {
|
|
15
|
+
p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));
|
|
16
|
+
p *= 17.0;
|
|
17
|
+
return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
float noise(vec3 p) {
|
|
21
|
+
vec3 ip = floor(p);
|
|
22
|
+
vec3 fp = fract(p);
|
|
23
|
+
fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep
|
|
24
|
+
return mix(
|
|
25
|
+
mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),
|
|
26
|
+
mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),
|
|
27
|
+
mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),
|
|
28
|
+
mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),
|
|
29
|
+
fp.z);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
void main() {
|
|
33
|
+
vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color
|
|
34
|
+
float n = noise(vPosition * 0.5); // Apply noise with frequency
|
|
35
|
+
color *= 0.8 + 0.2 * n; // Modulate color by noise
|
|
36
|
+
gl_FragColor = vec4(color, 1.0);
|
|
37
|
+
}
|
|
38
|
+
`,flatShading:!0}),s=new e.Mesh(t,o);this.add(s)}}class H 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),i=new e.MeshStandardMaterial({color:6908265,flatShading:!0}),a=new e.Mesh(n,i);a.position.set(0,2.5,0),this.add(a);const r=new e.ConeGeometry(3.5,2,4),m=new e.MeshStandardMaterial({color:5263440,flatShading:!0}),d=new e.Mesh(r,m);d.rotation.y=Math.PI/4,d.position.set(0,5,0),this.add(d);const y=new e.CylinderGeometry(.2,.2,3.5,16),p=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(A=>{const x=new e.Mesh(y,p);x.position.set(...A),this.add(x)});const u=new e.Shape;u.moveTo(-1,0),u.lineTo(-1,2),u.absarc(0,2,1,Math.PI,0,!0),u.lineTo(1,0);const h={depth:.5,bevelEnabled:!1},M=new e.ExtrudeGeometry(u,h),z=new e.MeshStandardMaterial({color:4210752,flatShading:!0}),w=new e.Mesh(M,z);w.position.set(0,.5,1.7),this.add(w)}}class k 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 q 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}),i=new e.Mesh(s,n);i.position.set(0,0,0),this.add(i);const a=new e.CylinderGeometry(o*.9,o*.9,t),r=new e.MeshStandardMaterial({color:16766720,flatShading:!0,transparent:!0,opacity:.6}),m=new e.Mesh(a,r);m.position.set(0,t/2+.1,0),this.add(m);const d=new e.ConeGeometry(o*1.1,.5,8),y=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),p=new e.Mesh(d,y);p.position.set(0,t+.35,0),this.add(p);const G=new e.TorusGeometry(o*.8,.05,8,16),u=new e.MeshStandardMaterial({color:9127187,flatShading:!0}),h=new e.Mesh(G,u);h.position.set(0,t+.85,0),this.add(h);const M=new e.PointLight(16755200,1.5,15);M.position.set(0,t/2+.1,0),M.castShadow=!0,this.add(M)}}class F 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)}}}c.BoneGeometry=L,c.Candle=k,c.CrossHeadstoneGeometry=S,c.FenceColumn=P,c.Lantern=q,c.Mausoleum=H,c.Moon=I,c.ObeliskHeadstoneGeometry=g,c.RoundedHeadstoneGeometry=v,c.SimpleLeafGeometry=b,c.SquareHeadstoneGeometry=B,c.Stones=F,c.WroughtIronBarGeometry=C,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
2
39
|
//# sourceMappingURL=index.umd.js.map
|
package/dist/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../src/geometry/Bone.ts"],"sourcesContent":["import { CylinderGeometry, Group, Mesh, MeshStandardMaterial, SphereGeometry } from \"three\";\n\nexport class Bone extends Group {\n constructor(radiusTop = 0.5, radiusBottom = 0.5, height = 2, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(\n radiusTop * 0.6, // slightly narrower for the shaft\n radiusBottom * 0.6,\n height,\n radialSegments,\n );\n const material = new MeshStandardMaterial({ color: 0xffffff });\n const cylinderMesh = new Mesh(cylinderGeometry, material);\n cylinderMesh.position.y = 0;\n this.add(cylinderMesh);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = new Mesh(sphereGeometry, material);\n const topSphere2 = new Mesh(sphereGeometry, material);\n const bottomSphere1 = new Mesh(sphereGeometry, material);\n const bottomSphere2 = new Mesh(sphereGeometry, material);\n\n // Position the spheres at each end of the cylinder\n topSphere1.position.set(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.position.set(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.position.set(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.position.set(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Add the spheres to the bone\n this.add(topSphere1);\n this.add(topSphere2);\n this.add(bottomSphere1);\n this.add(bottomSphere2);\n }\n}\n"],"names":["Bone","Group","radiusTop","radiusBottom","height","radialSegments","cylinderGeometry","CylinderGeometry","material","MeshStandardMaterial","cylinderMesh","Mesh","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2"],"mappings":"uQAEO,MAAMA,UAAaC,EAAAA,KAAM,CAC9B,YAAYC,EAAY,GAAKC,EAAe,GAAKC,EAAS,EAAGC,EAAiB,EAAG,CACzE,QAGN,MAAMC,EAAmB,IAAIC,EAAA,iBAC3BL,EAAY,GACZC,EAAe,GACfC,EACAC,CAAA,EAEIG,EAAW,IAAIC,EAAA,qBAAqB,CAAE,MAAO,QAAU,CAAA,EACvDC,EAAe,IAAIC,EAAAA,KAAKL,EAAkBE,CAAQ,EACxDE,EAAa,SAAS,EAAI,EAC1B,KAAK,IAAIA,CAAY,EAGrB,MAAME,EAAiB,IAAIC,EAAe,eAAAX,EAAWG,EAAgBA,CAAc,EAC7ES,EAAa,IAAIH,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CO,EAAa,IAAIJ,EAAAA,KAAKC,EAAgBJ,CAAQ,EAC9CQ,EAAgB,IAAIL,EAAAA,KAAKC,EAAgBJ,CAAQ,EACjDS,EAAgB,IAAIN,EAAAA,KAAKC,EAAgBJ,CAAQ,EAG5CM,EAAA,SAAS,IAAI,EAAGV,EAAS,EAAIF,EAAY,GAAK,CAACA,EAAY,EAAG,EAC9Da,EAAA,SAAS,IAAI,EAAGX,EAAS,EAAIF,EAAY,GAAKA,EAAY,EAAG,EAC1Dc,EAAA,SAAS,IAAI,EAAG,CAACZ,EAAS,EAAID,EAAe,GAAK,CAACA,EAAe,EAAG,EACrEc,EAAA,SAAS,IAAI,EAAG,CAACb,EAAS,EAAID,EAAe,GAAKA,EAAe,EAAG,EAGlF,KAAK,IAAIW,CAAU,EACnB,KAAK,IAAIC,CAAU,EACnB,KAAK,IAAIC,CAAa,EACtB,KAAK,IAAIC,CAAa,CACxB,CACF"}
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/geometry/cemetery/CrossHeadstoneGeometry.js","../src/geometry/cemetery/ObeliskHeadstoneGeometry.js","../src/geometry/cemetery/RoundedHeadstoneGeometry.js","../src/geometry/cemetery/SquareHeadstoneGeometry.js","../src/geometry/fence/FenceColumn.js","../src/geometry/fence/WroughtIronBarGeometry.js","../src/geometry/leafs/SimpleLeafGeometry.js","../src/geometry/skeleton/BoneGeometry.js","../src/group/astronomy/Moon.js","../src/group/cemetery/Mausoleum.js","../src/group/lighting/Candle.js","../src/group/lighting/Lantern.js","../src/group/rocks/Stones.js"],"sourcesContent":["import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass CrossHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.4, height = 1.2, depth = 0.2) {\n super();\n\n // Create the vertical part of the cross\n const verticalHeight = height * 0.6;\n const verticalGeometry = new BoxGeometry(width / 2, verticalHeight, depth);\n verticalGeometry.translate(0, verticalHeight / 2, 0);\n\n // Create the horizontal part of the cross\n const horizontalWidth = width * 1.5;\n const horizontalGeometry = new BoxGeometry(horizontalWidth, width / 4, depth);\n horizontalGeometry.translate(0, verticalHeight * 0.75, 0);\n\n // Merge both parts into a cross\n this.copy(mergeGeometries([verticalGeometry, horizontalGeometry], true));\n }\n}\n\nexport { CrossHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, ConeGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass ObeliskHeadstoneGeometry extends BufferGeometry {\n constructor(totalHeight = 1.75, baseWidth = 0.75) {\n super();\n\n // Define height proportions relative to the total height\n const baseHeight = totalHeight * 0.05;\n const lowerSegmentHeight = totalHeight * 0.15;\n const middleSegmentHeight = totalHeight * 0.15;\n const topSegmentHeight = totalHeight * 0.75;\n\n let currentHeight = 0;\n\n // Base of the Headstone (a wide box)\n const baseGeometry = new BoxGeometry(baseWidth, baseHeight, baseWidth);\n baseGeometry.translate(0, currentHeight + baseHeight / 2, 0);\n currentHeight += baseHeight;\n\n // Lower Segment (a slightly narrower box)\n const lowerSegmentGeometry = new BoxGeometry(baseWidth * 0.8, lowerSegmentHeight, baseWidth * 0.8);\n lowerSegmentGeometry.translate(0, currentHeight + lowerSegmentHeight / 2, 0);\n currentHeight += lowerSegmentHeight;\n\n // Middle Segment (an even narrower box)\n const middleSegmentGeometry = new BoxGeometry(baseWidth * 0.6, middleSegmentHeight, baseWidth * 0.6);\n middleSegmentGeometry.translate(0, currentHeight + middleSegmentHeight / 2, 0);\n currentHeight += middleSegmentHeight;\n\n // Top Segment (a tall, thin box to form the obelisk shape)\n const topSegmentGeometry = new BoxGeometry(baseWidth * 0.4, topSegmentHeight, baseWidth * 0.4);\n topSegmentGeometry.translate(0, currentHeight + topSegmentHeight / 2, 0);\n currentHeight += topSegmentHeight;\n\n // Pyramid Top (a cone to form the pointed top of the obelisk)\n const pyramidGeometry = new ConeGeometry((baseWidth * 0.4) / Math.sqrt(2), 0.1, 4, 1, false, Math.PI / 4);\n pyramidGeometry.translate(0, currentHeight + 0.1 / 2, 0);\n\n this.copy(\n mergeGeometries([baseGeometry, lowerSegmentGeometry, middleSegmentGeometry, topSegmentGeometry, pyramidGeometry], true),\n );\n }\n}\n\nexport { ObeliskHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\nclass RoundedHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.6, height = 1.0, depth = 0.2) {\n super();\n\n // Create the base of the headstone (a box)\n const baseHeight = height * 0.7;\n const baseGeometry = new BoxGeometry(width, baseHeight, depth);\n baseGeometry.translate(0, baseHeight / 2, 0);\n\n // Create the rounded top part (a half cylinder with caps)\n const topHeight = height - baseHeight;\n const topGeometry = new CylinderGeometry(width / 2, width / 2, depth, 16, 1, false, 0, Math.PI);\n topGeometry.rotateY(Math.PI / 2);\n topGeometry.rotateX(Math.PI / 2);\n topGeometry.translate(0, baseHeight + topHeight / 2 - depth / 2 - 0.05, 0);\n\n // Merge base and top into a single geometry\n this.copy(mergeGeometries([baseGeometry, topGeometry], true));\n }\n}\n\nexport { RoundedHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\n\nclass SquareHeadstoneGeometry extends BufferGeometry {\n constructor(width = 0.5, height = 0.8, depth = 0.15) {\n super();\n\n // Create a rectangular slab\n const slabGeometry = new BoxGeometry(width, height, depth);\n slabGeometry.translate(0, height / 2, 0); // Shift up to stand on the ground\n\n this.copy(slabGeometry);\n }\n}\nexport { SquareHeadstoneGeometry };\n","import { BoxGeometry, BufferGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Fence Column Geometry, a simple fence column shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a fence column\n * const columnGeometry = new FenceColumn();\n * const columnMaterial = new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true });\n * const column = new Mesh(columnGeometry, columnMaterial);\n * scene.add(column);\n */\nclass FenceColumn extends BufferGeometry {\n constructor(height = 2.25) {\n super();\n\n // Column Base (a wider base for stability)\n const baseGeometry = new BoxGeometry(1.2, 0.5, 1.2);\n baseGeometry.translate(0, 0.25, 0);\n\n // Main Column (a tall rectangular shape, adjustable height)\n const columnGeometry = new BoxGeometry(1, height, 1);\n columnGeometry.translate(0, 0.5 + height / 2, 0);\n\n // Column Cap (a slightly wider cap on top)\n const capGeometry = new BoxGeometry(1.4, 0.3, 1.4);\n capGeometry.translate(0, 0.5 + height + 0.15, 0);\n\n this.copy(mergeGeometries([baseGeometry, columnGeometry, capGeometry], true));\n }\n}\n\nexport { FenceColumn };\n","import { BufferGeometry, ConeGeometry, CylinderGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Wrought Iron Bar Geometry, a simple wrought iron bar shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a wrought iron bar\n * const barGeometry = new WroughtIronBarGeometry();\n * const barMaterial = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });\n * const bar = new Mesh(barGeometry, barMaterial);\n * scene.add(bar);\n */\nclass WroughtIronBarGeometry extends BufferGeometry {\n constructor(barHeight = 2.0, barRadius = 0.05, spikeHeight = 0.3) {\n super();\n\n // Create a cylinder for the vertical bar\n const barGeometry = new CylinderGeometry(barRadius, barRadius, barHeight, 8);\n barGeometry.translate(0, barHeight / 2, 0); // Shift up to stand on the ground\n\n // Create a cone for the spike on top\n const spikeGeometry = new ConeGeometry(barRadius * 1.5, spikeHeight, 8);\n spikeGeometry.translate(0, barHeight + spikeHeight / 2, 0); // Place on top of the bar\n\n // Merge bar and spike into one geometry\n this.copy(mergeGeometries([barGeometry, spikeGeometry], true));\n }\n}\n\nexport { WroughtIronBarGeometry };\n","import { BufferGeometry, Float32BufferAttribute } from \"three\";\n\nclass SimpleLeafGeometry extends BufferGeometry {\n constructor(size = 0.1) {\n super();\n\n const vertices = [];\n const indices = [];\n\n // Define vertices to approximate a simple, elongated, oval leaf shape\n const leafPoints = [\n [0, 1], // Top point\n [0.5, 0.75], // Right upper middle\n [0.75, 0.25], // Right lower middle\n [0.5, -0.5], // Right bottom middle\n [0, -1], // Bottom point\n [-0.5, -0.5], // Left bottom middle\n [-0.75, 0.25], // Left lower middle\n [-0.5, 0.75], // Left upper middle\n ];\n\n // Add vertices to the geometry, scaling them with the `size` parameter\n for (let i = 0; i < leafPoints.length; i++) {\n const [x, y] = leafPoints[i];\n vertices.push(x * size, y * size, 0);\n }\n\n // Define indices to form triangular faces of the leaf\n // Create a fan-like structure connecting the top vertex (index 0) to other neighboring vertices\n for (let i = 1; i < leafPoints.length - 1; i++) {\n indices.push(0, i, i + 1);\n }\n // Close the fan with the last triangle\n indices.push(0, leafPoints.length - 1, 1);\n\n // Convert the vertices and indices to buffer attributes\n const positionAttribute = new Float32BufferAttribute(vertices, 3);\n this.setAttribute('position', positionAttribute);\n this.setIndex(indices);\n\n this.computeVertexNormals();\n }\n}\n\nexport { SimpleLeafGeometry };\n","import { BufferGeometry, CylinderGeometry, SphereGeometry } from \"three\";\nimport { mergeGeometries } from \"three/addons/utils/BufferGeometryUtils.js\";\n\n/**\n * Bone Geometry, a simple bone shape\n * @extends BufferGeometry\n *\n * @example\n * // Create a bone\n * const boneGeometry = new Bone();\n * const boneMaterial = new MeshStandardMaterial({ color: 0xffffff });\n * const bone = new Mesh(boneGeometry, boneMaterial);\n * scene.add(bone);\n */\nclass BoneGeometry extends BufferGeometry {\n constructor(radiusTop = 0.1, radiusBottom = 0.1, height = 0.4, radialSegments = 8) {\n super();\n\n // Create the cylinder (shaft of the bone)\n const cylinderGeometry = new CylinderGeometry(radiusTop * 0.6, radiusBottom * 0.6, height, radialSegments);\n cylinderGeometry.translate(0, 0, 0);\n\n // Create the spheres (ends of the bone)\n const sphereGeometry = new SphereGeometry(radiusTop, radialSegments, radialSegments);\n const topSphere1 = sphereGeometry.clone();\n const topSphere2 = sphereGeometry.clone();\n const bottomSphere1 = sphereGeometry.clone();\n const bottomSphere2 = sphereGeometry.clone();\n\n // Position the spheres at each end of the cylinder\n topSphere1.translate(0, height / 2 + radiusTop * 0.6, -radiusTop * 0.6);\n topSphere2.translate(0, height / 2 + radiusTop * 0.6, radiusTop * 0.6);\n bottomSphere1.translate(0, -height / 2 - radiusBottom * 0.6, -radiusBottom * 0.6);\n bottomSphere2.translate(0, -height / 2 - radiusBottom * 0.6, radiusBottom * 0.6);\n\n // Merge the parts\n this.copy(mergeGeometries([cylinderGeometry, topSphere1, topSphere2, bottomSphere1, bottomSphere2], true));\n }\n}\n\nexport { BoneGeometry };\n","import { Group, Mesh, ShaderMaterial, SphereGeometry } from \"three\";\n\nclass Moon extends Group {\n constructor() {\n super();\n\n // Create moon geometry\n const moonGeometry = new SphereGeometry(5, 32, 32);\n\n // Custom ShaderMaterial\n const moonMaterial = new ShaderMaterial({\n uniforms: {\n time: { value: 0.0 },\n },\n vertexShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n void main() {\n vNormal = normalize(normal);\n vPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n fragmentShader: `\n varying vec3 vNormal;\n varying vec3 vPosition;\n\n // Simple 3D noise function\n float hash(vec3 p) {\n p = fract(p * 0.3183099 + vec3(0.71, 0.113, 0.419));\n p *= 17.0;\n return fract(p.x * p.y * p.z * (p.x + p.y + p.z));\n }\n\n float noise(vec3 p) {\n vec3 ip = floor(p);\n vec3 fp = fract(p);\n fp = fp * fp * (3.0 - 2.0 * fp); // Smoothstep\n return mix(\n mix(mix(hash(ip), hash(ip + vec3(1.0, 0.0, 0.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 0.0)), hash(ip + vec3(1.0, 1.0, 0.0)), fp.x), fp.y),\n mix(mix(hash(ip + vec3(0.0, 0.0, 1.0)), hash(ip + vec3(1.0, 0.0, 1.0)), fp.x),\n mix(hash(ip + vec3(0.0, 1.0, 1.0)), hash(ip + vec3(1.0, 1.0, 1.0)), fp.x), fp.y),\n fp.z);\n }\n\n void main() {\n vec3 color = vec3(0.8, 0.8, 0.7); // Base moon color\n float n = noise(vPosition * 0.5); // Apply noise with frequency\n color *= 0.8 + 0.2 * n; // Modulate color by noise\n gl_FragColor = vec4(color, 1.0);\n }\n `,\n flatShading: true,\n });\n\n // Create the moon mesh and add it to the scene\n const moon = new Mesh(moonGeometry, moonMaterial);\n this.add(moon);\n }\n}\n\nexport { Moon };\n","import { BoxGeometry, ConeGeometry, CylinderGeometry, ExtrudeGeometry, Group, Mesh, MeshStandardMaterial, Shape } from \"three\";\n\nclass Mausoleum extends Group {\n constructor() {\n super();\n\n // Base of the Mausoleum\n const baseGeometry = new BoxGeometry(5, 1, 5);\n const baseMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0.5, 0);\n this.add(baseMesh);\n\n // Main Building Structure\n const buildingGeometry = new BoxGeometry(4, 3, 4);\n const buildingMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n const buildingMesh = new Mesh(buildingGeometry, buildingMaterial);\n buildingMesh.position.set(0, 2.5, 0);\n this.add(buildingMesh);\n\n // Roof (Peaked)\n const roofGeometry = new ConeGeometry(3.5, 2, 4);\n const roofMaterial = new MeshStandardMaterial({ color: 0x505050, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.rotation.y = Math.PI / 4;\n roofMesh.position.set(0, 5, 0);\n this.add(roofMesh);\n\n // Pillars\n const pillarGeometry = new CylinderGeometry(0.2, 0.2, 3.5, 16);\n const pillarMaterial = new MeshStandardMaterial({ color: 0x696969, flatShading: true });\n\n const pillarPositions = [\n [-1.8, 2.3, -2.2],\n [1.8, 2.3, -2.2],\n [-1.8, 2.3, 2.2],\n [1.8, 2.3, 2.2],\n ];\n\n pillarPositions.forEach((position) => {\n const pillarMesh = new Mesh(pillarGeometry, pillarMaterial);\n pillarMesh.position.set(...position);\n this.add(pillarMesh);\n });\n\n // Corrected Arched Entrance\n const archShape = new Shape();\n archShape.moveTo(-1, 0);\n archShape.lineTo(-1, 2);\n archShape.absarc(0, 2, 1, Math.PI, 0, true);\n archShape.lineTo(1, 0);\n\n const extrudeSettings = {\n depth: 0.5,\n bevelEnabled: false,\n };\n const archGeometry = new ExtrudeGeometry(archShape, extrudeSettings);\n const archMaterial = new MeshStandardMaterial({ color: 0x404040, flatShading: true });\n const archMesh = new Mesh(archGeometry, archMaterial);\n archMesh.position.set(0, 0.5, 1.7);\n this.add(archMesh);\n }\n}\n\nexport { Mausoleum };\n","import { CylinderGeometry, Group, Mesh, MeshBasicMaterial, MeshStandardMaterial, PointLight, SphereGeometry } from \"three\";\n\nclass Candle extends Group {\n constructor(height = 1, radius = 0.2) {\n super();\n this.height = height;\n this.radius = radius;\n this.createCandle();\n this.animateFlicker();\n }\n\n createCandle() {\n // Candle Geometry\n const candleGeometry = new CylinderGeometry(this.radius, this.radius, this.height, 32);\n const candleMaterial = new MeshStandardMaterial({ color: 0xffffff });\n this.candle = new Mesh(candleGeometry, candleMaterial);\n this.candle.position.set(0, this.height / 2, 0);\n this.add(this.candle);\n\n // Flame Geometry\n const flameGeometry = new SphereGeometry(0.05, 16, 16);\n const flameMaterial = new MeshBasicMaterial({ color: 0xffa500 });\n this.flame = new Mesh(flameGeometry, flameMaterial);\n this.flame.position.set(0, this.height + 0.05, 0);\n this.add(this.flame);\n\n // Candlelight\n this.candleLight = new PointLight(0xffa500, 1, 5);\n this.candleLight.position.set(0, this.height + 0.05, 0);\n this.candleLight.castShadow = true;\n this.add(this.candleLight);\n }\n\n animateFlicker() {\n const flicker = () => {\n // Random flicker intensity between 0.8 and 1.2\n this.candleLight.intensity = 1 + (Math.random() * 0.4 - 0.2);\n\n // Optional: slight random movement to simulate a flickering flame\n this.candleLight.position.x = Math.random() * 0.02 - 0.01;\n this.candleLight.position.z = Math.random() * 0.02 - 0.01;\n\n requestAnimationFrame(flicker);\n };\n flicker();\n }\n}\n\nexport { Candle };\n","import { ConeGeometry, CylinderGeometry, Group, Mesh, MeshStandardMaterial, PointLight, TorusGeometry } from \"three\";\n\n// Class for Lantern Geometry\nclass Lantern extends Group {\n constructor(height = 1.3, baseWidth = 0.5) {\n super();\n\n // Lantern Base (cylinder)\n const baseGeometry = new CylinderGeometry(baseWidth, baseWidth, 0.2, 16);\n const baseMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const baseMesh = new Mesh(baseGeometry, baseMaterial);\n baseMesh.position.set(0, 0, 0);\n this.add(baseMesh);\n\n // Lantern Body (a rectangular frame)\n const bodyGeometry = new CylinderGeometry(baseWidth * 0.9, baseWidth * 0.9, height);\n const bodyMaterial = new MeshStandardMaterial({ color: 0xffd700, flatShading: true, transparent: true, opacity: 0.6 });\n const bodyMesh = new Mesh(bodyGeometry, bodyMaterial);\n bodyMesh.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n this.add(bodyMesh);\n\n // Lantern Roof (a cone)\n const roofGeometry = new ConeGeometry(baseWidth * 1.1, 0.5, 8);\n const roofMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const roofMesh = new Mesh(roofGeometry, roofMaterial);\n roofMesh.position.set(0, height + 0.35, 0); // Adjusted position based on height\n this.add(roofMesh);\n\n // Lantern Handle (a torus)\n const handleGeometry = new TorusGeometry(baseWidth * 0.8, 0.05, 8, 16);\n const handleMaterial = new MeshStandardMaterial({ color: 0x8b4513, flatShading: true });\n const handleMesh = new Mesh(handleGeometry, handleMaterial);\n handleMesh.position.set(0, height + 0.85, 0); // Adjusted to sit above the roof\n this.add(handleMesh);\n\n // Lantern Light (point light inside)\n const light = new PointLight(0xffaa00, 1.5, 15);\n light.position.set(0, height / 2 + 0.1, 0); // Adjust position based on height\n light.castShadow = true;\n this.add(light);\n }\n}\n\nexport { Lantern };\n","import { DodecahedronGeometry, Group, Mesh, MeshStandardMaterial } from \"three\";\n\nclass Stones extends Group {\n constructor() {\n super();\n\n // Rock Geometry (using Dodecahedron for a low-poly random rock-like shape)\n const rockGeometry = new DodecahedronGeometry(1, 0); // Low-poly shape\n const rockMaterial = new MeshStandardMaterial({ color: 0x808080, flatShading: true });\n\n // Create multiple random rocks with slight variations\n for (let i = 0; i < 5; i++) {\n const rockMesh = new Mesh(rockGeometry, rockMaterial);\n rockMesh.scale.set(0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4, 0.8 + Math.random() * 0.4); // Scale randomly to make each rock unique\n rockMesh.rotation.set(Math.random() * Math.PI, Math.random() * Math.PI, Math.random() * Math.PI); // Random rotation for variation\n rockMesh.position.set((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4); // Keep rocks at ground level\n this.add(rockMesh);\n }\n }\n}\n\nexport { Stones };\n"],"names":["CrossHeadstoneGeometry","BufferGeometry","width","height","depth","verticalHeight","verticalGeometry","BoxGeometry","horizontalWidth","horizontalGeometry","mergeGeometries","ObeliskHeadstoneGeometry","totalHeight","baseWidth","baseHeight","lowerSegmentHeight","middleSegmentHeight","topSegmentHeight","currentHeight","baseGeometry","lowerSegmentGeometry","middleSegmentGeometry","topSegmentGeometry","pyramidGeometry","ConeGeometry","RoundedHeadstoneGeometry","topHeight","topGeometry","CylinderGeometry","SquareHeadstoneGeometry","slabGeometry","FenceColumn","columnGeometry","capGeometry","WroughtIronBarGeometry","barHeight","barRadius","spikeHeight","barGeometry","spikeGeometry","SimpleLeafGeometry","size","vertices","indices","leafPoints","i","x","y","positionAttribute","Float32BufferAttribute","BoneGeometry","radiusTop","radiusBottom","radialSegments","cylinderGeometry","sphereGeometry","SphereGeometry","topSphere1","topSphere2","bottomSphere1","bottomSphere2","Moon","Group","moonGeometry","moonMaterial","ShaderMaterial","moon","Mesh","Mausoleum","baseMaterial","MeshStandardMaterial","baseMesh","buildingGeometry","buildingMaterial","buildingMesh","roofGeometry","roofMaterial","roofMesh","pillarGeometry","pillarMaterial","position","pillarMesh","archShape","Shape","extrudeSettings","archGeometry","ExtrudeGeometry","archMaterial","archMesh","Candle","radius","candleGeometry","candleMaterial","flameGeometry","flameMaterial","MeshBasicMaterial","PointLight","flicker","Lantern","bodyGeometry","bodyMaterial","bodyMesh","handleGeometry","TorusGeometry","handleMaterial","handleMesh","light","Stones","rockGeometry","DodecahedronGeometry","rockMaterial","rockMesh"],"mappings":"gYAGA,MAAMA,UAA+BC,EAAAA,cAAe,CAClD,YAAYC,EAAQ,GAAKC,EAAS,IAAKC,EAAQ,GAAK,CAClD,QAGA,MAAMC,EAAiBF,EAAS,GAC1BG,EAAmB,IAAIC,cAAYL,EAAQ,EAAGG,EAAgBD,CAAK,EACzEE,EAAiB,UAAU,EAAGD,EAAiB,EAAG,CAAC,EAGnD,MAAMG,EAAkBN,EAAQ,IAC1BO,EAAqB,IAAIF,cAAYC,EAAiBN,EAAQ,EAAGE,CAAK,EAC5EK,EAAmB,UAAU,EAAGJ,EAAiB,IAAM,CAAC,EAGxD,KAAK,KAAKK,kBAAgB,CAACJ,EAAkBG,CAAkB,EAAG,EAAI,CAAC,CACxE,CACH,CCjBA,MAAME,UAAiCV,EAAAA,cAAe,C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6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-low-poly",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Low poly assets for Three.js",
|
|
5
5
|
"author": "Jason Sturges <jason@jsonsturges.com> (https://jasonsturges.com)",
|
|
6
6
|
"homepage": "https://github.com/jasonsturges/three-low-poly",
|
|
@@ -17,30 +17,32 @@
|
|
|
17
17
|
"assets",
|
|
18
18
|
"3d"
|
|
19
19
|
],
|
|
20
|
+
"type": "module",
|
|
20
21
|
"main": "dist/index.cjs.js",
|
|
21
22
|
"module": "dist/index.es.js",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
23
|
+
"browser": "dist/index.iife.js",
|
|
24
|
+
"umd": "dist/index.umd.js",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"require": "./dist/index.cjs.js",
|
|
28
|
+
"import": "./dist/index.es.js",
|
|
29
|
+
"browser": "./dist/index.iife.js",
|
|
30
|
+
"umd": "./dist/index.umd.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
24
33
|
"files": [
|
|
25
34
|
"dist"
|
|
26
35
|
],
|
|
27
36
|
"scripts": {
|
|
28
|
-
"dev": "
|
|
37
|
+
"dev": "vite build --watch",
|
|
29
38
|
"start": "vite --host --open",
|
|
30
|
-
"build": "
|
|
31
|
-
"build:types": "dts-bundle-generator --config ./dts-bundle-generator.config.ts"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/node": "^22.8.1",
|
|
35
|
-
"@types/three": "^0.169.0",
|
|
36
|
-
"dts-bundle-generator": "^9.5.1",
|
|
37
|
-
"prettier": "^3.3.3",
|
|
38
|
-
"tslib": "^2.8.0",
|
|
39
|
-
"typescript": "^5.6.3",
|
|
40
|
-
"vite": "^5.4.10",
|
|
41
|
-
"vite-plugin-dts": "^4.3.0"
|
|
39
|
+
"build": "vite build"
|
|
42
40
|
},
|
|
43
41
|
"dependencies": {
|
|
44
42
|
"three": "^0.169.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"prettier": "^3.3.3",
|
|
46
|
+
"vite": "^5.4.10"
|
|
45
47
|
}
|
|
46
48
|
}
|