@needle-tools/three-mesh-effects 0.1.1 → 0.2.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/build/index.js ADDED
@@ -0,0 +1,57 @@
1
+ // @ts-nocheck
2
+
3
+ // src/public/index.js
4
+ var registrations = /* @__PURE__ */ new WeakMap();
5
+ function useLoader(loader, renderer, options = {}) {
6
+ const disabled = new Set(options.disable);
7
+ const existing = registrations.get(loader);
8
+ if (existing) {
9
+ existing.renderer = renderer;
10
+ existing.disabled = disabled;
11
+ return loader;
12
+ }
13
+ const state = { renderer, disabled };
14
+ registrations.set(loader, state);
15
+ const register = (name, apply) => {
16
+ loader.register((parser) => {
17
+ const disabled2 = state.disabled.has(name);
18
+ const renderer2 = state.renderer;
19
+ return {
20
+ name,
21
+ async afterRoot(result) {
22
+ const json = (
23
+ /** @type {{extensionsUsed?: string[], extensionsRequired?: string[]}} */
24
+ parser.json
25
+ );
26
+ if (!json.extensionsUsed?.includes(name) && !json.extensionsRequired?.includes(name)) return;
27
+ if (disabled2) {
28
+ if (json.extensionsRequired?.includes(name)) throw new Error(`Required glTF extension ${name} is disabled in useLoader.`);
29
+ return;
30
+ }
31
+ await apply(parser, result, renderer2);
32
+ }
33
+ };
34
+ });
35
+ };
36
+ register("NEEDLE_deformation_rig", async (parser, result) => {
37
+ const { NeedleDeformationRigLoaderPlugin } = await import("@needle-tools/three-mesh-effects/deformation-runtime");
38
+ await new NeedleDeformationRigLoaderPlugin(parser).afterRoot(result);
39
+ });
40
+ register("NEEDLE_mesh_impostor", async (parser, result, renderer2) => {
41
+ const { NeedleImpostorLoaderPlugin } = await import("@needle-tools/three-mesh-effects/impostor-runtime");
42
+ await new NeedleImpostorLoaderPlugin(parser, { renderer: renderer2 }).afterRoot(result);
43
+ });
44
+ register("NEEDLE_pixel_impostor", async (parser, result) => {
45
+ const { NeedlePixelImpostorLoaderPlugin } = await import("@needle-tools/three-mesh-effects/pixel-impostor-runtime");
46
+ await new NeedlePixelImpostorLoaderPlugin(parser).afterRoot(result);
47
+ });
48
+ register("NEEDLE_hull_effect", async (parser, result) => {
49
+ const { NeedleHullEffectLoaderPlugin } = await import("@needle-tools/three-mesh-effects/hull-effects");
50
+ await new NeedleHullEffectLoaderPlugin(parser).afterRoot(result);
51
+ });
52
+ return loader;
53
+ }
54
+ export {
55
+ useLoader
56
+ };
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/public/index.js"],
4
+ "sourcesContent": ["// @ts-check\n\n/** @typedef {import('three/addons/loaders/GLTFLoader.js').GLTFLoader} GLTFLoader */\n/** @typedef {import('three/addons/loaders/GLTFLoader.js').GLTFParser} GLTFParser */\n/** @typedef {import('three/addons/loaders/GLTFLoader.js').GLTF} GLTF */\n/** @typedef {import('../impostor/impostor-node-material.js').ImpostorRenderer} Renderer */\n\n/** @typedef {'NEEDLE_deformation_rig' | 'NEEDLE_mesh_impostor' | 'NEEDLE_pixel_impostor' | 'NEEDLE_hull_effect'} NeedleExtension */\n/** @typedef {{disable?: readonly NeedleExtension[]}} LoaderOptions */\n\n/** @type {WeakMap<GLTFLoader, {renderer: Renderer, disabled: Set<NeedleExtension>}>} */\nconst registrations = new WeakMap();\n\n/**\n * Enable all Needle glTF extensions before calling load/loadAsync or parse/parseAsync.\n * Handlers are imported only when a parsed asset declares their extension. Returns\n * the same loader; repeated registration updates its renderer without adding plugins.\n * Existing decoder and texture-loader configuration is preserved.\n * Disabled optional extensions retain their portable fallback; disabled required\n * extensions reject the load. Calling again replaces the options for future parses.\n *\n * @template {GLTFLoader} T\n * @param {T} loader\n * @param {Renderer} renderer\n * @param {LoaderOptions} [options]\n * @returns {T}\n */\nexport function useLoader(loader, renderer, options = {}) {\n const disabled = new Set(options.disable);\n const existing = registrations.get(loader);\n if (existing) { existing.renderer = renderer; existing.disabled = disabled; return loader; }\n const state = { renderer, disabled };\n registrations.set(loader, state);\n\n // Register each real extension name synchronously so GLTFLoader recognizes\n // required extensions before asynchronous postprocessing starts.\n /** @param {NeedleExtension} name @param {(parser: GLTFParser, result: GLTF, renderer: Renderer) => Promise<void>} apply */\n const register = (name, apply) => {\n loader.register(parser => {\n const disabled = state.disabled.has(name);\n const renderer = state.renderer;\n return {\n name,\n async afterRoot(result) {\n const json = /** @type {{extensionsUsed?: string[], extensionsRequired?: string[]}} */ (parser.json);\n if (!json.extensionsUsed?.includes(name) && !json.extensionsRequired?.includes(name)) return;\n if (disabled) {\n if (json.extensionsRequired?.includes(name)) throw new Error(`Required glTF extension ${name} is disabled in useLoader.`);\n return;\n }\n await apply(parser, result, renderer);\n },\n };\n });\n };\n register('NEEDLE_deformation_rig', async (parser, result) => {\n const { NeedleDeformationRigLoaderPlugin } = await import('@needle-tools/three-mesh-effects/deformation-runtime');\n await new NeedleDeformationRigLoaderPlugin(parser).afterRoot(result);\n });\n register('NEEDLE_mesh_impostor', async (parser, result, renderer) => {\n const { NeedleImpostorLoaderPlugin } = await import('@needle-tools/three-mesh-effects/impostor-runtime');\n await new NeedleImpostorLoaderPlugin(parser, { renderer }).afterRoot(result);\n });\n register('NEEDLE_pixel_impostor', async (parser, result) => {\n const { NeedlePixelImpostorLoaderPlugin } = await import('@needle-tools/three-mesh-effects/pixel-impostor-runtime');\n await new NeedlePixelImpostorLoaderPlugin(parser).afterRoot(result);\n });\n register('NEEDLE_hull_effect', async (parser, result) => {\n const { NeedleHullEffectLoaderPlugin } = await import('@needle-tools/three-mesh-effects/hull-effects');\n await new NeedleHullEffectLoaderPlugin(parser).afterRoot(result);\n });\n return loader;\n}\n"],
5
+ "mappings": ";;;AAWA,IAAM,gBAAgB,oBAAI,QAAQ;AAgB3B,SAAS,UAAU,QAAQ,UAAU,UAAU,CAAC,GAAG;AACxD,QAAM,WAAW,IAAI,IAAI,QAAQ,OAAO;AACxC,QAAM,WAAW,cAAc,IAAI,MAAM;AACzC,MAAI,UAAU;AAAE,aAAS,WAAW;AAAU,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OAAO,+CAA+C;AACrG,UAAM,IAAI,6BAA6B,MAAM,EAAE,UAAU,MAAM;AAAA,EACjE,CAAC;AACD,SAAO;AACT;",
6
+ "names": ["disabled", "renderer"]
7
+ }
@@ -0,0 +1,136 @@
1
+ // @ts-nocheck
2
+
3
+ // src/rendering/wrap-preview-settings.js
4
+ var HULL_EFFECT_CONTROLS = {
5
+ "heat-haze": [
6
+ { key: "strength", label: "Distortion", min: 0, max: 1, step: 0.01, value: 0.35, title: "Strength of the bubbling refractive normals." },
7
+ { key: "detail", label: "Detail", min: 1, max: 16, step: 0.25, value: 5, title: "Spatial scale of the smooth heat bubbles." },
8
+ { key: "speed", label: "Speed", min: 0, max: 4, step: 0.05, value: 1, title: "Upward motion and evolution of the heat distortion." },
9
+ { key: "thickness", label: "Thickness", min: 0.01, max: 1, step: 0.01, value: 0.15, title: "Optical thickness of the transmissive hull." }
10
+ ],
11
+ shroud: [
12
+ { key: "color", kind: "color", label: "Color", min: 0, max: 16777215, step: 1, value: 1051928, title: "Deep shadow cloud color." },
13
+ { key: "coverage", label: "Coverage", min: 0, max: 1, step: 0.01, value: 0.33, title: "Fraction of the surface hidden in swirling clouds." },
14
+ { key: "detail", label: "Detail", min: 1, max: 12, step: 0.25, value: 5.5, title: "Cloud and eddy scale." },
15
+ { key: "depth", label: "Cloud depth", min: 0, max: 0.1, step: 1e-3, value: 0.016, title: "Surface-hugging cloud thickness relative to model size." },
16
+ { key: "amplitude", label: "Vertex curl", min: 0, max: 0.08, step: 1e-3, value: 0.063, title: "Full 3D curl displacement of the cloud vertices. Zero removes the vertex curl calculations from the shader." },
17
+ { 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." },
18
+ { key: "speed", label: "Swirl speed", min: 0, max: 4, step: 0.05, value: 2.25, title: "Cloud circulation speed; no upward flame motion." },
19
+ { key: "opacity", label: "Opacity", min: 0, max: 1, step: 0.01, value: 0.99, title: "Maximum shadow opacity per layer." }
20
+ ],
21
+ lava: [
22
+ { 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." },
23
+ { 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." },
24
+ { key: "color", kind: "color", label: "Lava color", min: 0, max: 16777215, step: 1, value: 16725765, title: "Molten crack color, graduating to yellow-white in the hottest cores." },
25
+ { 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." },
26
+ { key: "detail", label: "Detail", min: 2, max: 24, step: 0.5, value: 12, title: "Scale of the irregular volcanic plates." },
27
+ { key: "cracks", label: "Crack width", min: 0.01, max: 0.3, step: 5e-3, value: 0.065, title: "Width of the molten seams between crust plates." },
28
+ { key: "glow", label: "Heat", min: 0, max: 8, step: 0.1, value: 3, title: "Emission of the molten cracks." },
29
+ { key: "speed", label: "Flow speed", min: 0, max: 3, step: 0.05, value: 0.5, title: "Slow molten heat flow beneath stationary crust." }
30
+ ],
31
+ ivy: [
32
+ { 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." },
33
+ { 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." },
34
+ { key: "color", kind: "color", label: "Leaf color", min: 0, max: 16777215, step: 1, value: 3767076, title: "Leaf green, with lighter veins and younger tips." },
35
+ { key: "growth", label: "Growth", min: 0, max: 1, step: 0.01, value: 1, title: "Reveal climbing stems and leaves from the bottom upward." },
36
+ { key: "detail", label: "Detail", min: 2, max: 24, step: 0.25, value: 10, title: "Scale of the procedural vines and leaves on the hull." },
37
+ { 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." },
38
+ { 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." }
39
+ ],
40
+ ice: [
41
+ { 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." },
42
+ { key: "frost", label: "Frost", min: 0, max: 1, step: 0.01, value: 0.55, title: "Cloudiness of the physical ice." },
43
+ { key: "facets", label: "Facets", min: 0, max: 1, step: 0.01, value: 0.5, title: "Blend rounded normals into cut-crystal facets." },
44
+ { key: "thickness", label: "Thickness", min: 0.02, max: 1, step: 0.01, value: 0.35, title: "Optical thickness relative to model size." }
45
+ ],
46
+ "force-field": [
47
+ { key: "color", kind: "color", label: "Color", min: 0, max: 16777215, step: 1, value: 2872559, title: "Energy color of both hex field layers." },
48
+ { key: "density", label: "Hex density", min: 4, max: 40, step: 1, value: 26, title: "Scale of the biplanar hex grid on both field layers." },
49
+ { 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." },
50
+ { key: "glow", label: "Glow", min: 0.1, max: 5, step: 0.1, value: 0.4, title: "Field and Fresnel brightness." },
51
+ { 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." },
52
+ { 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." },
53
+ { 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." }
54
+ ],
55
+ "tech-cage": [
56
+ { key: "color", kind: "color", label: "Color", min: 0, max: 16777215, step: 1, value: 5433087, title: "Color of the cage wires and vertex nodes." },
57
+ { key: "amplitude", label: "Curl strength", min: 0, max: 0.2, step: 5e-3, value: 0.035, title: "Shared curl displacement of cage vertices and node centers, relative to model size." },
58
+ { key: "speed", label: "Speed", min: 0, max: 4, step: 0.05, value: 0.7, title: "Speed of the animated 3D curl field." },
59
+ { key: "nodeSize", label: "Node size", min: 2e-3, max: 0.04, step: 1e-3, value: 9e-3, title: "Radius of the instanced smooth icospheres, relative to model size." },
60
+ { key: "width", label: "Wire width", min: 0.25, max: 4, step: 0.25, value: 1.25, title: "Antialiased wire width in screen pixels." }
61
+ ],
62
+ flames: [
63
+ { key: "color", kind: "color", label: "Cool", min: 0, max: 16777215, step: 1, value: 16727040, title: "Cooling plume tips and weak wisps in the stylized temperature estimate." },
64
+ { key: "warmColor", kind: "color", label: "Warm", min: 0, max: 16777215, step: 1, value: 16758058, title: "Middle of the flame temperature gradient." },
65
+ { key: "hotColor", kind: "color", label: "Hot", min: 0, max: 16777215, step: 1, value: 16774358, title: "Hot reaction region just beyond the emitting surface; the plume cools toward its tips." },
66
+ { 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." },
67
+ { 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." },
68
+ { key: "height", label: "Flame height", min: 0, max: 1, step: 0.01, value: 0.35, title: "Upward flame displacement relative to model size." },
69
+ { key: "speed", label: "Speed", min: 0, max: 4, step: 0.05, value: 1.4, title: "Upward flow speed of the aura." },
70
+ { key: "scale", label: "Flame detail", min: 1, max: 12, step: 0.25, value: 5, title: "Spatial frequency of the flame tongues." }
71
+ ],
72
+ aura: [
73
+ { key: "color", kind: "color", label: "Color", min: 0, max: 16777215, step: 1, value: 16766250, title: "Aura color." },
74
+ { 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." },
75
+ { 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." },
76
+ { 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." },
77
+ { 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." },
78
+ { 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." },
79
+ { 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." },
80
+ { key: "bendSpeed", label: "Bend speed", min: 0, max: 4, step: 0.05, value: 4, title: "Speed of the shell bend, independent of spike travel." },
81
+ { key: "scale", label: "Detail", min: 1, max: 12, step: 0.25, value: 6.75, title: "Spatial frequency of the pointed energy tongues." },
82
+ { key: "fresnel", label: "Fresnel", min: 0.25, max: 12, step: 0.05, value: 5, title: "Concentrate flat golden energy around the silhouette." },
83
+ { key: "opacity", label: "Opacity", min: 0, max: 1, step: 0.01, value: 0.17, title: "Opacity of the flat-color aura shell." }
84
+ ],
85
+ outline: [
86
+ { key: "color", kind: "color", label: "Color", min: 0, max: 16777215, step: 1, value: 16777215, title: "Solid inner outline color." },
87
+ { key: "expand", label: "Normal expand", min: 0, max: 0.2, step: 1e-3, value: 0.01, title: "Inner shell expansion along smooth normals, relative to model size." },
88
+ { key: "borderColor", kind: "color", label: "Border color", min: 0, max: 16777215, step: 1, value: 0, title: "Solid outer outline color." },
89
+ { key: "borderOffset", label: "Border offset", min: 0, max: 0.1, step: 1e-3, value: 5e-3, title: "Additional normal expansion beyond the inner shell." }
90
+ ],
91
+ godrays: [
92
+ { 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." },
93
+ { key: "elevation", kind: "hidden", label: "Elevation", min: -89, max: 89, step: 1, value: 55, title: "" },
94
+ { key: "angle", label: "Angle", min: 1, max: 80, step: 1, value: 25, title: "Angular spread of the directional rays." },
95
+ { key: "length", label: "Length", min: 0, max: 2, step: 0.01, value: 0.6, title: "Ray length relative to the wrap size." },
96
+ { key: "opacity", label: "Strength", min: 0, max: 1, step: 0.01, value: 0.65, title: "Multiplicative darkening of the rays." },
97
+ { key: "fresnel", label: "Edge softness", min: 0.25, max: 5, step: 0.05, value: 1.5, title: "Fade grazing edges smoothly." }
98
+ ],
99
+ "wind-frosted": [
100
+ { 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." },
101
+ { key: "elevation", kind: "hidden", label: "Elevation", min: -89, max: 89, step: 1, value: -25, title: "" },
102
+ { key: "coverage", label: "Coverage", min: 0, max: 1, step: 0.01, value: 0.55, title: "Amount of directional snow and frost coverage." },
103
+ { key: "normalOffset", label: "Windward offset", min: 0, max: 0.2, step: 1e-3, value: 0, title: "Push the wind-facing coating outward along its normals, relative to model size." },
104
+ { 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." },
105
+ { key: "scale", label: "Detail", min: 1, max: 12, step: 0.25, value: 5, title: "Detail of frost patches and pointed icicles." }
106
+ ]
107
+ };
108
+
109
+ // src/rendering/hull-effect-metadata.js
110
+ var NEEDLE_HULL_EFFECT = "NEEDLE_hull_effect";
111
+ function parseHullEffectDescriptor(raw) {
112
+ if (!raw || typeof raw !== "object") throw new Error("Invalid NEEDLE_hull_effect descriptor.");
113
+ const record = (
114
+ /** @type {Record<string, unknown>} */
115
+ raw
116
+ );
117
+ if (record.version !== 1) throw new Error("Unsupported NEEDLE_hull_effect version.");
118
+ if (typeof record.mode !== "string" || !Object.hasOwn(HULL_EFFECT_CONTROLS, record.mode)) throw new Error("Unknown NEEDLE_hull_effect mode.");
119
+ if (!record.values || typeof record.values !== "object" || Array.isArray(record.values)) throw new Error("Invalid NEEDLE_hull_effect values.");
120
+ const input = (
121
+ /** @type {Record<string, unknown>} */
122
+ record.values
123
+ );
124
+ const values = {};
125
+ for (const control of HULL_EFFECT_CONTROLS[record.mode]) {
126
+ const value = Object.hasOwn(input, control.key) ? input[control.key] : control.value;
127
+ if (typeof value !== "number" || !Number.isFinite(value)) throw new Error(`Invalid NEEDLE_hull_effect value: ${control.key}.`);
128
+ values[control.key] = Math.max(control.min, Math.min(control.max, value));
129
+ }
130
+ return { version: 1, mode: record.mode, values };
131
+ }
132
+ export {
133
+ NEEDLE_HULL_EFFECT,
134
+ parseHullEffectDescriptor
135
+ };
136
+ //# sourceMappingURL=hull-effect-metadata.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/rendering/wrap-preview-settings.js", "../../../src/rendering/hull-effect-metadata.js"],
4
+ "sourcesContent": ["// Lightweight UI contract; importing controls must not import shader graphs.\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 => group && typeof group === 'object' && 'report' in group && isWrapTopology(group.report));\n}\n", "// @ts-check\nimport { HULL_EFFECT_CONTROLS } from './wrap-preview-settings.js';\n\nexport const NEEDLE_HULL_EFFECT = 'NEEDLE_hull_effect';\n\n/** @typedef {{version: 1, mode: string, values: Record<string, number>}} HullEffectDescriptor */\n\n/** Validate the runtime contract before building any shader graphs.\n * @param {unknown} raw\n * @returns {HullEffectDescriptor}\n */\nexport function parseHullEffectDescriptor(raw) {\n if (!raw || typeof raw !== 'object') throw new Error('Invalid NEEDLE_hull_effect descriptor.');\n const record = /** @type {Record<string, unknown>} */ (raw);\n if (record.version !== 1) throw new Error('Unsupported NEEDLE_hull_effect version.');\n if (typeof record.mode !== 'string' || !Object.hasOwn(HULL_EFFECT_CONTROLS, record.mode)) throw new Error('Unknown NEEDLE_hull_effect mode.');\n if (!record.values || typeof record.values !== 'object' || Array.isArray(record.values)) throw new Error('Invalid NEEDLE_hull_effect values.');\n const input = /** @type {Record<string, unknown>} */ (record.values);\n /** @type {Record<string, number>} */\n const values = {};\n for (const control of HULL_EFFECT_CONTROLS[record.mode]) {\n const value = Object.hasOwn(input, control.key) ? input[control.key] : control.value;\n if (typeof value !== 'number' || !Number.isFinite(value)) throw new Error(`Invalid NEEDLE_hull_effect value: ${control.key}.`);\n values[control.key] = Math.max(control.min, Math.min(control.max, value));\n }\n return { version: 1, mode: record.mode, values };\n}\n"],
5
+ "mappings": ";;;AAGO,IAAM,uBAAuB;AAAA,EAClC,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,OAAO,OAAO,OAAO,0DAA0D;AAAA,IACpJ,EAAE,KAAK,aAAa,OAAO,eAAe,KAAK,GAAG,KAAK,MAAM,MAAM,MAAO,OAAO,OAAO,OAAO,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