@abi-software/scaffoldvuer 1.11.0 → 1.11.1

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/.eslintrc.js CHANGED
@@ -1,5 +1,7 @@
1
- // .eslintrc
2
- env: {
3
- node: true,
4
- es2022: true, // 👈 add this
1
+ module.exports = {
2
+ env: {
3
+ node: true,
4
+ es2020: true,
5
+ },
6
+ parser: '@babel/eslint-parser', // Use the modern parser
5
7
  }
@@ -31656,7 +31656,7 @@ const L4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31656
31656
  /* 2 */
31657
31657
  /***/
31658
31658
  (o) => {
31659
- o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.15.0","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
31659
+ o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.15.1","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
31660
31660
  },
31661
31661
  /* 3 */
31662
31662
  /***/
@@ -35240,11 +35240,11 @@ void main() {
35240
35240
  var w = new l.CatmullRomCurve3(u);
35241
35241
  y = new l.TubeGeometry(w, u.length, v, m, !1);
35242
35242
  } else {
35243
- var A = u.slice(0, -1).map((M, R) => {
35244
- var L = u[R + 1], S = new l.LineCurve3(M, L), I = new l.TubeGeometry(S, 1, v, m, !1);
35245
- return I;
35246
- });
35247
- y = d(A, !0), A.forEach((M) => M.dispose());
35243
+ for (var A = [], M = 0; M + 1 < u.length; M += 2) {
35244
+ var R = new l.LineCurve3(u[M], u[M + 1]), L = new l.TubeGeometry(R, 1, v, m, !1);
35245
+ A.push(L);
35246
+ }
35247
+ y = d(A, !0), A.forEach((S) => S.dispose());
35248
35248
  }
35249
35249
  return y;
35250
35250
  };
