vim-web 0.3.44-dev.27 → 0.3.44-dev.29
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/README.md +2 -2
- package/dist/style.css +9 -5
- package/dist/types/core-viewers/ultra/index.d.ts +1 -0
- package/dist/types/core-viewers/webgl/loader/materials/viewerMaterials.d.ts +1 -1
- package/dist/types/react-viewers/ultra/errors/ultraErrors.d.ts +1 -1
- package/dist/types/react-viewers/urls.d.ts +1 -0
- package/dist/vim-web.iife.js +23 -16
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +23 -16
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/vim-web.js
CHANGED
|
@@ -48858,14 +48858,14 @@ const _ViewerMaterials = class _ViewerMaterials {
|
|
|
48858
48858
|
this._onUpdate.dispatch();
|
|
48859
48859
|
}
|
|
48860
48860
|
/**
|
|
48861
|
-
* Size of the blur convolution on the selection outline effect.
|
|
48861
|
+
* Size of the blur convolution on the selection outline effect. Minimum 2.
|
|
48862
48862
|
*/
|
|
48863
48863
|
get outlineBlur() {
|
|
48864
48864
|
return this.outline.strokeBlur;
|
|
48865
48865
|
}
|
|
48866
48866
|
set outlineBlur(value) {
|
|
48867
48867
|
if (this.outline.strokeBlur === value) return;
|
|
48868
|
-
this.outline.strokeBlur = value;
|
|
48868
|
+
this.outline.strokeBlur = Math.max(value, 2);
|
|
48869
48869
|
this._onUpdate.dispatch();
|
|
48870
48870
|
}
|
|
48871
48871
|
/**
|
|
@@ -50617,8 +50617,12 @@ class CameraMovement {
|
|
|
50617
50617
|
}
|
|
50618
50618
|
frameSphere(sphere, forward) {
|
|
50619
50619
|
const direction = this.getNormalizedDirection(forward);
|
|
50620
|
-
|
|
50621
|
-
const
|
|
50620
|
+
this._camera.frustrumSizeAt(sphere.center);
|
|
50621
|
+
const vFov = this._camera.camPerspective.camera.fov * Math.PI / 180;
|
|
50622
|
+
const vDist = sphere.radius * 1.2 / Math.tan(vFov / 2);
|
|
50623
|
+
const hFov = vFov * this._camera.camPerspective.camera.aspect;
|
|
50624
|
+
const hDist = sphere.radius * 1.2 / Math.tan(hFov / 2);
|
|
50625
|
+
const dist2 = Math.max(vDist, hDist);
|
|
50622
50626
|
const safeDist = Math.max(dist2, this._camera.camPerspective.camera.near * 2);
|
|
50623
50627
|
const pos = direction.multiplyScalar(-safeDist).add(sphere.center);
|
|
50624
50628
|
this.set(pos, sphere.center);
|
|
@@ -61788,9 +61792,9 @@ class Renderer2 {
|
|
|
61788
61792
|
}
|
|
61789
61793
|
class SectionBox2 {
|
|
61790
61794
|
constructor(rpc) {
|
|
61791
|
-
__publicField(this, "_visible",
|
|
61792
|
-
__publicField(this, "_interactible",
|
|
61793
|
-
__publicField(this, "_clip",
|
|
61795
|
+
__publicField(this, "_visible", false);
|
|
61796
|
+
__publicField(this, "_interactible", false);
|
|
61797
|
+
__publicField(this, "_clip", false);
|
|
61794
61798
|
__publicField(this, "_box", new Box3());
|
|
61795
61799
|
__publicField(this, "_rpc");
|
|
61796
61800
|
__publicField(this, "_interval");
|
|
@@ -75607,7 +75611,7 @@ function Modal(props) {
|
|
|
75607
75611
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
75608
75612
|
"div",
|
|
75609
75613
|
{
|
|
75610
|
-
className: "vim-modal vc-absolute vc-inset-0 vc-z-40 vc-flex vc-items-center vc-justify-center vc-bg-overflow vc-
|
|
75614
|
+
className: "vim-modal vc-absolute vc-inset-0 vc-z-40 vc-flex vc-items-center vc-justify-center vc-bg-overflow vc-bg-gray",
|
|
75611
75615
|
onClick: ((_a2 = props.state.current) == null ? void 0 : _a2.canClose) ? () => {
|
|
75612
75616
|
var _a3, _b3;
|
|
75613
75617
|
return (_b3 = (_a3 = state.current) == null ? void 0 : _a3.onClose) == null ? void 0 : _b3.call(_a3);
|
|
@@ -75856,13 +75860,14 @@ function useSectionBox(adapter) {
|
|
|
75856
75860
|
const bottomOffset = useStateRef("1");
|
|
75857
75861
|
const boxRef = useRef(adapter.getBox());
|
|
75858
75862
|
useEffect(() => {
|
|
75859
|
-
adapter.setClip(true);
|
|
75860
75863
|
adapter.setVisible(false);
|
|
75864
|
+
adapter.setClip(false);
|
|
75861
75865
|
return adapter.onSelectionChanged.sub(() => {
|
|
75862
75866
|
if (auto.get() && enable.get()) sectionSelection.call();
|
|
75863
75867
|
});
|
|
75864
75868
|
}, []);
|
|
75865
75869
|
enable.useOnChange((v) => {
|
|
75870
|
+
adapter.setClip(v);
|
|
75866
75871
|
visible2.set(v);
|
|
75867
75872
|
showOffsetPanel.set(false);
|
|
75868
75873
|
if (v && auto.get()) {
|
|
@@ -76247,11 +76252,13 @@ const errorStyle = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
76247
76252
|
vcRoboto
|
|
76248
76253
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76249
76254
|
const support = "https://docs.vimaec.com";
|
|
76255
|
+
const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
|
|
76250
76256
|
const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|
|
76251
76257
|
const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76252
76258
|
__proto__: null,
|
|
76253
76259
|
support,
|
|
76254
|
-
supportControls
|
|
76260
|
+
supportControls,
|
|
76261
|
+
supportUltra
|
|
76255
76262
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76256
76263
|
function fileOpeningError(url) {
|
|
76257
76264
|
return {
|
|
@@ -76297,12 +76304,12 @@ function serverFileDownloadingError(url, authToken, server) {
|
|
|
76297
76304
|
}
|
|
76298
76305
|
return {
|
|
76299
76306
|
title: "File Downloading Error",
|
|
76300
|
-
body: body$4(
|
|
76307
|
+
body: body$4(url, authToken, server),
|
|
76301
76308
|
footer: footer(support),
|
|
76302
76309
|
canClose: false
|
|
76303
76310
|
};
|
|
76304
76311
|
}
|
|
76305
|
-
function body$4(url,
|
|
76312
|
+
function body$4(url, authToken, server) {
|
|
76306
76313
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
76307
76314
|
mainText(/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76308
76315
|
"Oops, it appears that there’s an ",
|
|
@@ -76367,7 +76374,7 @@ function body$2(url, local) {
|
|
|
76367
76374
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76368
76375
|
"Ensure that VIM Ultra",
|
|
76369
76376
|
" ",
|
|
76370
|
-
link(
|
|
76377
|
+
link(supportUltra, "process is running"),
|
|
76371
76378
|
" ",
|
|
76372
76379
|
"at ",
|
|
76373
76380
|
detailText(url)
|
|
@@ -76449,7 +76456,7 @@ function getErrorMessage(state) {
|
|
|
76449
76456
|
return serverStreamError(state.serverUrl);
|
|
76450
76457
|
}
|
|
76451
76458
|
}
|
|
76452
|
-
function getRequestErrorMessage(source, error) {
|
|
76459
|
+
function getRequestErrorMessage(serverUrl, source, error) {
|
|
76453
76460
|
console.log(error);
|
|
76454
76461
|
switch (error) {
|
|
76455
76462
|
case "loadingError":
|
|
@@ -76457,7 +76464,7 @@ function getRequestErrorMessage(source, error) {
|
|
|
76457
76464
|
case "downloadingError":
|
|
76458
76465
|
case "unknown":
|
|
76459
76466
|
case "cancelled":
|
|
76460
|
-
return serverFileDownloadingError(source.url);
|
|
76467
|
+
return serverFileDownloadingError(source.url, source.authToken, serverUrl);
|
|
76461
76468
|
case "serverDisconnected":
|
|
76462
76469
|
return serverConnectionError(source.url);
|
|
76463
76470
|
}
|
|
@@ -76603,7 +76610,7 @@ function patchLoad(viewer, modal) {
|
|
|
76603
76610
|
void request2.getResult().then(
|
|
76604
76611
|
(result) => {
|
|
76605
76612
|
if (result.isError) {
|
|
76606
|
-
modal.message(getRequestErrorMessage(source, result.error));
|
|
76613
|
+
modal.message(getRequestErrorMessage(viewer.serverUrl, source, result.error));
|
|
76607
76614
|
return;
|
|
76608
76615
|
}
|
|
76609
76616
|
if (result.isSuccess) {
|