@niivue/niivue 0.43.5 → 0.43.6

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/build/index.js CHANGED
@@ -13,7 +13,7 @@ var __publicField = (obj, key, value) => {
13
13
  import { mat4 as mat46, vec2, vec3 as vec311, vec4 as vec48 } from "gl-matrix";
14
14
 
15
15
  // package.json
16
- var version = "0.43.5";
16
+ var version = "0.43.6";
17
17
 
18
18
  // src/logger.ts
19
19
  var _Log = class _Log {
@@ -22011,11 +22011,11 @@ var DEFAULT_OPTIONS = {
22011
22011
  var INITIAL_SCENE_DATA = {
22012
22012
  azimuth: 110,
22013
22013
  elevation: 10,
22014
- crosshairPos: vec38.fromValues(0.5, 0.5, 0.5),
22014
+ crosshairPos: vec38.create(),
22015
22015
  clipPlane: [0, 0, 0, 0],
22016
22016
  clipPlaneDepthAziElev: [2, 0, 0],
22017
22017
  volScaleMultiplier: 1,
22018
- pan2Dxyzmm: vec46.fromValues(0, 0, 0, 1),
22018
+ pan2Dxyzmm: vec46.create(),
22019
22019
  clipThick: 2,
22020
22020
  clipVolumeLow: [0, 0, 0],
22021
22021
  clipVolumeHigh: [1, 1, 1]
@@ -22044,7 +22044,11 @@ var NVDocument = class _NVDocument {
22044
22044
  },
22045
22045
  onZoom3DChange: () => {
22046
22046
  },
22047
- sceneData: { ...INITIAL_SCENE_DATA },
22047
+ sceneData: {
22048
+ ...INITIAL_SCENE_DATA,
22049
+ pan2Dxyzmm: vec46.fromValues(0, 0, 0, 1),
22050
+ crosshairPos: vec38.fromValues(0.5, 0.5, 0.5)
22051
+ },
22048
22052
  get renderAzimuth() {
22049
22053
  return this.sceneData.azimuth;
22050
22054
  },
@@ -24243,7 +24247,7 @@ var Niivue = class _Niivue {
24243
24247
  */
24244
24248
  syncWith(otherNV, syncOpts = { "2d": true, "3d": true }) {
24245
24249
  this.otherNV = otherNV;
24246
- this.syncOpts = syncOpts;
24250
+ this.syncOpts = { ...syncOpts };
24247
24251
  }
24248
24252
  /**
24249
24253
  * Sync the scene controls (orientation, crosshair location, etc.) from one Niivue instance to others. useful for using one canvas to drive another.
@@ -24280,10 +24284,12 @@ var Niivue = class _Niivue {
24280
24284
  if (this.otherNV instanceof _Niivue) {
24281
24285
  if (this.syncOpts["2d"]) {
24282
24286
  this.otherNV.scene.crosshairPos = this.otherNV.mm2frac(thisMM);
24287
+ this.otherNV.scene.pan2Dxyzmm = vec48.clone(this.scene.pan2Dxyzmm);
24283
24288
  }
24284
24289
  if (this.syncOpts["3d"]) {
24285
24290
  this.otherNV.scene.renderAzimuth = this.scene.renderAzimuth;
24286
24291
  this.otherNV.scene.renderElevation = this.scene.renderElevation;
24292
+ this.otherNV.scene.volScaleMultiplier = this.scene.volScaleMultiplier;
24287
24293
  }
24288
24294
  this.otherNV.drawScene();
24289
24295
  this.otherNV.createOnLocationChange();
@@ -24294,10 +24300,12 @@ var Niivue = class _Niivue {
24294
24300
  }
24295
24301
  if (this.syncOpts["2d"]) {
24296
24302
  this.otherNV[i].scene.crosshairPos = this.otherNV[i].mm2frac(thisMM);
24303
+ this.otherNV[i].scene.pan2Dxyzmm = vec48.clone(this.scene.pan2Dxyzmm);
24297
24304
  }
24298
24305
  if (this.syncOpts["3d"]) {
24299
24306
  this.otherNV[i].scene.renderAzimuth = this.scene.renderAzimuth;
24300
24307
  this.otherNV[i].scene.renderElevation = this.scene.renderElevation;
24308
+ this.otherNV[i].scene.volScaleMultiplier = this.scene.volScaleMultiplier;
24301
24309
  }
24302
24310
  this.otherNV[i].drawScene();
24303
24311
  this.otherNV[i].createOnLocationChange();