@needle-tools/three-mesh-effects 0.1.0 → 0.1.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.
@@ -1,8 +1,8 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  // src/rendering/wrap-preview-settings.js
4
- var WRAP_PREVIEW_MODES = ["ice", "force-field", "tech-cage", "flames", "aura", "outline", "godrays", "wind-frosted", "shroud", "lava", "ivy", "heat-haze"];
5
- var WRAP_PREVIEW_CONTROLS = {
4
+ var HULL_EFFECT_MODES = ["ice", "force-field", "tech-cage", "flames", "aura", "outline", "godrays", "wind-frosted", "shroud", "lava", "ivy", "heat-haze"];
5
+ var HULL_EFFECT_CONTROLS = {
6
6
  "heat-haze": [
7
7
  { key: "strength", label: "Distortion", min: 0, max: 1, step: 0.01, value: 0.35, title: "Strength of the bubbling refractive normals." },
8
8
  { key: "detail", label: "Detail", min: 1, max: 16, step: 0.25, value: 5, title: "Spatial scale of the smooth heat bubbles." },
@@ -106,11 +106,15 @@ var WRAP_PREVIEW_CONTROLS = {
106
106
  { key: "scale", label: "Detail", min: 1, max: 12, step: 0.25, value: 5, title: "Detail of frost patches and pointed icicles." }
107
107
  ]
108
108
  };
109
- function createWrapPreviewValues() {
110
- return Object.fromEntries(Object.entries(WRAP_PREVIEW_CONTROLS).map(([mode, controls]) => [
111
- mode,
112
- Object.fromEntries(controls.map((control) => [control.key, control.value]))
113
- ]));
109
+ function createHullEffectValues() {
110
+ return (
111
+ /** @type {Record<string, Record<string, number> & {mode: string}>} */
112
+ /** @type {unknown} */
113
+ Object.fromEntries(Object.entries(HULL_EFFECT_CONTROLS).map(([mode, controls]) => [
114
+ mode,
115
+ { mode, ...Object.fromEntries(controls.map((control) => [control.key, control.value])) }
116
+ ]))
117
+ );
114
118
  }
115
119
  function isWrapTopology(topology) {
116
120
  if (!topology || typeof topology !== "object") return false;
@@ -118,9 +122,9 @@ function isWrapTopology(topology) {
118
122
  return "groups" in topology && Array.isArray(topology.groups) && topology.groups.some((group) => group && typeof group === "object" && "report" in group && isWrapTopology(group.report));
119
123
  }
120
124
  export {
121
- WRAP_PREVIEW_CONTROLS,
122
- WRAP_PREVIEW_MODES,
123
- createWrapPreviewValues,
125
+ HULL_EFFECT_CONTROLS,
126
+ HULL_EFFECT_MODES,
127
+ createHullEffectValues,
124
128
  isWrapTopology
125
129
  };
126
130
  //# sourceMappingURL=wrap-preview-settings.js.map
@@ -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.\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
- "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,UA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s.\nexport const HULL_EFFECT_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 HULL_EFFECT_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};\n/** @returns {Record<string, Record<string, number> & {mode: string}>} */\nexport function createHullEffectValues() {\n return /** @type {Record<string, Record<string, number> & {mode: string}>} */ (/** @type {unknown} */ (Object.fromEntries(Object.entries(HULL_EFFECT_CONTROLS).map(([mode, controls]) => [mode,\n { mode, ...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 =>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,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;AAEO,SAAS,yBAAyB;AACvC;AAAA;AAAA;AAAA,IAAuG,OAAO,YAAY,OAAO,QAAQ,oBAAoB,EAAE,IAAI,CAAC,CAAC,MAAM,QAAQ,MAAM;AAAA,MAAC;AAAA,MACxL,EAAE,MAAM,GAAG,OAAO,YAAY,SAAS,IAAI,aAAW,CAAC,QAAQ,KAAK,QAAQ,KAAK,CAAC,CAAC,EAAE;AAAA,IACvF,CAAC,CAAC;AAAA;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
  }
@@ -7,7 +7,7 @@ import { clone as cloneSkeleton } from "three/addons/utils/SkeletonUtils.js";
7
7
  import { mergeVertices } from "three/addons/utils/BufferGeometryUtils.js";
8
8
 
9
9
  // src/rendering/wrap-preview-settings.js
10
- var WRAP_PREVIEW_CONTROLS = {
10
+ var HULL_EFFECT_CONTROLS = {
11
11
  "heat-haze": [
12
12
  { key: "strength", label: "Distortion", min: 0, max: 1, step: 0.01, value: 0.35, title: "Strength of the bubbling refractive normals." },
13
13
  { key: "detail", label: "Detail", min: 1, max: 16, step: 0.25, value: 5, title: "Spatial scale of the smooth heat bubbles." },
@@ -5058,14 +5058,15 @@ function prepareRayGeometry(source) {
5058
5058
  geometry.setAttribute("rayTangent", new THREE3.Float32BufferAttribute(tangents, 3));
5059
5059
  return geometry;
5060
5060
  }
5061
- function createWrapPreview(asset, original, mode, values, options = {}) {
5062
- const controls = mode === "control" ? [] : WRAP_PREVIEW_CONTROLS[mode];
5063
- if (!controls) throw new Error(`Unknown wrap preview: ${mode}`);
5064
- const validatedValues = (input) => Object.fromEntries(controls.map((control) => [
5065
- control.key,
5066
- Number.isFinite(input[control.key]) ? THREE3.MathUtils.clamp(input[control.key], control.min, control.max) : control.value
5067
- ]));
5068
- values = validatedValues(values);
5061
+ function createHullEffect(asset, original, effect, options = {}) {
5062
+ const { mode, ...inputValues } = effect;
5063
+ const controls = mode === "control" ? [] : HULL_EFFECT_CONTROLS[mode];
5064
+ if (!controls) throw new Error(`Unknown hull effect: ${mode}`);
5065
+ const validatedValues = (input) => Object.fromEntries(controls.map((control) => {
5066
+ const value = input[control.key];
5067
+ return [control.key, typeof value === "number" && Number.isFinite(value) ? THREE3.MathUtils.clamp(value, control.min, control.max) : control.value];
5068
+ }));
5069
+ const values = validatedValues(inputValues);
5069
5070
  const group = new THREE3.Group();
5070
5071
  group.name = `Wrap preview: ${mode}`;
5071
5072
  group.userData.wrapPreview = true;
@@ -5574,20 +5575,20 @@ function createWrapPreview(asset, original, mode, values, options = {}) {
5574
5575
  syncAnimation() {
5575
5576
  skin?.update();
5576
5577
  },
5577
- /** @param {Record<string, number>} next */
5578
+ /** @param {Record<string, string | number>} next */
5578
5579
  update(next) {
5579
- next = validatedValues(next);
5580
- if (mode === "ice" && next.dispersion > 0 !== dispersionEnabled) return false;
5581
- if (mode === "force-field" && next.noise > 0 !== fieldNoiseEnabled) return false;
5582
- if ((mode === "ivy" || mode === "lava") && next.noise > 0 !== growthNoiseEnabled) return false;
5583
- if (mode === "heat-haze" && next.strength > 0 !== hazeNoiseEnabled) return false;
5584
- if (mode === "shroud" && next.amplitude > 0 !== shroudCurlEnabled) return false;
5585
- effectColor.value.setHex(next.color ?? 16777215);
5586
- borderColor.value.setHex(next.borderColor ?? 0);
5587
- warmColor.value.setHex(next.warmColor ?? 16758058);
5588
- hotColor.value.setHex(next.hotColor ?? 16774358);
5589
- for (const [key, value] of Object.entries(next)) if (uniforms[key]) uniforms[key].value = value;
5590
- for (const material of materials) if (material.userData.previewWireframeThickness) material.userData.previewWireframeThickness.value = next.width;
5580
+ const validated = validatedValues(next);
5581
+ if (mode === "ice" && validated.dispersion > 0 !== dispersionEnabled) return false;
5582
+ if (mode === "force-field" && validated.noise > 0 !== fieldNoiseEnabled) return false;
5583
+ if ((mode === "ivy" || mode === "lava") && validated.noise > 0 !== growthNoiseEnabled) return false;
5584
+ if (mode === "heat-haze" && validated.strength > 0 !== hazeNoiseEnabled) return false;
5585
+ if (mode === "shroud" && validated.amplitude > 0 !== shroudCurlEnabled) return false;
5586
+ effectColor.value.setHex(validated.color ?? 16777215);
5587
+ borderColor.value.setHex(validated.borderColor ?? 0);
5588
+ warmColor.value.setHex(validated.warmColor ?? 16758058);
5589
+ hotColor.value.setHex(validated.hotColor ?? 16774358);
5590
+ for (const [key, value] of Object.entries(validated)) if (uniforms[key]) uniforms[key].value = value;
5591
+ for (const material of materials) if (material.userData.previewWireframeThickness) material.userData.previewWireframeThickness.value = validated.width;
5591
5592
  return true;
5592
5593
  },
5593
5594
  dispose() {
@@ -5602,7 +5603,7 @@ function createWrapPreview(asset, original, mode, values, options = {}) {
5602
5603
  };
5603
5604
  }
5604
5605
  export {
5605
- createWrapPreview,
5606
+ createHullEffect,
5606
5607
  prepareAuraGeometry,
5607
5608
  prepareIceNormalAttributes,
5608
5609
  prepareRayGeometry