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 CHANGED
@@ -11,11 +11,11 @@ https://www.npmjs.com/package/vim-web
11
11
 
12
12
  ### WebGL Viewer
13
13
  - **[Small - Residence](https://vimaec.github.io/vim-web/webgl)**
14
- - **[Medium - Medical Tower](https://vimaec.github.io/vim-web/webgl?vim=https://vim.azureedge.net/samples/Medical_Tower.vim)**
14
+ - **[Medium - Medical Tower](https://vimaec.github.io/vim-web/webgl?vim=https://storage.cdn.vimaec.com/samples/Medical_Tower.vim)**
15
15
 
16
16
  ### Ultra Viewer
17
17
  - **[Small - Residence](https://vimaec.github.io/vim-web/ultra)**
18
- - **[Medium - Medical Tower](https://vimaec.github.io/vim-web/ultra?vim=https://vim.azureedge.net/samples/Medical_Tower.vim)**
18
+ - **[Medium - Medical Tower](https://vimaec.github.io/vim-web/ultra?vim=https://storage.cdn.vimaec.com/samples/Medical_Tower.vim)**
19
19
 
20
20
  Find detailed camera controls here: [Camera Controls](https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide).
21
21
 
package/dist/style.css CHANGED
@@ -733,6 +733,9 @@ video:where(.vim-component,.vim-component *) {
733
733
  .vc-top-1 {
734
734
  top: 0.25rem;
735
735
  }
736
+ .vc-top-10 {
737
+ top: 2.5rem;
738
+ }
736
739
  .vc-top-4 {
737
740
  top: 1rem;
738
741
  }
@@ -982,6 +985,9 @@ video:where(.vim-component,.vim-component *) {
982
985
  .vc-justify-evenly {
983
986
  justify-content: space-evenly;
984
987
  }
988
+ .vc-gap-1 {
989
+ gap: 0.25rem;
990
+ }
985
991
  .vc-gap-2 {
986
992
  gap: 0.5rem;
987
993
  }
@@ -1098,6 +1104,9 @@ video:where(.vim-component,.vim-component *) {
1098
1104
  --tw-bg-opacity: 1 !important;
1099
1105
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;
1100
1106
  }
1107
+ .vc-bg-gray {
1108
+ background-color: var(--c-gray);
1109
+ }
1101
1110
  .vc-bg-gray-light {
1102
1111
  background-color: var(--c-light-gray);
1103
1112
  }
@@ -1304,11 +1313,6 @@ video:where(.vim-component,.vim-component *) {
1304
1313
  --tw-saturate: saturate(0);
1305
1314
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1306
1315
  }
1307
- .vc-backdrop-blur {
1308
- --tw-backdrop-blur: blur(8px);
1309
- -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
1310
- backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
1311
- }
1312
1316
  .\!vc-transition-opacity {
1313
1317
  transition-property: opacity !important;
1314
1318
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
@@ -7,3 +7,4 @@ export * from './viewer/color';
7
7
  export type { ILoadRequest, VimRequestErrorType } from './viewer/loadRequest';
8
8
  export type { ClientState, ConnectionSettings } from './viewer/socketClient';
9
9
  export type { VimSource } from './viewer/rpcSafeClient';
10
+ export type { SectionBoxState } from './viewer/marshal';
@@ -131,7 +131,7 @@ export declare class ViewerMaterials {
131
131
  get outlineAntialias(): boolean;
132
132
  set outlineAntialias(value: boolean);
133
133
  /**
134
- * Size of the blur convolution on the selection outline effect.
134
+ * Size of the blur convolution on the selection outline effect. Minimum 2.
135
135
  */
136
136
  get outlineBlur(): number;
137
137
  set outlineBlur(value: number);
@@ -1,3 +1,3 @@
1
1
  import * as Ultra from '../../../core-viewers/ultra';
2
2
  export declare function getErrorMessage(state: Ultra.ClientState): import("../..").MessageBoxProps;
3
- export declare function getRequestErrorMessage(source: Ultra.VimSource, error: Ultra.VimRequestErrorType): import("../..").MessageBoxProps;
3
+ export declare function getRequestErrorMessage(serverUrl: string, source: Ultra.VimSource, error: Ultra.VimRequestErrorType): import("../..").MessageBoxProps;
@@ -1,2 +1,3 @@
1
1
  export declare const support = "https://docs.vimaec.com";
2
+ export declare const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
2
3
  export declare const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
@@ -48874,14 +48874,14 @@ void main() {
48874
48874
  this._onUpdate.dispatch();
48875
48875
  }
48876
48876
  /**
48877
- * Size of the blur convolution on the selection outline effect.
48877
+ * Size of the blur convolution on the selection outline effect. Minimum 2.
48878
48878
  */
48879
48879
  get outlineBlur() {
48880
48880
  return this.outline.strokeBlur;
48881
48881
  }
48882
48882
  set outlineBlur(value) {
48883
48883
  if (this.outline.strokeBlur === value) return;
48884
- this.outline.strokeBlur = value;
48884
+ this.outline.strokeBlur = Math.max(value, 2);
48885
48885
  this._onUpdate.dispatch();
48886
48886
  }
48887
48887
  /**
@@ -50633,8 +50633,12 @@ void main() {
50633
50633
  }
50634
50634
  frameSphere(sphere, forward) {
50635
50635
  const direction = this.getNormalizedDirection(forward);
50636
- const fov2 = this._camera.camPerspective.camera.fov * Math.PI / 180;
50637
- const dist2 = sphere.radius * 1.2 / Math.tan(fov2 / 2);
50636
+ this._camera.frustrumSizeAt(sphere.center);
50637
+ const vFov = this._camera.camPerspective.camera.fov * Math.PI / 180;
50638
+ const vDist = sphere.radius * 1.2 / Math.tan(vFov / 2);
50639
+ const hFov = vFov * this._camera.camPerspective.camera.aspect;
50640
+ const hDist = sphere.radius * 1.2 / Math.tan(hFov / 2);
50641
+ const dist2 = Math.max(vDist, hDist);
50638
50642
  const safeDist = Math.max(dist2, this._camera.camPerspective.camera.near * 2);
50639
50643
  const pos = direction.multiplyScalar(-safeDist).add(sphere.center);
50640
50644
  this.set(pos, sphere.center);
@@ -61804,9 +61808,9 @@ Averrage Date/Second ${avgDataRatePS} kb
61804
61808
  }
61805
61809
  class SectionBox {
61806
61810
  constructor(rpc) {
61807
- __publicField(this, "_visible", true);
61808
- __publicField(this, "_interactible", true);
61809
- __publicField(this, "_clip", true);
61811
+ __publicField(this, "_visible", false);
61812
+ __publicField(this, "_interactible", false);
61813
+ __publicField(this, "_clip", false);
61810
61814
  __publicField(this, "_box", new Box3());
61811
61815
  __publicField(this, "_rpc");
61812
61816
  __publicField(this, "_interval");
@@ -75623,7 +75627,7 @@ Averrage Date/Second ${avgDataRatePS} kb
75623
75627
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
75624
75628
  "div",
75625
75629
  {
75626
- className: "vim-modal vc-absolute vc-inset-0 vc-z-40 vc-flex vc-items-center vc-justify-center vc-bg-overflow vc-backdrop-blur",
75630
+ 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",
75627
75631
  onClick: ((_a2 = props.state.current) == null ? void 0 : _a2.canClose) ? () => {
75628
75632
  var _a3, _b3;
75629
75633
  return (_b3 = (_a3 = state.current) == null ? void 0 : _a3.onClose) == null ? void 0 : _b3.call(_a3);
@@ -75872,13 +75876,14 @@ Averrage Date/Second ${avgDataRatePS} kb
75872
75876
  const bottomOffset = useStateRef("1");
75873
75877
  const boxRef = React2.useRef(adapter.getBox());
75874
75878
  React2.useEffect(() => {
75875
- adapter.setClip(true);
75876
75879
  adapter.setVisible(false);
75880
+ adapter.setClip(false);
75877
75881
  return adapter.onSelectionChanged.sub(() => {
75878
75882
  if (auto.get() && enable.get()) sectionSelection.call();
75879
75883
  });
75880
75884
  }, []);
75881
75885
  enable.useOnChange((v) => {
75886
+ adapter.setClip(v);
75882
75887
  visible2.set(v);
75883
75888
  showOffsetPanel.set(false);
75884
75889
  if (v && auto.get()) {
@@ -76263,11 +76268,13 @@ Averrage Date/Second ${avgDataRatePS} kb
76263
76268
  vcRoboto
76264
76269
  }, Symbol.toStringTag, { value: "Module" }));
76265
76270
  const support = "https://docs.vimaec.com";
76271
+ const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
76266
76272
  const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
76267
76273
  const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
76268
76274
  __proto__: null,
76269
76275
  support,
76270
- supportControls
76276
+ supportControls,
76277
+ supportUltra
76271
76278
  }, Symbol.toStringTag, { value: "Module" }));
76272
76279
  function fileOpeningError(url) {
76273
76280
  return {
@@ -76313,12 +76320,12 @@ Averrage Date/Second ${avgDataRatePS} kb
76313
76320
  }
76314
76321
  return {
76315
76322
  title: "File Downloading Error",
76316
- body: body$4(server, authToken, server),
76323
+ body: body$4(url, authToken, server),
76317
76324
  footer: footer(support),
76318
76325
  canClose: false
76319
76326
  };
76320
76327
  }
76321
- function body$4(url, server, authToken) {
76328
+ function body$4(url, authToken, server) {
76322
76329
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
76323
76330
  mainText(/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76324
76331
  "Oops, it appears that there’s an ",
@@ -76383,7 +76390,7 @@ Averrage Date/Second ${avgDataRatePS} kb
76383
76390
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76384
76391
  "Ensure that VIM Ultra",
76385
76392
  " ",
76386
- link(support, "process is running"),
76393
+ link(supportUltra, "process is running"),
76387
76394
  " ",
76388
76395
  "at ",
76389
76396
  detailText(url)
@@ -76465,7 +76472,7 @@ Averrage Date/Second ${avgDataRatePS} kb
76465
76472
  return serverStreamError(state.serverUrl);
76466
76473
  }
76467
76474
  }
76468
- function getRequestErrorMessage(source, error) {
76475
+ function getRequestErrorMessage(serverUrl, source, error) {
76469
76476
  console.log(error);
76470
76477
  switch (error) {
76471
76478
  case "loadingError":
@@ -76473,7 +76480,7 @@ Averrage Date/Second ${avgDataRatePS} kb
76473
76480
  case "downloadingError":
76474
76481
  case "unknown":
76475
76482
  case "cancelled":
76476
- return serverFileDownloadingError(source.url);
76483
+ return serverFileDownloadingError(source.url, source.authToken, serverUrl);
76477
76484
  case "serverDisconnected":
76478
76485
  return serverConnectionError(source.url);
76479
76486
  }
@@ -76619,7 +76626,7 @@ Averrage Date/Second ${avgDataRatePS} kb
76619
76626
  void request2.getResult().then(
76620
76627
  (result) => {
76621
76628
  if (result.isError) {
76622
- modal.message(getRequestErrorMessage(source, result.error));
76629
+ modal.message(getRequestErrorMessage(viewer.serverUrl, source, result.error));
76623
76630
  return;
76624
76631
  }
76625
76632
  if (result.isSuccess) {