@needle-tools/three-mesh-effects 0.2.3 → 0.3.2

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +34 -8
  2. package/README.md +86 -3
  3. package/SKILL.md +14 -4
  4. package/build/box-impostor-runtime.js +1423 -0
  5. package/build/box-impostor-runtime.js.map +7 -0
  6. package/build/deformation-runtime.js +30 -19
  7. package/build/deformation-runtime.js.map +3 -3
  8. package/build/hull-effects.js +60 -28
  9. package/build/hull-effects.js.map +3 -3
  10. package/build/impostor-runtime.js +264 -133
  11. package/build/impostor-runtime.js.map +4 -4
  12. package/build/index.js +8 -0
  13. package/build/index.js.map +2 -2
  14. package/build/internal/box-impostor/box-impostor-display-settings.js +50 -0
  15. package/build/internal/box-impostor/box-impostor-display-settings.js.map +7 -0
  16. package/build/internal/box-impostor/box-impostor-display.js +1102 -0
  17. package/build/internal/box-impostor/box-impostor-display.js.map +7 -0
  18. package/build/internal/box-impostor/box-impostor-face-axes.js +15 -0
  19. package/build/internal/box-impostor/box-impostor-face-axes.js.map +7 -0
  20. package/build/internal/box-impostor/box-impostor-faces.js +125 -0
  21. package/build/internal/box-impostor/box-impostor-faces.js.map +7 -0
  22. package/build/internal/box-impostor/box-impostor-geometry.js +230 -0
  23. package/build/internal/box-impostor/box-impostor-geometry.js.map +7 -0
  24. package/build/internal/box-impostor/box-impostor-material.js +1056 -0
  25. package/build/internal/box-impostor/box-impostor-material.js.map +7 -0
  26. package/build/internal/box-impostor/box-impostor-metadata.js +108 -0
  27. package/build/internal/box-impostor/box-impostor-metadata.js.map +7 -0
  28. package/build/internal/box-impostor/box-impostor-projection.js +276 -0
  29. package/build/internal/box-impostor/box-impostor-projection.js.map +7 -0
  30. package/build/internal/box-impostor/box-impostor-runtime.js +1369 -0
  31. package/build/internal/box-impostor/box-impostor-runtime.js.map +7 -0
  32. package/build/internal/box-impostor/box-impostor-surface-search.js +21 -0
  33. package/build/internal/box-impostor/box-impostor-surface-search.js.map +7 -0
  34. package/build/internal/deformation/cloth-surface.js +23 -17
  35. package/build/internal/deformation/cloth-surface.js.map +3 -3
  36. package/build/internal/deformation/pin-cloth.js +7 -2
  37. package/build/internal/deformation/pin-cloth.js.map +2 -2
  38. package/build/internal/deformation/rig-runtime.js +30 -19
  39. package/build/internal/deformation/rig-runtime.js.map +3 -3
  40. package/build/internal/impostor/impostor-node-material.js +264 -133
  41. package/build/internal/impostor/impostor-node-material.js.map +4 -4
  42. package/build/internal/pixel-impostor/pixel-impostor-display.js +84 -38
  43. package/build/internal/pixel-impostor/pixel-impostor-display.js.map +4 -4
  44. package/build/internal/rendering/captured-surface-depth.js +35 -0
  45. package/build/internal/rendering/captured-surface-depth.js.map +7 -0
  46. package/build/internal/rendering/captured-surface-material.js +28 -0
  47. package/build/internal/rendering/captured-surface-material.js.map +7 -0
  48. package/build/internal/rendering/hull-effect-runtime.js +59 -27
  49. package/build/internal/rendering/hull-effect-runtime.js.map +3 -3
  50. package/build/internal/rendering/renderer-support.js +31 -0
  51. package/build/internal/rendering/renderer-support.js.map +7 -0
  52. package/build/internal/rendering/wireframe.js +41 -9
  53. package/build/internal/rendering/wireframe.js.map +2 -2
  54. package/build/internal/rendering/wrap-preview.js +59 -27
  55. package/build/internal/rendering/wrap-preview.js.map +3 -3
  56. package/build/pixel-impostor-runtime.js +84 -38
  57. package/build/pixel-impostor-runtime.js.map +4 -4
  58. package/build/types/box-impostor/box-impostor-display-settings.d.ts +30 -0
  59. package/build/types/box-impostor/box-impostor-display-settings.js +1 -0
  60. package/build/types/box-impostor/box-impostor-display.d.ts +13 -0
  61. package/build/types/box-impostor/box-impostor-display.js +1 -0
  62. package/build/types/box-impostor/box-impostor-face-axes.d.ts +5 -0
  63. package/build/types/box-impostor/box-impostor-face-axes.js +1 -0
  64. package/build/types/box-impostor/box-impostor-faces.d.ts +11 -0
  65. package/build/types/box-impostor/box-impostor-faces.js +1 -0
  66. package/build/types/box-impostor/box-impostor-geometry.d.ts +5 -0
  67. package/build/types/box-impostor/box-impostor-geometry.js +1 -0
  68. package/build/types/box-impostor/box-impostor-material.d.ts +14 -0
  69. package/build/types/box-impostor/box-impostor-material.js +1 -0
  70. package/build/types/box-impostor/box-impostor-metadata.d.ts +31 -0
  71. package/build/types/box-impostor/box-impostor-metadata.js +1 -0
  72. package/build/types/box-impostor/box-impostor-projection.d.ts +19 -0
  73. package/build/types/box-impostor/box-impostor-projection.js +1 -0
  74. package/build/types/box-impostor/box-impostor-runtime.d.ts +19 -0
  75. package/build/types/box-impostor/box-impostor-runtime.js +1 -0
  76. package/build/types/box-impostor/box-impostor-surface-search.d.ts +13 -0
  77. package/build/types/box-impostor/box-impostor-surface-search.js +1 -0
  78. package/build/types/deformation/cloth-surface.d.ts +1 -0
  79. package/build/types/deformation/pin-cloth.d.ts +1 -0
  80. package/build/types/impostor/impostor-node-material.d.ts +2 -15
  81. package/build/types/public/box-impostor-runtime.d.ts +6 -0
  82. package/build/types/public/box-impostor-runtime.js +1 -0
  83. package/build/types/public/hull-effects.d.ts +1 -0
  84. package/build/types/public/index.d.ts +1 -1
  85. package/build/types/rendering/captured-surface-depth.d.ts +5 -0
  86. package/build/types/rendering/captured-surface-depth.js +1 -0
  87. package/build/types/rendering/captured-surface-material.d.ts +8 -0
  88. package/build/types/rendering/captured-surface-material.js +1 -0
  89. package/build/types/rendering/renderer-support.d.ts +27 -0
  90. package/build/types/rendering/renderer-support.js +1 -0
  91. package/build/types/rendering/wireframe.d.ts +2 -2
  92. package/package.json +29 -8
  93. package/src/box-impostor/box-impostor-display-settings.js +54 -0
  94. package/src/box-impostor/box-impostor-display.js +50 -0
  95. package/src/box-impostor/box-impostor-face-axes.js +11 -0
  96. package/src/box-impostor/box-impostor-faces.js +118 -0
  97. package/src/box-impostor/box-impostor-geometry.js +140 -0
  98. package/src/box-impostor/box-impostor-material.js +771 -0
  99. package/src/box-impostor/box-impostor-metadata.js +122 -0
  100. package/src/box-impostor/box-impostor-projection.js +276 -0
  101. package/src/box-impostor/box-impostor-runtime.js +124 -0
  102. package/src/box-impostor/box-impostor-surface-search.js +11 -0
  103. package/src/deformation/cloth-surface.ts +28 -17
  104. package/src/deformation/pin-cloth.ts +9 -3
  105. package/src/impostor/impostor-node-material.js +188 -157
  106. package/src/pixel-impostor/pixel-impostor-display.js +5 -13
  107. package/src/public/box-impostor-runtime.js +14 -0
  108. package/src/public/hull-effects.js +1 -0
  109. package/src/public/index.js +10 -1
  110. package/src/rendering/captured-surface-depth.js +55 -0
  111. package/src/rendering/captured-surface-material.js +27 -0
  112. package/src/rendering/renderer-support.js +50 -0
  113. package/src/rendering/wireframe.js +51 -13
