@needle-tools/three-mesh-effects 0.1.0-alpha → 0.1.0-alpha.0
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/LICENSE +21 -21
- package/README.md +94 -88
- package/build/deformation-runtime.js.map +1 -1
- package/build/impostor-runtime-needle-engine.js.map +1 -1
- package/build/impostor-runtime.js.map +1 -1
- package/build/internal/deformation/cloth-surface.js.map +1 -1
- package/build/internal/deformation/fur-surface.js.map +1 -1
- package/build/internal/deformation/ik-constraints.js.map +1 -1
- package/build/internal/deformation/joints-json.js.map +1 -1
- package/build/internal/deformation/limits.js.map +1 -1
- package/build/internal/deformation/motion-settings.js.map +1 -1
- package/build/internal/deformation/pin-cloth.js.map +1 -1
- package/build/internal/deformation/pin-ik.js.map +1 -1
- package/build/internal/deformation/pin-types.js.map +1 -1
- package/build/internal/deformation/pin-wiggle.js.map +1 -1
- package/build/internal/deformation/pose-slots.js.map +1 -1
- package/build/internal/deformation/pose-timeline.js.map +1 -1
- package/build/internal/deformation/rig-drivers.js.map +1 -1
- package/build/internal/deformation/rig-extension.js.map +1 -1
- package/build/internal/deformation/rig-runtime.js.map +1 -1
- package/build/internal/deformation/wind.js.map +1 -1
- package/build/internal/impostor/impostor-metadata.js.map +1 -1
- package/build/internal/impostor/impostor-node-material.js.map +1 -1
- package/build/internal/impostor/impostor-runtime-support.js.map +1 -1
- package/build/internal/impostor/octahedral.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-display.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-metadata.js.map +1 -1
- package/build/internal/pixel-impostor/pixel-impostor-runtime.js.map +1 -1
- package/build/internal/rendering/skin-projection.js +52 -52
- package/build/internal/rendering/skin-projection.js.map +2 -2
- package/build/internal/rendering/surface-query.js +52 -52
- package/build/internal/rendering/surface-query.js.map +2 -2
- package/build/internal/rendering/wireframe.js.map +1 -1
- package/build/internal/rendering/wrap-preview-settings.js.map +1 -1
- package/build/internal/rendering/wrap-preview.js +52 -52
- package/build/internal/rendering/wrap-preview.js.map +2 -2
- package/build/internal/rendering/wrap-skin.js +52 -52
- package/build/internal/rendering/wrap-skin.js.map +2 -2
- package/build/pixel-impostor-runtime.js.map +1 -1
- package/build/wrap-effects.js +52 -52
- package/build/wrap-effects.js.map +2 -2
- package/package.json +107 -94
- package/src/deformation/cloth-surface.ts +223 -223
- package/src/deformation/fur-surface.ts +129 -129
- package/src/deformation/ik-constraints.ts +37 -37
- package/src/deformation/joints-json.ts +94 -94
- package/src/deformation/limits.ts +25 -25
- package/src/deformation/motion-settings.ts +9 -9
- package/src/deformation/pin-cloth.ts +149 -149
- package/src/deformation/pin-ik.ts +582 -582
- package/src/deformation/pin-types.ts +22 -22
- package/src/deformation/pin-wiggle.ts +119 -119
- package/src/deformation/pose-slots.ts +106 -106
- package/src/deformation/pose-timeline.ts +242 -242
- package/src/deformation/rig-drivers.ts +32 -32
- package/src/deformation/rig-extension.ts +87 -87
- package/src/deformation/rig-runtime.ts +416 -416
- package/src/deformation/wind.ts +36 -36
- package/src/impostor/impostor-metadata.js +137 -137
- package/src/impostor/impostor-node-material.js +1581 -1581
- package/src/impostor/impostor-runtime-support.js +139 -139
- package/src/impostor/octahedral.js +280 -280
- package/src/pixel-impostor/pixel-impostor-display.js +794 -794
- package/src/pixel-impostor/pixel-impostor-metadata.js +74 -74
- package/src/pixel-impostor/pixel-impostor-runtime.js +78 -78
- package/src/public/deformation-runtime.ts +3 -3
- package/src/public/impostor-runtime-needle-engine.js +56 -56
- package/src/public/impostor-runtime.js +21 -21
- package/src/public/pixel-impostor-runtime.js +5 -5
- package/src/public/wrap-effects.js +21 -21
- package/src/rendering/skin-projection.js +113 -113
- package/src/rendering/surface-query.js +88 -88
- package/src/rendering/wireframe.js +115 -115
- package/src/rendering/wrap-preview-settings.js +123 -123
- package/src/rendering/wrap-preview.js +645 -645
- package/src/rendering/wrap-skin.js +109 -109
- package/build/internal/public/deformation-runtime.js +0 -2143
- package/build/internal/public/deformation-runtime.js.map +0 -7
- package/build/internal/public/impostor-runtime-needle-engine.js +0 -42
- package/build/internal/public/impostor-runtime-needle-engine.js.map +0 -7
- package/build/internal/public/impostor-runtime.js +0 -1333
- package/build/internal/public/impostor-runtime.js.map +0 -7
- package/build/internal/public/pixel-impostor-runtime.js +0 -876
- package/build/internal/public/pixel-impostor-runtime.js.map +0 -7
- package/build/internal/public/wrap-effects.js +0 -5640
- package/build/internal/public/wrap-effects.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/rendering/wireframe.js"],
|
|
4
|
-
"sourcesContent": ["// @ts-check\
|
|
4
|
+
"sourcesContent": ["// @ts-check\nimport * as THREE from 'three';\nimport { MeshBasicNodeMaterial } from 'three/webgpu';\nimport { attribute, fwidth, min, vec3, uniform, float } from 'three/tsl';\n/** @typedef {'black' | 'white' | 'invert'} WireframeBlendMode */\n\n/**\n * Produces a triangle overlay with a screen-space barycentric edge mask. Unlike\n * hardware line primitives this supports stable, adjustable pixel thickness.\n * @param {THREE.Material} sourceMaterial\n * @param {boolean} isImpostor\n * @param {number} thickness\n * @param {WireframeBlendMode} blendMode\n */\nexport function createPreviewWireframeMaterial(sourceMaterial, isImpostor, thickness, blendMode) {\n const thicknessNode = uniform(thickness);\n const barycentric = attribute('previewBarycentric', /** @type {'vec3'} */ ('vec3'));\n const edgeMask = attribute('previewWireframeEdgeMask', /** @type {'vec3'} */ ('vec3'));\n const derivative = fwidth(barycentric).max(vec3(1e-4));\n const edgeDistanceVector = barycentric.div(derivative)\n .add(vec3(1).sub(edgeMask).mul(1e4));\n const edgeDistance = min(\n edgeDistanceVector.x,\n edgeDistanceVector.y,\n edgeDistanceVector.z,\n );\n const halfWidth = thicknessNode.mul(0.5);\n // Exact overlap of the requested line interval with a one-pixel box filter.\n // The difference of the two ramps preserves integrated line energy for\n // subpixel widths instead of quantizing or over-attenuating thin lines.\n const coverage = halfWidth.add(0.5).sub(edgeDistance).clamp(0, 1).sub(\n float(0.5).sub(halfWidth).sub(edgeDistance).clamp(0, 1),\n );\n const material = new MeshBasicNodeMaterial({\n name: isImpostor ? 'Black impostor quad overlay' : 'Black mesh wireframe overlay',\n color: 0x000000,\n side: isImpostor ? THREE.DoubleSide : sourceMaterial.side,\n depthTest: !isImpostor,\n depthWrite: false,\n polygonOffset: !isImpostor,\n polygonOffsetFactor: -1,\n polygonOffsetUnits: -1,\n toneMapped: false,\n });\n material.transparent = true;\n material.premultipliedAlpha = true;\n material.opacityNode = coverage;\n material.maskNode = coverage.greaterThan(1 / 1024);\n if ('positionNode' in sourceMaterial) {\n const sourceNodeMaterial = /** @type {import('three/webgpu').NodeMaterial} */ (sourceMaterial);\n material.positionNode = sourceNodeMaterial.positionNode ?? null;\n }\n material.userData.previewWireframeThickness = thicknessNode;\n applyPreviewWireframeBlendMode(material, blendMode);\n return material;\n}\n\n/** @param {string} value @returns {WireframeBlendMode} */\nexport function parseWireframeBlendMode(value) {\n return value === 'white' || value === 'invert' ? value : 'black';\n}\n\n/**\n * @param {THREE.Material} material\n * @param {WireframeBlendMode} mode\n */\nexport function applyPreviewWireframeBlendMode(material, mode) {\n const basic = /** @type {import('three/webgpu').MeshBasicNodeMaterial} */ (material);\n basic.color.set(mode === 'black' ? 0x000000 : 0xffffff);\n if (mode === 'invert') {\n basic.blending = THREE.CustomBlending;\n basic.blendEquation = THREE.AddEquation;\n basic.blendSrc = THREE.OneMinusDstColorFactor;\n basic.blendDst = THREE.OneMinusSrcColorFactor;\n basic.blendEquationAlpha = THREE.AddEquation;\n basic.blendSrcAlpha = THREE.OneFactor;\n basic.blendDstAlpha = THREE.OneMinusSrcAlphaFactor;\n } else {\n basic.blending = THREE.NormalBlending;\n }\n basic.userData.previewWireframeBlendMode = mode;\n basic.needsUpdate = true;\n}\n\n/**\n * @param {THREE.BufferGeometry} source\n * @returns {THREE.BufferGeometry}\n */\nexport function createBarycentricWireframeGeometry(source) {\n const geometry = source.index ? source.toNonIndexed() : source.clone();\n const vertexCount = geometry.getAttribute('position')?.count ?? 0;\n const barycentric = new Float32Array(vertexCount * 3);\n const edgeMask = new Float32Array(vertexCount * 3);\n const triangleMasks = source.userData.previewWireframeEdgeMasks;\n for (let vertex = 0; vertex + 2 < vertexCount; vertex += 3) {\n barycentric[(vertex + 0) * 3 + 0] = 1;\n barycentric[(vertex + 1) * 3 + 1] = 1;\n barycentric[(vertex + 2) * 3 + 2] = 1;\n const triangle = vertex / 3;\n const x = triangleMasks?.[triangle * 3] ?? 1;\n const y = triangleMasks?.[triangle * 3 + 1] ?? 1;\n const z = triangleMasks?.[triangle * 3 + 2] ?? 1;\n for (let corner = 0; corner < 3; corner++) {\n edgeMask[(vertex + corner) * 3] = x;\n edgeMask[(vertex + corner) * 3 + 1] = y;\n edgeMask[(vertex + corner) * 3 + 2] = z;\n }\n }\n geometry.setAttribute('previewBarycentric', new THREE.BufferAttribute(barycentric, 3));\n geometry.setAttribute(\n 'previewWireframeEdgeMask',\n new THREE.BufferAttribute(edgeMask, 3),\n );\n return geometry;\n}\n"],
|
|
5
5
|
"mappings": ";;;AACA,YAAY,WAAW;AACvB,SAAS,6BAA6B;AACtC,SAAS,WAAW,QAAQ,KAAK,MAAM,SAAS,aAAa;AAWtD,SAAS,+BAA+B,gBAAgB,YAAY,WAAW,WAAW;AAC/F,QAAM,gBAAgB,QAAQ,SAAS;AACvC,QAAM,cAAc;AAAA,IAAU;AAAA;AAAA,IAA6C;AAAA,EAAO;AAClF,QAAM,WAAW;AAAA,IAAU;AAAA;AAAA,IAAmD;AAAA,EAAO;AACrF,QAAM,aAAa,OAAO,WAAW,EAAE,IAAI,KAAK,IAAI,CAAC;AACrD,QAAM,qBAAqB,YAAY,IAAI,UAAU,EAClD,IAAI,KAAK,CAAC,EAAE,IAAI,QAAQ,EAAE,IAAI,GAAG,CAAC;AACrC,QAAM,eAAe;AAAA,IACnB,mBAAmB;AAAA,IACnB,mBAAm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A4B;AAC3C,QAAM,cAAc;AACtB;AAMO,SAAS,mCAAmC,QAAQ;AACzD,QAAM,WAAW,OAAO,QAAQ,OAAO,aAAa,IAAI,OAAO,MAAM;AACrE,QAAM,cAAc,SAAS,aAAa,UAAU,GAAG,SAAS;AAChE,QAAM,cAAc,IAAI,aAAa,cAAc,CAAC;AACpD,QAAM,WAAW,IAAI,aAAa,cAAc,CAAC;AACjD,QAAM,gBAAgB,OAAO,SAAS;AACtC,WAAS,SAAS,GAAG,SAAS,IAAI,aAAa,UAAU,GAAG;AAC1D,iBAAa,SAAS,KAAK,IAAI,CAAC,IAAI;AACpC,iBAAa,SAAS,KAAK,IAAI,CAAC,IAAI;AACpC,iBAAa,SAAS,KAAK,IAAI,CAAC,IAAI;AACpC,UAAM,WAAW,SAAS;AAC1B,UAAM,IAAI,gBAAgB,WAAW,CAAC,KAAK;AAC3C,UAAM,IAAI,gBAAgB,WAAW,IAAI,CAAC,KAAK;AAC/C,UAAM,IAAI,gBAAgB,WAAW,IAAI,CAAC,KAAK;AAC/C,aAAS,SAAS,GAAG,SAAS,GAAG,UAAU;AACzC,gBAAU,SAAS,UAAU,CAAC,IAAI;AAClC,gBAAU,SAAS,UAAU,IAAI,CAAC,IAAI;AACtC,gBAAU,SAAS,UAAU,IAAI,CAAC,IAAI;AAAA,IACxC;AAAA,EACF;AACA,WAAS,aAAa,sBAAsB,IAAU,sBAAgB,aAAa,CAAC,CAAC;AACrF,WAAS;AAAA,IACP;AAAA,IACA,IAAU,sBAAgB,UAAU,CAAC;AAAA,EACvC;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/rendering/wrap-preview-settings.js"],
|
|
4
|
-
"sourcesContent": ["// Lightweight UI contract; importing controls must not import shader graphs.\r\nexport const WRAP_PREVIEW_MODES = ['ice', 'force-field', 'tech-cage', 'flames', 'aura', 'outline', 'godrays', 'wind-frosted', 'shroud', 'lava', 'ivy', 'heat-haze'];\r\n/** @type {Record<string, {key: string, label: string, min: number, max: number, step: number, value: number, title: string, kind?: string}[]>} */\r\nexport const WRAP_PREVIEW_CONTROLS = {\r\n 'heat-haze': [\r\n { key: 'strength', label: 'Distortion', min: 0, max: 1, step: 0.01, value: 0.35, title: 'Strength of the bubbling refractive normals.' },\r\n { key: 'detail', label: 'Detail', min: 1, max: 16, step: 0.25, value: 5, title: 'Spatial scale of the smooth heat bubbles.' },\r\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1, title: 'Upward motion and evolution of the heat distortion.' },\r\n { key: 'thickness', label: 'Thickness', min: 0.01, max: 1, step: 0.01, value: 0.15, title: 'Optical thickness of the transmissive hull.' },\r\n ],\r\n shroud: [\r\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x100d18, title: 'Deep shadow cloud color.' },\r\n { key: 'coverage', label: 'Coverage', min: 0, max: 1, step: 0.01, value: 0.33, title: 'Fraction of the surface hidden in swirling clouds.' },\r\n { key: 'detail', label: 'Detail', min: 1, max: 12, step: 0.25, value: 5.5, title: 'Cloud and eddy scale.' },\r\n { key: 'depth', label: 'Cloud depth', min: 0, max: 0.1, step: 0.001, value: 0.016, title: 'Surface-hugging cloud thickness relative to model size.' },\r\n { key: 'amplitude', label: 'Vertex curl', min: 0, max: 0.08, step: 0.001, value: 0.063, title: 'Full 3D curl displacement of the cloud vertices. Zero removes the vertex curl calculations from the shader.' },\r\n { key: 'fresnel', label: 'Edge fade', min: 0, max: 8, step: 0.05, value: 1.5, title: 'Fade clouds to transparent at grazing angles. Higher values soften more of the silhouette; zero disables the fade.' },\r\n { key: 'speed', label: 'Swirl speed', min: 0, max: 4, step: 0.05, value: 2.25, title: 'Cloud circulation speed; no upward flame motion.' },\r\n { key: 'opacity', label: 'Opacity', min: 0, max: 1, step: 0.01, value: 0.99, title: 'Maximum shadow opacity per layer.' },\r\n ],\r\n lava: [\r\n { key: 'noise', label: 'Growth noise', min: 0, max: 1, step: 0.01, value: 0.6, title: '3D noise variation in the advancing front. Zero removes the growth-noise graph.' },\r\n { key: 'transition', label: 'Transition zone', min: 0.05, max: 0.4, step: 0.01, value: 0.2, title: 'Width of the zone where volcanic plates form and expand.' },\r\n { key: 'color', kind: 'color', label: 'Lava color', min: 0, max: 16777215, step: 1, value: 0xff3705, title: 'Molten crack color, graduating to yellow-white in the hottest cores.' },\r\n { key: 'fill', label: 'Fill from bottom', min: 0, max: 1, step: 0.01, value: 0.65, title: 'Fill height from the base to the top of the rest-pose hull. Zero hides all lava; one covers all of it.' },\r\n { key: 'detail', label: 'Detail', min: 2, max: 24, step: 0.5, value: 12, title: 'Scale of the irregular volcanic plates.' },\r\n { key: 'cracks', label: 'Crack width', min: 0.01, max: 0.3, step: 0.005, value: 0.065, title: 'Width of the molten seams between crust plates.' },\r\n { key: 'glow', label: 'Heat', min: 0, max: 8, step: 0.1, value: 3, title: 'Emission of the molten cracks.' },\r\n { key: 'speed', label: 'Flow speed', min: 0, max: 3, step: 0.05, value: 0.5, title: 'Slow molten heat flow beneath stationary crust.' },\r\n ],\r\n ivy: [\r\n { key: 'noise', label: 'Growth noise', min: 0, max: 1, step: 0.01, value: 0.6, title: '3D variation in vine and leaf growth timing. Zero removes the growth-noise graph.' },\r\n { key: 'transition', label: 'Transition zone', min: 0.05, max: 0.4, step: 0.01, value: 0.2, title: 'Width of the zone where twigs extend and leaves unfurl from their roots.' },\r\n { key: 'color', kind: 'color', label: 'Leaf color', min: 0, max: 16777215, step: 1, value: 0x397b24, title: 'Leaf green, with lighter veins and younger tips.' },\r\n { key: 'growth', label: 'Growth', min: 0, max: 1, step: 0.01, value: 1, title: 'Reveal climbing stems and leaves from the bottom upward.' },\r\n { key: 'detail', label: 'Detail', min: 2, max: 24, step: 0.25, value: 10, title: 'Scale of the procedural vines and leaves on the hull.' },\r\n { key: 'leafSize', label: 'Leaf size', min: 0.2, max: 1, step: 0.01, value: 0.7, title: 'Lobed leaf size relative to the vine spacing.' },\r\n { key: 'speed', label: 'Breeze speed', min: 0, max: 3, step: 0.05, value: 0.6, title: 'Gentle leaf movement; stems stay attached to the hull.' },\r\n ],\r\n ice: [\r\n { key: 'dispersion', label: 'Dispersion', min: 0, max: 2, step: 0.01, value: 0.25, title: 'Spectral refraction through the ice. Zero removes dispersion from the shader.' },\r\n { key: 'frost', label: 'Frost', min: 0, max: 1, step: 0.01, value: 0.55, title: 'Cloudiness of the physical ice.' },\r\n { key: 'facets', label: 'Facets', min: 0, max: 1, step: 0.01, value: 0.5, title: 'Blend rounded normals into cut-crystal facets.' },\r\n { key: 'thickness', label: 'Thickness', min: 0.02, max: 1, step: 0.01, value: 0.35, title: 'Optical thickness relative to model size.' },\r\n ],\r\n 'force-field': [\r\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x2bd4ef, title: 'Energy color of both hex field layers.' },\r\n { key: 'density', label: 'Hex density', min: 4, max: 40, step: 1, value: 26, title: 'Scale of the biplanar hex grid on both field layers.' },\r\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1.75, title: 'Speed of the per-hex energy pulses and shifting outer patches.' },\r\n { key: 'glow', label: 'Glow', min: 0.1, max: 5, step: 0.1, value: 0.4, title: 'Field and Fresnel brightness.' },\r\n { key: 'detail', label: 'Detail', min: 1, max: 12, step: 0.25, value: 4, title: 'Spatial detail of curl motion and outer patches, independent of hex density.' },\r\n { key: 'noise', label: 'Noise strength', min: 0, max: 2, step: 0.05, value: 1, title: 'Curl displacement and outer-patch noise. Zero removes noise calculations from the shader.' },\r\n { key: 'fresnel', label: 'Fresnel', min: 0.25, max: 8, step: 0.05, value: 3, title: 'Concentrate the glow toward grazing edges. Higher values make a tighter rim.' },\r\n ],\r\n 'tech-cage': [\r\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x52e6ff, title: 'Color of the cage wires and vertex nodes.' },\r\n { key: 'amplitude', label: 'Curl strength', min: 0, max: 0.2, step: 0.005, value: 0.035, title: 'Shared curl displacement of cage vertices and node centers, relative to model size.' },\r\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 0.7, title: 'Speed of the animated 3D curl field.' },\r\n { key: 'nodeSize', label: 'Node size', min: 0.002, max: 0.04, step: 0.001, value: 0.009, title: 'Radius of the instanced smooth icospheres, relative to model size.' },\r\n { key: 'width', label: 'Wire width', min: 0.25, max: 4, step: 0.25, value: 1.25, title: 'Antialiased wire width in screen pixels.' },\r\n ],\r\n flames: [\r\n { key: 'color', kind: 'color', label: 'Cool', min: 0, max: 16777215, step: 1, value: 0xff3c00, title: 'Cooling plume tips and weak wisps in the stylized temperature estimate.' },\r\n { key: 'warmColor', kind: 'color', label: 'Warm', min: 0, max: 16777215, step: 1, value: 0xffb52a, title: 'Middle of the flame temperature gradient.' },\r\n { key: 'hotColor', kind: 'color', label: 'Hot', min: 0, max: 16777215, step: 1, value: 0xfff4d6, title: 'Hot reaction region just beyond the emitting surface; the plume cools toward its tips.' },\r\n { key: 'radialUp', label: 'Radial up', min: 0, max: 1, step: 0.01, value: 0, title: '0: vertical world up. 1: outward and upward from the wrap\u2019s bottom-center floor point.' },\r\n { key: 'upThreshold', label: 'Upward threshold', min: -1, max: 0.95, step: 0.05, value: 0.05, title: 'Outward geometry-normal alignment with the selected up direction. Lower values include more side faces.' },\r\n { key: 'height', label: 'Flame height', min: 0, max: 1, step: 0.01, value: 0.35, title: 'Upward flame displacement relative to model size.' },\r\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1.4, title: 'Upward flow speed of the aura.' },\r\n { key: 'scale', label: 'Flame detail', min: 1, max: 12, step: 0.25, value: 5, title: 'Spatial frequency of the flame tongues.' },\r\n ],\r\n aura: [\r\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0xffd52a, title: 'Aura color.' },\r\n { key: 'radialUp', label: 'Radial up', min: 0, max: 1, step: 0.01, value: 0.68, title: 'Blend vertical up into outward rays from the bottom-center floor point.' },\r\n { key: 'upThreshold', label: 'Upward threshold', min: -1, max: 0.95, step: 0.05, value: -0.2, title: 'Outward geometry-normal alignment required to emit spikes.' },\r\n { key: 'height', label: 'Spike height', min: 0, max: 1, step: 0.01, value: 0.39, title: 'Length of the pointed aura tongues relative to model size.' },\r\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 2.85, title: 'General spike pulsing and shape variation, independent of inward travel and bending.' },\r\n { key: 'wanderSpeed', label: 'Inward travel speed', min: -4, max: 4, step: 0.05, value: 2.45, title: 'Polar spike travel speed. Negative reverses toward the base; zero stops travel without stopping the other animation.' },\r\n { key: 'bendStrength', label: 'Bend strength', min: 0, max: 0.5, step: 0.01, value: 0.1, title: 'Strength of the separate travelling shell bend. Zero disables the bend.' },\r\n { key: 'bendSpeed', label: 'Bend speed', min: 0, max: 4, step: 0.05, value: 4, title: 'Speed of the shell bend, independent of spike travel.' },\r\n { key: 'scale', label: 'Detail', min: 1, max: 12, step: 0.25, value: 6.75, title: 'Spatial frequency of the pointed energy tongues.' },\r\n { key: 'fresnel', label: 'Fresnel', min: 0.25, max: 12, step: 0.05, value: 5, title: 'Concentrate flat golden energy around the silhouette.' },\r\n { key: 'opacity', label: 'Opacity', min: 0, max: 1, step: 0.01, value: 0.17, title: 'Opacity of the flat-color aura shell.' },\r\n ],\r\n outline: [\r\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0xffffff, title: 'Solid inner outline color.' },\r\n { key: 'expand', label: 'Normal expand', min: 0, max: 0.2, step: 0.001, value: 0.01, title: 'Inner shell expansion along smooth normals, relative to model size.' },\r\n { key: 'borderColor', kind: 'color', label: 'Border color', min: 0, max: 16777215, step: 1, value: 0x000000, title: 'Solid outer outline color.' },\r\n { key: 'borderOffset', label: 'Border offset', min: 0, max: 0.1, step: 0.001, value: 0.005, title: 'Additional normal expansion beyond the inner shell.' },\r\n ],\r\n godrays: [\r\n { key: 'azimuth', kind: 'direction', label: 'Direction', min: -180, max: 180, step: 1, value: 25, title: 'Drag to rotate the ray direction. Arrow keys rotate; Home resets.' },\r\n { key: 'elevation', kind: 'hidden', label: 'Elevation', min: -89, max: 89, step: 1, value: 55, title: '' },\r\n { key: 'angle', label: 'Angle', min: 1, max: 80, step: 1, value: 25, title: 'Angular spread of the directional rays.' },\r\n { key: 'length', label: 'Length', min: 0, max: 2, step: 0.01, value: 0.6, title: 'Ray length relative to the wrap size.' },\r\n { key: 'opacity', label: 'Strength', min: 0, max: 1, step: 0.01, value: 0.65, title: 'Multiplicative darkening of the rays.' },\r\n { key: 'fresnel', label: 'Edge softness', min: 0.25, max: 5, step: 0.05, value: 1.5, title: 'Fade grazing edges smoothly.' },\r\n ],\r\n 'wind-frosted': [\r\n { key: 'azimuth', kind: 'direction', label: 'Direction', min: -180, max: 180, step: 1, value: 25, title: 'Direction the freezing wind travels. Icicles point away with the wind.' },\r\n { key: 'elevation', kind: 'hidden', label: 'Elevation', min: -89, max: 89, step: 1, value: -25, title: '' },\r\n { key: 'coverage', label: 'Coverage', min: 0, max: 1, step: 0.01, value: 0.55, title: 'Amount of directional snow and frost coverage.' },\r\n { key: 'normalOffset', label: 'Windward offset', min: 0, max: 0.2, step: 0.001, value: 0, title: 'Push the wind-facing coating outward along its normals, relative to model size.' },\r\n { key: 'height', label: 'Icicle length', min: 0, max: 0.5, step: 0.01, value: 0.12, title: 'Length of sharp downwind icicles relative to model size.' },\r\n { key: 'scale', label: 'Detail', min: 1, max: 12, step: 0.25, value: 5, title: 'Detail of frost patches and pointed icicles.' },\r\n ],\r\n};\r\nexport function createWrapPreviewValues() {\r\n return Object.fromEntries(Object.entries(WRAP_PREVIEW_CONTROLS).map(([mode, controls]) => [mode,\r\n Object.fromEntries(controls.map(control => [control.key, control.value])),\r\n ]));\r\n}\r\n\r\n/** Includes older reports whose wrap stages live inside material groups.\r\n * @param {unknown} topology\r\n * @returns {boolean}\r\n */\r\nexport function isWrapTopology(topology) {\r\n if (!topology || typeof topology !== 'object') return false;\r\n if ('mode' in topology && topology.mode === 'hull') return true;\r\n return 'groups' in topology && Array.isArray(topology.groups)\r\n && topology.groups.some(group => group && typeof group === 'object' && 'report' in group && isWrapTopology(group.report));\r\n}\r\n"],
|
|
4
|
+
"sourcesContent": ["// Lightweight UI contract; importing controls must not import shader graphs.\nexport const WRAP_PREVIEW_MODES = ['ice', 'force-field', 'tech-cage', 'flames', 'aura', 'outline', 'godrays', 'wind-frosted', 'shroud', 'lava', 'ivy', 'heat-haze'];\n/** @type {Record<string, {key: string, label: string, min: number, max: number, step: number, value: number, title: string, kind?: string}[]>} */\nexport const WRAP_PREVIEW_CONTROLS = {\n 'heat-haze': [\n { key: 'strength', label: 'Distortion', min: 0, max: 1, step: 0.01, value: 0.35, title: 'Strength of the bubbling refractive normals.' },\n { key: 'detail', label: 'Detail', min: 1, max: 16, step: 0.25, value: 5, title: 'Spatial scale of the smooth heat bubbles.' },\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1, title: 'Upward motion and evolution of the heat distortion.' },\n { key: 'thickness', label: 'Thickness', min: 0.01, max: 1, step: 0.01, value: 0.15, title: 'Optical thickness of the transmissive hull.' },\n ],\n shroud: [\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x100d18, title: 'Deep shadow cloud color.' },\n { key: 'coverage', label: 'Coverage', min: 0, max: 1, step: 0.01, value: 0.33, title: 'Fraction of the surface hidden in swirling clouds.' },\n { key: 'detail', label: 'Detail', min: 1, max: 12, step: 0.25, value: 5.5, title: 'Cloud and eddy scale.' },\n { key: 'depth', label: 'Cloud depth', min: 0, max: 0.1, step: 0.001, value: 0.016, title: 'Surface-hugging cloud thickness relative to model size.' },\n { key: 'amplitude', label: 'Vertex curl', min: 0, max: 0.08, step: 0.001, value: 0.063, title: 'Full 3D curl displacement of the cloud vertices. Zero removes the vertex curl calculations from the shader.' },\n { key: 'fresnel', label: 'Edge fade', min: 0, max: 8, step: 0.05, value: 1.5, title: 'Fade clouds to transparent at grazing angles. Higher values soften more of the silhouette; zero disables the fade.' },\n { key: 'speed', label: 'Swirl speed', min: 0, max: 4, step: 0.05, value: 2.25, title: 'Cloud circulation speed; no upward flame motion.' },\n { key: 'opacity', label: 'Opacity', min: 0, max: 1, step: 0.01, value: 0.99, title: 'Maximum shadow opacity per layer.' },\n ],\n lava: [\n { key: 'noise', label: 'Growth noise', min: 0, max: 1, step: 0.01, value: 0.6, title: '3D noise variation in the advancing front. Zero removes the growth-noise graph.' },\n { key: 'transition', label: 'Transition zone', min: 0.05, max: 0.4, step: 0.01, value: 0.2, title: 'Width of the zone where volcanic plates form and expand.' },\n { key: 'color', kind: 'color', label: 'Lava color', min: 0, max: 16777215, step: 1, value: 0xff3705, title: 'Molten crack color, graduating to yellow-white in the hottest cores.' },\n { key: 'fill', label: 'Fill from bottom', min: 0, max: 1, step: 0.01, value: 0.65, title: 'Fill height from the base to the top of the rest-pose hull. Zero hides all lava; one covers all of it.' },\n { key: 'detail', label: 'Detail', min: 2, max: 24, step: 0.5, value: 12, title: 'Scale of the irregular volcanic plates.' },\n { key: 'cracks', label: 'Crack width', min: 0.01, max: 0.3, step: 0.005, value: 0.065, title: 'Width of the molten seams between crust plates.' },\n { key: 'glow', label: 'Heat', min: 0, max: 8, step: 0.1, value: 3, title: 'Emission of the molten cracks.' },\n { key: 'speed', label: 'Flow speed', min: 0, max: 3, step: 0.05, value: 0.5, title: 'Slow molten heat flow beneath stationary crust.' },\n ],\n ivy: [\n { key: 'noise', label: 'Growth noise', min: 0, max: 1, step: 0.01, value: 0.6, title: '3D variation in vine and leaf growth timing. Zero removes the growth-noise graph.' },\n { key: 'transition', label: 'Transition zone', min: 0.05, max: 0.4, step: 0.01, value: 0.2, title: 'Width of the zone where twigs extend and leaves unfurl from their roots.' },\n { key: 'color', kind: 'color', label: 'Leaf color', min: 0, max: 16777215, step: 1, value: 0x397b24, title: 'Leaf green, with lighter veins and younger tips.' },\n { key: 'growth', label: 'Growth', min: 0, max: 1, step: 0.01, value: 1, title: 'Reveal climbing stems and leaves from the bottom upward.' },\n { key: 'detail', label: 'Detail', min: 2, max: 24, step: 0.25, value: 10, title: 'Scale of the procedural vines and leaves on the hull.' },\n { key: 'leafSize', label: 'Leaf size', min: 0.2, max: 1, step: 0.01, value: 0.7, title: 'Lobed leaf size relative to the vine spacing.' },\n { key: 'speed', label: 'Breeze speed', min: 0, max: 3, step: 0.05, value: 0.6, title: 'Gentle leaf movement; stems stay attached to the hull.' },\n ],\n ice: [\n { key: 'dispersion', label: 'Dispersion', min: 0, max: 2, step: 0.01, value: 0.25, title: 'Spectral refraction through the ice. Zero removes dispersion from the shader.' },\n { key: 'frost', label: 'Frost', min: 0, max: 1, step: 0.01, value: 0.55, title: 'Cloudiness of the physical ice.' },\n { key: 'facets', label: 'Facets', min: 0, max: 1, step: 0.01, value: 0.5, title: 'Blend rounded normals into cut-crystal facets.' },\n { key: 'thickness', label: 'Thickness', min: 0.02, max: 1, step: 0.01, value: 0.35, title: 'Optical thickness relative to model size.' },\n ],\n 'force-field': [\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x2bd4ef, title: 'Energy color of both hex field layers.' },\n { key: 'density', label: 'Hex density', min: 4, max: 40, step: 1, value: 26, title: 'Scale of the biplanar hex grid on both field layers.' },\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1.75, title: 'Speed of the per-hex energy pulses and shifting outer patches.' },\n { key: 'glow', label: 'Glow', min: 0.1, max: 5, step: 0.1, value: 0.4, title: 'Field and Fresnel brightness.' },\n { key: 'detail', label: 'Detail', min: 1, max: 12, step: 0.25, value: 4, title: 'Spatial detail of curl motion and outer patches, independent of hex density.' },\n { key: 'noise', label: 'Noise strength', min: 0, max: 2, step: 0.05, value: 1, title: 'Curl displacement and outer-patch noise. Zero removes noise calculations from the shader.' },\n { key: 'fresnel', label: 'Fresnel', min: 0.25, max: 8, step: 0.05, value: 3, title: 'Concentrate the glow toward grazing edges. Higher values make a tighter rim.' },\n ],\n 'tech-cage': [\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0x52e6ff, title: 'Color of the cage wires and vertex nodes.' },\n { key: 'amplitude', label: 'Curl strength', min: 0, max: 0.2, step: 0.005, value: 0.035, title: 'Shared curl displacement of cage vertices and node centers, relative to model size.' },\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 0.7, title: 'Speed of the animated 3D curl field.' },\n { key: 'nodeSize', label: 'Node size', min: 0.002, max: 0.04, step: 0.001, value: 0.009, title: 'Radius of the instanced smooth icospheres, relative to model size.' },\n { key: 'width', label: 'Wire width', min: 0.25, max: 4, step: 0.25, value: 1.25, title: 'Antialiased wire width in screen pixels.' },\n ],\n flames: [\n { key: 'color', kind: 'color', label: 'Cool', min: 0, max: 16777215, step: 1, value: 0xff3c00, title: 'Cooling plume tips and weak wisps in the stylized temperature estimate.' },\n { key: 'warmColor', kind: 'color', label: 'Warm', min: 0, max: 16777215, step: 1, value: 0xffb52a, title: 'Middle of the flame temperature gradient.' },\n { key: 'hotColor', kind: 'color', label: 'Hot', min: 0, max: 16777215, step: 1, value: 0xfff4d6, title: 'Hot reaction region just beyond the emitting surface; the plume cools toward its tips.' },\n { key: 'radialUp', label: 'Radial up', min: 0, max: 1, step: 0.01, value: 0, title: '0: vertical world up. 1: outward and upward from the wrap\u2019s bottom-center floor point.' },\n { key: 'upThreshold', label: 'Upward threshold', min: -1, max: 0.95, step: 0.05, value: 0.05, title: 'Outward geometry-normal alignment with the selected up direction. Lower values include more side faces.' },\n { key: 'height', label: 'Flame height', min: 0, max: 1, step: 0.01, value: 0.35, title: 'Upward flame displacement relative to model size.' },\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 1.4, title: 'Upward flow speed of the aura.' },\n { key: 'scale', label: 'Flame detail', min: 1, max: 12, step: 0.25, value: 5, title: 'Spatial frequency of the flame tongues.' },\n ],\n aura: [\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0xffd52a, title: 'Aura color.' },\n { key: 'radialUp', label: 'Radial up', min: 0, max: 1, step: 0.01, value: 0.68, title: 'Blend vertical up into outward rays from the bottom-center floor point.' },\n { key: 'upThreshold', label: 'Upward threshold', min: -1, max: 0.95, step: 0.05, value: -0.2, title: 'Outward geometry-normal alignment required to emit spikes.' },\n { key: 'height', label: 'Spike height', min: 0, max: 1, step: 0.01, value: 0.39, title: 'Length of the pointed aura tongues relative to model size.' },\n { key: 'speed', label: 'Speed', min: 0, max: 4, step: 0.05, value: 2.85, title: 'General spike pulsing and shape variation, independent of inward travel and bending.' },\n { key: 'wanderSpeed', label: 'Inward travel speed', min: -4, max: 4, step: 0.05, value: 2.45, title: 'Polar spike travel speed. Negative reverses toward the base; zero stops travel without stopping the other animation.' },\n { key: 'bendStrength', label: 'Bend strength', min: 0, max: 0.5, step: 0.01, value: 0.1, title: 'Strength of the separate travelling shell bend. Zero disables the bend.' },\n { key: 'bendSpeed', label: 'Bend speed', min: 0, max: 4, step: 0.05, value: 4, title: 'Speed of the shell bend, independent of spike travel.' },\n { key: 'scale', label: 'Detail', min: 1, max: 12, step: 0.25, value: 6.75, title: 'Spatial frequency of the pointed energy tongues.' },\n { key: 'fresnel', label: 'Fresnel', min: 0.25, max: 12, step: 0.05, value: 5, title: 'Concentrate flat golden energy around the silhouette.' },\n { key: 'opacity', label: 'Opacity', min: 0, max: 1, step: 0.01, value: 0.17, title: 'Opacity of the flat-color aura shell.' },\n ],\n outline: [\n { key: 'color', kind: 'color', label: 'Color', min: 0, max: 16777215, step: 1, value: 0xffffff, title: 'Solid inner outline color.' },\n { key: 'expand', label: 'Normal expand', min: 0, max: 0.2, step: 0.001, value: 0.01, title: 'Inner shell expansion along smooth normals, relative to model size.' },\n { key: 'borderColor', kind: 'color', label: 'Border color', min: 0, max: 16777215, step: 1, value: 0x000000, title: 'Solid outer outline color.' },\n { key: 'borderOffset', label: 'Border offset', min: 0, max: 0.1, step: 0.001, value: 0.005, title: 'Additional normal expansion beyond the inner shell.' },\n ],\n godrays: [\n { key: 'azimuth', kind: 'direction', label: 'Direction', min: -180, max: 180, step: 1, value: 25, title: 'Drag to rotate the ray direction. Arrow keys rotate; Home resets.' },\n { key: 'elevation', kind: 'hidden', label: 'Elevation', min: -89, max: 89, step: 1, value: 55, title: '' },\n { key: 'angle', label: 'Angle', min: 1, max: 80, step: 1, value: 25, title: 'Angular spread of the directional rays.' },\n { key: 'length', label: 'Length', min: 0, max: 2, step: 0.01, value: 0.6, title: 'Ray length relative to the wrap size.' },\n { key: 'opacity', label: 'Strength', min: 0, max: 1, step: 0.01, value: 0.65, title: 'Multiplicative darkening of the rays.' },\n { key: 'fresnel', label: 'Edge softness', min: 0.25, max: 5, step: 0.05, value: 1.5, title: 'Fade grazing edges smoothly.' },\n ],\n 'wind-frosted': [\n { key: 'azimuth', kind: 'direction', label: 'Direction', min: -180, max: 180, step: 1, value: 25, title: 'Direction the freezing wind travels. Icicles point away with the wind.' },\n { key: 'elevation', kind: 'hidden', label: 'Elevation', min: -89, max: 89, step: 1, value: -25, title: '' },\n { key: 'coverage', label: 'Coverage', min: 0, max: 1, step: 0.01, value: 0.55, title: 'Amount of directional snow and frost coverage.' },\n { key: 'normalOffset', label: 'Windward offset', min: 0, max: 0.2, step: 0.001, value: 0, title: 'Push the wind-facing coating outward along its normals, relative to model size.' },\n { key: 'height', label: 'Icicle length', min: 0, max: 0.5, step: 0.01, value: 0.12, title: 'Length of sharp downwind icicles relative to model size.' },\n { key: 'scale', label: 'Detail', min: 1, max: 12, step: 0.25, value: 5, title: 'Detail of frost patches and pointed icicles.' },\n ],\n};\nexport function createWrapPreviewValues() {\n return Object.fromEntries(Object.entries(WRAP_PREVIEW_CONTROLS).map(([mode, controls]) => [mode,\n Object.fromEntries(controls.map(control => [control.key, control.value])),\n ]));\n}\n\n/** Includes older reports whose wrap stages live inside material groups.\n * @param {unknown} topology\n * @returns {boolean}\n */\nexport function isWrapTopology(topology) {\n if (!topology || typeof topology !== 'object') return false;\n if ('mode' in topology && topology.mode === 'hull') return true;\n return 'groups' in topology && Array.isArray(topology.groups)\n && topology.groups.some(group => group && typeof group === 'object' && 'report' in group && isWrapTopology(group.report));\n}\n"],
|
|
5
5
|
"mappings": ";;;AACO,IAAM,qBAAqB,CAAC,OAAO,eAAe,aAAa,UAAU,QAAQ,WAAW,WAAW,gBAAgB,UAAU,QAAQ,OAAO,WAAW;AAE3J,IAAM,wBAAwB;AAAA,EACnC,aAAa;AAAA,IACX,EAAE,KAAK,YAAY,OAAO,cAAc,KAAK,GAAG,KAAK,GAAG,MAAM,MAAM,OAAO,MAAM,OAAO,+CAA+C;AAAA,IACvI,EAAE,KAAK,UAAU,OAAO,UAAU,KAAK,GAAG,KAAK,IAAI,MAAM,MAAM,OAAO,GAAG,OAAO,4CAA4C;AAAA,IAC5H,EAAE,KAAK,SAAS,OAAO,SAAS,KAAK,GAAG,KAAK,GAAG,MAAM,MAAM,OAAO,GAAG,OAAO,sDAAsD;AAAA,IACnI,EAAE,KAAK,aAAa,OAAO,aAAa,KAAK,MAAM,KAAK,GAAG,MAAM,MAAM,OAAO,MAAM,OAAO,8CAA8C;AAAA,EAC3I;AAAA,EACA,QAAQ;AAAA,IACN,EAAE,KAAK,SAAS,MAAM,SAAS,OAAO,SAAS,KAAK,GAAG,KAAK,UAAU,MAAM,GAAG,OAAO,SAAU,OAAO,2BAA2B;AAAA,IAClI,EAAE,KAAK,YAAY,OAAO,YAAY,KAAK,GAAG,KAAK,GAAG,MAAM,MAAM,OAAO,MAAM,OAAO,qDAAqD;AAAA,IAC3I,EAAE,KAAK,UAAU,OAAO,UAAU,KAAK,GAAG,KAAK,IAAI,MAAM,MAAM,OAAO,KAAK,OAAO,wBAAwB;AAAA,IAC1G,EAAE,KAAK,SAAS,OAAO,eAAe,KAAK,GAAG,KAAK,KAAK,MAAM,MAAO,OA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,MAAM,UAAU,OAAO,aAAa,KAAK,KAAK,KAAK,IAAI,MAAM,GAAG,OAAO,KAAK,OAAO,GAAG;AAAA,IAC1G,EAAE,KAAK,YAAY,OAAO,YAAY,KAAK,GAAG,KAAK,GAAG,MAAM,MAAM,OAAO,MAAM,OAAO,iDAAiD;AAAA,IACvI,EAAE,KAAK,gBAAgB,OAAO,mBAAmB,KAAK,GAAG,KAAK,KAAK,MAAM,MAAO,OAAO,GAAG,OAAO,kFAAkF;AAAA,IACnL,EAAE,KAAK,UAAU,OAAO,iBAAiB,KAAK,GAAG,KAAK,KAAK,MAAM,MAAM,OAAO,MAAM,OAAO,2DAA2D;AAAA,IACtJ,EAAE,KAAK,SAAS,OAAO,UAAU,KAAK,GAAG,KAAK,IAAI,MAAM,MAAM,OAAO,GAAG,OAAO,+CAA+C;AAAA,EAChI;AACF;AACO,SAAS,0BAA0B;AACxC,SAAO,OAAO,YAAY,OAAO,QAAQ,qBAAqB,EAAE,IAAI,CAAC,CAAC,MAAM,QAAQ,MAAM;AAAA,IAAC;AAAA,IACzF,OAAO,YAAY,SAAS,IAAI,aAAW,CAAC,QAAQ,KAAK,QAAQ,KAAK,CAAC,CAAC;AAAA,EAC1E,CAAC,CAAC;AACJ;AAMO,SAAS,eAAe,UAAU;AACvC,MAAI,CAAC,YAAY,OAAO,aAAa,SAAU,QAAO;AACtD,MAAI,UAAU,YAAY,SAAS,SAAS,OAAQ,QAAO;AAC3D,SAAO,YAAY,YAAY,MAAM,QAAQ,SAAS,MAAM,KACvD,SAAS,OAAO,KAAK,WAAS,SAAS,OAAO,UAAU,YAAY,YAAY,SAAS,eAAe,MAAM,MAAM,CAAC;AAC5H;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -121,10 +121,10 @@ import { Triangle as Triangle4, Vector3 as Vector312 } from "three";
|
|
|
121
121
|
// src/rendering/surface-query.js
|
|
122
122
|
import { BackSide as BackSide2, BufferAttribute as BufferAttribute3, BufferGeometry, FrontSide as FrontSide2, Ray as Ray2, Vector3 as Vector311 } from "three";
|
|
123
123
|
|
|
124
|
-
//
|
|
124
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
125
125
|
import { Box3 as Box33 } from "three";
|
|
126
126
|
|
|
127
|
-
//
|
|
127
|
+
// node_modules/three-mesh-bvh/src/core/Constants.js
|
|
128
128
|
var CENTER = 0;
|
|
129
129
|
var AVERAGE = 1;
|
|
130
130
|
var SAH = 2;
|
|
@@ -150,7 +150,7 @@ var DEFAULT_OPTIONS = {
|
|
|
150
150
|
[SKIP_GENERATION]: false
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
//
|
|
153
|
+
// node_modules/three-mesh-bvh/src/utils/ArrayBoxUtilities.js
|
|
154
154
|
function arrayToBox(nodeIndex32, array, target) {
|
|
155
155
|
target.min.x = array[nodeIndex32];
|
|
156
156
|
target.min.y = array[nodeIndex32 + 1];
|
|
@@ -208,7 +208,7 @@ function computeSurfaceArea(bounds) {
|
|
|
208
208
|
return 2 * (d0 * d1 + d1 * d2 + d2 * d0);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
//
|
|
211
|
+
// node_modules/three-mesh-bvh/src/core/utils/nodeBufferUtils.js
|
|
212
212
|
function IS_LEAF(n16, uint16Array2) {
|
|
213
213
|
return uint16Array2[n16 + 15] === IS_LEAFNODE_FLAG;
|
|
214
214
|
}
|
|
@@ -232,7 +232,7 @@ function BOUNDING_DATA_INDEX(n32) {
|
|
|
232
232
|
return n32;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
//
|
|
235
|
+
// node_modules/three-mesh-bvh/src/core/build/computeBoundsUtils.js
|
|
236
236
|
function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
237
237
|
let minx = Infinity;
|
|
238
238
|
let miny = Infinity;
|
|
@@ -287,7 +287,7 @@ function getBounds(primitiveBounds, offset, count, target, centroidTarget) {
|
|
|
287
287
|
centroidTarget[5] = cmaxz;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
//
|
|
290
|
+
// node_modules/three-mesh-bvh/src/core/build/splitUtils.js
|
|
291
291
|
var BIN_COUNT = 32;
|
|
292
292
|
var binsSort = (a, b) => a.candidate - b.candidate;
|
|
293
293
|
var sahBins = /* @__PURE__ */ new Array(BIN_COUNT).fill().map(() => {
|
|
@@ -463,14 +463,14 @@ function getAverage(primitiveBounds, offset, count, axis) {
|
|
|
463
463
|
return avg / count;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
//
|
|
466
|
+
// node_modules/three-mesh-bvh/src/core/BVHNode.js
|
|
467
467
|
var BVHNode = class {
|
|
468
468
|
constructor() {
|
|
469
469
|
this.boundingData = new Float32Array(6);
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
|
|
473
|
-
//
|
|
473
|
+
// node_modules/three-mesh-bvh/src/core/build/sortUtils.js
|
|
474
474
|
function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
475
475
|
let left = offset;
|
|
476
476
|
let right = offset + count - 1;
|
|
@@ -505,7 +505,7 @@ function partition(buffer, stride, primitiveBounds, offset, count, split) {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
//
|
|
508
|
+
// node_modules/three-mesh-bvh/src/core/build/buildUtils.js
|
|
509
509
|
var float32Array;
|
|
510
510
|
var uint32Array;
|
|
511
511
|
var uint16Array;
|
|
@@ -559,7 +559,7 @@ function _populateBuffer(byteOffset, node) {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
//
|
|
562
|
+
// node_modules/three-mesh-bvh/src/core/build/buildTree.js
|
|
563
563
|
function buildTree(bvh, primitiveBounds, offset, count, options, loadRange) {
|
|
564
564
|
const {
|
|
565
565
|
maxDepth,
|
|
@@ -645,10 +645,10 @@ function buildPackedTree(bvh, options) {
|
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
//
|
|
648
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
649
649
|
import { Box3 } from "three";
|
|
650
650
|
|
|
651
|
-
//
|
|
651
|
+
// node_modules/three-mesh-bvh/src/utils/PrimitivePool.js
|
|
652
652
|
var PrimitivePool = class {
|
|
653
653
|
constructor(getNewPrimitive) {
|
|
654
654
|
this._getNewPrimitive = getNewPrimitive;
|
|
@@ -667,7 +667,7 @@ var PrimitivePool = class {
|
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
669
|
|
|
670
|
-
//
|
|
670
|
+
// node_modules/three-mesh-bvh/src/core/utils/BufferStack.js
|
|
671
671
|
var _BufferStack = class {
|
|
672
672
|
constructor() {
|
|
673
673
|
this.float32Array = null;
|
|
@@ -697,7 +697,7 @@ var _BufferStack = class {
|
|
|
697
697
|
};
|
|
698
698
|
var BufferStack = /* @__PURE__ */ new _BufferStack();
|
|
699
699
|
|
|
700
|
-
//
|
|
700
|
+
// node_modules/three-mesh-bvh/src/core/cast/shapecast.js
|
|
701
701
|
var _box1;
|
|
702
702
|
var _box2;
|
|
703
703
|
var boxStack = [];
|
|
@@ -819,7 +819,7 @@ function shapecastTraverse(nodeIndex32, geometry, intersectsBoundsFunc, intersec
|
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
-
//
|
|
822
|
+
// node_modules/three-mesh-bvh/src/core/cast/bvhcast.js
|
|
823
823
|
import { Box3 as Box32, Matrix4 } from "three";
|
|
824
824
|
var _bufferStack1 = /* @__PURE__ */ new BufferStack.constructor();
|
|
825
825
|
var _bufferStack2 = /* @__PURE__ */ new BufferStack.constructor();
|
|
@@ -1091,7 +1091,7 @@ function _traverse(node1Index32, node2Index32, matrix2to1, matrix1to2, intersect
|
|
|
1091
1091
|
return result;
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
-
//
|
|
1094
|
+
// node_modules/three-mesh-bvh/src/core/BVHTraversalHelper.js
|
|
1095
1095
|
var BVHTraversalHelper = new class {
|
|
1096
1096
|
constructor() {
|
|
1097
1097
|
let buffer = null;
|
|
@@ -1171,7 +1171,7 @@ var BVHTraversalHelper = new class {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
}();
|
|
1173
1173
|
|
|
1174
|
-
//
|
|
1174
|
+
// node_modules/three-mesh-bvh/src/core/BVH.js
|
|
1175
1175
|
var _tempBox = /* @__PURE__ */ new Box33();
|
|
1176
1176
|
var _tempBuffer = /* @__PURE__ */ new Float32Array(6);
|
|
1177
1177
|
var BVH = class {
|
|
@@ -1416,15 +1416,15 @@ var BVH = class {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
};
|
|
1418
1418
|
|
|
1419
|
-
//
|
|
1419
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1420
1420
|
import { Box3 as Box34 } from "three";
|
|
1421
1421
|
|
|
1422
|
-
//
|
|
1422
|
+
// node_modules/three-mesh-bvh/src/utils/BufferUtils.js
|
|
1423
1423
|
function isSharedArrayBufferSupported() {
|
|
1424
1424
|
return typeof SharedArrayBuffer !== "undefined";
|
|
1425
1425
|
}
|
|
1426
1426
|
|
|
1427
|
-
//
|
|
1427
|
+
// node_modules/three-mesh-bvh/src/core/build/geometryUtils.js
|
|
1428
1428
|
import { BufferAttribute } from "three";
|
|
1429
1429
|
function getVertexCount(geo) {
|
|
1430
1430
|
return geo.index ? geo.index.count : geo.attributes.position.count;
|
|
@@ -1512,7 +1512,7 @@ function getRootPrimitiveRanges(geo, range, stride) {
|
|
|
1512
1512
|
return ranges;
|
|
1513
1513
|
}
|
|
1514
1514
|
|
|
1515
|
-
//
|
|
1515
|
+
// node_modules/three-mesh-bvh/src/core/GeometryBVH.js
|
|
1516
1516
|
function generateIndirectBuffer(ranges, useSharedArrayBuffer) {
|
|
1517
1517
|
const lastRange = ranges[ranges.length - 1];
|
|
1518
1518
|
const useUint32 = lastRange.offset + lastRange.count > 2 ** 16;
|
|
@@ -1602,13 +1602,13 @@ var GeometryBVH = class extends BVH {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
};
|
|
1604
1604
|
|
|
1605
|
-
//
|
|
1605
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
1606
1606
|
import { BufferAttribute as BufferAttribute2, FrontSide, Ray, Vector3 as Vector310, Matrix4 as Matrix47 } from "three";
|
|
1607
1607
|
|
|
1608
|
-
//
|
|
1608
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
1609
1609
|
import { Vector3 as Vector34, Matrix4 as Matrix42, Line3 as Line33 } from "three";
|
|
1610
1610
|
|
|
1611
|
-
//
|
|
1611
|
+
// node_modules/three-mesh-bvh/src/math/SeparatingAxisBounds.js
|
|
1612
1612
|
import { Vector3 } from "three";
|
|
1613
1613
|
var SeparatingAxisBounds = class {
|
|
1614
1614
|
constructor() {
|
|
@@ -1667,10 +1667,10 @@ SeparatingAxisBounds.prototype.setFromBox = /* @__PURE__ */ (function() {
|
|
|
1667
1667
|
};
|
|
1668
1668
|
})();
|
|
1669
1669
|
|
|
1670
|
-
//
|
|
1670
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1671
1671
|
import { Triangle, Vector3 as Vector33, Vector2 as Vector22, Line3 as Line32, Plane as Plane2 } from "three";
|
|
1672
1672
|
|
|
1673
|
-
//
|
|
1673
|
+
// node_modules/three-mesh-bvh/src/math/MathUtilities.js
|
|
1674
1674
|
import { Vector3 as Vector32, Vector2, Plane, Line3 } from "three";
|
|
1675
1675
|
var closestPointLineToLine = /* @__PURE__ */ (function() {
|
|
1676
1676
|
const dir1 = /* @__PURE__ */ new Vector32();
|
|
@@ -1789,7 +1789,7 @@ var sphereIntersectTriangle = /* @__PURE__ */ (function() {
|
|
|
1789
1789
|
};
|
|
1790
1790
|
})();
|
|
1791
1791
|
|
|
1792
|
-
//
|
|
1792
|
+
// node_modules/three-mesh-bvh/src/math/ExtendedTriangle.js
|
|
1793
1793
|
var componentKeys = ["x", "y", "z"];
|
|
1794
1794
|
var ZERO_EPSILON = 1e-15;
|
|
1795
1795
|
var ZERO_EPSILON_SQR = ZERO_EPSILON * ZERO_EPSILON;
|
|
@@ -2272,7 +2272,7 @@ ExtendedTriangle.prototype.distanceToTriangle = /* @__PURE__ */ (function() {
|
|
|
2272
2272
|
};
|
|
2273
2273
|
})();
|
|
2274
2274
|
|
|
2275
|
-
//
|
|
2275
|
+
// node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
2276
2276
|
var OrientedBox = class {
|
|
2277
2277
|
constructor(min2, max, matrix) {
|
|
2278
2278
|
this.isOrientedBox = true;
|
|
@@ -2539,7 +2539,7 @@ OrientedBox.prototype.distanceToBox = /* @__PURE__ */ (function() {
|
|
|
2539
2539
|
};
|
|
2540
2540
|
})();
|
|
2541
2541
|
|
|
2542
|
-
//
|
|
2542
|
+
// node_modules/three-mesh-bvh/src/utils/ExtendedTrianglePool.js
|
|
2543
2543
|
var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
2544
2544
|
constructor() {
|
|
2545
2545
|
super(() => new ExtendedTriangle());
|
|
@@ -2547,7 +2547,7 @@ var ExtendedTrianglePoolBase = class extends PrimitivePool {
|
|
|
2547
2547
|
};
|
|
2548
2548
|
var ExtendedTrianglePool = /* @__PURE__ */ new ExtendedTrianglePoolBase();
|
|
2549
2549
|
|
|
2550
|
-
//
|
|
2550
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToPoint.js
|
|
2551
2551
|
import { Vector3 as Vector35 } from "three";
|
|
2552
2552
|
var temp = /* @__PURE__ */ new Vector35();
|
|
2553
2553
|
var temp1 = /* @__PURE__ */ new Vector35();
|
|
@@ -2589,7 +2589,7 @@ function closestPointToPoint(bvh, point, target = {}, minThreshold = 0, maxThres
|
|
|
2589
2589
|
return target;
|
|
2590
2590
|
}
|
|
2591
2591
|
|
|
2592
|
-
//
|
|
2592
|
+
// node_modules/three-mesh-bvh/src/utils/ThreeRayIntersectUtilities.js
|
|
2593
2593
|
import { Vector3 as Vector36, Vector2 as Vector23, Triangle as Triangle2, DoubleSide, BackSide, REVISION } from "three";
|
|
2594
2594
|
var IS_GT_REVISION_169 = parseInt(REVISION) >= 169;
|
|
2595
2595
|
var IS_LT_REVISION_161 = parseInt(REVISION) <= 161;
|
|
@@ -2727,7 +2727,7 @@ function intersectTri(geometry, materialOrSide, ray, tri, intersections, near, f
|
|
|
2727
2727
|
return null;
|
|
2728
2728
|
}
|
|
2729
2729
|
|
|
2730
|
-
//
|
|
2730
|
+
// node_modules/three-mesh-bvh/src/utils/TriangleUtilities.js
|
|
2731
2731
|
import { Vector2 as Vector24, Vector3 as Vector37, Triangle as Triangle3 } from "three";
|
|
2732
2732
|
function setTriangle(tri, i, index, pos) {
|
|
2733
2733
|
const ta = tri.a;
|
|
@@ -2752,7 +2752,7 @@ function setTriangle(tri, i, index, pos) {
|
|
|
2752
2752
|
tc.z = pos.getZ(i2);
|
|
2753
2753
|
}
|
|
2754
2754
|
|
|
2755
|
-
//
|
|
2755
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils.generated.js
|
|
2756
2756
|
function intersectTris(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2757
2757
|
const { geometry, _indirectBuffer } = bvh;
|
|
2758
2758
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2789,7 +2789,7 @@ function iterateOverTriangles(offset, count, bvh, intersectsTriangleFunc, contai
|
|
|
2789
2789
|
return false;
|
|
2790
2790
|
}
|
|
2791
2791
|
|
|
2792
|
-
//
|
|
2792
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit.generated.js
|
|
2793
2793
|
function refit(bvh, nodeIndices = null) {
|
|
2794
2794
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
2795
2795
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -2888,7 +2888,7 @@ function refit(bvh, nodeIndices = null) {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
|
|
2891
|
-
//
|
|
2891
|
+
// node_modules/three-mesh-bvh/src/core/utils/intersectUtils.js
|
|
2892
2892
|
function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
2893
2893
|
let tmin, tmax, tymin, tymax, tzmin, tzmax;
|
|
2894
2894
|
const invdirx = 1 / ray.direction.x, invdiry = 1 / ray.direction.y, invdirz = 1 / ray.direction.z;
|
|
@@ -2931,7 +2931,7 @@ function intersectsNodeBounds(nodeIndex32, array, ray, near, far) {
|
|
|
2931
2931
|
return tmin <= far && tmax >= near;
|
|
2932
2932
|
}
|
|
2933
2933
|
|
|
2934
|
-
//
|
|
2934
|
+
// node_modules/three-mesh-bvh/src/core/utils/iterationUtils_indirect.generated.js
|
|
2935
2935
|
function intersectTris_indirect(bvh, materialOrSide, ray, offset, count, intersections, near, far) {
|
|
2936
2936
|
const { geometry, _indirectBuffer } = bvh;
|
|
2937
2937
|
for (let i = offset, end = offset + count; i < end; i++) {
|
|
@@ -2969,7 +2969,7 @@ function iterateOverTriangles_indirect(offset, count, bvh, intersectsTriangleFun
|
|
|
2969
2969
|
return false;
|
|
2970
2970
|
}
|
|
2971
2971
|
|
|
2972
|
-
//
|
|
2972
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast.generated.js
|
|
2973
2973
|
function raycast(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
2974
2974
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
2975
2975
|
_raycast(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -2995,7 +2995,7 @@ function _raycast(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
2997
|
|
|
2998
|
-
//
|
|
2998
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst.generated.js
|
|
2999
2999
|
var _xyzFields = ["x", "y", "z"];
|
|
3000
3000
|
function raycastFirst(bvh, root, materialOrSide, ray, near, far) {
|
|
3001
3001
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3046,7 +3046,7 @@ function _raycastFirst(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
3048
3048
|
|
|
3049
|
-
//
|
|
3049
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry.generated.js
|
|
3050
3050
|
import { Box3 as Box35, Matrix4 as Matrix43 } from "three";
|
|
3051
3051
|
var boundingBox = /* @__PURE__ */ new Box35();
|
|
3052
3052
|
var triangle = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3132,7 +3132,7 @@ function _intersectsGeometry(nodeIndex32, bvh, otherGeometry, geometryToBvh, cac
|
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
3134
3134
|
|
|
3135
|
-
//
|
|
3135
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry.generated.js
|
|
3136
3136
|
import { Matrix4 as Matrix44, Vector3 as Vector38 } from "three";
|
|
3137
3137
|
var tempMatrix = /* @__PURE__ */ new Matrix44();
|
|
3138
3138
|
var obb3 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3272,7 +3272,7 @@ function closestPointToGeometry(bvh, otherGeometry, geometryToBvh, target1 = {},
|
|
|
3272
3272
|
return target1;
|
|
3273
3273
|
}
|
|
3274
3274
|
|
|
3275
|
-
//
|
|
3275
|
+
// node_modules/three-mesh-bvh/src/core/cast/refit_indirect.generated.js
|
|
3276
3276
|
function refit_indirect(bvh, nodeIndices = null) {
|
|
3277
3277
|
if (nodeIndices && Array.isArray(nodeIndices)) {
|
|
3278
3278
|
nodeIndices = new Set(nodeIndices);
|
|
@@ -3375,7 +3375,7 @@ function refit_indirect(bvh, nodeIndices = null) {
|
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
3377
3377
|
|
|
3378
|
-
//
|
|
3378
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycast_indirect.generated.js
|
|
3379
3379
|
function raycast_indirect(bvh, root, materialOrSide, ray, intersects, near, far) {
|
|
3380
3380
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
3381
3381
|
_raycast2(0, bvh, materialOrSide, ray, intersects, near, far);
|
|
@@ -3401,7 +3401,7 @@ function _raycast2(nodeIndex32, bvh, materialOrSide, ray, intersects, near, far)
|
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
3403
|
|
|
3404
|
-
//
|
|
3404
|
+
// node_modules/three-mesh-bvh/src/core/cast/raycastFirst_indirect.generated.js
|
|
3405
3405
|
var _xyzFields2 = ["x", "y", "z"];
|
|
3406
3406
|
function raycastFirst_indirect(bvh, root, materialOrSide, ray, near, far) {
|
|
3407
3407
|
BufferStack.setBuffer(bvh._roots[root]);
|
|
@@ -3452,7 +3452,7 @@ function _raycastFirst2(nodeIndex32, bvh, materialOrSide, ray, near, far) {
|
|
|
3452
3452
|
}
|
|
3453
3453
|
}
|
|
3454
3454
|
|
|
3455
|
-
//
|
|
3455
|
+
// node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry_indirect.generated.js
|
|
3456
3456
|
import { Box3 as Box36, Matrix4 as Matrix45 } from "three";
|
|
3457
3457
|
var boundingBox2 = /* @__PURE__ */ new Box36();
|
|
3458
3458
|
var triangle3 = /* @__PURE__ */ new ExtendedTriangle();
|
|
@@ -3539,7 +3539,7 @@ function _intersectsGeometry2(nodeIndex32, bvh, otherGeometry, geometryToBvh, ca
|
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
|
|
3542
|
-
//
|
|
3542
|
+
// node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry_indirect.generated.js
|
|
3543
3543
|
import { Matrix4 as Matrix46, Vector3 as Vector39 } from "three";
|
|
3544
3544
|
var tempMatrix2 = /* @__PURE__ */ new Matrix46();
|
|
3545
3545
|
var obb5 = /* @__PURE__ */ new OrientedBox();
|
|
@@ -3682,7 +3682,7 @@ function closestPointToGeometry_indirect(bvh, otherGeometry, geometryToBvh, targ
|
|
|
3682
3682
|
return target1;
|
|
3683
3683
|
}
|
|
3684
3684
|
|
|
3685
|
-
//
|
|
3685
|
+
// node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
|
|
3686
3686
|
function convertRaycastIntersect(hit, object, raycaster) {
|
|
3687
3687
|
if (hit === null) {
|
|
3688
3688
|
return null;
|
|
@@ -3693,7 +3693,7 @@ function convertRaycastIntersect(hit, object, raycaster) {
|
|
|
3693
3693
|
return hit;
|
|
3694
3694
|
}
|
|
3695
3695
|
|
|
3696
|
-
//
|
|
3696
|
+
// node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
3697
3697
|
var _obb = /* @__PURE__ */ new OrientedBox();
|
|
3698
3698
|
var _ray = /* @__PURE__ */ new Ray();
|
|
3699
3699
|
var _direction = /* @__PURE__ */ new Vector310();
|
|
@@ -4208,8 +4208,8 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4208
4208
|
* `getTriangleHitPointInfo` to obtain more information like UV coordinates, triangle normal
|
|
4209
4209
|
* and materialIndex.
|
|
4210
4210
|
*
|
|
4211
|
-
*
|
|
4212
|
-
*
|
|
4211
|
+
* @note This function can be very slow if `geometry` does not have a `geometry.boundsTree`
|
|
4212
|
+
* computed.
|
|
4213
4213
|
*
|
|
4214
4214
|
* @param {BufferGeometry} otherGeometry
|
|
4215
4215
|
* @param {Matrix4} geometryToBvh - Transform of `otherGeometry` into the local space of
|
|
@@ -4262,7 +4262,7 @@ var MeshBVH = class _MeshBVH extends GeometryBVH {
|
|
|
4262
4262
|
}
|
|
4263
4263
|
};
|
|
4264
4264
|
|
|
4265
|
-
//
|
|
4265
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/common_functions.glsl.js
|
|
4266
4266
|
var common_functions = (
|
|
4267
4267
|
/* glsl */
|
|
4268
4268
|
`
|
|
@@ -4350,7 +4350,7 @@ void ndcToCameraRay(
|
|
|
4350
4350
|
`
|
|
4351
4351
|
);
|
|
4352
4352
|
|
|
4353
|
-
//
|
|
4353
|
+
// node_modules/three-mesh-bvh/src/webgl/glsl/bvh_ray_functions.glsl.js
|
|
4354
4354
|
var bvh_ray_functions = (
|
|
4355
4355
|
/* glsl */
|
|
4356
4356
|
`
|
|
@@ -4560,7 +4560,7 @@ bool _bvhIntersectFirstHit(
|
|
|
4560
4560
|
`
|
|
4561
4561
|
);
|
|
4562
4562
|
|
|
4563
|
-
//
|
|
4563
|
+
// node_modules/three-mesh-bvh/src/index.js
|
|
4564
4564
|
var shaderIntersectFunction = `
|
|
4565
4565
|
${common_functions}
|
|
4566
4566
|
${bvh_ray_functions}
|