@speridlabs/visus 1.0.3 → 1.0.4
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/dist/main.d.ts +328 -328
- package/dist/main.es.js +86 -86
- package/dist/main.umd.js +4 -4
- package/dist/react.es.js +108 -108
- package/package.json +1 -1
package/dist/react.es.js
CHANGED
|
@@ -65,7 +65,7 @@ function _e() {
|
|
|
65
65
|
return "Suspense";
|
|
66
66
|
case F:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case C:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof s == "object")
|
|
@@ -81,7 +81,7 @@ function _e() {
|
|
|
81
81
|
case H:
|
|
82
82
|
var d = s.render;
|
|
83
83
|
return s = s.displayName, s || (s = d.displayName || d.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
84
|
-
case
|
|
84
|
+
case k:
|
|
85
85
|
return d = s.displayName || null, d !== null ? d : T(s.type) || "Memo";
|
|
86
86
|
case O:
|
|
87
87
|
d = s._payload, s = s._init;
|
|
@@ -104,11 +104,11 @@ function _e() {
|
|
|
104
104
|
}
|
|
105
105
|
if (d) {
|
|
106
106
|
d = console;
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var A = d.error, z = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
108
|
+
return A.call(
|
|
109
109
|
d,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
-
|
|
111
|
+
z
|
|
112
112
|
), e(s);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -124,7 +124,7 @@ function _e() {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function r() {
|
|
127
|
-
var s =
|
|
127
|
+
var s = M.A;
|
|
128
128
|
return s === null ? null : s.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function n() {
|
|
@@ -138,31 +138,31 @@ function _e() {
|
|
|
138
138
|
return s.key !== void 0;
|
|
139
139
|
}
|
|
140
140
|
function c(s, d) {
|
|
141
|
-
function
|
|
141
|
+
function A() {
|
|
142
142
|
x || (x = !0, console.error(
|
|
143
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
144
144
|
d
|
|
145
145
|
));
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
get:
|
|
147
|
+
A.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
148
|
+
get: A,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function v() {
|
|
153
153
|
var s = T(this.type);
|
|
154
|
-
return
|
|
154
|
+
return E[s] || (E[s] = !0, console.error(
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
157
157
|
}
|
|
158
|
-
function g(s, d,
|
|
159
|
-
return
|
|
158
|
+
function g(s, d, A, z, L, u, P, D) {
|
|
159
|
+
return A = u.ref, s = {
|
|
160
160
|
$$typeof: m,
|
|
161
161
|
type: s,
|
|
162
162
|
key: d,
|
|
163
163
|
props: u,
|
|
164
164
|
_owner: L
|
|
165
|
-
}, (
|
|
165
|
+
}, (A !== void 0 ? A : null) !== null ? Object.defineProperty(s, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: v
|
|
168
168
|
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
@@ -179,7 +179,7 @@ function _e() {
|
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
182
|
+
value: P
|
|
183
183
|
}), Object.defineProperty(s, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
@@ -187,13 +187,13 @@ function _e() {
|
|
|
187
187
|
value: D
|
|
188
188
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
189
189
|
}
|
|
190
|
-
function S(s, d,
|
|
190
|
+
function S(s, d, A, z, L, u, P, D) {
|
|
191
191
|
var l = d.children;
|
|
192
192
|
if (l !== void 0)
|
|
193
|
-
if (
|
|
193
|
+
if (z)
|
|
194
194
|
if (V(l)) {
|
|
195
|
-
for (
|
|
196
|
-
b(l[
|
|
195
|
+
for (z = 0; z < l.length; z++)
|
|
196
|
+
b(l[z]);
|
|
197
197
|
Object.freeze && Object.freeze(l);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
@@ -202,29 +202,29 @@ function _e() {
|
|
|
202
202
|
else b(l);
|
|
203
203
|
if (U.call(d, "key")) {
|
|
204
204
|
l = T(s);
|
|
205
|
-
var
|
|
205
|
+
var I = Object.keys(d).filter(function(X) {
|
|
206
206
|
return X !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
z = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", G[l + z] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
215
|
+
z,
|
|
216
216
|
l,
|
|
217
|
-
|
|
217
|
+
I,
|
|
218
218
|
l
|
|
219
|
-
), G[l +
|
|
219
|
+
), G[l + z] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (l = null,
|
|
222
|
-
|
|
221
|
+
if (l = null, A !== void 0 && (o(A), l = "" + A), a(d) && (o(d.key), l = "" + d.key), "key" in d) {
|
|
222
|
+
A = {};
|
|
223
223
|
for (var Y in d)
|
|
224
|
-
Y !== "key" && (
|
|
225
|
-
} else
|
|
224
|
+
Y !== "key" && (A[Y] = d[Y]);
|
|
225
|
+
} else A = d;
|
|
226
226
|
return l && c(
|
|
227
|
-
|
|
227
|
+
A,
|
|
228
228
|
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
229
229
|
), g(
|
|
230
230
|
s,
|
|
@@ -232,15 +232,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
u,
|
|
233
233
|
L,
|
|
234
234
|
r(),
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
A,
|
|
236
|
+
P,
|
|
237
237
|
D
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
function b(s) {
|
|
241
241
|
typeof s == "object" && s !== null && s.$$typeof === m && s._store && (s._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var p = ve, m = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), B = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), W = Symbol.for("react.consumer"), j = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"),
|
|
243
|
+
var p = ve, m = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), B = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), W = Symbol.for("react.consumer"), j = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), w = Symbol.for("react.client.reference"), M = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, V = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
p = {
|
|
@@ -248,32 +248,32 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return s();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var x,
|
|
251
|
+
var x, E = {}, R = p["react-stack-bottom-frame"].bind(
|
|
252
252
|
p,
|
|
253
253
|
n
|
|
254
254
|
)(), N = y(t(n)), G = {};
|
|
255
|
-
re.Fragment = _, re.jsx = function(s, d,
|
|
256
|
-
var u = 1e4 >
|
|
255
|
+
re.Fragment = _, re.jsx = function(s, d, A, z, L) {
|
|
256
|
+
var u = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return S(
|
|
258
258
|
s,
|
|
259
259
|
d,
|
|
260
|
-
|
|
260
|
+
A,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
262
|
+
z,
|
|
263
263
|
L,
|
|
264
|
-
u ? Error("react-stack-top-frame") :
|
|
264
|
+
u ? Error("react-stack-top-frame") : R,
|
|
265
265
|
u ? y(t(s)) : N
|
|
266
266
|
);
|
|
267
|
-
}, re.jsxs = function(s, d,
|
|
268
|
-
var u = 1e4 >
|
|
267
|
+
}, re.jsxs = function(s, d, A, z, L) {
|
|
268
|
+
var u = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return S(
|
|
270
270
|
s,
|
|
271
271
|
d,
|
|
272
|
-
|
|
272
|
+
A,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
274
|
+
z,
|
|
275
275
|
L,
|
|
276
|
-
u ? Error("react-stack-top-frame") :
|
|
276
|
+
u ? Error("react-stack-top-frame") : R,
|
|
277
277
|
u ? y(t(s)) : N
|
|
278
278
|
);
|
|
279
279
|
};
|
|
@@ -531,8 +531,8 @@ end_header
|
|
|
531
531
|
let a = 0;
|
|
532
532
|
for (let y = 0; y < t.length - n.length; y++) {
|
|
533
533
|
let x = !0;
|
|
534
|
-
for (let
|
|
535
|
-
if (t[y +
|
|
534
|
+
for (let E = 0; E < n.length; E++)
|
|
535
|
+
if (t[y + E] !== n.charCodeAt(E)) {
|
|
536
536
|
x = !1;
|
|
537
537
|
break;
|
|
538
538
|
}
|
|
@@ -549,15 +549,15 @@ end_header
|
|
|
549
549
|
for (let y = 1; y < v.length; y++) {
|
|
550
550
|
const x = v[y].trim();
|
|
551
551
|
if (x === "" || x === "end_header") continue;
|
|
552
|
-
const
|
|
553
|
-
switch (
|
|
552
|
+
const E = x.split(" ");
|
|
553
|
+
switch (E[0]) {
|
|
554
554
|
case "format":
|
|
555
|
-
S =
|
|
555
|
+
S = E[1];
|
|
556
556
|
break;
|
|
557
557
|
case "element":
|
|
558
558
|
g.push({
|
|
559
|
-
name:
|
|
560
|
-
count: parseInt(
|
|
559
|
+
name: E[1],
|
|
560
|
+
count: parseInt(E[2], 10),
|
|
561
561
|
properties: []
|
|
562
562
|
});
|
|
563
563
|
break;
|
|
@@ -567,8 +567,8 @@ end_header
|
|
|
567
567
|
"Invalid PLY file: Property without element"
|
|
568
568
|
);
|
|
569
569
|
g[g.length - 1].properties.push({
|
|
570
|
-
type:
|
|
571
|
-
name:
|
|
570
|
+
type: E[1],
|
|
571
|
+
name: E[2],
|
|
572
572
|
storage: null
|
|
573
573
|
});
|
|
574
574
|
break;
|
|
@@ -605,15 +605,15 @@ end_header
|
|
|
605
605
|
F
|
|
606
606
|
].some((y) => y === -1))
|
|
607
607
|
throw new Error("Invalid PLY file: Missing required properties");
|
|
608
|
-
const O = 0.28209479177387814,
|
|
608
|
+
const O = 0.28209479177387814, C = (y) => {
|
|
609
609
|
if (y > 0) return 1 / (1 + Math.exp(-y));
|
|
610
610
|
const x = Math.exp(y);
|
|
611
611
|
return x / (1 + x);
|
|
612
|
-
}, w = new i.Vector3(),
|
|
612
|
+
}, w = new i.Vector3(), M = new i.Quaternion(), U = new i.Vector3(), V = new i.Color();
|
|
613
613
|
for (let y = 0; y < b.count; y++) {
|
|
614
614
|
const x = [];
|
|
615
|
-
for (let
|
|
616
|
-
const G = b.properties[
|
|
615
|
+
for (let R = 0; R < b.properties.length; R++) {
|
|
616
|
+
const G = b.properties[R].type;
|
|
617
617
|
let s;
|
|
618
618
|
switch (G) {
|
|
619
619
|
case "char":
|
|
@@ -649,13 +649,13 @@ end_header
|
|
|
649
649
|
x[B],
|
|
650
650
|
x[q],
|
|
651
651
|
x[W]
|
|
652
|
-
),
|
|
652
|
+
), M.set(
|
|
653
653
|
x[j[1]],
|
|
654
654
|
// PLY stores rot 1,2,3,0 (x,y,z,w)
|
|
655
655
|
x[j[2]],
|
|
656
656
|
x[j[3]],
|
|
657
657
|
x[j[0]]
|
|
658
|
-
).normalize(), U.set(
|
|
658
|
+
).normalize(), M.w < 0 && (M.x = -M.x, M.y = -M.y, M.z = -M.z, M.w = -M.w), U.set(
|
|
659
659
|
x[H[0]],
|
|
660
660
|
// Read directly assuming it's log scale
|
|
661
661
|
x[H[1]],
|
|
@@ -665,15 +665,15 @@ end_header
|
|
|
665
665
|
0.5 + x[$[1]] * O,
|
|
666
666
|
0.5 + x[$[2]] * O
|
|
667
667
|
), V.r = Math.max(0, Math.min(1, V.r)), V.g = Math.max(0, Math.min(1, V.g)), V.b = Math.max(0, Math.min(1, V.b));
|
|
668
|
-
const
|
|
668
|
+
const E = C(x[F]);
|
|
669
669
|
p.setSplat(
|
|
670
670
|
y,
|
|
671
671
|
w,
|
|
672
|
-
|
|
672
|
+
M,
|
|
673
673
|
U,
|
|
674
674
|
// Pass log scale directly
|
|
675
675
|
V,
|
|
676
|
-
|
|
676
|
+
E
|
|
677
677
|
);
|
|
678
678
|
}
|
|
679
679
|
return p.calculateBoundingBox(), p;
|
|
@@ -813,12 +813,12 @@ class Ee extends i.EventDispatcher {
|
|
|
813
813
|
let t = null, r = null, n = null, a = null, c = null, v = null, g = !1;
|
|
814
814
|
const S = { x: 0, y: 0, z: 0 }, b = { x: 0, y: 0, z: 0 }, p = { x: 0, y: 0, z: 0 }, m = { x: 0, y: 0, z: 0 };
|
|
815
815
|
let f = null, _ = null;
|
|
816
|
-
const B = 32, q = new Array(B).fill(0), W = new Array(B).fill(0), j = new Array(B).fill(0), H = (F,
|
|
817
|
-
for (; F <=
|
|
818
|
-
const
|
|
819
|
-
if (w > 0) F =
|
|
820
|
-
else if (w < 0)
|
|
821
|
-
else return
|
|
816
|
+
const B = 32, q = new Array(B).fill(0), W = new Array(B).fill(0), j = new Array(B).fill(0), H = (F, k, O) => {
|
|
817
|
+
for (; F <= k; ) {
|
|
818
|
+
const C = k + F >> 1, w = O(C);
|
|
819
|
+
if (w > 0) F = C + 1;
|
|
820
|
+
else if (w < 0) k = C - 1;
|
|
821
|
+
else return C;
|
|
822
822
|
}
|
|
823
823
|
return ~F;
|
|
824
824
|
}, $ = () => {
|
|
@@ -832,27 +832,27 @@ class Ee extends i.EventDispatcher {
|
|
|
832
832
|
self.postMessage(u, [t.buffer]), t = null;
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const F = c.x,
|
|
835
|
+
const F = c.x, k = c.y, O = c.z, C = v.x, w = v.y, M = v.z, U = 1e-4, V = Math.abs(F - S.x) > U || Math.abs(k - S.y) > U || Math.abs(O - S.z) > U, y = Math.abs(C - b.x) > U || Math.abs(w - b.y) > U || Math.abs(M - b.z) > U;
|
|
836
836
|
if (!g && !V && !y)
|
|
837
837
|
return;
|
|
838
|
-
g = !1, S.x = F, S.y =
|
|
839
|
-
let x = 1 / 0,
|
|
838
|
+
g = !1, S.x = F, S.y = k, S.z = O, b.x = C, b.y = w, b.z = M;
|
|
839
|
+
let x = 1 / 0, E = -1 / 0;
|
|
840
840
|
for (let u = 0; u < 8; ++u) {
|
|
841
|
-
const
|
|
842
|
-
x = Math.min(x,
|
|
841
|
+
const P = u & 1 ? p.x : m.x, D = u & 2 ? p.y : m.y, l = u & 4 ? p.z : m.z, I = P * C + D * w + l * M;
|
|
842
|
+
x = Math.min(x, I), E = Math.max(E, I);
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const R = r.length / 3, N = E - x, s = (1 << Math.max(
|
|
845
845
|
10,
|
|
846
|
-
Math.min(20, Math.ceil(Math.log2(
|
|
846
|
+
Math.min(20, Math.ceil(Math.log2(R / 4)))
|
|
847
847
|
)) + 1;
|
|
848
|
-
if ((!f || f.length !==
|
|
849
|
-
for (let u = 0; u <
|
|
850
|
-
_[0] =
|
|
848
|
+
if ((!f || f.length !== R) && (f = new Uint32Array(R)), !_ || _.length !== s ? _ = new Uint32Array(s) : _.fill(0), N < 1e-7) {
|
|
849
|
+
for (let u = 0; u < R; ++u) f[u] = 0;
|
|
850
|
+
_[0] = R;
|
|
851
851
|
} else if (n && n.length > 0) {
|
|
852
852
|
const u = n.length / 6;
|
|
853
853
|
q.fill(0);
|
|
854
854
|
for (let l = 0; l < u; ++l) {
|
|
855
|
-
const
|
|
855
|
+
const I = l * 6, Y = n[I + 0], X = n[I + 1], ne = n[I + 2], Z = n[I + 3], J = Y * C + X * w + ne * M - x, oe = J - Z, ee = J + Z, ie = Math.max(
|
|
856
856
|
0,
|
|
857
857
|
Math.floor(oe * B / N)
|
|
858
858
|
), ce = Math.min(
|
|
@@ -862,15 +862,15 @@ class Ee extends i.EventDispatcher {
|
|
|
862
862
|
for (let Q = ie; Q < ce; ++Q)
|
|
863
863
|
q[Q]++;
|
|
864
864
|
}
|
|
865
|
-
let
|
|
866
|
-
for (let l = 0; l < B; ++l)
|
|
865
|
+
let P = 0;
|
|
866
|
+
for (let l = 0; l < B; ++l) P += q[l];
|
|
867
867
|
j[0] = 0, W[0] = 0;
|
|
868
868
|
for (let l = 1; l < B; ++l)
|
|
869
|
-
j[l - 1] = q[l - 1] /
|
|
870
|
-
j[B - 1] = q[B - 1] /
|
|
869
|
+
j[l - 1] = q[l - 1] / P * s >>> 0, W[l] = W[l - 1] + j[l - 1];
|
|
870
|
+
j[B - 1] = q[B - 1] / P * s >>> 0;
|
|
871
871
|
const D = N / B;
|
|
872
|
-
for (let l = 0; l <
|
|
873
|
-
const
|
|
872
|
+
for (let l = 0; l < R; ++l) {
|
|
873
|
+
const I = l * 3, Y = r[I + 0], X = r[I + 1], ne = r[I + 2], Z = Y * C + X * w + ne * M, oe = (E - Z) / D, ee = Math.max(
|
|
874
874
|
0,
|
|
875
875
|
Math.min(
|
|
876
876
|
B - 1,
|
|
@@ -881,62 +881,62 @@ class Ee extends i.EventDispatcher {
|
|
|
881
881
|
}
|
|
882
882
|
} else {
|
|
883
883
|
const u = (s - 1) / N;
|
|
884
|
-
for (let
|
|
885
|
-
const D =
|
|
886
|
-
f[
|
|
884
|
+
for (let P = 0; P < R; ++P) {
|
|
885
|
+
const D = P * 3, l = r[D + 0], I = r[D + 1], Y = r[D + 2], X = l * C + I * w + Y * M, Z = (E - X) * u >>> 0, J = Math.min(Z, s - 1);
|
|
886
|
+
f[P] = J, _[J]++;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
for (let u = 1; u < s; u++)
|
|
890
890
|
_[u] += _[u - 1];
|
|
891
|
-
for (let u =
|
|
892
|
-
const
|
|
891
|
+
for (let u = R - 1; u >= 0; u--) {
|
|
892
|
+
const P = f[u], D = --_[P];
|
|
893
893
|
t[D] = a ? a[u] : u;
|
|
894
894
|
}
|
|
895
|
-
const d = F *
|
|
895
|
+
const d = F * C + k * w + O * M, A = (u) => {
|
|
896
896
|
if (!t) return -1 / 0;
|
|
897
|
-
const
|
|
897
|
+
const P = t[u], D = P;
|
|
898
898
|
if (!r || D * 3 + 2 >= r.length)
|
|
899
899
|
return -1 / 0;
|
|
900
900
|
const l = D * 3;
|
|
901
|
-
return r[l] *
|
|
901
|
+
return r[l] * C + r[l + 1] * w + r[l + 2] * M - d;
|
|
902
902
|
};
|
|
903
|
-
let
|
|
904
|
-
if (
|
|
903
|
+
let z = R;
|
|
904
|
+
if (R > 0 && A(R - 1) < 0) {
|
|
905
905
|
const u = H(
|
|
906
906
|
0,
|
|
907
|
-
|
|
908
|
-
|
|
907
|
+
R - 1,
|
|
908
|
+
A
|
|
909
909
|
);
|
|
910
|
-
|
|
910
|
+
z = u < 0 ? ~u : u;
|
|
911
911
|
}
|
|
912
912
|
const L = {
|
|
913
913
|
order: t.buffer,
|
|
914
|
-
count:
|
|
914
|
+
count: z
|
|
915
915
|
};
|
|
916
916
|
self.postMessage(L, [t.buffer]), t = null;
|
|
917
917
|
};
|
|
918
918
|
self.onmessage = (F) => {
|
|
919
|
-
const
|
|
920
|
-
|
|
919
|
+
const k = F.data;
|
|
920
|
+
k.order && (t = new Uint32Array(k.order));
|
|
921
921
|
let O = !1;
|
|
922
|
-
if (
|
|
923
|
-
if (n = new Float32Array(
|
|
924
|
-
for (let
|
|
925
|
-
const w =
|
|
926
|
-
n[w + 0] = (
|
|
927
|
-
(y -
|
|
922
|
+
if (k.centers && (r = new Float32Array(k.centers), O = !0, g = !0), Object.prototype.hasOwnProperty.call(k, "mapping") && (a = k.mapping ? new Uint32Array(k.mapping) : null, g = !0), k.chunks) {
|
|
923
|
+
if (n = new Float32Array(k.chunks), n.length > 0 && n[3] > 0)
|
|
924
|
+
for (let C = 0; C < n.length / 6; ++C) {
|
|
925
|
+
const w = C * 6, M = n[w + 0], U = n[w + 1], V = n[w + 2], y = n[w + 3], x = n[w + 4], E = n[w + 5];
|
|
926
|
+
n[w + 0] = (M + y) * 0.5, n[w + 1] = (U + x) * 0.5, n[w + 2] = (V + E) * 0.5, n[w + 3] = Math.sqrt(
|
|
927
|
+
(y - M) ** 2 + (x - U) ** 2 + (E - V) ** 2
|
|
928
928
|
) * 0.5;
|
|
929
929
|
}
|
|
930
930
|
g = !0;
|
|
931
931
|
}
|
|
932
932
|
if (O && r && r.length > 0) {
|
|
933
933
|
p.x = m.x = r[0], p.y = m.y = r[1], p.z = m.z = r[2];
|
|
934
|
-
for (let
|
|
935
|
-
const w =
|
|
934
|
+
for (let C = 1; C < r.length / 3; C++) {
|
|
935
|
+
const w = C * 3;
|
|
936
936
|
p.x = Math.min(p.x, r[w + 0]), m.x = Math.max(m.x, r[w + 0]), p.y = Math.min(p.y, r[w + 1]), m.y = Math.max(m.y, r[w + 1]), p.z = Math.min(p.z, r[w + 2]), m.z = Math.max(m.z, r[w + 2]);
|
|
937
937
|
}
|
|
938
938
|
} else O && r && r.length === 0 && (p.x = m.x = p.y = m.y = p.z = m.z = 0);
|
|
939
|
-
|
|
939
|
+
k.cameraPosition && (c = k.cameraPosition), k.cameraDirection && (v = k.cameraDirection), $();
|
|
940
940
|
};
|
|
941
941
|
}).toString()})();`;
|
|
942
942
|
}
|
package/package.json
CHANGED