world.ts 0.5.9 → 0.5.11
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/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -398,7 +398,7 @@ const F = 40075017, De = (e) => e / 180 * Math.PI, En = (e) => e * 180 / Math.PI
|
|
|
398
398
|
const { target: n, offset: i, distance: r, orientation: s, fieldOfView: o } = {
|
|
399
399
|
...Et,
|
|
400
400
|
...e
|
|
401
|
-
}, [c = 0, a = 0] = t, [f = 0, l = 0] = i, h = Math.tan(De(45) / 2) / Math.tan(De(o) / 2), u = r / F, d = Math.max(1e3 / F, u), m = 1e3, _ = 1e-3, x = d * m
|
|
401
|
+
}, [c = 0, a = 0] = t, [f = 0, l = 0] = i, h = Math.tan(De(45) / 2) / Math.tan(De(o) / 2), u = r / F * h, d = Math.max(1e3 / F, u), m = 1e3, _ = 1e-3, x = d * m, v = d * _, A = ne(), b = he();
|
|
402
402
|
Ot(b), Bt(b, De(o), c / a, v, x), Wt(b, b, [1, -1, 1]);
|
|
403
403
|
const p = he();
|
|
404
404
|
Ke(p, xt(s));
|
|
@@ -417,7 +417,7 @@ const F = 40075017, De = (e) => e / 180 * Math.PI, En = (e) => e * 180 / Math.PI
|
|
|
417
417
|
}, M = ([O = 0, Z = 0, H = 0], Q = ne()) => at(Q, ot(Q, O, Z, H, 1), E), [S = 0, U = 0] = w([f + c / 2, l + a / 2]), [P = 0, z = 0, L = 0] = y([S, U, -1, 1]), [X = 0, C = 0, Y = 0] = y([S, U, 1.00001, 1]), [j = 0] = _n(
|
|
418
418
|
(X - P) ** 2 + (C - z) ** 2 + (Y - L) ** 2,
|
|
419
419
|
2 * (P * (X - P) + z * (C - z) + L * (Y - L)),
|
|
420
|
-
P ** 2 + z ** 2 + L ** 2 -
|
|
420
|
+
P ** 2 + z ** 2 + L ** 2 - u ** 2
|
|
421
421
|
);
|
|
422
422
|
if (isNaN(j))
|
|
423
423
|
throw new Error("Unexpected");
|
|
@@ -3168,11 +3168,9 @@ const B = 34, di = 22, mi = xe(0, B).flatMap(
|
|
|
3168
3168
|
}
|
|
3169
3169
|
return;
|
|
3170
3170
|
}
|
|
3171
|
-
if (s &&
|
|
3172
|
-
s = !1;
|
|
3171
|
+
if (s && (Math.abs(v) > 1 || Math.abs(A) > 1) && (s = !1, m.buttons === 1)) {
|
|
3173
3172
|
const { point: R, position: T, layer: w } = i([_, x]);
|
|
3174
3173
|
(w?.onDrag || w?.onDragFlat) && (o = w, o.onDragStart?.({ point: R, position: T, layer: w }), [, , c] = T);
|
|
3175
|
-
return;
|
|
3176
3174
|
}
|
|
3177
3175
|
const { point: b, position: p, layer: E } = i([_, x]);
|
|
3178
3176
|
E?.onMouseMove?.({ point: b, position: p, layer: E });
|