@@ -0,0 +1,230 @@
1
+ // @ts-nocheck
2
+
3
+ // src/box-impostor/box-impostor-geometry.js
4
+ import {
5
+ BufferGeometry,
6
+ Float32BufferAttribute,
7
+ InterleavedBuffer,
8
+ InterleavedBufferAttribute
9
+ } from "three";
10
+
11
+ // src/box-impostor/box-impostor-display-settings.js
12
+ var DEFAULT_BOX_IMPOSTOR_DISPLAY = Object.freeze({
13
+ depthMode: (
14
+ /** @type {'auto'|'projection'|'depth'} */
15
+ "auto"
16
+ ),
17
+ raySteps: (
18
+ /** @type {8|16|32} */
19
+ 16
20
+ ),
21
+ alphaCutoff: 0.5,
22
+ interpolation: (
23
+ /** @type {'none'|'linear'|'smooth'} */
24
+ "none"
25
+ ),
26
+ transparency: (
27
+ /** @type {'auto'|'cutout'|'dithered'|'blended'} */
28
+ "auto"
29
+ )
30
+ });
31
+ function normalizeBoxImpostorDisplay(input = {}) {
32
+ const value = { ...DEFAULT_BOX_IMPOSTOR_DISPLAY, ...input };
33
+ if (!["auto", "projection", "depth"].includes(value.depthMode) || ![8, 16, 32].includes(value.raySteps) || !Number.isFinite(value.alphaCutoff) || value.alphaCutoff <= 0 || value.alphaCutoff >= 1 || !["none", "linear", "smooth"].includes(value.interpolation) || !["auto", "cutout", "dithered", "blended"].includes(value.transparency))
34
+ throw new Error("Invalid box impostor display settings.");
35
+ return {
36
+ depthMode: value.depthMode,
37
+ raySteps: value.raySteps,
38
+ alphaCutoff: value.alphaCutoff,
39
+ interpolation: value.interpolation,
40
+ transparency: value.transparency
41
+ };
42
+ }
43
+
44
+ // src/box-impostor/box-impostor-face-axes.js
45
+ var BOX_FACE_AXES = Object.freeze([
46
+ { normal: [1, 0, 0], right: [0, 0, -1], up: [0, 1, 0] },
47
+ { normal: [-1, 0, 0], right: [0, 0, 1], up: [0, 1, 0] },
48
+ { normal: [0, 1, 0], right: [1, 0, 0], up: [0, 0, -1] },
49
+ { normal: [0, -1, 0], right: [1, 0, 0], up: [0, 0, 1] },
50
+ { normal: [0, 0, 1], right: [1, 0, 0], up: [0, 1, 0] },
51
+ { normal: [0, 0, -1], right: [-1, 0, 0], up: [0, 1, 0] }
52
+ ]);
53
+
54
+ // src/box-impostor/box-impostor-metadata.js
55
+ var BOX_OCCUPANCY_RESOLUTION = 8;
56
+ var BOX_OCCUPANCY_WORDS = BOX_OCCUPANCY_RESOLUTION ** 3 / 32;
57
+ function parseBoxImpostorDescriptor(raw) {
58
+ const d = (
59
+ /** @type {BoxImpostorDescriptor} */
60
+ raw
61
+ );
62
+ const fail = () => {
63
+ throw new Error("Invalid NEEDLE_box_impostor descriptor.");
64
+ };
65
+ const vector = (v) => Array.isArray(v) && v.length === 3 && v.every(Number.isFinite);
66
+ if (!d || d.version !== 1 || !["basic", "cards", "fitted"].includes(d.mode) || ![8, 16, 32].includes(d.raySteps) || !Number.isInteger(d.atlasResolution) || d.atlasResolution < 32 || d.atlasResolution > 8192 || !Number.isInteger(d.padding) || d.padding < 1 || d.padding > 16 || !Number.isFinite(d.alphaCutoff) || d.alphaCutoff <= 0 || d.alphaCutoff >= 1 || !Array.isArray(d.boxes) || !d.boxes.length || d.boxes.length > 64)
67
+ fail();
68
+ if (d.alphaMode !== void 0 && !["opaque", "mask", "blend"].includes(d.alphaMode))
69
+ fail();
70
+ if (d.mode === "basic" && d.boxes.length !== 1) fail();
71
+ for (const b of d.boxes) {
72
+ if (b.occupancy !== void 0 && (!Array.isArray(b.occupancy) || b.occupancy.length !== BOX_OCCUPANCY_WORDS || !b.occupancy.every(
73
+ (v) => Number.isInteger(v) && v >= 0 && v <= 4294967295
74
+ )))
75
+ fail();
76
+ if (b.depthBounds !== void 0 && (!Array.isArray(b.depthBounds) || b.depthBounds.length !== 12 || !b.depthBounds.every(
77
+ (v) => Number.isInteger(v) && v >= 0 && v <= 65535
78
+ )))
79
+ fail();
80
+ if (b.planeErrors !== void 0 && (!Array.isArray(b.planeErrors) || b.planeErrors.length !== 6 || !b.planeErrors.every((v) => Number.isFinite(v) && v >= 0 && v <= 1)))
81
+ fail();
82
+ if (b.planes !== void 0 && (!Array.isArray(b.planes) || b.planes.length !== 6 || !b.planes.every((v) => Number.isFinite(v) && v >= 0 && v <= 1)))
83
+ fail();
84
+ if (!vector(b.center) || !vector(b.halfSize) || b.halfSize.some((v) => v <= 0) || !Array.isArray(b.axes) || b.axes.length !== 3 || !b.axes.every(vector) || !Array.isArray(b.views) || b.views.length !== 6)
85
+ fail();
86
+ for (let i = 0; i < 3; i++)
87
+ for (let j = 0; j < 3; j++) {
88
+ const dot = b.axes[i].reduce((s, v, k) => s + v * b.axes[j][k], 0);
89
+ if (Math.abs(dot - (i === j ? 1 : 0)) > 1e-4) fail();
90
+ }
91
+ const [x, y, z] = b.axes;
92
+ if ((x[1] * y[2] - x[2] * y[1]) * z[0] + (x[2] * y[0] - x[0] * y[2]) * z[1] + (x[0] * y[1] - x[1] * y[0]) * z[2] < 0.999)
93
+ fail();
94
+ for (const r of b.views)
95
+ if (!Array.isArray(r) || r.length !== 4 || !r.every(Number.isInteger) || r[0] < 0 || r[1] < 0 || r[2] <= d.padding * 2 || r[3] <= d.padding * 2 || r[0] + r[2] > d.atlasResolution || r[1] + r[3] > d.atlasResolution)
96
+ fail();
97
+ }
98
+ return {
99
+ version: d.version,
100
+ mode: d.mode,
101
+ atlasResolution: d.atlasResolution,
102
+ padding: d.padding,
103
+ boxes: d.boxes,
104
+ ...d.alphaMode ? { alphaMode: d.alphaMode } : {},
105
+ ...normalizeBoxImpostorDisplay(d)
106
+ };
107
+ }
108
+
109
+ // src/box-impostor/box-impostor-geometry.js
110
+ function createBoxImpostorGeometry(input) {
111
+ const d = parseBoxImpostorDescriptor(input);
112
+ const depths = (
113
+ /** @type {number[][]} */
114
+ [[], [], []]
115
+ );
116
+ const positions = [], normals = [], uvs = [], indices = [], centers = [], halves = [], axisX = [], axisY = [], axisZ = [], boxIds = [], faces = [], corners = [];
117
+ for (const [id, b] of d.boxes.entries())
118
+ for (const f of d.mode !== "fitted" ? [4] : [0, 1, 2, 3, 4, 5]) {
119
+ const face = BOX_FACE_AXES[f], base = positions.length / 3, r = b.views[f], p = d.padding;
120
+ for (const [x, y] of [
121
+ [-1, -1],
122
+ [1, -1],
123
+ [1, 1],
124
+ [-1, 1]
125
+ ]) {
126
+ const local = face.normal.map(
127
+ (n, a) => (n + face.right[a] * x + face.up[a] * y) * b.halfSize[a]
128
+ );
129
+ positions.push(
130
+ ...b.center.map(
131
+ (c, a) => c + local.reduce((s, v, i) => s + v * b.axes[i][a], 0)
132
+ )
133
+ );
134
+ normals.push(
135
+ ...[0, 1, 2].map(
136
+ (a) => face.normal.reduce((s, v, i) => s + v * b.axes[i][a], 0)
137
+ )
138
+ );
139
+ uvs.push(
140
+ (r[0] + p + (x + 1) * 0.5 * (r[2] - 2 * p)) / d.atlasResolution,
141
+ (r[1] + p + (y + 1) * 0.5 * (r[3] - 2 * p)) / d.atlasResolution
142
+ );
143
+ centers.push(...b.center);
144
+ halves.push(...b.halfSize);
145
+ axisX.push(...b.axes[0]);
146
+ axisY.push(...b.axes[1]);
147
+ axisZ.push(...b.axes[2]);
148
+ for (let axis = 0; axis < 3; axis++)
149
+ depths[axis].push(
150
+ ...(b.depthBounds?.slice(axis * 4, axis * 4 + 4) ?? [
151
+ 0,
152
+ 65535,
153
+ 0,
154
+ 65535
155
+ ]).map((v) => v / 65535)
156
+ );
157
+ boxIds.push(id);
158
+ faces.push(f);
159
+ corners.push(x, y);
160
+ }
161
+ indices.push(base, base + 1, base + 2, base, base + 2, base + 3);
162
+ }
163
+ const geometry = new BufferGeometry();
164
+ for (
165
+ const [name, data2, size] of
166
+ /** @type {[string,number[],number][]} */
167
+ [
168
+ ["position", positions, 3],
169
+ ["normal", normals, 3],
170
+ ["uv", uvs, 2],
171
+ ["boxCenter", centers, 3],
172
+ ["boxHalfSize", halves, 3],
173
+ ["boxAxisX", axisX, 3],
174
+ ["boxAxisY", axisY, 3],
175
+ ["boxAxisZ", axisZ, 3],
176
+ ["boxDepthX", depths[0], 4],
177
+ ["boxDepthY", depths[1], 4],
178
+ ["boxDepthZ", depths[2], 4],
179
+ ["boxId", boxIds, 1],
180
+ ["boxFace", faces, 1],
181
+ ["cardCorner", corners, 2]
182
+ ]
183
+ )
184
+ geometry.setAttribute(name, new Float32BufferAttribute(data2, size));
185
+ const names = [
186
+ "boxCenter",
187
+ "boxHalfSize",
188
+ "boxAxisX",
189
+ "boxAxisY",
190
+ "boxAxisZ",
191
+ "boxDepthX",
192
+ "boxDepthY",
193
+ "boxDepthZ",
194
+ "boxId",
195
+ "boxFace",
196
+ "cardCorner"
197
+ ];
198
+ const stride = names.reduce(
199
+ (sum, name) => sum + geometry.getAttribute(name).itemSize,
200
+ 0
201
+ );
202
+ const data = new Float32Array(centers.length / 3 * stride), buffer = new InterleavedBuffer(data, stride);
203
+ let offset = 0;
204
+ for (const name of names) {
205
+ const attribute = geometry.getAttribute(name);
206
+ for (let vertex = 0; vertex < attribute.count; vertex++)
207
+ for (let component = 0; component < attribute.itemSize; component++)
208
+ data[vertex * stride + offset + component] = attribute.getComponent(
209
+ vertex,
210
+ component
211
+ );
212
+ geometry.setAttribute(
213
+ name,
214
+ new InterleavedBufferAttribute(buffer, attribute.itemSize, offset)
215
+ );
216
+ offset += attribute.itemSize;
217
+ }
218
+ geometry.userData.previewWireframeEdgeMasks = Float32Array.from(
219
+ { length: indices.length },
220
+ (_, i) => [1, 0, 1, 1, 1, 0][i % 6]
221
+ );
222
+ geometry.setIndex(indices);
223
+ geometry.computeBoundingBox();
224
+ geometry.computeBoundingSphere();
225
+ return geometry;
226
+ }
227
+ export {
228
+ createBoxImpostorGeometry
229
+ };
230
+ //# sourceMappingURL=box-impostor-geometry.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/box-impostor/box-impostor-geometry.js", "../../../src/box-impostor/box-impostor-display-settings.js", "../../../src/box-impostor/box-impostor-face-axes.js", "../../../src/box-impostor/box-impostor-metadata.js"],
4
+ "sourcesContent": ["// @ts-check\nimport {\n BufferGeometry,\n Float32BufferAttribute,\n InterleavedBuffer,\n InterleavedBufferAttribute,\n} from 'three';\nimport {\n BOX_FACE_AXES,\n parseBoxImpostorDescriptor,\n} from './box-impostor-metadata.js';\n\n/** Portable six-face boxes (or a front card) with atlas UVs. Runtime attributes\n * repeat each box's transform so all boxes can use a single material and draw.\n * @param {import('./box-impostor-metadata.js').BoxImpostorDescriptor} input */\nexport function createBoxImpostorGeometry(input) {\n const d = parseBoxImpostorDescriptor(input);\n const depths = /** @type {number[][]} */ ([[], [], []]);\n const positions = [],\n normals = [],\n uvs = [],\n indices = [],\n centers = [],\n halves = [],\n axisX = [],\n axisY = [],\n axisZ = [],\n boxIds = [],\n faces = [],\n corners = [];\n for (const [id, b] of d.boxes.entries())\n for (const f of d.mode !== 'fitted' ? [4] : [0, 1, 2, 3, 4, 5]) {\n const face = BOX_FACE_AXES[f],\n base = positions.length / 3,\n r = b.views[f],\n p = d.padding;\n for (const [x, y] of [\n [-1, -1],\n [1, -1],\n [1, 1],\n [-1, 1],\n ]) {\n const local = face.normal.map(\n (n, a) => (n + face.right[a] * x + face.up[a] * y) * b.halfSize[a],\n );\n positions.push(\n ...b.center.map(\n (c, a) => c + local.reduce((s, v, i) => s + v * b.axes[i][a], 0),\n ),\n );\n normals.push(\n ...[0, 1, 2].map((a) =>\n face.normal.reduce((s, v, i) => s + v * b.axes[i][a], 0),\n ),\n );\n uvs.push(\n (r[0] + p + (x + 1) * 0.5 * (r[2] - 2 * p)) / d.atlasResolution,\n (r[1] + p + (y + 1) * 0.5 * (r[3] - 2 * p)) / d.atlasResolution,\n );\n centers.push(...b.center);\n halves.push(...b.halfSize);\n axisX.push(...b.axes[0]);\n axisY.push(...b.axes[1]);\n axisZ.push(...b.axes[2]);\n for (let axis = 0; axis < 3; axis++)\n depths[axis].push(\n ...(\n b.depthBounds?.slice(axis * 4, axis * 4 + 4) ?? [\n 0, 65535, 0, 65535,\n ]\n ).map((v) => v / 65535),\n );\n boxIds.push(id);\n faces.push(f);\n corners.push(x, y);\n }\n indices.push(base, base + 1, base + 2, base, base + 2, base + 3);\n }\n const geometry = new BufferGeometry();\n for (const [name, data, size] of /** @type {[string,number[],number][]} */ ([\n ['position', positions, 3],\n ['normal', normals, 3],\n ['uv', uvs, 2],\n ['boxCenter', centers, 3],\n ['boxHalfSize', halves, 3],\n ['boxAxisX', axisX, 3],\n ['boxAxisY', axisY, 3],\n ['boxAxisZ', axisZ, 3],\n ['boxDepthX', depths[0], 4],\n ['boxDepthY', depths[1], 4],\n ['boxDepthZ', depths[2], 4],\n ['boxId', boxIds, 1],\n ['boxFace', faces, 1],\n ['cardCorner', corners, 2],\n ]))\n geometry.setAttribute(name, new Float32BufferAttribute(data, size));\n const names = [\n 'boxCenter',\n 'boxHalfSize',\n 'boxAxisX',\n 'boxAxisY',\n 'boxAxisZ',\n 'boxDepthX',\n 'boxDepthY',\n 'boxDepthZ',\n 'boxId',\n 'boxFace',\n 'cardCorner',\n ];\n const stride = names.reduce(\n (sum, name) => sum + geometry.getAttribute(name).itemSize,\n 0,\n );\n const data = new Float32Array((centers.length / 3) * stride),\n buffer = new InterleavedBuffer(data, stride);\n let offset = 0;\n for (const name of names) {\n const attribute = geometry.getAttribute(name);\n for (let vertex = 0; vertex < attribute.count; vertex++)\n for (let component = 0; component < attribute.itemSize; component++)\n data[vertex * stride + offset + component] = attribute.getComponent(\n vertex,\n component,\n );\n geometry.setAttribute(\n name,\n new InterleavedBufferAttribute(buffer, attribute.itemSize, offset),\n );\n offset += attribute.itemSize;\n }\n // Barycentric components face the opposite triangle edge. Mask the shared\n // 0\u20132 diagonal of each quad while retaining all four carrier boundaries.\n geometry.userData.previewWireframeEdgeMasks = Float32Array.from(\n { length: indices.length }, (_, i) => [1, 0, 1, 1, 1, 0][i % 6],\n );\n geometry.setIndex(indices);\n geometry.computeBoundingBox();\n geometry.computeBoundingSphere();\n return geometry;\n}\n", "// @ts-check\n/** @typedef {{depthMode:'auto'|'projection'|'depth',raySteps:8|16|32,alphaCutoff:number,interpolation:'none'|'linear'|'smooth',transparency:'auto'|'cutout'|'dithered'|'blended'}} BoxImpostorDisplay */\nexport const DEFAULT_BOX_IMPOSTOR_DISPLAY = Object.freeze({\n depthMode: /** @type {'auto'|'projection'|'depth'} */ ('auto'),\n raySteps: /** @type {8|16|32} */ (16),\n alphaCutoff: 0.5,\n interpolation: /** @type {'none'|'linear'|'smooth'} */ ('none'),\n transparency: /** @type {'auto'|'cutout'|'dithered'|'blended'} */ ('auto'),\n});\n/** @param {Partial<BoxImpostorDisplay>} [input] @returns {BoxImpostorDisplay} */\nexport function normalizeBoxImpostorDisplay(input = {}) {\n const value = { ...DEFAULT_BOX_IMPOSTOR_DISPLAY, ...input };\n if (\n !['auto', 'projection', 'depth'].includes(value.depthMode) ||\n ![8, 16, 32].includes(value.raySteps) ||\n !Number.isFinite(value.alphaCutoff) ||\n value.alphaCutoff <= 0 ||\n value.alphaCutoff >= 1 ||\n !['none', 'linear', 'smooth'].includes(value.interpolation) ||\n !['auto', 'cutout', 'dithered', 'blended'].includes(value.transparency)\n )\n throw new Error('Invalid box impostor display settings.');\n return {\n depthMode: value.depthMode,\n raySteps: value.raySteps,\n alphaCutoff: value.alphaCutoff,\n interpolation: value.interpolation,\n transparency: value.transparency,\n };\n}\n\n/** @param {{alphaMode?:'opaque'|'mask'|'blend'}} descriptor @param {BoxImpostorDisplay} settings */\nexport function boxTransparency(descriptor, settings) {\n return settings.transparency === 'auto'\n ? descriptor.alphaMode === 'blend'\n ? 'blended'\n : 'cutout'\n : settings.transparency;\n}\n\n/** Auto only uses planes when every capture is flat within its stored depth bound.\n * Captures without a flatness bound use depth reconstruction.\n * @param {{boxes:{planes?:number[],planeErrors?:number[]}[]}} descriptor @param {BoxImpostorDisplay} settings */\nexport function boxDepthMode(descriptor, settings) {\n if (settings.depthMode !== 'auto') return settings.depthMode;\n return descriptor.boxes.every(\n (box) =>\n box.planes?.length === 6 &&\n box.planeErrors?.length === 6 &&\n box.planeErrors.every((error) => error <= 2 / 255),\n )\n ? 'projection'\n : 'depth';\n}\n", "// @ts-check\n// Shared capture coordinates; keep this module free of renderer dependencies so\n// standalone bundles can use the same convention without importing an engine.\nexport const BOX_FACE_AXES = Object.freeze([\n { normal: [1, 0, 0], right: [0, 0, -1], up: [0, 1, 0] },\n { normal: [-1, 0, 0], right: [0, 0, 1], up: [0, 1, 0] },\n { normal: [0, 1, 0], right: [1, 0, 0], up: [0, 0, -1] },\n { normal: [0, -1, 0], right: [1, 0, 0], up: [0, 0, 1] },\n { normal: [0, 0, 1], right: [1, 0, 0], up: [0, 1, 0] },\n { normal: [0, 0, -1], right: [-1, 0, 0], up: [0, 1, 0] },\n]);\n", "// @ts-check\nimport { normalizeBoxImpostorDisplay } from \"./box-impostor-display-settings.js\";\nexport const NEEDLE_BOX_IMPOSTOR = \"NEEDLE_box_impostor\";\nexport const BOX_OCCUPANCY_RESOLUTION = 8;\nexport const BOX_OCCUPANCY_WORDS = BOX_OCCUPANCY_RESOLUTION ** 3 / 32;\nexport { BOX_FACE_AXES } from \"./box-impostor-face-axes.js\";\n/** @typedef {{center:number[],axes:number[][],halfSize:number[],views:number[][],planes?:number[],planeErrors?:number[],depthBounds?:number[],occupancy?:number[]}} ImpostorBox */\n/** @typedef {{version:1,depthMode?:'auto'|'projection'|'depth',alphaMode?:'opaque'|'mask'|'blend',interpolation?:'none'|'linear'|'smooth',transparency?:'auto'|'cutout'|'dithered'|'blended',mode:'basic'|'cards'|'fitted',atlasResolution:number,padding:number,raySteps:8|16|32,alphaCutoff:number,boxes:ImpostorBox[]}} BoxImpostorDescriptor */\n/** @param {unknown} raw @returns {BoxImpostorDescriptor} */\nexport function parseBoxImpostorDescriptor(raw) {\n const d = /** @type {BoxImpostorDescriptor} */ (raw);\n const fail = () => {\n throw new Error(\"Invalid NEEDLE_box_impostor descriptor.\");\n };\n const vector = (/** @type {unknown} */ v) =>\n Array.isArray(v) && v.length === 3 && v.every(Number.isFinite);\n if (\n !d ||\n d.version !== 1 ||\n ![\"basic\", \"cards\", \"fitted\"].includes(d.mode) ||\n ![8, 16, 32].includes(d.raySteps) ||\n !Number.isInteger(d.atlasResolution) ||\n d.atlasResolution < 32 ||\n d.atlasResolution > 8192 ||\n !Number.isInteger(d.padding) ||\n d.padding < 1 ||\n d.padding > 16 ||\n !Number.isFinite(d.alphaCutoff) ||\n d.alphaCutoff <= 0 ||\n d.alphaCutoff >= 1 ||\n !Array.isArray(d.boxes) ||\n !d.boxes.length ||\n d.boxes.length > 64\n )\n fail();\n if (\n d.alphaMode !== undefined &&\n ![\"opaque\", \"mask\", \"blend\"].includes(d.alphaMode)\n )\n fail();\n if (d.mode === \"basic\" && d.boxes.length !== 1) fail();\n for (const b of d.boxes) {\n if (\n b.occupancy !== undefined &&\n (!Array.isArray(b.occupancy) ||\n b.occupancy.length !== BOX_OCCUPANCY_WORDS ||\n !b.occupancy.every(\n (v) => Number.isInteger(v) && v >= 0 && v <= 0xffffffff,\n ))\n )\n fail();\n if (\n b.depthBounds !== undefined &&\n (!Array.isArray(b.depthBounds) ||\n b.depthBounds.length !== 12 ||\n !b.depthBounds.every(\n (v) => Number.isInteger(v) && v >= 0 && v <= 65535,\n ))\n )\n fail();\n if (\n b.planeErrors !== undefined &&\n (!Array.isArray(b.planeErrors) ||\n b.planeErrors.length !== 6 ||\n !b.planeErrors.every((v) => Number.isFinite(v) && v >= 0 && v <= 1))\n )\n fail();\n if (\n b.planes !== undefined &&\n (!Array.isArray(b.planes) ||\n b.planes.length !== 6 ||\n !b.planes.every((v) => Number.isFinite(v) && v >= 0 && v <= 1))\n )\n fail();\n if (\n !vector(b.center) ||\n !vector(b.halfSize) ||\n b.halfSize.some((v) => v <= 0) ||\n !Array.isArray(b.axes) ||\n b.axes.length !== 3 ||\n !b.axes.every(vector) ||\n !Array.isArray(b.views) ||\n b.views.length !== 6\n )\n fail();\n for (let i = 0; i < 3; i++)\n for (let j = 0; j < 3; j++) {\n const dot = b.axes[i].reduce((s, v, k) => s + v * b.axes[j][k], 0);\n if (Math.abs(dot - (i === j ? 1 : 0)) > 1e-4) fail();\n }\n const [x, y, z] = b.axes;\n if (\n (x[1] * y[2] - x[2] * y[1]) * z[0] +\n (x[2] * y[0] - x[0] * y[2]) * z[1] +\n (x[0] * y[1] - x[1] * y[0]) * z[2] <\n 0.999\n )\n fail();\n for (const r of b.views)\n if (\n !Array.isArray(r) ||\n r.length !== 4 ||\n !r.every(Number.isInteger) ||\n r[0] < 0 ||\n r[1] < 0 ||\n r[2] <= d.padding * 2 ||\n r[3] <= d.padding * 2 ||\n r[0] + r[2] > d.atlasResolution ||\n r[1] + r[3] > d.atlasResolution\n )\n fail();\n }\n return {\n version: d.version,\n mode: d.mode,\n atlasResolution: d.atlasResolution,\n padding: d.padding,\n boxes: d.boxes,\n ...(d.alphaMode ? { alphaMode: d.alphaMode } : {}),\n ...normalizeBoxImpostorDisplay(d),\n };\n}\n"],
5
+ "mappings": ";;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACJA,IAAM,+BAA+B,OAAO,OAAO;AAAA,EACxD;AAAA;AAAA,IAAuD;AAAA;AAAA,EACvD;AAAA;AAAA,IAAkC;AAAA;AAAA,EAClC,aAAa;AAAA,EACb;AAAA;AAAA,I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