@@ -38704,13 +38704,21 @@ const wM = /* @__PURE__ */ mr(H4, [["render", W4], ["__scopeId", "data-v-12185b7
38704
38704
  setObject: function(n) {
38705
38705
  if (n.isZincObject) {
38706
38706
  this.zincObject = An(n);
38707
- const e = this.zincObject.getGroup();
38708
- e && e.position && (this.x = e.position.x, this.y = e.position.y, this.z = e.position.z, this.zincObject.isGlyphset ? this.scale = this.zincObject.globalScale : this.scale = e.scale.x, this.enableScaling = !this.zincObject.isTextureSlides);
38707
+ const e = this.zincObject.getGroup(), t = this.zincObject.userData.originalPos;
38708
+ e && e.position && (this.x = e.position.x, this.y = e.position.y, this.z = e.position.z, this.zincObject.isGlyphset ? this.scale = this.zincObject.globalScale : this.scale = e.scale.x, this.enableScaling = !this.zincObject.isTextureSlides, t && this.boundingDims && (this.min = [
38709
+ t[0] - this.boundingDims.size[0],
38710
+ t[1] - this.boundingDims.size[1],
38711
+ t[2] - this.boundingDims.size[2]
38712
+ ], this.max = [
38713
+ t[0] + this.boundingDims.size[0],
38714
+ t[1] + this.boundingDims.size[1],
38715
+ t[2] + this.boundingDims.size[2]
38716
+ ]));
38709
38717
  } else
38710
38718
  this.zincObject = void 0, this.x = 0, this.y = 0, this.z = 0, this.scale = 1;
38711
38719
  },
38712
38720
  modifyPosition: function() {
38713
- this.zincObject.setPosition(this.x, this.y, this.z);
38721
+ this.zincObject && this.zincObject.setPosition(this.x, this.y, this.z);
38714
38722
  },
38715
38723
  modifyScale: function() {
38716
38724
  this.zincObject.setScaleAll(this.scale);
@@ -38929,7 +38937,7 @@ function $4(n, e, t, i, r, s) {
38929
38937
  _: 1
38930
38938
  });
38931
38939
  }
38932
- const AM = /* @__PURE__ */ mr(j4, [["render", $4], ["__scopeId", "data-v-69c1b94a"]]), Z4 = {
38940
+ const AM = /* @__PURE__ */ mr(j4, [["render", $4], ["__scopeId", "data-v-cd88ead8"]]), Z4 = {
38933
38941
  name: "OpacityControls",
38934
38942
  components: {
38935
38943
  Container: zi,
@@ -42841,8 +42849,10 @@ const R5 = [
42841
42849
  */
42842
42850
  isNerves: {
42843
42851
  type: Object,
42844
- default: {
42845
- regions: ["nerves"]
42852
+ default: function() {
42853
+ return {
42854
+ regions: ["nerves"]
42855
+ };
42846
42856
  }
42847
42857
  },
42848
42858
  /**
@@ -42928,9 +42938,11 @@ const R5 = [
42928
42938
  */
42929
42939
  usageConfig: {
42930
42940
  type: Object,
42931
- default: {
42932
- showTubeLinesControls: !0,
42933
- tubeLines: !1
42941
+ default: function() {
42942
+ return {
42943
+ showTubeLinesControls: !0,
42944
+ tubeLines: !1
42945
+ };
42934
42946
  }
42935
42947
  }
42936
42948
  },
@@ -43224,15 +43236,21 @@ const R5 = [
43224
43236
  * This is called when a new zinc object is read into the scene.
43225
43237
  */
43226
43238
  zincObjectAdded: function(n) {
43227
- var i;
43239
+ var r;
43228
43240
  this.loading = !1, this.$_searchIndex.addZincObject(n, n.uuid), this.timeVarying === !1 && n.isTimeVarying() && (this.timeVarying = !0);
43229
43241
  const e = n.groupName.toLowerCase();
43230
43242
  e in Dv && n.setAnatomicalId(Dv[e]);
43231
- const t = (i = this.isNerves) == null ? void 0 : i.regions;
43232
- if (t) {
43233
- const r = n.getRegion().getFullPath().toLowerCase();
43234
- for (let s = 0; s < t.length; s++)
43235
- r.includes(t[s].toLowerCase()) ? (n.userData.isNerves = !0, n.userData.defaultColour = `#${n.getColourHex()}`, n.userData.isGreyScale = !1, e in Ov && n.setAnatomicalId(Ov[e])) : n.userData.isNerves = !1;
43243
+ const t = n.getGroup();
43244
+ t && t.position ? n.userData.originalPos = [
43245
+ t.position.x,
43246
+ t.position.y,
43247
+ t.position.z
43248
+ ] : n.userData.originalPos = [0, 0, 0];
43249
+ const i = (r = this.isNerves) == null ? void 0 : r.regions;
43250
+ if (i) {
43251
+ const s = n.getRegion().getFullPath().toLowerCase();
43252
+ for (let o = 0; o < i.length; o++)
43253
+ s.includes(i[o].toLowerCase()) ? (n.userData.isNerves = !0, n.userData.defaultColour = `#${n.getColourHex()}`, n.userData.isGreyScale = !1, e in Ov && n.setAnatomicalId(Ov[e])) : n.userData.isNerves = !1;
43236
43254
  }
43237
43255
  this.$emit("zinc-object-added", n);
43238
43256
  },
@@ -44855,7 +44873,7 @@ function Z5(n, e, t, i, r, s) {
44855
44873
  [L, n.loading]
44856
44874
  ]);
44857
44875
  }
44858
- const Q5 = /* @__PURE__ */ mr(O5, [["render", Z5], ["__scopeId", "data-v-ea9c1e4d"]]);
44876
+ const Q5 = /* @__PURE__ */ mr(O5, [["render", Z5], ["__scopeId", "data-v-b5c791a7"]]);
44859
44877
  export {
44860
44878
  Q5 as ScaffoldVuer
44861
44879
  };