@ndmspc/ndmvr 0.1.2 → 0.20220401.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.
@@ -1,6 +1,8 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { Subject } from 'rxjs';
3
- import AFRAME from 'aframe';
3
+ import AFRAME$1 from 'aframe';
4
+ import { io } from 'socket.io-client';
5
+ import { Vector3, Quaternion } from 'three';
4
6
 
5
7
  function _defineProperties(target, props) {
6
8
  for (var i = 0; i < props.length; i++) {
@@ -82,7 +84,7 @@ var JsrootService = /*#__PURE__*/function () {
82
84
  var secondary = projectionTargetAxis ? axisArray[1] : axisArray[0];
83
85
  var primaryAxis = "f" + secondary + "axis";
84
86
  var secondaryAxis = "f" + primary + "axis";
85
- var binAxis = primary.toLowerCase() + "Max";
87
+ var binAxis = primary.toLowerCase() + "Pos";
86
88
 
87
89
  var h1 = _classPrivateFieldLooseBase(this, _jsroot)[_jsroot].createHistogram('TH1I', info.obj[primaryAxis].fNbins);
88
90
 
@@ -93,6 +95,7 @@ var JsrootService = /*#__PURE__*/function () {
93
95
  var currLabel = ((_info$obj$secondaryAx = info.obj[secondaryAxis].fLabels) === null || _info$obj$secondaryAx === void 0 ? void 0 : _info$obj$secondaryAx.arr.length) > 0 ? info.obj[secondaryAxis].fLabels.arr[info.bin[binAxis] - 1].fString : '';
94
96
 
95
97
  for (var n = 0; n < info.obj[primaryAxis].fNbins; n++) {
98
+ console.log(info.obj);
96
99
  h1.setBinContent(n + 1, projectionAxis === axisArray[0] ? info.obj.getBinContent(info.bin[binAxis], n + 1) : info.obj.getBinContent(n + 1, info.bin[binAxis]));
97
100
  }
98
101
 
@@ -105,10 +108,8 @@ var JsrootService = /*#__PURE__*/function () {
105
108
  _proto.openTH1Projection = function openTH1Projection(projectionAxis, info, idTargetElm, axisArray, projections, projIndex) {
106
109
  var _this = this;
107
110
 
108
- var xLength = info.obj.fXaxis.fXmax / info.obj.fXaxis.fNbins;
109
- var yLength = info.obj.fYaxis.fXmax / info.obj.fYaxis.fNbins;
110
- var xBin = info.bin.xMin / xLength;
111
- var yBin = info.bin.yMin / yLength;
111
+ var xBin = info.bin.xPos - 1;
112
+ var yBin = info.bin.yPos - 1;
112
113
 
113
114
  try {
114
115
  var projection = projections.fFolders.arr[xBin].fFolders.arr[yBin].fFolders.arr[projIndex || 0];
@@ -134,6 +135,8 @@ var JsrootService = /*#__PURE__*/function () {
134
135
  canvas.setAttribute('width', width);
135
136
  var svgString = new XMLSerializer().serializeToString(sourceSvgElement);
136
137
  var ctx = canvas.getContext('2d');
138
+ ctx.fillStyle = '#ffffff';
139
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
137
140
  var DOMURL = self.URL || self.webkitURL || self;
138
141
  var img = new Image();
139
142
  var svg = new Blob([svgString], {
@@ -174,13 +177,13 @@ var styles = {
174
177
  width: '90%',
175
178
  textAlign: 'center',
176
179
  align: 'center',
177
- paddingTop: 2
180
+ paddingTop: 4
178
181
  },
179
182
  projection: {
180
183
  display: 'block',
181
184
  margin: 'auto',
182
- width: '460px',
183
- height: '380px'
185
+ width: '420px',
186
+ height: '350px'
184
187
  },
185
188
  form: {
186
189
  display: 'block',
@@ -218,12 +221,15 @@ var JsrootHistogram = function JsrootHistogram(_ref) {
218
221
  setAxis = _useState[1];
219
222
 
220
223
  var _useState2 = useState(null),
221
- data = _useState2[0],
222
- setData = _useState2[1];
224
+ selectedBin = _useState2[0],
225
+ setSelectedBin = _useState2[1];
223
226
 
224
227
  var handleInputChange = function handleInputChange(event) {
225
- var axis = event.target.value;
226
- setAxis(axis);
228
+ setAxis(event.target.value);
229
+ };
230
+
231
+ var handleSubscription = function handleSubscription(data) {
232
+ setSelectedBin(data);
227
233
  };
228
234
 
229
235
  var renderForm = function renderForm() {
@@ -239,24 +245,22 @@ var JsrootHistogram = function JsrootHistogram(_ref) {
239
245
  id: "axisProjection",
240
246
  style: styles.input
241
247
  }, /*#__PURE__*/React.createElement("option", {
242
- defaultValue: projectionAxes[0]
248
+ value: projectionAxes[0]
243
249
  }, histogram["f" + projectionAxes[0] + "axis"].fTitle ? histogram["f" + projectionAxes[0] + "axis"].fTitle : projectionAxes[0]), /*#__PURE__*/React.createElement("option", {
244
250
  value: projectionAxes[1]
245
251
  }, histogram["f" + projectionAxes[1] + "axis"].fTitle ? histogram["f" + projectionAxes[1] + "axis"].fTitle : projectionAxes[1])));
246
252
  };
247
253
 
248
- var handleSubscription = function handleSubscription(data) {
249
- setData(data);
250
-
254
+ var createAndDisplayProjection = function createAndDisplayProjection() {
251
255
  if (projections !== null) {
252
256
  jsrootService.openTH1Projection(axis, {
253
257
  obj: histogram,
254
- bin: data
258
+ bin: selectedBin
255
259
  }, 'projectionContainer', projectionAxes, projections, projIndex);
256
260
  } else {
257
261
  jsrootService.createTH1Projection(axis, {
258
262
  obj: histogram,
259
- bin: data
263
+ bin: selectedBin
260
264
  }, 'projectionContainer', projectionAxes);
261
265
  setTimeout(function () {
262
266
  jsrootService.displayImageOfProjection('projectionContainer', 'th-mapping', '500px', '500px');
@@ -266,24 +270,21 @@ var JsrootHistogram = function JsrootHistogram(_ref) {
266
270
 
267
271
  useEffect(function () {
268
272
  jsrootService.jsrootLibrary = window.JSROOT;
273
+ setSelectedBin(null);
269
274
  subscription = jsrootSubject.getServiceEvent().subscribe(handleSubscription);
270
275
  return function () {
271
276
  return subscription.unsubscribe();
272
277
  };
273
- }, [axis, projections, histogram]);
274
-
275
- if (data !== null) {
276
- return /*#__PURE__*/React.createElement("div", {
277
- style: styles.box
278
- }, projections === null && renderForm(), /*#__PURE__*/React.createElement("div", {
279
- id: "projectionContainer",
280
- style: styles.projection
281
- }));
282
- } else {
283
- return /*#__PURE__*/React.createElement("div", {
284
- style: styles.box
285
- }, /*#__PURE__*/React.createElement("h3", null, "Empty"));
286
- }
278
+ }, [histogram]);
279
+ useEffect(function () {
280
+ if (selectedBin != null) createAndDisplayProjection();
281
+ }, [axis, selectedBin, projections]);
282
+ return /*#__PURE__*/React.createElement("div", {
283
+ style: styles.box
284
+ }, projections === null && selectedBin !== null && renderForm(), /*#__PURE__*/React.createElement("div", {
285
+ id: "projectionContainer",
286
+ style: styles.projection
287
+ }));
287
288
  };
288
289
 
289
290
  var _subject$1 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
@@ -322,1264 +323,1352 @@ var CameraSubject = /*#__PURE__*/function () {
322
323
 
323
324
  var cameraSubject = new CameraSubject();
324
325
 
325
- var NdmVrCamera = function NdmVrCamera() {
326
- var subscription;
327
- var offset = 30;
328
-
329
- var _useState = useState(0),
330
- rotation = _useState[0],
331
- setRotation = _useState[1];
326
+ var _cameraWrapper = /*#__PURE__*/_classPrivateFieldLooseKey("cameraWrapper");
332
327
 
333
- var _useState2 = useState(null),
334
- prevPosition = _useState2[0],
335
- setPrevPosition = _useState2[1];
328
+ var _setVerticalOffset = /*#__PURE__*/_classPrivateFieldLooseKey("setVerticalOffset");
336
329
 
337
- var _useState3 = useState('keyboard'),
338
- inputDevice = _useState3[0],
339
- setInputDevice = _useState3[1];
330
+ var CameraService = function CameraService() {
331
+ var _this = this;
340
332
 
341
- var _useState4 = useState(false),
342
- show = _useState4[0],
343
- setShow = _useState4[1];
333
+ Object.defineProperty(this, _cameraWrapper, {
334
+ writable: true,
335
+ value: void 0
336
+ });
344
337
 
345
- var _useState5 = useState(false),
346
- showProjection = _useState5[0],
347
- setShowProjection = _useState5[1];
338
+ this.verticalMoveCamera = function (moveUp, speed) {
339
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] === null) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
348
340
 
349
- var handleSubscription = function handleSubscription(data) {
350
- if (data.device) {
351
- if (inputDevice !== data.device) setInputDevice(data.device);
352
- setShow(!show);
353
- } else if (data === 'shift') {
354
- compileRotation();
355
- } else if (data === 'show') {
356
- setShowProjection(!showProjection);
341
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
342
+ if (moveUp) {
343
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y += speed;
344
+ } else {
345
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y > 0) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y -= speed;
346
+ }
357
347
  }
358
348
  };
359
349
 
360
- var compileRotation = function compileRotation() {
361
- var currentRotation = rotation + 90;
362
- if (currentRotation >= 360) currentRotation = 0;
363
- setRotation(currentRotation);
364
- };
350
+ this.horizontalMoveCamera = function (axis, increment, speed) {
351
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] === null) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
365
352
 
366
- var renderProjectionsBanners = function renderProjectionsBanners() {
367
- return /*#__PURE__*/React.createElement("a-entity", {
368
- position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
369
- animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;",
370
- material: "color: white"
371
- }, /*#__PURE__*/React.createElement("a-entity", {
372
- geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
373
- position: "-30 28 0",
374
- rotation: "45 90 0",
375
- material: "color:white;"
376
- }, /*#__PURE__*/React.createElement("a-text", {
377
- color: "black",
378
- width: 50,
379
- value: inputDevice === 'keyboard' ? 'Press C to show help panels' : 'Press Button X to show help panels',
380
- position: "-20 2.8 1"
381
- }), /*#__PURE__*/React.createElement("a-text", {
382
- color: "black",
383
- width: 50,
384
- value: inputDevice === 'keyboard' ? 'Press V to switch to histogram view' : 'Press Button Y to switch to histogram view',
385
- position: "-20 0 1"
386
- }), /*#__PURE__*/React.createElement("a-text", {
387
- color: "black",
388
- width: 50,
389
- value: inputDevice === 'keyboard' ? 'Press X to shift panels' : 'Press right Trigger to shift panels',
390
- position: "-20 -2.8 1"
391
- })), /*#__PURE__*/React.createElement("a-box", {
392
- id: "bannerId_1",
393
- scale: "80 50 2",
394
- animation__position: "property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",
395
- material: "transparent:true"
396
- }), /*#__PURE__*/React.createElement("a-box", {
397
- scale: "80 52 2",
398
- animation__position: "property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",
399
- material: "color: white;"
400
- }), /*#__PURE__*/React.createElement("a-box", {
401
- id: "bannerId_2",
402
- scale: "80 50 2",
403
- animation__position: "property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",
404
- rotation: "0 90 0",
405
- material: "transparent:true"
406
- }), /*#__PURE__*/React.createElement("a-box", {
407
- scale: "80 52 2",
408
- animation__position: "property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",
409
- rotation: "0 90 0",
410
- material: "color: white;"
411
- }), /*#__PURE__*/React.createElement("a-box", {
412
- id: "bannerId_3",
413
- scale: "80 50 2",
414
- animation__position: "property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",
415
- material: "transparent:true"
416
- }), /*#__PURE__*/React.createElement("a-box", {
417
- scale: "80 52 2",
418
- animation__position: "property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",
419
- material: "color: white;"
420
- }), /*#__PURE__*/React.createElement("a-box", {
421
- id: "bannerId_4",
422
- scale: "80 50 2",
423
- animation__position: "property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",
424
- rotation: "0 90 0",
425
- material: "transparent:true"
426
- }), /*#__PURE__*/React.createElement("a-box", {
427
- scale: "80 52 2",
428
- animation__position: "property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",
429
- rotation: "0 90 0",
430
- material: "color: white;"
431
- }));
353
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
354
+ if (increment) {
355
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position[axis] += speed;
356
+ } else {
357
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position[axis] -= speed;
358
+ }
359
+ }
432
360
  };
433
361
 
434
- var renderBannersWithControls = function renderBannersWithControls() {
435
- if (inputDevice === 'keyboard') {
436
- return /*#__PURE__*/React.createElement("a-entity", {
437
- position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
438
- animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;",
439
- material: "color: white"
440
- }, /*#__PURE__*/React.createElement("a-entity", {
441
- geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
442
- position: "-30 28 0",
443
- rotation: "45 90 0",
444
- material: "color: white"
445
- }, /*#__PURE__*/React.createElement("a-text", {
446
- color: "black",
447
- width: "50",
448
- value: showProjection ? 'Press C to show help panels' : 'Press C to show projection panels',
449
- position: "-20 2.8 1"
450
- }), /*#__PURE__*/React.createElement("a-text", {
451
- color: "black",
452
- width: "50",
453
- value: "Press V to switch to histogram view",
454
- position: "-20 0 1"
455
- }), /*#__PURE__*/React.createElement("a-text", {
456
- color: "black",
457
- width: "50",
458
- value: "Press X to shift panels",
459
- position: "-20 -2.8 1"
460
- })), /*#__PURE__*/React.createElement("a-box", {
461
- scale: "80 50 2",
462
- animation__position: "property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",
463
- rotation: "0 -45 0",
464
- src: "./ndmvr/keyboardControls/keyboard.png"
465
- }), /*#__PURE__*/React.createElement("a-box", {
466
- scale: "80 50 2",
467
- animation__position: "property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",
468
- rotation: "0 45 0",
469
- src: "./ndmvr/keyboardControls/keyboard1.png"
470
- }), /*#__PURE__*/React.createElement("a-box", {
471
- scale: "80 50 2",
472
- animation__position: "property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",
473
- rotation: "0 -45 0",
474
- src: "./ndmvr/keyboardControls/keyboard2.png"
475
- }), /*#__PURE__*/React.createElement("a-box", {
476
- scale: "80 50 2",
477
- animation__position: "property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",
478
- rotation: " 0 45 0",
479
- src: "./ndmvr/keyboardControls/keyboard3.png"
480
- }));
481
- } else {
482
- return /*#__PURE__*/React.createElement("a-entity", {
483
- position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
484
- animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;"
485
- }, /*#__PURE__*/React.createElement("a-entity", {
486
- geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
487
- position: "-30 28 0",
488
- rotation: "45 90 0",
489
- material: "color: white"
490
- }, /*#__PURE__*/React.createElement("a-text", {
491
- color: "black",
492
- width: "50",
493
- value: showProjection ? 'Press Button X to show help panels' : 'Press Button X to show projection panels',
494
- position: "-20 2.8 1"
495
- }), /*#__PURE__*/React.createElement("a-text", {
496
- color: "black",
497
- width: "50",
498
- value: "Press Button Y to switch to histogram view",
499
- position: "-20 0 1"
500
- }), /*#__PURE__*/React.createElement("a-text", {
501
- color: "black",
502
- width: "50",
503
- value: "Press right Trigger to shift panels",
504
- position: "-20 -2.8 1"
505
- })), /*#__PURE__*/React.createElement("a-box", {
506
- scale: "80 50 2",
507
- animation__position: "property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",
508
- rotation: "-10 -45 0",
509
- src: "./ndmvr/oculusControls/oculus.png"
510
- }), /*#__PURE__*/React.createElement("a-box", {
511
- scale: "80 50 2",
512
- animation__position: "property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",
513
- rotation: "10 45 0",
514
- src: "./ndmvr/oculusControls/oculus2.png"
515
- }), /*#__PURE__*/React.createElement("a-box", {
516
- scale: "80 50 2",
517
- animation__position: "property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",
518
- rotation: "10 -45 0",
519
- src: "./ndmvr/oculusControls/oculus1.png"
520
- }), /*#__PURE__*/React.createElement("a-box", {
521
- scale: "80 50 2",
522
- animation__position: "property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",
523
- rotation: "-10 45 0",
524
- src: "./ndmvr/oculusControls/oculus3.png"
525
- }));
362
+ Object.defineProperty(this, _setVerticalOffset, {
363
+ writable: true,
364
+ value: function value(elm, offset, rotation) {
365
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null && elm !== null) {
366
+ var newXPos = elm.object3D.position.x + 1 * elm.object3D.position.x;
367
+ var newZPos = elm.object3D.position.z + 1 * elm.object3D.position.z;
368
+ var newYPos = offset;
369
+
370
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation', "property: position; to: " + (newXPos + 1) + " " + newYPos + " " + (newZPos + 1) + "; dur: 100;");
371
+
372
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation__1', "property: rotation; to: " + _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.rotation.x + " " + rotation + " " + _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.rotation.z + "; dur: 100;");
373
+ }
526
374
  }
527
- };
375
+ });
528
376
 
529
- var hideMappingBanner = function hideMappingBanner() {
530
- var banner = document.getElementById('th-mapping');
531
- var background = document.getElementById('th-background');
377
+ this.setCameraPosition = function (offsets) {
378
+ if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
379
+ var newZPos = _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y;
532
380
 
533
- if (banner !== undefined && background !== undefined) {
534
- banner.setAttribute('material', 'opacity', 0);
535
- background.setAttribute('material', 'opacity', 0);
381
+ if (offsets.zOffset !== undefined) {
382
+ newZPos = offsets.zOffset * 2;
383
+ }
384
+
385
+ var newXPos = offsets.xOffset + offsets.xOffset;
386
+ var newYPos = offsets.yOffset + offsets.yOffset;
387
+ setTimeout(function () {
388
+ _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation', "property: position; to: " + (newXPos - 3) + " " + newZPos + " " + (newYPos - 3) + "; dur: 40;");
389
+ }, 1800);
536
390
  }
537
391
  };
538
392
 
539
- var showMappingBanner = function showMappingBanner() {
540
- var banner = document.getElementById('th-mapping');
541
- var background = document.getElementById('th-background');
393
+ this.setPredefinedDownPosition = function () {
394
+ var labelElement = document.getElementById('downLabel');
542
395
 
543
- if (banner !== undefined && background !== undefined) {
544
- banner.setAttribute('material', 'opacity', 1);
545
- background.setAttribute('material', 'opacity', 1);
396
+ if (labelElement !== undefined) {
397
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 180);
546
398
  }
547
399
  };
548
400
 
549
- useEffect(function () {
550
- subscription = cameraSubject.getCameraSubject().subscribe(handleSubscription);
551
- return function () {
552
- return subscription.unsubscribe();
553
- };
554
- }, [show, showProjection, rotation]);
555
- useEffect(function () {
556
- var camera = document.getElementById('camera');
401
+ this.setPredefinedUpPosition = function () {
402
+ var labelElement = document.getElementById('upLabel');
557
403
 
558
- if (!show) {
559
- camera.object3D.position.y = 1.6;
404
+ if (labelElement !== undefined) {
405
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 0);
406
+ }
407
+ };
560
408
 
561
- if (prevPosition !== null) {
562
- camera.object3D.position.x = prevPosition.x;
563
- camera.object3D.position.z = prevPosition.z;
564
- camera.object3D.position.y = prevPosition.y;
565
- }
409
+ this.setPredefinedRightPosition = function () {
410
+ var labelElement = document.getElementById('rightLabel');
566
411
 
567
- showMappingBanner();
568
- } else {
569
- setPrevPosition({
570
- x: camera.object3D.position.x,
571
- y: camera.object3D.position.y,
572
- z: camera.object3D.position.z
573
- });
574
- camera.object3D.position.y = camera.object3D.position.y + offset;
575
- hideMappingBanner();
412
+ if (labelElement !== undefined) {
413
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 90);
576
414
  }
577
- }, [show, inputDevice]);
578
- useEffect(function () {
579
- if (showProjection) {
580
- jsrootService.displayImageOfProjection('projectionContainer', 'bannerId_1', '500px', '400px');
415
+ };
416
+
417
+ this.setPredefinedLeftPosition = function () {
418
+ var labelElement = document.getElementById('leftLabel');
419
+
420
+ if (labelElement !== undefined) {
421
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 270);
581
422
  }
582
- }, [showProjection]);
583
- return /*#__PURE__*/React.createElement("a-entity", {
584
- id: "cameraWrapper",
585
- rotation: "0 180 0",
586
- position: "0 2 0"
587
- }, show && !showProjection && renderBannersWithControls(), show && showProjection && renderProjectionsBanners(), /*#__PURE__*/React.createElement("a-camera", {
588
- id: "camera",
589
- "look-control": true,
590
- "wasd-controls-enabled": "acceleration:=50"
591
- }, /*#__PURE__*/React.createElement("a-entity", {
592
- cursor: "fuse: false; fuseTimeout: 2000;",
593
- raycaster: "objects: .clickable; showLine: false; far: 100;",
594
- animation__click: "property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",
595
- animation__mouseenter: "property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",
596
- animation__mouseleave: "property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",
597
- line: "color: orange; opacity: 0.5",
598
- far: "100",
599
- position: "0 0 -1",
600
- geometry: "primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",
601
- material: "color: white; shader: flat"
602
- }), /*#__PURE__*/React.createElement("a-entity", {
603
- "oculus-touch-controls": "hand: left",
604
- "left-controller-logging": true
605
- }), /*#__PURE__*/React.createElement("a-entity", {
606
- "oculus-touch-controls": "hand: right",
607
- "right-controller-logging": true
608
- })));
609
- };
423
+ };
610
424
 
611
- var _storage = /*#__PURE__*/_classPrivateFieldLooseKey("storage");
425
+ this.setPredefinedDownPositionWithOffset = function () {
426
+ var labelElement = document.getElementById('downLabel');
612
427
 
613
- var _camera = /*#__PURE__*/_classPrivateFieldLooseKey("camera");
428
+ if (labelElement !== undefined) {
429
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 180);
430
+ }
431
+ };
614
432
 
615
- var _selectedBins = /*#__PURE__*/_classPrivateFieldLooseKey("selectedBins");
433
+ this.setPredefinedUpPositionWithOffset = function () {
434
+ var labelElement = document.getElementById('upLabel');
616
435
 
617
- var _deleteCurrentBin = /*#__PURE__*/_classPrivateFieldLooseKey("deleteCurrentBin");
436
+ if (labelElement !== undefined) {
437
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 0);
438
+ }
439
+ };
618
440
 
619
- var NdmVrStorageService = /*#__PURE__*/function () {
620
- function NdmVrStorageService() {
621
- var _this = this;
441
+ this.setPredefinedRightPositionWithOffset = function () {
442
+ var labelElement = document.getElementById('rightLabel');
622
443
 
623
- Object.defineProperty(this, _storage, {
624
- writable: true,
625
- value: void 0
626
- });
627
- Object.defineProperty(this, _camera, {
444
+ if (labelElement !== undefined) {
445
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 90);
446
+ }
447
+ };
448
+
449
+ this.setPredefinedLeftPositionWithOffset = function () {
450
+ var labelElement = document.getElementById('leftLabel');
451
+
452
+ if (labelElement !== undefined) {
453
+ _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 270);
454
+ }
455
+ };
456
+
457
+ _classPrivateFieldLooseBase(this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
458
+ };
459
+
460
+ var _subject$2 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
461
+
462
+ var HistogramSubject = /*#__PURE__*/function () {
463
+ function HistogramSubject() {
464
+ Object.defineProperty(this, _subject$2, {
628
465
  writable: true,
629
466
  value: void 0
630
467
  });
631
- Object.defineProperty(this, _selectedBins, {
632
- writable: true,
633
- value: []
634
- });
635
- Object.defineProperty(this, _deleteCurrentBin, {
636
- writable: true,
637
- value: function value(binData) {
638
- return _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].filter(function (item) {
639
- return item.id !== binData.id;
640
- });
641
- }
642
- });
468
+ _classPrivateFieldLooseBase(this, _subject$2)[_subject$2] = new Subject();
469
+ }
643
470
 
644
- this.containThisBin = function (binData) {
645
- var updatedArray = _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].filter(function (item) {
646
- return item.id === binData.id;
647
- });
471
+ var _proto = HistogramSubject.prototype;
648
472
 
649
- return updatedArray.length !== 0;
650
- };
473
+ _proto.changeHistogramSectionByOffset = function changeHistogramSectionByOffset(axis, histogramType, increment, defaultRange) {
474
+ _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].next({
475
+ name: histogramType,
476
+ axis: axis,
477
+ increment: increment,
478
+ defaultRange: defaultRange
479
+ });
480
+ };
651
481
 
652
- this.storeBinToLocalStorage = function (binData) {
653
- if (!_this.containThisBin(binData)) {
654
- _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].push(binData);
482
+ _proto.changeHistogramFunction = function changeHistogramFunction(typeFunction, histogramType) {
483
+ _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].next({
484
+ fFunction: typeFunction,
485
+ name: histogramType
486
+ });
487
+ };
655
488
 
656
- _classPrivateFieldLooseBase(_this, _storage)[_storage].setItem('selectedBins', JSON.stringify(_classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins]));
657
- }
658
- };
489
+ _proto.changeTypeOfBinMark = function changeTypeOfBinMark(value, histogramType) {
490
+ _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].next({
491
+ binMarkMode: value,
492
+ name: histogramType
493
+ });
494
+ };
659
495
 
660
- this.deleteBinFromLocalStorage = function (binData) {
661
- if (_this.containThisBin(binData)) {
662
- _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins] = _classPrivateFieldLooseBase(_this, _deleteCurrentBin)[_deleteCurrentBin](binData);
496
+ _proto.getChangedSection = function getChangedSection() {
497
+ return _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].asObservable();
498
+ };
663
499
 
664
- _classPrivateFieldLooseBase(_this, _storage)[_storage].setItem('selectedBins', JSON.stringify(_classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins]));
665
- }
666
- };
500
+ return HistogramSubject;
501
+ }();
667
502
 
668
- this.getBinsFromLocalStorage = function () {
669
- var selectedBins = JSON.parse(_classPrivateFieldLooseBase(_this, _storage)[_storage].getItem('selectedBins'));
503
+ var histogramTH2Service = new HistogramSubject();
504
+ var histogramTH3Service = new HistogramSubject();
670
505
 
671
- if (selectedBins === null) {
672
- return [];
673
- } else {
674
- return selectedBins;
675
- }
676
- };
506
+ var _subject$3 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
677
507
 
678
- _classPrivateFieldLooseBase(this, _storage)[_storage] = window.localStorage;
679
- _classPrivateFieldLooseBase(this, _camera)[_camera] = document.getElementById('cameraWrapper');
680
- _classPrivateFieldLooseBase(this, _selectedBins)[_selectedBins] = this.getBinsFromLocalStorage();
508
+ var BinSubject = /*#__PURE__*/function () {
509
+ function BinSubject() {
510
+ Object.defineProperty(this, _subject$3, {
511
+ writable: true,
512
+ value: void 0
513
+ });
514
+ _classPrivateFieldLooseBase(this, _subject$3)[_subject$3] = new Subject();
681
515
  }
682
516
 
683
- var _proto = NdmVrStorageService.prototype;
517
+ var _proto = BinSubject.prototype;
684
518
 
685
- _proto.storeCurrentBinToLocalStorage = function storeCurrentBinToLocalStorage(binData) {
686
- _classPrivateFieldLooseBase(this, _storage)[_storage].setItem('currentBin', JSON.stringify(binData));
519
+ _proto.saveSelectedBinToLocalStorage = function saveSelectedBinToLocalStorage() {
520
+ _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].next(true);
687
521
  };
688
522
 
689
- _proto.getCurrentBinFromLocalStorage = function getCurrentBinFromLocalStorage() {
690
- var currentBin = JSON.parse(_classPrivateFieldLooseBase(this, _storage)[_storage].getItem('currentBin'));
691
-
692
- if (currentBin === undefined || currentBin === '') {
693
- return null;
694
- }
695
-
696
- return currentBin;
523
+ _proto.deleteBinFromLocalStorage = function deleteBinFromLocalStorage() {
524
+ _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].next(false);
697
525
  };
698
526
 
699
- _proto.loadProperty = function loadProperty(property) {
700
- return JSON.parse(_classPrivateFieldLooseBase(this, _storage)[_storage].getItem(property));
527
+ _proto.getKeyboardEvent = function getKeyboardEvent() {
528
+ return _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].asObservable();
701
529
  };
702
530
 
703
- _proto.storeProperty = function storeProperty(property, object) {
704
- _classPrivateFieldLooseBase(this, _storage)[_storage].setItem(property, JSON.stringify(object));
705
- };
531
+ return BinSubject;
532
+ }();
706
533
 
707
- _proto.initHistogramData = function initHistogramData(histogram) {
708
- if (histogram._typename.includes('TH3')) {
709
- this.storeTH3HistogramLimits(histogram);
710
- } else if (histogram._typename.includes('TH2')) {
711
- this.storeTH2HistogramLimits(histogram);
712
- }
713
- };
534
+ var binSubject = new BinSubject();
714
535
 
715
- _proto.storeTH2Offsets = function storeTH2Offsets(xOffset, yOffset, range) {
716
- var object = this.loadProperty('TH2');
717
- var section;
536
+ var keyPressed = {};
537
+ var cameraService = new CameraService();
538
+ var aframeObj;
539
+ var geoAttributes;
540
+ var toolsSelector = new Subject();
541
+ var activeTool;
718
542
 
719
- if (object === null) {
720
- object = {};
721
- section = {
722
- name: 'TH2',
723
- xOffset: 1,
724
- yOffset: 1,
725
- range: 8
726
- };
727
- } else {
728
- section = {
729
- name: 'TH2',
730
- xOffset: xOffset,
731
- yOffset: yOffset,
732
- range: range
733
- };
734
- }
543
+ var handlePositioning = function handlePositioning(property, event) {
544
+ var difference = 0.2;
545
+ if (property.name === 'scale') difference = 0.01;else if (property.name === 'rotation') difference = 2;
735
546
 
736
- object.section = section;
737
- this.storeProperty('TH2', object);
738
- };
547
+ if (event.key === 'ArrowDown') {
548
+ property.xValue = property.xValue + difference;
549
+ } else if (event.key === 'ArrowUp') {
550
+ property.xValue = property.xValue - difference;
551
+ } else if (event.key === '=') {
552
+ property.yValue = property.yValue + difference;
553
+ } else if (event.key === '-') {
554
+ property.yValue = property.yValue - difference;
555
+ } else if (event.key === 'ArrowRight') {
556
+ property.zValue = property.zValue + difference;
557
+ } else if (event.key === 'ArrowLeft') {
558
+ property.zValue = property.zValue - difference;
559
+ }
739
560
 
740
- _proto.storeTH3Offsets = function storeTH3Offsets(xOffset, yOffset, zOffset, range) {
741
- var object = this.loadProperty('TH3');
742
- var section;
561
+ aframeObj.setAttribute(property.name, property.xValue + " " + property.yValue + " " + property.zValue);
562
+ };
743
563
 
744
- if (object === null) {
745
- object = {};
746
- section = {
747
- name: 'TH3',
748
- xOffset: 1,
749
- yOffset: 1,
750
- zOffset: 1,
751
- range: 4
752
- };
753
- } else {
754
- section = {
755
- name: 'TH3',
756
- xOffset: xOffset,
757
- yOffset: yOffset,
758
- zOffset: zOffset,
759
- range: range
760
- };
761
- }
564
+ var handleChangeHistogramSectionByDefaultRange = function handleChangeHistogramSectionByDefaultRange(event) {
565
+ if (event.key === 'k' || event.key === 'K') {
566
+ histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', false, true);
567
+ histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', false, true);
568
+ } else if (event.key === 'i' || event.key === 'I') {
569
+ histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', true, true);
570
+ histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', true, true);
571
+ } else if (event.key === 'u' || event.key === 'U') {
572
+ histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', true, true);
573
+ } else if (event.key === 'o' || event.key === 'O') {
574
+ histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', false, true);
575
+ } else if (event.key === 'l' || event.key === 'L') {
576
+ histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', false, true);
577
+ histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', false, true);
578
+ } else if (event.key === 'j' || event.key === 'J') {
579
+ histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', true, true);
580
+ histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', true, true);
581
+ }
582
+ };
762
583
 
763
- object.section = section;
764
- this.storeProperty('TH3', object);
765
- };
584
+ var handleChangeHistogramSectionByOwnRange = function handleChangeHistogramSectionByOwnRange(event) {
585
+ if (event.key === 'k' || event.key === 'K') {
586
+ histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', false, false);
587
+ histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', false, false);
588
+ } else if (event.key === 'i' || event.key === 'I') {
589
+ histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', true, false);
590
+ histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', true, false);
591
+ } else if (event.key === 'u' || event.key === 'U') {
592
+ histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', true, false);
593
+ } else if (event.key === 'o' || event.key === 'O') {
594
+ histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', false, false);
595
+ } else if (event.key === 'l' || event.key === 'L') {
596
+ histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', false, false);
597
+ histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', false, false);
598
+ } else if (event.key === 'j' || event.key === 'J') {
599
+ histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', true, false);
600
+ histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', true, false);
601
+ }
602
+ };
766
603
 
767
- _proto.storeOffsets = function storeOffsets(section) {
768
- if (section.name.includes('TH3') || section.name.includes('th3')) {
769
- this.storeTH3Offsets(section.xOffset, section.yOffset, section.zOffset, section.range);
770
- } else if (section.name.includes('TH2') || section.name.includes('th2')) {
771
- this.storeTH2Offsets(section.xOffset, section.yOffset, section.range);
772
- }
773
- };
604
+ var keyPressHandlerFunction = function keyPressHandlerFunction(event) {
605
+ keyPressed[event.key] = true;
774
606
 
775
- _proto.storeFilePath = function storeFilePath(filePath) {
776
- _classPrivateFieldLooseBase(this, _storage)[_storage].setItem('rootFile', filePath);
777
- };
607
+ if (keyPressed.Z || keyPressed.z) {
608
+ handlePositioning(geoAttributes[0], event);
609
+ }
778
610
 
779
- _proto.loadFilePath = function loadFilePath() {
780
- var filename = _classPrivateFieldLooseBase(this, _storage)[_storage].getItem('rootFile');
611
+ if (keyPressed.X || keyPressed.x) {
612
+ handlePositioning(geoAttributes[1], event);
613
+ }
781
614
 
782
- if (filename === null || filename === undefined) {
783
- return 'defaultHistogram';
784
- }
615
+ if (keyPressed.C || keyPressed.c) {
616
+ handlePositioning(geoAttributes[2], event);
617
+ }
785
618
 
786
- return filename;
787
- };
619
+ if (keyPressed.Shift) {
620
+ handleChangeHistogramSectionByOwnRange(event);
621
+ }
788
622
 
789
- _proto.loadTH2Offsets = function loadTH2Offsets() {
790
- var object = this.loadProperty('TH2');
623
+ handleChangeHistogramSectionByDefaultRange(event);
791
624
 
792
- if (object !== null) {
793
- return object.section;
794
- } else {
795
- return null;
796
- }
797
- };
625
+ if (event.key === ' ') {
626
+ cameraService.verticalMoveCamera(true, 0.3);
627
+ }
798
628
 
799
- _proto.loadTH3Offsets = function loadTH3Offsets() {
800
- var object = this.loadProperty('TH3');
629
+ if (event.shiftKey) {
630
+ cameraService.verticalMoveCamera(false, 0.3);
631
+ }
801
632
 
802
- if (object !== null) {
803
- return object.section;
804
- } else {
805
- return null;
806
- }
807
- };
633
+ if (event.key === '1') {
634
+ toolsSelector.next(1);
635
+ activeTool = 1;
636
+ }
808
637
 
809
- _proto.loadOffsets = function loadOffsets(type) {
810
- if (type.includes('TH3') || type.includes('th3')) {
811
- return this.loadTH3Offsets();
812
- } else if (type.includes('TH2') || type.includes('th2')) {
813
- return this.loadTH2Offsets();
814
- }
815
- };
638
+ if (event.key === '2') {
639
+ toolsSelector.next(2);
640
+ activeTool = 2;
641
+ }
816
642
 
817
- return NdmVrStorageService;
818
- }();
819
- var localStorageService = new NdmVrStorageService();
643
+ if (event.key === '3') {
644
+ toolsSelector.next(3);
645
+ activeTool = 3;
646
+ }
820
647
 
821
- var _subject$2 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
648
+ if (event.key === '4') {
649
+ toolsSelector.next(4);
650
+ activeTool = 4;
651
+ }
822
652
 
823
- var BinSubject = /*#__PURE__*/function () {
824
- function BinSubject() {
825
- Object.defineProperty(this, _subject$2, {
826
- writable: true,
827
- value: void 0
828
- });
829
- _classPrivateFieldLooseBase(this, _subject$2)[_subject$2] = new Subject();
653
+ if (event.key === '5') {
654
+ toolsSelector.next(5);
655
+ activeTool = 5;
830
656
  }
831
657
 
832
- var _proto = BinSubject.prototype;
658
+ if (event.key === '6') {
659
+ toolsSelector.next(6);
660
+ activeTool = 6;
661
+ }
833
662
 
834
- _proto.saveSelectedBinToLocalStorage = function saveSelectedBinToLocalStorage() {
835
- _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].next(true);
836
- };
663
+ if (event.key === '7') {
664
+ toolsSelector.next(7);
665
+ activeTool = 7;
666
+ }
837
667
 
838
- _proto.deleteBinFromLocalStorage = function deleteBinFromLocalStorage() {
839
- _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].next(false);
840
- };
668
+ if (event.key === '8') {
669
+ toolsSelector.next(8);
670
+ activeTool = 8;
671
+ }
841
672
 
842
- _proto.getKeyboardEvent = function getKeyboardEvent() {
843
- return _classPrivateFieldLooseBase(this, _subject$2)[_subject$2].asObservable();
844
- };
673
+ if (event.key === '9') {
674
+ toolsSelector.next(9);
675
+ activeTool = 9;
676
+ }
845
677
 
846
- return BinSubject;
847
- }();
678
+ if (event.key === '0') {
679
+ toolsSelector.next(0);
680
+ activeTool = 0;
681
+ }
848
682
 
849
- var binSubject = new BinSubject();
683
+ if (event.key === 'Enter') {
684
+ binSubject.saveSelectedBinToLocalStorage();
685
+ ['th-mapping', 'bannerId_1', 'bannerId_2', 'bannerId_3', 'bannerId_4'].forEach(function (targetId) {
686
+ if (document.getElementById(targetId) !== null) {
687
+ jsrootService.displayImageOfProjection('projectionContainer', targetId, '500px', '400px');
688
+ }
689
+ });
690
+ }
850
691
 
851
- AFRAME.registerComponent('mouseevent', {
852
- init: function init() {
853
- var subscription;
854
- var el = this.el;
855
- var clickCount = 0;
856
- var checked = false;
857
- el.addEventListener('mouseenter', function setHover(evt) {
858
- var _this = this;
692
+ if (event.key === 'r' || event.key === 'R') {
693
+ binSubject.deleteBinFromLocalStorage();
694
+ }
859
695
 
860
- checked = false;
861
- var intersection = evt.detail.intersection;
862
- subscription = binSubject.getKeyboardEvent().subscribe(function (save) {
863
- if (save) {
864
- localStorageService.storeBinToLocalStorage(_this.userData);
865
- localStorageService.storeCurrentBinToLocalStorage(_this.userData);
866
- _this.userData.markedColor = _this.userData.selectColor;
696
+ if (event.key === 'm' || event.key === 'M') {
697
+ histogramTH2Service.changeHistogramFunction('feet', 'TH2');
698
+ }
867
699
 
868
- _this.setAttribute('material', 'opacity', '1');
700
+ if (event.key === 'n' || event.key === 'N') {
701
+ histogramTH2Service.changeHistogramFunction('default', 'TH2');
702
+ }
869
703
 
870
- jsrootSubject.showBinProjection(_this.userData);
871
- } else {
872
- localStorageService.deleteBinFromLocalStorage(_this.userData);
873
- _this.userData.markedColor = _this.userData.color;
704
+ if (event.key === 'c' || event.key === 'C') {
705
+ cameraSubject.setUserState();
706
+ }
874
707
 
875
- _this.setAttribute('material', 'opacity', '0.75');
876
- }
877
- });
708
+ if (event.key === 'v' || event.key === 'V') {
709
+ cameraSubject.setVisibilityOfBanners('keyboard');
710
+ }
878
711
 
879
- if (intersection.face.normal.x !== 0) {
880
- this.setAttribute('material', 'color', this.userData.axisZ);
881
- } else if (intersection.face.normal.y !== 0) {
882
- this.setAttribute('material', 'color', this.userData.axisY);
883
- } else {
884
- this.setAttribute('material', 'color', this.userData.axisX);
885
- }
712
+ if (event.key === 'x' || event.key === 'X') {
713
+ cameraSubject.shiftBanners();
714
+ }
886
715
 
887
- this.setAttribute('material', 'opacity', '1');
888
- });
889
- el.addEventListener('mouseleave', function setPassive() {
890
- subscription.unsubscribe();
716
+ if (event.key === 'x' || event.key === 'X') {
717
+ cameraSubject.shiftBanners();
718
+ }
719
+ };
891
720
 
892
- if (checked === false) {
893
- this.setAttribute('material', 'color', this.userData.markedColor);
894
- this.setAttribute('material', 'opacity', '0.75');
895
- }
721
+ var switchDisplayModeOnBin = function switchDisplayModeOnBin(event) {
722
+ event.preventDefault();
723
+ var binDisplayMode;
896
724
 
897
- clickCount = 0;
898
- });
899
- el.addEventListener('click', function setActive(evt) {
900
- clickCount = clickCount + 1;
901
- checked = false;
902
- setTimeout(function () {
903
- clickCount = 0;
904
- }, 600);
725
+ if (event.deltaY > 0) {
726
+ binDisplayMode = 1;
727
+ } else {
728
+ binDisplayMode = -1;
729
+ }
905
730
 
906
- if (clickCount === 2) {
907
- clickCount = 0;
908
- checked = true;
909
- this.setAttribute('material', 'color', '#99ff00');
910
- this.setAttribute('material', 'opacity', '1');
911
- var camera = document.getElementById('cameraWrapper');
731
+ histogramTH2Service.changeTypeOfBinMark(binDisplayMode, 'TH2');
732
+ histogramTH3Service.changeTypeOfBinMark(binDisplayMode, 'TH3');
733
+ };
912
734
 
913
- if (camera !== null) {
914
- camera.object3D.position.y = this.object3D.position.y + 0.4;
735
+ var getActiveTool = function getActiveTool() {
736
+ return activeTool;
737
+ };
915
738
 
916
- if (this.userData.content > 0.5) {
917
- camera.setAttribute('animation', "property: position; to: " + (-0.5 + this.object3D.position.x) + " " + this.object3D.position.y + " " + this.object3D.position.z + "\n ; dur: 600; easing: linear;");
918
- } else if (this.userData.content > 0.2) {
919
- camera.setAttribute('animation', "property: position; to: " + (-0.5 + this.object3D.position.x) + " " + (this.object3D.position.y + 0.1) + " " + (this.object3D.position.z + 0.5) + "\n ; dur: 600; easing: linear;");
920
- } else {
921
- camera.setAttribute('animation', "property: position; to: " + (this.object3D.position.x + 2) + " " + (this.object3D.position.y + 0.1) + " " + (this.object3D.position.z + 8.5) + "\n ; dur: 600; easing: linear;");
922
- }
923
- }
924
- } else if (clickCount === 1) {
925
- this.setAttribute('material', 'color', '#99ff00');
926
- this.setAttribute('material', 'opacity', '1');
927
- localStorageService.storeCurrentBinToLocalStorage(this.userData);
928
- jsrootSubject.showBinProjection(this.userData);
929
- }
739
+ var keyReleaseHandlerFunction = function keyReleaseHandlerFunction(event) {
740
+ delete keyPressed[event.key];
741
+ };
930
742
 
931
- var infoBanner = document.getElementById('th2-banner');
743
+ var initialKeyboardController = function initialKeyboardController(data, object) {
744
+ aframeObj = object;
745
+ geoAttributes = [data.position, data.scale, data.rotation];
932
746
 
933
- if (infoBanner === null) {
934
- infoBanner = document.getElementById('th3-banner');
935
- }
747
+ for (var i = 0; i < 3; i++) {
748
+ aframeObj.setAttribute(geoAttributes[i].name, geoAttributes[i].xValue + " " + geoAttributes[i].yValue + " " + geoAttributes[i].zValue);
749
+ }
750
+ };
936
751
 
937
- if (infoBanner !== null) {
938
- var planes = infoBanner.childNodes;
752
+ var keyboardUpdateCameraReference = function keyboardUpdateCameraReference() {
753
+ cameraService = new CameraService();
754
+ };
939
755
 
940
- if (this.userData.typeName === 'TH3' && planes.length === 5) {
941
- var zCor = "[" + this.userData.zTitle + "] [" + this.userData.zMin + "," + this.userData.zMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
942
- var xCor = "[" + this.userData.xTitle + "] [" + this.userData.xMin + "," + this.userData.xMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
943
- var yCor = "[" + this.userData.yTitle + "] [" + this.userData.yMin + "," + this.userData.yMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
944
- var content = "Content: " + this.userData.absoluteContent + " [" + this.userData.content + "]\n";
945
- planes[0].setAttribute('text', "value: " + content + "; color: " + this.userData.color + "; align: center; width: 30; height: auto;");
946
- planes[1].setAttribute('text', "value: " + xCor + "; color: " + this.userData.axisX + "; align: center; width: 30; height: auto;");
947
- planes[2].setAttribute('text', "value: " + yCor + "; color: " + this.userData.axisY + "; align: center; width: 30; height: auto;");
948
- planes[3].setAttribute('text', "value: " + zCor + "; color: " + this.userData.axisZ + "; align: center; width: 30; height: auto;");
949
- } else {
950
- var _content = "Content: " + this.userData.absoluteContent + " [" + this.userData.content + "]\n";
756
+ var _storage = /*#__PURE__*/_classPrivateFieldLooseKey("storage");
951
757
 
952
- var _xCor = "[" + this.userData.xTitle + "] [" + this.userData.xMin + "," + this.userData.xMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
758
+ var _camera = /*#__PURE__*/_classPrivateFieldLooseKey("camera");
953
759
 
954
- var _yCor = "[" + this.userData.yTitle + "] [" + this.userData.yMin + "," + this.userData.yMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
760
+ var _selectedBins = /*#__PURE__*/_classPrivateFieldLooseKey("selectedBins");
955
761
 
956
- planes[0].setAttribute('text', "value: " + _content + "; color: " + this.userData.color + "; align: center; baseline: center; width: 30; height: auto;");
957
- planes[1].setAttribute('text', "value: " + _xCor + "; color: " + this.userData.axisX + "; align: center; width: 30; height: auto;");
958
- planes[2].setAttribute('text', "value: " + _yCor + "; color: " + this.userData.axisY + "; align: center; width: 30; height: auto;");
959
- }
960
- } else {
961
- console.log('You dont have any information banner!!!');
762
+ var _deleteCurrentBin = /*#__PURE__*/_classPrivateFieldLooseKey("deleteCurrentBin");
763
+
764
+ var NdmVrStorageService = /*#__PURE__*/function () {
765
+ function NdmVrStorageService() {
766
+ var _this = this;
767
+
768
+ Object.defineProperty(this, _storage, {
769
+ writable: true,
770
+ value: void 0
771
+ });
772
+ Object.defineProperty(this, _camera, {
773
+ writable: true,
774
+ value: void 0
775
+ });
776
+ Object.defineProperty(this, _selectedBins, {
777
+ writable: true,
778
+ value: []
779
+ });
780
+ Object.defineProperty(this, _deleteCurrentBin, {
781
+ writable: true,
782
+ value: function value(binData) {
783
+ return _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].filter(function (item) {
784
+ return item.id !== binData.id;
785
+ });
962
786
  }
963
787
  });
964
- },
965
- update: function update() {
966
- var el = this.el;
967
- el.setAttribute('material', 'color', el.userData.markedColor);
968
- el.setAttribute('material', 'opacity', '0.75');
969
- }
970
- });
971
788
 
972
- AFRAME.registerComponent('binth2', {
973
- schema: {
974
- id: {
975
- type: 'string'
976
- },
977
- content: {
978
- "default": 0
979
- },
980
- absoluteContent: {
981
- "default": 0
982
- },
983
- binName: {
984
- "default": ''
985
- },
986
- xTitle: {
987
- type: 'string'
988
- },
989
- yTitle: {
990
- type: 'string'
991
- },
992
- xMin: {
993
- type: 'number'
994
- },
995
- yMin: {
996
- type: 'number'
997
- },
998
- xMax: {
999
- type: 'number'
1000
- },
1001
- yMax: {
1002
- type: 'number'
1003
- },
1004
- xCenter: {
1005
- type: 'number'
1006
- },
1007
- yCenter: {
1008
- type: 'number'
1009
- },
1010
- xWidth: {
1011
- type: 'number'
1012
- },
1013
- yWidth: {
1014
- type: 'number'
1015
- },
1016
- color: {
1017
- type: 'string'
1018
- },
1019
- axisX: {
1020
- type: 'string'
1021
- },
1022
- axisY: {
1023
- type: 'string'
1024
- },
1025
- axisZ: {
1026
- type: 'string'
1027
- },
1028
- selectColor: {
1029
- type: 'string'
1030
- },
1031
- markedColor: {
1032
- type: 'string'
1033
- }
1034
- },
1035
- init: function init() {
1036
- var el = this.el;
1037
- el.userData = {
1038
- typeName: 'TH2',
1039
- id: this.data.id,
1040
- content: this.data.content,
1041
- absoluteContent: this.data.absoluteContent,
1042
- binName: this.data.binName,
1043
- xTitle: this.data.xTitle,
1044
- yTitle: this.data.yTitle,
1045
- xMin: this.data.xMin,
1046
- yMin: this.data.yMin,
1047
- xMax: this.data.xMax,
1048
- yMax: this.data.yMax,
1049
- xCenter: this.data.xCenter,
1050
- yCenter: this.data.yCenter,
1051
- xWidth: this.data.xWidth,
1052
- yWidth: this.data.yWidth,
1053
- color: this.data.color,
1054
- axisX: this.data.axisX,
1055
- axisY: this.data.axisY,
1056
- axisZ: this.data.axisZ,
1057
- selectColor: this.data.selectColor,
1058
- markedColor: this.data.markedColor
789
+ this.containThisBin = function (binData) {
790
+ var updatedArray = _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].filter(function (item) {
791
+ return item.id === binData.id;
792
+ });
793
+
794
+ return updatedArray.length !== 0;
1059
795
  };
1060
- },
1061
- update: function update() {
1062
- var el = this.el;
1063
- el.userData = {
1064
- typeName: 'TH2',
1065
- id: this.data.id,
1066
- content: this.data.content,
1067
- absoluteContent: this.data.absoluteContent,
1068
- binName: this.data.binName,
1069
- xTitle: this.data.xTitle,
1070
- yTitle: this.data.yTitle,
1071
- xMin: this.data.xMin,
1072
- yMin: this.data.yMin,
1073
- xMax: this.data.xMax,
1074
- yMax: this.data.yMax,
1075
- xCenter: this.data.xCenter,
1076
- yCenter: this.data.yCenter,
1077
- xWidth: this.data.xWidth,
1078
- yWidth: this.data.yWidth,
1079
- color: this.data.color,
1080
- axisX: this.data.axisX,
1081
- axisY: this.data.axisY,
1082
- axisZ: this.data.axisZ,
1083
- selectColor: this.data.selectColor,
1084
- markedColor: this.data.markedColor
796
+
797
+ this.storeBinToLocalStorage = function (binData) {
798
+ if (!_this.containThisBin(binData)) {
799
+ _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins].push(binData);
800
+
801
+ _classPrivateFieldLooseBase(_this, _storage)[_storage].setItem('selectedBins', JSON.stringify(_classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins]));
802
+ }
1085
803
  };
1086
- }
1087
- });
1088
804
 
1089
- AFRAME.registerComponent('binth3', {
1090
- schema: {
1091
- id: {
1092
- type: 'string'
1093
- },
1094
- content: {
1095
- "default": 0
1096
- },
1097
- absoluteContent: {
1098
- "default": 0
1099
- },
1100
- binName: {
1101
- "default": ''
1102
- },
1103
- xTitle: {
1104
- type: 'string'
1105
- },
1106
- yTitle: {
1107
- type: 'string'
1108
- },
1109
- zTitle: {
1110
- type: 'string'
1111
- },
1112
- xMin: {
1113
- type: 'number'
1114
- },
1115
- yMin: {
1116
- type: 'number'
1117
- },
1118
- zMin: {
1119
- type: 'number'
1120
- },
1121
- xMax: {
1122
- type: 'number'
1123
- },
1124
- yMax: {
1125
- type: 'number'
1126
- },
1127
- zMax: {
1128
- type: 'number'
1129
- },
1130
- xCenter: {
1131
- type: 'number'
1132
- },
1133
- yCenter: {
1134
- type: 'number'
1135
- },
1136
- zCenter: {
1137
- type: 'number'
1138
- },
1139
- xWidth: {
1140
- type: 'number'
1141
- },
1142
- yWidth: {
1143
- type: 'number'
1144
- },
1145
- zWidth: {
1146
- type: 'number'
1147
- },
1148
- color: {
1149
- type: 'string'
1150
- },
1151
- axisX: {
1152
- type: 'string'
1153
- },
1154
- axisY: {
1155
- type: 'string'
1156
- },
1157
- axisZ: {
1158
- type: 'string'
1159
- },
1160
- selectColor: {
1161
- type: 'string'
1162
- },
1163
- markedColor: {
1164
- type: 'string'
1165
- }
1166
- },
1167
- init: function init() {
1168
- var el = this.el;
1169
- el.userData = {
1170
- typeName: 'TH3',
1171
- id: this.data.id,
1172
- content: this.data.content,
1173
- absoluteContent: this.data.absoluteContent,
1174
- binName: this.data.binName,
1175
- xTitle: this.data.xTitle,
1176
- yTitle: this.data.yTitle,
1177
- zTitle: this.data.zTitle,
1178
- xMin: this.data.xMin,
1179
- yMin: this.data.yMin,
1180
- zMin: this.data.zMin,
1181
- xMax: this.data.xMax,
1182
- yMax: this.data.yMax,
1183
- zMax: this.data.zMax,
1184
- xCenter: this.data.xCenter,
1185
- yCenter: this.data.yCenter,
1186
- zCenter: this.data.zCenter,
1187
- xWidth: this.data.xWidth,
1188
- yWidth: this.data.yWidth,
1189
- zWidth: this.data.zWidth,
1190
- color: this.data.color,
1191
- axisX: this.data.axisX,
1192
- axisY: this.data.axisY,
1193
- axisZ: this.data.axisZ,
1194
- selectColor: this.data.selectColor,
1195
- markedColor: this.data.markedColor
805
+ this.deleteBinFromLocalStorage = function (binData) {
806
+ if (_this.containThisBin(binData)) {
807
+ _classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins] = _classPrivateFieldLooseBase(_this, _deleteCurrentBin)[_deleteCurrentBin](binData);
808
+
809
+ _classPrivateFieldLooseBase(_this, _storage)[_storage].setItem('selectedBins', JSON.stringify(_classPrivateFieldLooseBase(_this, _selectedBins)[_selectedBins]));
810
+ }
1196
811
  };
1197
- },
1198
- update: function update() {
1199
- var el = this.el;
1200
- el.userData = {
1201
- typeName: 'TH3',
1202
- id: this.data.id,
1203
- content: this.data.content,
1204
- absoluteContent: this.data.absoluteContent,
1205
- binName: this.data.binName,
1206
- xTitle: this.data.xTitle,
1207
- yTitle: this.data.yTitle,
1208
- zTitle: this.data.zTitle,
1209
- xMin: this.data.xMin,
1210
- yMin: this.data.yMin,
1211
- zMin: this.data.zMin,
1212
- xMax: this.data.xMax,
1213
- yMax: this.data.yMax,
1214
- zMax: this.data.zMax,
1215
- xCenter: this.data.xCenter,
1216
- yCenter: this.data.yCenter,
1217
- zCenter: this.data.zCenter,
1218
- xWidth: this.data.xWidth,
1219
- yWidth: this.data.yWidth,
1220
- zWidth: this.data.zWidth,
1221
- color: this.data.color,
1222
- axisX: this.data.axisX,
1223
- axisY: this.data.axisY,
1224
- axisZ: this.data.axisZ,
1225
- selectColor: this.data.selectColor,
1226
- markedColor: this.data.markedColor
812
+
813
+ this.getBinsFromLocalStorage = function () {
814
+ var selectedBins = JSON.parse(_classPrivateFieldLooseBase(_this, _storage)[_storage].getItem('selectedBins'));
815
+
816
+ if (selectedBins === null) {
817
+ return [];
818
+ } else {
819
+ return selectedBins;
820
+ }
1227
821
  };
822
+
823
+ _classPrivateFieldLooseBase(this, _storage)[_storage] = window.localStorage;
824
+ _classPrivateFieldLooseBase(this, _camera)[_camera] = document.getElementById('cameraWrapper');
825
+ _classPrivateFieldLooseBase(this, _selectedBins)[_selectedBins] = this.getBinsFromLocalStorage();
1228
826
  }
1229
- });
1230
827
 
1231
- var _cameraWrapper = /*#__PURE__*/_classPrivateFieldLooseKey("cameraWrapper");
828
+ var _proto = NdmVrStorageService.prototype;
1232
829
 
1233
- var _setVerticalOffset = /*#__PURE__*/_classPrivateFieldLooseKey("setVerticalOffset");
830
+ _proto.storeCurrentBinToLocalStorage = function storeCurrentBinToLocalStorage(binData) {
831
+ _classPrivateFieldLooseBase(this, _storage)[_storage].setItem('currentBin', JSON.stringify(binData));
832
+ };
1234
833
 
1235
- var CameraService = function CameraService() {
1236
- var _this = this;
834
+ _proto.getCurrentBinFromLocalStorage = function getCurrentBinFromLocalStorage() {
835
+ var currentBin = JSON.parse(_classPrivateFieldLooseBase(this, _storage)[_storage].getItem('currentBin'));
1237
836
 
1238
- Object.defineProperty(this, _cameraWrapper, {
1239
- writable: true,
1240
- value: void 0
1241
- });
837
+ if (currentBin === undefined || currentBin === '') {
838
+ return null;
839
+ }
840
+
841
+ return currentBin;
842
+ };
843
+
844
+ _proto.loadProperty = function loadProperty(property) {
845
+ return JSON.parse(_classPrivateFieldLooseBase(this, _storage)[_storage].getItem(property));
846
+ };
847
+
848
+ _proto.storeProperty = function storeProperty(property, object) {
849
+ _classPrivateFieldLooseBase(this, _storage)[_storage].setItem(property, JSON.stringify(object));
850
+ };
851
+
852
+ _proto.initHistogramData = function initHistogramData(histogram) {
853
+ if (histogram._typename.includes('TH3')) {
854
+ this.storeTH3HistogramLimits(histogram);
855
+ } else if (histogram._typename.includes('TH2')) {
856
+ this.storeTH2HistogramLimits(histogram);
857
+ }
858
+ };
859
+
860
+ _proto.storeTH2Offsets = function storeTH2Offsets(xOffset, yOffset, range) {
861
+ var object = this.loadProperty('TH2');
862
+ var section;
863
+
864
+ if (object === null) {
865
+ object = {};
866
+ section = {
867
+ name: 'TH2',
868
+ xOffset: 1,
869
+ yOffset: 1,
870
+ range: 8
871
+ };
872
+ } else {
873
+ section = {
874
+ name: 'TH2',
875
+ xOffset: xOffset,
876
+ yOffset: yOffset,
877
+ range: range
878
+ };
879
+ }
880
+
881
+ object.section = section;
882
+ this.storeProperty('TH2', object);
883
+ };
1242
884
 
1243
- this.verticalMoveCamera = function (moveUp, speed) {
1244
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] === null) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
885
+ _proto.storeTH3Offsets = function storeTH3Offsets(xOffset, yOffset, zOffset, range) {
886
+ var object = this.loadProperty('TH3');
887
+ var section;
1245
888
 
1246
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
1247
- if (moveUp) {
1248
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y += speed;
1249
- } else {
1250
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y > 0) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y -= speed;
1251
- }
889
+ if (object === null) {
890
+ object = {};
891
+ section = {
892
+ name: 'TH3',
893
+ xOffset: 1,
894
+ yOffset: 1,
895
+ zOffset: 1,
896
+ range: 4
897
+ };
898
+ } else {
899
+ section = {
900
+ name: 'TH3',
901
+ xOffset: xOffset,
902
+ yOffset: yOffset,
903
+ zOffset: zOffset,
904
+ range: range
905
+ };
1252
906
  }
1253
- };
1254
907
 
1255
- this.horizontalMoveCamera = function (axis, increment, speed) {
1256
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] === null) _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
908
+ object.section = section;
909
+ this.storeProperty('TH3', object);
910
+ };
1257
911
 
1258
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
1259
- if (increment) {
1260
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position[axis] += speed;
1261
- } else {
1262
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position[axis] -= speed;
1263
- }
912
+ _proto.storeOffsets = function storeOffsets(section) {
913
+ if (section.name.includes('TH3') || section.name.includes('th3')) {
914
+ this.storeTH3Offsets(section.xOffset, section.yOffset, section.zOffset, section.range);
915
+ } else if (section.name.includes('TH2') || section.name.includes('th2')) {
916
+ this.storeTH2Offsets(section.xOffset, section.yOffset, section.range);
1264
917
  }
1265
918
  };
1266
919
 
1267
- Object.defineProperty(this, _setVerticalOffset, {
1268
- writable: true,
1269
- value: function value(elm, offset, rotation) {
1270
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null && elm !== null) {
1271
- var newXPos = elm.object3D.position.x + 1 * elm.object3D.position.x;
1272
- var newZPos = elm.object3D.position.z + 1 * elm.object3D.position.z;
1273
- var newYPos = offset;
920
+ _proto.storeFilePath = function storeFilePath(filePath) {
921
+ _classPrivateFieldLooseBase(this, _storage)[_storage].setItem('rootFile', filePath);
922
+ };
1274
923
 
1275
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation', "property: position; to: " + (newXPos + 1) + " " + newYPos + " " + (newZPos + 1) + "; dur: 100;");
924
+ _proto.loadFilePath = function loadFilePath() {
925
+ var filename = _classPrivateFieldLooseBase(this, _storage)[_storage].getItem('rootFile');
1276
926
 
1277
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation__1', "property: rotation; to: " + _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.rotation.x + " " + rotation + " " + _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.rotation.z + "; dur: 100;");
1278
- }
927
+ if (filename === null || filename === undefined) {
928
+ return 'defaultHistogram';
1279
929
  }
1280
- });
1281
930
 
1282
- this.setCameraPosition = function (offsets) {
1283
- if (_classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper] !== null) {
1284
- var newZPos = _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].object3D.position.y;
931
+ return filename;
932
+ };
1285
933
 
1286
- if (offsets.zOffset !== undefined) {
1287
- newZPos = offsets.zOffset * 2;
1288
- }
934
+ _proto.loadTH2Offsets = function loadTH2Offsets() {
935
+ var object = this.loadProperty('TH2');
1289
936
 
1290
- var newXPos = offsets.xOffset + offsets.xOffset;
1291
- var newYPos = offsets.yOffset + offsets.yOffset;
1292
- setTimeout(function () {
1293
- _classPrivateFieldLooseBase(_this, _cameraWrapper)[_cameraWrapper].setAttribute('animation', "property: position; to: " + (newXPos - 3) + " " + newZPos + " " + (newYPos - 3) + "; dur: 40;");
1294
- }, 1800);
937
+ if (object !== null) {
938
+ return object.section;
939
+ } else {
940
+ return null;
1295
941
  }
1296
942
  };
1297
943
 
1298
- this.setPredefinedDownPosition = function () {
1299
- var labelElement = document.getElementById('downLabel');
944
+ _proto.loadTH3Offsets = function loadTH3Offsets() {
945
+ var object = this.loadProperty('TH3');
1300
946
 
1301
- if (labelElement !== undefined) {
1302
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 180);
947
+ if (object !== null) {
948
+ return object.section;
949
+ } else {
950
+ return null;
1303
951
  }
1304
952
  };
1305
953
 
1306
- this.setPredefinedUpPosition = function () {
1307
- var labelElement = document.getElementById('upLabel');
1308
-
1309
- if (labelElement !== undefined) {
1310
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 0);
954
+ _proto.loadOffsets = function loadOffsets(type) {
955
+ if (type.includes('TH3') || type.includes('th3')) {
956
+ return this.loadTH3Offsets();
957
+ } else if (type.includes('TH2') || type.includes('th2')) {
958
+ return this.loadTH2Offsets();
1311
959
  }
1312
960
  };
1313
961
 
1314
- this.setPredefinedRightPosition = function () {
1315
- var labelElement = document.getElementById('rightLabel');
962
+ return NdmVrStorageService;
963
+ }();
964
+ var localStorageService = new NdmVrStorageService();
1316
965
 
1317
- if (labelElement !== undefined) {
1318
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 90);
1319
- }
1320
- };
966
+ var _subject$4 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
1321
967
 
1322
- this.setPredefinedLeftPosition = function () {
1323
- var labelElement = document.getElementById('leftLabel');
968
+ var BinDataDistributor = /*#__PURE__*/function () {
969
+ function BinDataDistributor() {
970
+ Object.defineProperty(this, _subject$4, {
971
+ writable: true,
972
+ value: void 0
973
+ });
974
+ _classPrivateFieldLooseBase(this, _subject$4)[_subject$4] = new Subject();
975
+ }
1324
976
 
1325
- if (labelElement !== undefined) {
1326
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 0, 270);
1327
- }
1328
- };
977
+ var _proto = BinDataDistributor.prototype;
1329
978
 
1330
- this.setPredefinedDownPositionWithOffset = function () {
1331
- var labelElement = document.getElementById('downLabel');
979
+ _proto.sendDataOfTheSelectedBin = function sendDataOfTheSelectedBin(binData) {
980
+ _classPrivateFieldLooseBase(this, _subject$4)[_subject$4].next(binData);
981
+ };
1332
982
 
1333
- if (labelElement !== undefined) {
1334
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 180);
1335
- }
983
+ _proto.getBinDistributor = function getBinDistributor() {
984
+ return _classPrivateFieldLooseBase(this, _subject$4)[_subject$4].asObservable();
1336
985
  };
1337
986
 
1338
- this.setPredefinedUpPositionWithOffset = function () {
1339
- var labelElement = document.getElementById('upLabel');
987
+ return BinDataDistributor;
988
+ }();
1340
989
 
1341
- if (labelElement !== undefined) {
1342
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 0);
1343
- }
1344
- };
990
+ var binDataDistributor = new BinDataDistributor();
1345
991
 
1346
- this.setPredefinedRightPositionWithOffset = function () {
1347
- var labelElement = document.getElementById('rightLabel');
992
+ var binData = new Subject();
993
+ AFRAME$1.registerComponent('mouseevent', {
994
+ init: function init() {
995
+ var subscription;
996
+ var el = this.el;
997
+ var clickCount = 0;
998
+ var checked = false;
999
+ el.addEventListener('mouseenter', function setHover(evt) {
1000
+ var _this = this;
1348
1001
 
1349
- if (labelElement !== undefined) {
1350
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 90);
1351
- }
1352
- };
1002
+ checked = false;
1003
+ var intersection = evt.detail.intersection;
1004
+ subscription = binSubject.getKeyboardEvent().subscribe(function (save) {
1005
+ if (save) {
1006
+ localStorageService.storeBinToLocalStorage(_this.userData);
1007
+ localStorageService.storeCurrentBinToLocalStorage(_this.userData);
1008
+ binDataDistributor.sendDataOfTheSelectedBin(_this.userData);
1009
+ _this.userData.markedColor = _this.userData.selectColor;
1353
1010
 
1354
- this.setPredefinedLeftPositionWithOffset = function () {
1355
- var labelElement = document.getElementById('leftLabel');
1011
+ _this.setAttribute('material', 'opacity', '0.70');
1356
1012
 
1357
- if (labelElement !== undefined) {
1358
- _classPrivateFieldLooseBase(_this, _setVerticalOffset)[_setVerticalOffset](labelElement, 10, 270);
1359
- }
1360
- };
1013
+ jsrootSubject.showBinProjection(_this.userData);
1014
+ } else {
1015
+ localStorageService.deleteBinFromLocalStorage(_this.userData);
1016
+ _this.userData.markedColor = _this.userData.color;
1361
1017
 
1362
- _classPrivateFieldLooseBase(this, _cameraWrapper)[_cameraWrapper] = document.getElementById('cameraWrapper');
1363
- };
1018
+ _this.setAttribute('material', 'opacity', '0.50');
1019
+ }
1020
+ });
1364
1021
 
1365
- var _subject$3 = /*#__PURE__*/_classPrivateFieldLooseKey("subject");
1022
+ if (intersection.face.normal.x !== 0) {
1023
+ this.setAttribute('material', 'color', this.userData.axisZ);
1024
+ } else if (intersection.face.normal.y !== 0) {
1025
+ this.setAttribute('material', 'color', this.userData.axisY);
1026
+ } else {
1027
+ this.setAttribute('material', 'color', this.userData.axisX);
1028
+ }
1366
1029
 
1367
- var HistogramSubject = /*#__PURE__*/function () {
1368
- function HistogramSubject() {
1369
- Object.defineProperty(this, _subject$3, {
1370
- writable: true,
1371
- value: void 0
1030
+ this.setAttribute('material', 'opacity', '0.70');
1372
1031
  });
1373
- _classPrivateFieldLooseBase(this, _subject$3)[_subject$3] = new Subject();
1032
+ el.addEventListener('mouseleave', function setPassive() {
1033
+ subscription.unsubscribe();
1034
+
1035
+ if (checked === false) {
1036
+ this.setAttribute('material', 'color', this.userData.markedColor);
1037
+ this.setAttribute('material', 'opacity', '0.50');
1038
+ }
1039
+
1040
+ clickCount = 0;
1041
+ });
1042
+ el.addEventListener('click', function setActive(evt) {
1043
+ clickCount = clickCount + 1;
1044
+ checked = false;
1045
+ setTimeout(function () {
1046
+ clickCount = 0;
1047
+ }, 600);
1048
+
1049
+ if (clickCount === 2) {
1050
+ clickCount = 0;
1051
+ checked = true;
1052
+ this.setAttribute('material', 'color', '#99ff00');
1053
+ this.setAttribute('material', 'opacity', '1');
1054
+ var camera = document.getElementById('cameraWrapper');
1055
+
1056
+ if (camera !== null) {
1057
+ camera.object3D.position.y = this.object3D.position.y + 0.4;
1058
+
1059
+ if (this.userData.content > 0.5) {
1060
+ camera.setAttribute('animation', "property: position; to: " + (-0.5 + this.object3D.position.x) + " " + this.object3D.position.y + " " + this.object3D.position.z + "\n ; dur: 600; easing: linear;");
1061
+ } else if (this.userData.content > 0.2) {
1062
+ camera.setAttribute('animation', "property: position; to: " + (-0.5 + this.object3D.position.x) + " " + (this.object3D.position.y + 0.1) + " " + (this.object3D.position.z + 0.5) + "\n ; dur: 600; easing: linear;");
1063
+ } else {
1064
+ camera.setAttribute('animation', "property: position; to: " + (this.object3D.position.x + 2) + " " + (this.object3D.position.y + 0.1) + " " + (this.object3D.position.z + 8.5) + "\n ; dur: 600; easing: linear;");
1065
+ }
1066
+ }
1067
+ } else if (clickCount === 1) {
1068
+ this.setAttribute('material', 'color', '#99ff00');
1069
+ this.setAttribute('material', 'opacity', '1');
1070
+ localStorageService.storeCurrentBinToLocalStorage(this.userData);
1071
+ jsrootSubject.showBinProjection(this.userData);
1072
+
1073
+ switch (getActiveTool()) {
1074
+ case 1:
1075
+ binData.next(this.userData);
1076
+ break;
1077
+ }
1078
+ }
1079
+
1080
+ var infoBanner = document.getElementById('th2-banner');
1081
+
1082
+ if (infoBanner === null) {
1083
+ infoBanner = document.getElementById('th3-banner');
1084
+ }
1085
+
1086
+ if (infoBanner !== null) {
1087
+ var planes = infoBanner.childNodes;
1088
+
1089
+ if (this.userData.typeName === 'TH3' && planes.length === 5) {
1090
+ var zCor = "[" + this.userData.zTitle + "] [" + this.userData.zMin + "," + this.userData.zMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
1091
+ var xCor = "[" + this.userData.xTitle + "] [" + this.userData.xMin + "," + this.userData.xMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
1092
+ var yCor = "[" + this.userData.yTitle + "] [" + this.userData.yMin + "," + this.userData.yMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
1093
+ var content = "Content: " + this.userData.absoluteContent + " [" + this.userData.content + "]\n";
1094
+ planes[0].setAttribute('text', "value: " + content + "; color: " + this.userData.color + "; align: center; width: 30; height: auto;");
1095
+ planes[1].setAttribute('text', "value: " + xCor + "; color: " + this.userData.axisX + "; align: center; width: 30; height: auto;");
1096
+ planes[2].setAttribute('text', "value: " + yCor + "; color: " + this.userData.axisY + "; align: center; width: 30; height: auto;");
1097
+ planes[3].setAttribute('text', "value: " + zCor + "; color: " + this.userData.axisZ + "; align: center; width: 30; height: auto;");
1098
+ } else {
1099
+ var _content = "Content: " + this.userData.absoluteContent + " [" + this.userData.content + "]\n";
1100
+
1101
+ var _xCor = "[" + this.userData.xTitle + "] [" + this.userData.xMin + "," + this.userData.xMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
1102
+
1103
+ var _yCor = "[" + this.userData.yTitle + "] [" + this.userData.yMin + "," + this.userData.yMax + "] " + (this.userData.binName !== '' ? this.userData.binName + '\n' : '\n');
1104
+
1105
+ planes[0].setAttribute('text', "value: " + _content + "; color: " + this.userData.color + "; align: center; baseline: center; width: 30; height: auto;");
1106
+ planes[1].setAttribute('text', "value: " + _xCor + "; color: " + this.userData.axisX + "; align: center; width: 30; height: auto;");
1107
+ planes[2].setAttribute('text', "value: " + _yCor + "; color: " + this.userData.axisY + "; align: center; width: 30; height: auto;");
1108
+ }
1109
+ }
1110
+ });
1111
+ },
1112
+ update: function update() {
1113
+ var el = this.el;
1114
+ el.setAttribute('material', 'color', el.userData.markedColor);
1115
+ el.setAttribute('material', 'opacity', '0.75');
1374
1116
  }
1117
+ });
1375
1118
 
1376
- var _proto = HistogramSubject.prototype;
1119
+ var AFRAME = window.AFRAME;
1377
1120
 
1378
- _proto.changeHistogramSectionByOffset = function changeHistogramSectionByOffset(axis, histogramType, increment, defaultRange) {
1379
- _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].next({
1380
- name: histogramType,
1381
- axis: axis,
1382
- increment: increment,
1383
- defaultRange: defaultRange
1384
- });
1385
- };
1121
+ var NdmVrCamera = function NdmVrCamera() {
1122
+ var subscription;
1123
+ var activeToolHighlight = '0 -0.75 -1';
1124
+ var binDataSubscription;
1386
1125
 
1387
- _proto.changeHistogramFunction = function changeHistogramFunction(typeFunction, histogramType) {
1388
- _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].next({
1389
- fFunction: typeFunction,
1390
- name: histogramType
1391
- });
1392
- };
1126
+ var _useState = useState('value: Bin data:\nX: null\nY: null\nZ: null;color: black;'),
1127
+ selectedBinData = _useState[0],
1128
+ setSelectedBinData = _useState[1];
1393
1129
 
1394
- _proto.getChangedSection = function getChangedSection() {
1395
- return _classPrivateFieldLooseBase(this, _subject$3)[_subject$3].asObservable();
1396
- };
1130
+ var offset = 30;
1397
1131
 
1398
- return HistogramSubject;
1399
- }();
1132
+ var _useState2 = useState(0),
1133
+ rotation = _useState2[0],
1134
+ setRotation = _useState2[1];
1400
1135
 
1401
- var histogramTH2Service = new HistogramSubject();
1402
- var histogramTH3Service = new HistogramSubject();
1136
+ var _useState3 = useState(null),
1137
+ prevPosition = _useState3[0],
1138
+ setPrevPosition = _useState3[1];
1403
1139
 
1404
- var keyPressed = {};
1405
- var cameraService = new CameraService();
1406
- var aframeObj;
1407
- var geoAttributes;
1140
+ var _useState4 = useState('keyboard'),
1141
+ inputDevice = _useState4[0],
1142
+ setInputDevice = _useState4[1];
1408
1143
 
1409
- var handlePositioning = function handlePositioning(property, event) {
1410
- var difference = 0.2;
1411
- if (property.name === 'scale') difference = 0.01;else if (property.name === 'rotation') difference = 2;
1144
+ var _useState5 = useState(false),
1145
+ show = _useState5[0],
1146
+ setShow = _useState5[1];
1412
1147
 
1413
- if (event.key === 'ArrowDown') {
1414
- property.xValue = property.xValue + difference;
1415
- } else if (event.key === 'ArrowUp') {
1416
- property.xValue = property.xValue - difference;
1417
- } else if (event.key === '=') {
1418
- property.yValue = property.yValue + difference;
1419
- } else if (event.key === '-') {
1420
- property.yValue = property.yValue - difference;
1421
- } else if (event.key === 'ArrowRight') {
1422
- property.zValue = property.zValue + difference;
1423
- } else if (event.key === 'ArrowLeft') {
1424
- property.zValue = property.zValue - difference;
1425
- }
1148
+ var _useState6 = useState(false),
1149
+ showProjection = _useState6[0],
1150
+ setShowProjection = _useState6[1];
1426
1151
 
1427
- aframeObj.setAttribute(property.name, property.xValue + " " + property.yValue + " " + property.zValue);
1428
- };
1152
+ var _useState7 = useState(3),
1153
+ activeTool = _useState7[0],
1154
+ setActiveTool = _useState7[1];
1429
1155
 
1430
- var handleChangeHistogramSectionByDefaultRange = function handleChangeHistogramSectionByDefaultRange(event) {
1431
- if (event.key === 'k' || event.key === 'K') {
1432
- histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', false, true);
1433
- histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', false, true);
1434
- } else if (event.key === 'i' || event.key === 'I') {
1435
- histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', true, true);
1436
- histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', true, true);
1437
- } else if (event.key === 'u' || event.key === 'U') {
1438
- histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', true, true);
1439
- } else if (event.key === 'o' || event.key === 'O') {
1440
- histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', false, true);
1441
- } else if (event.key === 'l' || event.key === 'L') {
1442
- histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', false, true);
1443
- histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', false, true);
1444
- } else if (event.key === 'j' || event.key === 'J') {
1445
- histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', true, true);
1446
- histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', true, true);
1447
- }
1448
- };
1156
+ toolsSelector.subscribe(function (value) {
1157
+ setActiveTool(value);
1449
1158
 
1450
- var handleChangeHistogramSectionByOwnRange = function handleChangeHistogramSectionByOwnRange(event) {
1451
- if (event.key === 'k' || event.key === 'K') {
1452
- histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', false, false);
1453
- histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', false, false);
1454
- } else if (event.key === 'i' || event.key === 'I') {
1455
- histogramTH2Service.changeHistogramSectionByOffset('yOffset', 'TH2', true, false);
1456
- histogramTH3Service.changeHistogramSectionByOffset('yOffset', 'TH3', true, false);
1457
- } else if (event.key === 'u' || event.key === 'U') {
1458
- histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', true, false);
1459
- } else if (event.key === 'o' || event.key === 'O') {
1460
- histogramTH3Service.changeHistogramSectionByOffset('zOffset', 'TH3', false, false);
1461
- } else if (event.key === 'l' || event.key === 'L') {
1462
- histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', false, false);
1463
- histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', false, false);
1464
- } else if (event.key === 'j' || event.key === 'J') {
1465
- histogramTH2Service.changeHistogramSectionByOffset('xOffset', 'TH2', true, false);
1466
- histogramTH3Service.changeHistogramSectionByOffset('xOffset', 'TH3', true, false);
1467
- }
1468
- };
1159
+ if (value === 1) {
1160
+ binDataSubscription = binData.subscribe(function (value) {
1161
+ return setSelectedBinData(String('value: Bin data:\n' + 'X: ' + value.xPos + '\n' + 'Y: ' + value.yPos + '\n' + 'Z: ' + value.zPos + '; color: black;'));
1162
+ });
1163
+ } else {
1164
+ if (binDataSubscription) binDataSubscription.unsubscribe();
1165
+ }
1166
+ });
1469
1167
 
1470
- var keyPressHandlerFunction = function keyPressHandlerFunction(event) {
1471
- keyPressed[event.key] = true;
1168
+ var handleSubscription = function handleSubscription(data) {
1169
+ if (data.device) {
1170
+ if (inputDevice !== data.device) {
1171
+ setInputDevice(data.device);
1172
+ }
1472
1173
 
1473
- if (keyPressed.Z || keyPressed.z) {
1474
- handlePositioning(geoAttributes[0], event);
1475
- }
1174
+ setShow(!show);
1175
+ } else if (data === 'shift') {
1176
+ compileRotation();
1177
+ } else if (data === 'show') {
1178
+ setShowProjection(!showProjection);
1179
+ }
1180
+ };
1476
1181
 
1477
- if (keyPressed.X || keyPressed.x) {
1478
- handlePositioning(geoAttributes[1], event);
1479
- }
1182
+ var compileRotation = function compileRotation() {
1183
+ var currentRotation = rotation + 90;
1184
+ if (currentRotation >= 360) currentRotation = 0;
1185
+ setRotation(currentRotation);
1186
+ };
1187
+
1188
+ var renderProjectionsBanners = function renderProjectionsBanners() {
1189
+ return /*#__PURE__*/React.createElement("a-entity", {
1190
+ position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
1191
+ animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;",
1192
+ material: "color: white"
1193
+ }, /*#__PURE__*/React.createElement("a-entity", {
1194
+ geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
1195
+ position: "-30 28 0",
1196
+ rotation: "45 90 0",
1197
+ material: "color:white;"
1198
+ }, /*#__PURE__*/React.createElement("a-text", {
1199
+ color: "black",
1200
+ width: 50,
1201
+ value: inputDevice === 'keyboard' ? 'Press C to show help panels' : 'Press Button X to show help panels',
1202
+ position: "-20 2.8 1"
1203
+ }), /*#__PURE__*/React.createElement("a-text", {
1204
+ color: "black",
1205
+ width: 50,
1206
+ value: inputDevice === 'keyboard' ? 'Press V to switch to histogram view' : 'Press Button Y to switch to histogram view',
1207
+ position: "-20 0 1"
1208
+ }), /*#__PURE__*/React.createElement("a-text", {
1209
+ color: "black",
1210
+ width: 50,
1211
+ value: inputDevice === 'keyboard' ? 'Press X to shift panels' : 'Press right Trigger to shift panels',
1212
+ position: "-20 -2.8 1"
1213
+ })), /*#__PURE__*/React.createElement("a-box", {
1214
+ id: "bannerId_1",
1215
+ scale: "80 50 2",
1216
+ animation__position: "property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",
1217
+ material: "transparent:true"
1218
+ }), /*#__PURE__*/React.createElement("a-box", {
1219
+ scale: "80 52 2",
1220
+ animation__position: "property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",
1221
+ material: "color: white;"
1222
+ }), /*#__PURE__*/React.createElement("a-box", {
1223
+ id: "bannerId_2",
1224
+ scale: "80 50 2",
1225
+ animation__position: "property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",
1226
+ rotation: "0 90 0",
1227
+ material: "transparent:true"
1228
+ }), /*#__PURE__*/React.createElement("a-box", {
1229
+ scale: "80 52 2",
1230
+ animation__position: "property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",
1231
+ rotation: "0 90 0",
1232
+ material: "color: white;"
1233
+ }), /*#__PURE__*/React.createElement("a-box", {
1234
+ id: "bannerId_3",
1235
+ scale: "80 50 2",
1236
+ animation__position: "property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",
1237
+ material: "transparent:true"
1238
+ }), /*#__PURE__*/React.createElement("a-box", {
1239
+ scale: "80 52 2",
1240
+ animation__position: "property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",
1241
+ material: "color: white;"
1242
+ }), /*#__PURE__*/React.createElement("a-box", {
1243
+ id: "bannerId_4",
1244
+ scale: "80 50 2",
1245
+ animation__position: "property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",
1246
+ rotation: "0 90 0",
1247
+ material: "transparent:true"
1248
+ }), /*#__PURE__*/React.createElement("a-box", {
1249
+ scale: "80 52 2",
1250
+ animation__position: "property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",
1251
+ rotation: "0 90 0",
1252
+ material: "color: white;"
1253
+ }));
1254
+ };
1255
+
1256
+ var renderBannersWithControls = function renderBannersWithControls() {
1257
+ if (inputDevice === 'keyboard') {
1258
+ return /*#__PURE__*/React.createElement("a-entity", {
1259
+ position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
1260
+ animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;",
1261
+ material: "color: white"
1262
+ }, /*#__PURE__*/React.createElement("a-entity", {
1263
+ geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
1264
+ position: "-30 28 0",
1265
+ rotation: "45 90 0",
1266
+ material: "color: white"
1267
+ }, /*#__PURE__*/React.createElement("a-text", {
1268
+ color: "black",
1269
+ width: "50",
1270
+ value: showProjection ? 'Press C to show help panels' : 'Press C to show projection panels',
1271
+ position: "-20 2.8 1"
1272
+ }), /*#__PURE__*/React.createElement("a-text", {
1273
+ color: "black",
1274
+ width: "50",
1275
+ value: "Press V to switch to histogram view",
1276
+ position: "-20 0 1"
1277
+ }), /*#__PURE__*/React.createElement("a-text", {
1278
+ color: "black",
1279
+ width: "50",
1280
+ value: "Press X to shift panels",
1281
+ position: "-20 -2.8 1"
1282
+ })), /*#__PURE__*/React.createElement("a-box", {
1283
+ scale: "80 50 2",
1284
+ animation__position: "property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",
1285
+ rotation: "0 -45 0",
1286
+ src: "./ndmvr/keyboardControls/keyboard.png"
1287
+ }), /*#__PURE__*/React.createElement("a-box", {
1288
+ scale: "80 50 2",
1289
+ animation__position: "property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",
1290
+ rotation: "0 45 0",
1291
+ src: "./ndmvr/keyboardControls/keyboard1.png"
1292
+ }), /*#__PURE__*/React.createElement("a-box", {
1293
+ scale: "80 50 2",
1294
+ animation__position: "property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",
1295
+ rotation: "0 -45 0",
1296
+ src: "./ndmvr/keyboardControls/keyboard2.png"
1297
+ }), /*#__PURE__*/React.createElement("a-box", {
1298
+ scale: "80 50 2",
1299
+ animation__position: "property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",
1300
+ rotation: " 0 45 0",
1301
+ src: "./ndmvr/keyboardControls/keyboard3.png"
1302
+ }));
1303
+ } else {
1304
+ return /*#__PURE__*/React.createElement("a-entity", {
1305
+ position: prevPosition === null ? "0 " + offset + " 0" : prevPosition.x + " " + offset + " " + prevPosition.z,
1306
+ animation__rotation: "property: rotation; to: 0 " + rotation + " 0; dur: 1000; easing: linear;"
1307
+ }, /*#__PURE__*/React.createElement("a-entity", {
1308
+ geometry: "primitive: box; width: 50; height: 10; depth: 0.1;",
1309
+ position: "-30 28 0",
1310
+ rotation: "45 90 0",
1311
+ material: "color: white"
1312
+ }, /*#__PURE__*/React.createElement("a-text", {
1313
+ color: "black",
1314
+ width: "50",
1315
+ value: showProjection ? 'Press Button X to show help panels' : 'Press Button X to show projection panels',
1316
+ position: "-20 2.8 1"
1317
+ }), /*#__PURE__*/React.createElement("a-text", {
1318
+ color: "black",
1319
+ width: "50",
1320
+ value: "Press Button Y to switch to histogram view",
1321
+ position: "-20 0 1"
1322
+ }), /*#__PURE__*/React.createElement("a-text", {
1323
+ color: "black",
1324
+ width: "50",
1325
+ value: "Press right Trigger to shift panels",
1326
+ position: "-20 -2.8 1"
1327
+ })), /*#__PURE__*/React.createElement("a-box", {
1328
+ scale: "80 50 2",
1329
+ animation__position: "property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",
1330
+ rotation: "-10 -45 0",
1331
+ src: "./ndmvr/oculusControls/oculus.png"
1332
+ }), /*#__PURE__*/React.createElement("a-box", {
1333
+ scale: "80 50 2",
1334
+ animation__position: "property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",
1335
+ rotation: "10 45 0",
1336
+ src: "./ndmvr/oculusControls/oculus2.png"
1337
+ }), /*#__PURE__*/React.createElement("a-box", {
1338
+ scale: "80 50 2",
1339
+ animation__position: "property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",
1340
+ rotation: "10 -45 0",
1341
+ src: "./ndmvr/oculusControls/oculus1.png"
1342
+ }), /*#__PURE__*/React.createElement("a-box", {
1343
+ scale: "80 50 2",
1344
+ animation__position: "property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",
1345
+ rotation: "-10 45 0",
1346
+ src: "./ndmvr/oculusControls/oculus3.png"
1347
+ }));
1348
+ }
1349
+ };
1480
1350
 
1481
- if (keyPressed.C || keyPressed.c) {
1482
- handlePositioning(geoAttributes[2], event);
1483
- }
1351
+ var hideMappingBanner = function hideMappingBanner() {
1352
+ var banner = document.getElementById('th-mapping');
1484
1353
 
1485
- if (keyPressed.Shift) {
1486
- handleChangeHistogramSectionByOwnRange(event);
1487
- }
1354
+ if (banner !== undefined) {
1355
+ banner.setAttribute('material', 'opacity', 0);
1356
+ }
1357
+ };
1488
1358
 
1489
- handleChangeHistogramSectionByDefaultRange(event);
1359
+ var showMappingBanner = function showMappingBanner() {
1360
+ var banner = document.getElementById('th-mapping');
1490
1361
 
1491
- if (event.key === 'q' || event.key === 'Q') {
1492
- cameraService.verticalMoveCamera(true, 0.3);
1493
- }
1362
+ if (banner !== undefined) {
1363
+ banner.setAttribute('material', 'opacity', 1);
1364
+ }
1365
+ };
1494
1366
 
1495
- if (event.key === 'e' || event.key === 'E') {
1496
- cameraService.verticalMoveCamera(false, 0.3);
1497
- }
1367
+ useEffect(function () {
1368
+ subscription = cameraSubject.getCameraSubject().subscribe(handleSubscription);
1369
+ return function () {
1370
+ return subscription.unsubscribe();
1371
+ };
1372
+ }, [show, showProjection, rotation]);
1373
+ useEffect(function () {
1374
+ var camera = document.getElementById('camera');
1498
1375
 
1499
- if (event.key === '1') {
1500
- cameraService.setPredefinedDownPosition();
1501
- }
1376
+ if (!show) {
1377
+ camera.object3D.position.y = 1.6;
1502
1378
 
1503
- if (event.key === '2') {
1504
- cameraService.setPredefinedUpPosition();
1505
- }
1379
+ if (prevPosition !== null) {
1380
+ camera.object3D.position.x = prevPosition.x;
1381
+ camera.object3D.position.z = prevPosition.z;
1382
+ camera.object3D.position.y = prevPosition.y;
1383
+ }
1506
1384
 
1507
- if (event.key === '3') {
1508
- cameraService.setPredefinedRightPosition();
1509
- }
1385
+ showMappingBanner();
1386
+ } else {
1387
+ setPrevPosition({
1388
+ x: camera.object3D.position.x,
1389
+ y: camera.object3D.position.y,
1390
+ z: camera.object3D.position.z
1391
+ });
1392
+ camera.object3D.position.y = camera.object3D.position.y + offset;
1393
+ hideMappingBanner();
1394
+ }
1395
+ }, [show, inputDevice]);
1396
+ useEffect(function () {
1397
+ if (showProjection) {
1398
+ jsrootService.displayImageOfProjection('projectionContainer', 'bannerId_1', '500px', '400px');
1399
+ }
1400
+ }, [showProjection]);
1510
1401
 
1511
- if (event.key === '4') {
1512
- cameraService.setPredefinedLeftPosition();
1513
- }
1402
+ var renderActiveTool = function renderActiveTool() {
1403
+ switch (activeTool) {
1404
+ case 1:
1405
+ activeToolHighlight = '-0.675 -0.825 -1';
1406
+ break;
1514
1407
 
1515
- if (event.key === '5') {
1516
- cameraService.setPredefinedDownPositionWithOffset();
1517
- }
1408
+ case 2:
1409
+ activeToolHighlight = '-0.525 -0.825 -1';
1410
+ break;
1518
1411
 
1519
- if (event.key === '6') {
1520
- cameraService.setPredefinedUpPositionWithOffset();
1521
- }
1412
+ case 3:
1413
+ activeToolHighlight = '-0.375 -0.825 -1';
1414
+ break;
1522
1415
 
1523
- if (event.key === '7') {
1524
- cameraService.setPredefinedRightPositionWithOffset();
1525
- }
1416
+ case 4:
1417
+ activeToolHighlight = '-0.225 -0.825 -1';
1418
+ break;
1526
1419
 
1527
- if (event.key === '8') {
1528
- cameraService.setPredefinedLeftPositionWithOffset();
1529
- }
1420
+ case 5:
1421
+ activeToolHighlight = '-0.075 -0.825 -1';
1422
+ break;
1530
1423
 
1531
- if (event.key === 'Enter') {
1532
- binSubject.saveSelectedBinToLocalStorage();
1533
- ['th-mapping', 'bannerId_1', 'bannerId_2', 'bannerId_3', 'bannerId_4'].forEach(function (targetId) {
1534
- if (document.getElementById(targetId) !== null) {
1535
- jsrootService.displayImageOfProjection('projectionContainer', targetId, '500px', '400px');
1536
- }
1537
- });
1538
- }
1424
+ case 6:
1425
+ activeToolHighlight = '0.075 -0.825 -1';
1426
+ break;
1539
1427
 
1540
- if (event.key === 'r' || event.key === 'R') {
1541
- binSubject.deleteBinFromLocalStorage();
1542
- }
1428
+ case 7:
1429
+ activeToolHighlight = '0.225 -0.825 -1';
1430
+ break;
1543
1431
 
1544
- if (event.key === 'm' || event.key === 'M') {
1545
- histogramTH2Service.changeHistogramFunction('feet', 'TH2');
1546
- }
1432
+ case 8:
1433
+ activeToolHighlight = '0.375 -0.825 -1';
1434
+ break;
1547
1435
 
1548
- if (event.key === 'n' || event.key === 'N') {
1549
- histogramTH2Service.changeHistogramFunction('default', 'TH2');
1550
- }
1436
+ case 9:
1437
+ activeToolHighlight = '0.525 -0.825 -1';
1438
+ break;
1551
1439
 
1552
- if (event.key === 'c' || event.key === 'C') {
1553
- cameraSubject.setUserState();
1554
- }
1440
+ case 0:
1441
+ activeToolHighlight = '0.675 -0.825 -1';
1442
+ break;
1443
+ }
1555
1444
 
1556
- if (event.key === 'v' || event.key === 'V') {
1557
- cameraSubject.setVisibilityOfBanners('keyboard');
1558
- }
1445
+ var tools = ['info', 2, 3, 4, 5, 6, 7, 8, 9, 0];
1446
+ var toolNumXPos = -0.825;
1447
+ return /*#__PURE__*/React.createElement(React.Fragment, null, tools.map(function (tool) {
1448
+ var txt;
1449
+ toolNumXPos = toolNumXPos + 0.15;
1450
+ var txtPos = String(toolNumXPos + ' -0.78' + ' -1');
1451
+ if (tools.indexOf(tool) + 1 === activeTool) txt = String('value: ' + tool + '; color: #0F52BA;width:1.4;align:center');else txt = String('value: ' + tool + '; color: black;width:1;align:center');
1452
+ return /*#__PURE__*/React.createElement("a-entity", {
1453
+ key: tools.indexOf(tool),
1454
+ text: txt,
1455
+ position: txtPos,
1456
+ material: "shader: flat;"
1457
+ });
1458
+ }), /*#__PURE__*/React.createElement("a-entity", {
1459
+ geometry: "primitive: plane; height: 0.007; width: 0.17",
1460
+ position: activeToolHighlight,
1461
+ material: "color: #0F52BA;"
1462
+ }));
1463
+ };
1559
1464
 
1560
- if (event.key === 'x' || event.key === 'X') {
1561
- cameraSubject.shiftBanners();
1562
- }
1563
- };
1465
+ var renderOculusControls = function renderOculusControls() {
1466
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a-entity", {
1467
+ "laser-controls": "hand: right",
1468
+ raycaster: "objects: .clickable; lineOpacity: 0.5; far: 20;"
1469
+ }), /*#__PURE__*/React.createElement("a-entity", {
1470
+ "oculus-touch-controls": "hand: left",
1471
+ "left-controller-logging": true
1472
+ }), /*#__PURE__*/React.createElement("a-entity", {
1473
+ "oculus-touch-controls": "hand: right",
1474
+ "right-controller-logging": true
1475
+ }));
1476
+ };
1564
1477
 
1565
- var keyReleaseHandlerFunction = function keyReleaseHandlerFunction(event) {
1566
- delete keyPressed[event.key];
1478
+ return /*#__PURE__*/React.createElement("a-entity", {
1479
+ id: "cameraWrapper",
1480
+ rotation: "0 -135 0",
1481
+ position: "-7 2 -7"
1482
+ }, show && !showProjection && renderBannersWithControls(), show && showProjection && renderProjectionsBanners(), /*#__PURE__*/React.createElement("a-camera", {
1483
+ id: "camera",
1484
+ "look-control": true,
1485
+ "wasd-controls-enabled": "acceleration:=50"
1486
+ }, /*#__PURE__*/React.createElement("a-entity", {
1487
+ geometry: "primitive: plane; height: 0.2; width: 2",
1488
+ position: "0 -0.825 -1",
1489
+ material: "color: #eee;shader: flat;"
1490
+ }), /*#__PURE__*/React.createElement("a-entity", {
1491
+ geometry: "primitive: plane; height: 0.001; width: 1.75",
1492
+ position: "0 -0.825 -1",
1493
+ material: "color: #aaa;shader: flat;"
1494
+ }), activeTool === 1 && /*#__PURE__*/React.createElement("a-entity", {
1495
+ text: selectedBinData,
1496
+ position: "-0.8 0.7 -1"
1497
+ }), renderActiveTool(), !AFRAME.utils.device.checkHeadsetConnected() && /*#__PURE__*/React.createElement("a-entity", {
1498
+ cursor: "fuse: false; fuseTimeout: 2000;",
1499
+ raycaster: "objects: .clickable; showLine: false; far: 100;",
1500
+ animation__click: "property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",
1501
+ animation__mouseenter: "property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",
1502
+ animation__mouseleave: "property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",
1503
+ line: "color: orange; opacity: 0.5",
1504
+ far: "100",
1505
+ position: "0 0 -1",
1506
+ geometry: "primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",
1507
+ material: "color: white; shader: flat"
1508
+ })), AFRAME.utils.device.checkHeadsetConnected() && renderOculusControls());
1567
1509
  };
1568
1510
 
1569
- var initialKeyboardController = function initialKeyboardController(data, object) {
1570
- aframeObj = object;
1571
- geoAttributes = [data.position, data.scale, data.rotation];
1572
-
1573
- for (var i = 0; i < 3; i++) {
1574
- aframeObj.setAttribute(geoAttributes[i].name, geoAttributes[i].xValue + " " + geoAttributes[i].yValue + " " + geoAttributes[i].zValue);
1511
+ AFRAME$1.registerComponent('binth', {
1512
+ schema: {
1513
+ id: {
1514
+ type: 'string'
1515
+ },
1516
+ typeName: {
1517
+ type: 'string'
1518
+ },
1519
+ content: {
1520
+ "default": 0
1521
+ },
1522
+ absoluteContent: {
1523
+ "default": 0
1524
+ },
1525
+ binName: {
1526
+ "default": ''
1527
+ },
1528
+ xTitle: {
1529
+ type: 'string'
1530
+ },
1531
+ yTitle: {
1532
+ type: 'string'
1533
+ },
1534
+ zTitle: {
1535
+ type: 'string'
1536
+ },
1537
+ xMin: {
1538
+ type: 'number'
1539
+ },
1540
+ yMin: {
1541
+ type: 'number'
1542
+ },
1543
+ zMin: {
1544
+ type: 'number'
1545
+ },
1546
+ xMax: {
1547
+ type: 'number'
1548
+ },
1549
+ yMax: {
1550
+ type: 'number'
1551
+ },
1552
+ zMax: {
1553
+ type: 'number'
1554
+ },
1555
+ xPos: {
1556
+ type: 'number'
1557
+ },
1558
+ yPos: {
1559
+ type: 'number'
1560
+ },
1561
+ zPos: {
1562
+ type: 'number'
1563
+ },
1564
+ xCenter: {
1565
+ type: 'number'
1566
+ },
1567
+ yCenter: {
1568
+ type: 'number'
1569
+ },
1570
+ zCenter: {
1571
+ type: 'number'
1572
+ },
1573
+ xWidth: {
1574
+ type: 'number'
1575
+ },
1576
+ yWidth: {
1577
+ type: 'number'
1578
+ },
1579
+ zWidth: {
1580
+ type: 'number'
1581
+ },
1582
+ color: {
1583
+ type: 'string'
1584
+ },
1585
+ axisX: {
1586
+ type: 'string'
1587
+ },
1588
+ axisY: {
1589
+ type: 'string'
1590
+ },
1591
+ axisZ: {
1592
+ type: 'string'
1593
+ },
1594
+ selectColor: {
1595
+ type: 'string'
1596
+ },
1597
+ markedColor: {
1598
+ type: 'string'
1599
+ }
1600
+ },
1601
+ init: function init() {
1602
+ var el = this.el;
1603
+ el.userData = {
1604
+ typeName: this.data.typeName,
1605
+ id: this.data.id,
1606
+ content: this.data.content,
1607
+ absoluteContent: this.data.absoluteContent,
1608
+ binName: this.data.binName,
1609
+ xTitle: this.data.xTitle,
1610
+ yTitle: this.data.yTitle,
1611
+ zTitle: this.data.zTitle,
1612
+ xMin: this.data.xMin,
1613
+ yMin: this.data.yMin,
1614
+ zMin: this.data.zMin,
1615
+ xMax: this.data.xMax,
1616
+ yMax: this.data.yMax,
1617
+ zMax: this.data.zMax,
1618
+ xPos: this.data.xPos,
1619
+ yPos: this.data.yPos,
1620
+ zPos: this.data.zPos,
1621
+ xCenter: this.data.xCenter,
1622
+ yCenter: this.data.yCenter,
1623
+ zCenter: this.data.zCenter,
1624
+ xWidth: this.data.xWidth,
1625
+ yWidth: this.data.yWidth,
1626
+ zWidth: this.data.zWidth,
1627
+ color: this.data.color,
1628
+ axisX: this.data.axisX,
1629
+ axisY: this.data.axisY,
1630
+ axisZ: this.data.axisZ,
1631
+ selectColor: this.data.selectColor,
1632
+ markedColor: this.data.markedColor
1633
+ };
1634
+ },
1635
+ update: function update() {
1636
+ var el = this.el;
1637
+ el.userData = {
1638
+ typeName: this.data.typeName,
1639
+ id: this.data.id,
1640
+ content: this.data.content,
1641
+ absoluteContent: this.data.absoluteContent,
1642
+ binName: this.data.binName,
1643
+ xTitle: this.data.xTitle,
1644
+ yTitle: this.data.yTitle,
1645
+ zTitle: this.data.zTitle,
1646
+ xMin: this.data.xMin,
1647
+ yMin: this.data.yMin,
1648
+ zMin: this.data.zMin,
1649
+ xMax: this.data.xMax,
1650
+ yMax: this.data.yMax,
1651
+ zMax: this.data.zMax,
1652
+ xPos: this.data.xPos,
1653
+ yPos: this.data.yPos,
1654
+ zPos: this.data.zPos,
1655
+ xCenter: this.data.xCenter,
1656
+ yCenter: this.data.yCenter,
1657
+ zCenter: this.data.zCenter,
1658
+ xWidth: this.data.xWidth,
1659
+ yWidth: this.data.yWidth,
1660
+ zWidth: this.data.zWidth,
1661
+ color: this.data.color,
1662
+ axisX: this.data.axisX,
1663
+ axisY: this.data.axisY,
1664
+ axisZ: this.data.axisZ,
1665
+ selectColor: this.data.selectColor,
1666
+ markedColor: this.data.markedColor
1667
+ };
1575
1668
  }
1576
- };
1577
-
1578
- var keyboardUpdateCameraReference = function keyboardUpdateCameraReference() {
1579
- cameraService = new CameraService();
1580
- };
1669
+ });
1581
1670
 
1582
- AFRAME.registerComponent('histogram-control', {
1671
+ AFRAME$1.registerComponent('histogram-control', {
1583
1672
  schema: {
1584
1673
  position: {
1585
1674
  name: 'position',
@@ -1605,13 +1694,14 @@ AFRAME.registerComponent('histogram-control', {
1605
1694
  initialKeyboardController(this.schema, el);
1606
1695
  document.addEventListener('keydown', keyPressHandlerFunction);
1607
1696
  document.addEventListener('keyup', keyReleaseHandlerFunction);
1697
+ document.addEventListener('wheel', switchDisplayModeOnBin);
1608
1698
  },
1609
1699
  update: function update() {
1610
1700
  keyboardUpdateCameraReference();
1611
1701
  }
1612
1702
  });
1613
1703
 
1614
- AFRAME.registerComponent('label-handler', {
1704
+ AFRAME$1.registerComponent('label-handler', {
1615
1705
  schema: {
1616
1706
  value: {
1617
1707
  type: 'string'
@@ -1924,6 +2014,14 @@ var _zWidth = /*#__PURE__*/_classPrivateFieldLooseKey("zWidth");
1924
2014
 
1925
2015
  var _range = /*#__PURE__*/_classPrivateFieldLooseKey("range");
1926
2016
 
2017
+ var _labels = /*#__PURE__*/_classPrivateFieldLooseKey("labels");
2018
+
2019
+ var _contentScale = /*#__PURE__*/_classPrivateFieldLooseKey("contentScale");
2020
+
2021
+ var _minDisplayedContent = /*#__PURE__*/_classPrivateFieldLooseKey("minDisplayedContent");
2022
+
2023
+ var _binScaleCoef = /*#__PURE__*/_classPrivateFieldLooseKey("binScaleCoef");
2024
+
1927
2025
  var _shift = /*#__PURE__*/_classPrivateFieldLooseKey("shift");
1928
2026
 
1929
2027
  var _previousBins = /*#__PURE__*/_classPrivateFieldLooseKey("previousBins");
@@ -1934,6 +2032,10 @@ var _checkBinState = /*#__PURE__*/_classPrivateFieldLooseKey("checkBinState");
1934
2032
 
1935
2033
  var _createAxisEntity = /*#__PURE__*/_classPrivateFieldLooseKey("createAxisEntity");
1936
2034
 
2035
+ var _createTH3Histogram = /*#__PURE__*/_classPrivateFieldLooseKey("createTH3Histogram");
2036
+
2037
+ var _createTH2Histogram = /*#__PURE__*/_classPrivateFieldLooseKey("createTH2Histogram");
2038
+
1937
2039
  var _optimizeBinContent = /*#__PURE__*/_classPrivateFieldLooseKey("optimizeBinContent");
1938
2040
 
1939
2041
  var _getValidOffset = /*#__PURE__*/_classPrivateFieldLooseKey("getValidOffset");
@@ -2014,7 +2116,27 @@ var HistogramReactFactory = /*#__PURE__*/function () {
2014
2116
  });
2015
2117
  Object.defineProperty(this, _range, {
2016
2118
  writable: true,
2017
- value: 4
2119
+ value: 8
2120
+ });
2121
+ Object.defineProperty(this, _labels, {
2122
+ writable: true,
2123
+ value: {
2124
+ xInitial: 0,
2125
+ yInitial: 0,
2126
+ zInitial: 0
2127
+ }
2128
+ });
2129
+ Object.defineProperty(this, _contentScale, {
2130
+ writable: true,
2131
+ value: 1
2132
+ });
2133
+ Object.defineProperty(this, _minDisplayedContent, {
2134
+ writable: true,
2135
+ value: 0
2136
+ });
2137
+ Object.defineProperty(this, _binScaleCoef, {
2138
+ writable: true,
2139
+ value: 2
2018
2140
  });
2019
2141
  Object.defineProperty(this, _shift, {
2020
2142
  writable: true,
@@ -2070,17 +2192,656 @@ var HistogramReactFactory = /*#__PURE__*/function () {
2070
2192
  Object.defineProperty(this, _createAxisEntity, {
2071
2193
  writable: true,
2072
2194
  value: function value(id, positionX, positionY, positionZ, rotationX, rotationY, rotationZ, width, height, _value, color, fontColor) {
2073
- return /*#__PURE__*/React.createElement("a-entity", {
2195
+ return {
2074
2196
  key: id + _classPrivateFieldLooseBase(_this, _id)[_id],
2075
- geometry: "primitive: plane; width:" + width + "; height:" + height + ";",
2076
- text: "color: " + fontColor + "; width: 4; height:auto; align:center;",
2077
- "label-handler": "value: " + _value + "; delay:" + 500,
2078
- rotation: rotationX + " " + rotationY + " " + rotationZ,
2079
- material: "color: " + color + ";",
2080
- animation: "property: text.width; from: 0; to: 4; dur: 1000;",
2081
- animation__1: "property: material.opacity; from: 0; to: 0.8; dur: 1500;",
2082
- animation__2: "property: position; from: " + (positionX + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset) + " " + (positionY + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset) + " " + (positionZ + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset) + "; to: " + positionX + " " + positionY + " " + positionZ + "; dur: 1005;"
2083
- });
2197
+ geometry: {
2198
+ primitive: 'plane',
2199
+ width: width,
2200
+ height: height
2201
+ },
2202
+ text: {
2203
+ color: fontColor,
2204
+ width: 4,
2205
+ height: 'auto'
2206
+ },
2207
+ labelHandler: {
2208
+ value: _value,
2209
+ delay: 500
2210
+ },
2211
+ rotation: {
2212
+ x: rotationX,
2213
+ y: rotationY,
2214
+ z: rotationZ
2215
+ },
2216
+ material: {
2217
+ color: color
2218
+ },
2219
+ animation: {
2220
+ fromX: positionX + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2221
+ fromY: positionY + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2222
+ fromZ: positionZ + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2223
+ toX: positionX,
2224
+ toY: positionY,
2225
+ toZ: positionZ
2226
+ }
2227
+ };
2228
+ }
2229
+ });
2230
+ Object.defineProperty(this, _createTH3Histogram, {
2231
+ writable: true,
2232
+ value: function value() {
2233
+ _classPrivateFieldLooseBase(_this, _selectedBins$1)[_selectedBins$1] = localStorageService.getBinsFromLocalStorage();
2234
+ var elements = {
2235
+ type: 'TH3',
2236
+ bins: [],
2237
+ labels: [],
2238
+ banners: [],
2239
+ ground: {},
2240
+ titles: [],
2241
+ axisLabels: []
2242
+ };
2243
+ var xcenter, xmin, xmax, xwidth;
2244
+ var ycenter, ymin, ymax, ywidth;
2245
+ var zcenter, zmin, zmax, zwidth;
2246
+ var binName = '';
2247
+ var absoluteContent;
2248
+ var c;
2249
+ var count = 0;
2250
+ var maxXLength = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] : _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _range)[_range];
2251
+ var maxYLength = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] : _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range];
2252
+ var maxZLength = _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _zLimit)[_zLimit] ? _classPrivateFieldLooseBase(_this, _zLimit)[_zLimit] : _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(_this, _range)[_range];
2253
+
2254
+ var xTitle = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fTitle;
2255
+
2256
+ var yTitle = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fTitle;
2257
+
2258
+ var zTitle = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fZaxis.fTitle;
2259
+
2260
+ var xLabels = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fLabels ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fLabels.arr : [];
2261
+ var yLabels = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fLabels ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fLabels.arr : [];
2262
+ var zLabels = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fZaxis.fLabels ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fZaxis.fLabels.arr : [];
2263
+ var currentBinScales = [];
2264
+
2265
+ for (var iz = _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset]; iz <= maxZLength; iz++) {
2266
+ for (var iy = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset]; iy <= maxYLength; iy++) {
2267
+ for (var ix = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset]; ix <= maxXLength; ix++) {
2268
+ xcenter = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.GetBinCenter(ix);
2269
+ xmin = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.GetBinLowEdge(ix);
2270
+ xmax = xcenter + (xcenter - xmin);
2271
+ xwidth = xmax - xmin;
2272
+ ycenter = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.GetBinCenter(iy);
2273
+ ymin = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.GetBinLowEdge(iy);
2274
+ ymax = ycenter + (ycenter - ymin);
2275
+ ywidth = ymax - ymin;
2276
+ zcenter = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fZaxis.GetBinCenter(iz);
2277
+ zmin = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fZaxis.GetBinLowEdge(iz);
2278
+ zmax = zcenter + (zcenter - zmin);
2279
+ zwidth = zmax - zmin;
2280
+ absoluteContent = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].getBinContent(ix, iy, iz);
2281
+ c = _classPrivateFieldLooseBase(_this, _optimizeBinContent)[_optimizeBinContent](absoluteContent, _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fMaximum);
2282
+
2283
+ if (c > _classPrivateFieldLooseBase(_this, _minDisplayedContent)[_minDisplayedContent]) {
2284
+ var size = c;
2285
+ if (c < 0.15) size = 0.15;
2286
+
2287
+ var color = _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getBinColor(c);
2288
+
2289
+ var id = _classPrivateFieldLooseBase(_this, _id)[_id] + xmin + 'th3' + xmax + 'th3' + zmin + 'th3' + zmax + 'th3' + ymin + 'th3' + ymax;
2290
+ var markedColor = void 0;
2291
+
2292
+ if (_classPrivateFieldLooseBase(_this, _checkBinState)[_checkBinState](id)) {
2293
+ markedColor = _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryAccentColor();
2294
+ } else {
2295
+ markedColor = color;
2296
+ }
2297
+
2298
+ var binData = "id: " + id + ";\n typeName: 'TH2'\n content: " + c + ";\n color: " + color + ";\n yTitle: " + yTitle + ";\n xTitle: " + xTitle + ";\n zTitle: " + zTitle + ";\n absoluteContent: " + absoluteContent + ";\n binName: " + binName + ";\n xMin: " + xmin + ";\n yMin: " + ymin + ";\n zMin: " + zmin + ";\n xMax: " + xmax + ";\n yMax: " + ymax + ";\n zMax: " + zmax + ";\n xPos: " + ix + ";\n yPos: " + iy + ";\n zPos: " + iz + ";\n xCenter: " + xcenter + ";\n yCenter: " + ycenter + ";\n zCenter: " + zcenter + ";\n xWidth: " + xwidth + ";\n yWidth: " + ywidth + ";\n zWidth: " + zwidth + ";\n markedColor: " + markedColor + ";\n selectColor: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryAccentColor() + ";\n axisX: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x') + ";\n axisY: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y') + ";\n axisZ: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z');
2299
+
2300
+ var width = size * 0.8;
2301
+ var posX = ix - 1;
2302
+ var posY = iz - 1;
2303
+ var posZ = iy - 1;
2304
+ elements.bins[count] = {
2305
+ id: id,
2306
+ color: color,
2307
+ binData: binData,
2308
+ content: absoluteContent,
2309
+ animation: {
2310
+ fromWidth: _classPrivateFieldLooseBase(_this, _getPreviousBinScales)[_getPreviousBinScales](id),
2311
+ fromHeight: _classPrivateFieldLooseBase(_this, _getPreviousBinScales)[_getPreviousBinScales](id),
2312
+ fromDepth: _classPrivateFieldLooseBase(_this, _getPreviousBinScales)[_getPreviousBinScales](id),
2313
+ toWidth: width,
2314
+ toHeight: width,
2315
+ toDepth: width
2316
+ },
2317
+ animation2: {
2318
+ fromX: posX + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2319
+ fromY: posY + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2320
+ fromZ: posZ + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2321
+ toX: posX,
2322
+ toY: posY,
2323
+ toZ: posZ
2324
+ },
2325
+ animation3: {
2326
+ fromColor: _classPrivateFieldLooseBase(_this, _getPreviousBinColor)[_getPreviousBinColor](id),
2327
+ toColor: markedColor
2328
+ }
2329
+ };
2330
+ currentBinScales[count] = {
2331
+ key: id,
2332
+ scale: width,
2333
+ color: markedColor
2334
+ };
2335
+ }
2336
+
2337
+ count++;
2338
+ }
2339
+ }
2340
+ }
2341
+
2342
+ _classPrivateFieldLooseBase(_this, _previousBins)[_previousBins] = currentBinScales;
2343
+ var normalAxis = [];
2344
+ var reversedAxis = [];
2345
+ count = 0;
2346
+
2347
+ for (var _iz = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset]; _iz <= maxYLength; _iz++) {
2348
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](50000 + count, -2.5 + _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset], _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, _iz - 1, 270, 180, 0, 2, 1, "" + (yLabels[_iz - 1] ? yLabels[_iz - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].yInitial + _iz - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2349
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](55000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, _iz - 1, 270, 360, 0, 2, 1, "" + (yLabels[_iz - 1] ? yLabels[_iz - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].yInitial + _iz - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2350
+ count++;
2351
+ }
2352
+
2353
+ elements.axisLabels[0] = {
2354
+ id: 'leftLabel',
2355
+ key: 6000 + _classPrivateFieldLooseBase(_this, _id)[_id],
2356
+ text: {
2357
+ value: yTitle,
2358
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z')
2359
+ },
2360
+ rotation: {
2361
+ x: 270,
2362
+ y: 270,
2363
+ z: 0
2364
+ },
2365
+ animation: {
2366
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 4 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2367
+ fromY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2368
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2369
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 4,
2370
+ toY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1,
2371
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + 0.5
2372
+ }
2373
+ };
2374
+ elements.axisLabels[1] = {
2375
+ id: 'rightLabel',
2376
+ key: 64001 + _classPrivateFieldLooseBase(_this, _id)[_id],
2377
+ text: {
2378
+ value: yTitle,
2379
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z')
2380
+ },
2381
+ rotation: {
2382
+ x: 270,
2383
+ y: 90,
2384
+ z: 0
2385
+ },
2386
+ animation: {
2387
+ fromX: maxXLength + 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2388
+ fromY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2389
+ fromZ: maxYLength - 2.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2390
+ toX: maxXLength + 2,
2391
+ toY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1,
2392
+ toZ: maxYLength - 2.5
2393
+ }
2394
+ };
2395
+
2396
+ for (var _ix = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset]; _ix <= maxXLength; _ix++) {
2397
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](70000 + count, _ix - 1, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 270, 0, 2, 1, "" + (xLabels[_ix - 1] ? xLabels[_ix - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].xInitial + _ix - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2398
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](75000 + count, _ix - 1, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 90, 0, 2, 1, "" + (xLabels[_ix - 1] ? xLabels[_ix - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].xInitial + _ix - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2399
+ count++;
2400
+ }
2401
+
2402
+ elements.axisLabels[2] = {
2403
+ id: 'downLabel',
2404
+ key: 84002 + _classPrivateFieldLooseBase(_this, _id)[_id],
2405
+ text: {
2406
+ value: xTitle,
2407
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x')
2408
+ },
2409
+ rotation: {
2410
+ x: 270,
2411
+ y: 180,
2412
+ z: 0
2413
+ },
2414
+ animation: {
2415
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2416
+ fromY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2417
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 4 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2418
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset],
2419
+ toY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1,
2420
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 4
2421
+ }
2422
+ };
2423
+ elements.axisLabels[3] = {
2424
+ id: 'upLabel',
2425
+ key: 85003 + _classPrivateFieldLooseBase(_this, _id)[_id],
2426
+ text: {
2427
+ value: xTitle,
2428
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x')
2429
+ },
2430
+ rotation: {
2431
+ x: 270,
2432
+ y: 0,
2433
+ z: 0
2434
+ },
2435
+ animation: {
2436
+ fromX: maxXLength - 2.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2437
+ fromY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2438
+ fromZ: maxYLength + 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2439
+ toX: maxXLength - 2.5,
2440
+ toY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1,
2441
+ toZ: maxYLength + 2
2442
+ }
2443
+ };
2444
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](90000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 360, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].zInitial + _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2445
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](91000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 90, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].zInitial + _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2446
+ count++;
2447
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](92000 + count, _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2.5, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 270, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].zInitial + _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2448
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](93000 + count, _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2.5, _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].zInitial + _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1 + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2449
+ count++;
2450
+ elements.axisLabels[4] = {
2451
+ id: 'upLabel1',
2452
+ key: 95004 + _classPrivateFieldLooseBase(_this, _id)[_id],
2453
+ text: {
2454
+ value: zTitle,
2455
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y')
2456
+ },
2457
+ rotation: {
2458
+ x: 0,
2459
+ y: 270,
2460
+ z: 90
2461
+ },
2462
+ animation: {
2463
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 1.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2464
+ fromY: maxZLength - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2465
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2466
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 1.5,
2467
+ toY: maxZLength - 1,
2468
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2
2469
+ }
2470
+ };
2471
+ elements.axisLabels[5] = {
2472
+ id: 'upLabel2',
2473
+ key: 100005 + _classPrivateFieldLooseBase(_this, _id)[_id],
2474
+ text: {
2475
+ value: zTitle,
2476
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y')
2477
+ },
2478
+ rotation: {
2479
+ x: 0,
2480
+ y: 90,
2481
+ z: 90
2482
+ },
2483
+ animation: {
2484
+ fromX: maxXLength - 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2485
+ fromY: maxZLength - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2486
+ fromZ: maxYLength + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2487
+ toX: maxXLength - 0.5,
2488
+ toY: maxZLength - 1,
2489
+ toZ: maxYLength
2490
+ }
2491
+ };
2492
+ elements.axisLabels[6] = {
2493
+ id: 'upLabel3',
2494
+ key: 105006 + _classPrivateFieldLooseBase(_this, _id)[_id],
2495
+ text: {
2496
+ value: zTitle,
2497
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y')
2498
+ },
2499
+ rotation: {
2500
+ x: 0,
2501
+ y: 360,
2502
+ z: 90
2503
+ },
2504
+ animation: {
2505
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2506
+ fromY: maxZLength - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2507
+ fromZ: maxYLength - 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2508
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2,
2509
+ toY: maxZLength - 1,
2510
+ toZ: maxYLength - 0.5
2511
+ }
2512
+ };
2513
+ elements.axisLabels[7] = {
2514
+ id: 'upLabel4',
2515
+ key: 105007 + _classPrivateFieldLooseBase(_this, _id)[_id],
2516
+ text: {
2517
+ value: zTitle,
2518
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y')
2519
+ },
2520
+ rotation: {
2521
+ x: 0,
2522
+ y: 180,
2523
+ z: 90
2524
+ },
2525
+ animation: {
2526
+ fromX: maxXLength - 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2527
+ fromY: maxZLength - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2528
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 1.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2529
+ toX: maxXLength - 0.5,
2530
+ toY: maxZLength - 1,
2531
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 1.5
2532
+ }
2533
+ };
2534
+ count++;
2535
+ var bannerWidthX = _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] + 1 : _classPrivateFieldLooseBase(_this, _range)[_range];
2536
+ var bannerWidthY = _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] + 1 : _classPrivateFieldLooseBase(_this, _range)[_range];
2537
+ elements.ground = {
2538
+ key: 125000 + count + _classPrivateFieldLooseBase(_this, _id)[_id],
2539
+ scale: {
2540
+ width: bannerWidthX + 8,
2541
+ height: 0.2,
2542
+ depth: bannerWidthY + 8
2543
+ },
2544
+ animation: {
2545
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2546
+ fromY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2547
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2548
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1,
2549
+ toY: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] - 1.5,
2550
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5
2551
+ }
2552
+ };
2553
+ count++;
2554
+ elements.banners[1] = {
2555
+ key: 130000 + count + _classPrivateFieldLooseBase(_this, _id)[_id],
2556
+ id: 'th-mapping',
2557
+ geometry: {
2558
+ width: 1,
2559
+ height: 15,
2560
+ depth: 22
2561
+ },
2562
+ position: {
2563
+ x: maxXLength + 8,
2564
+ y: _classPrivateFieldLooseBase(_this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] / 2 + 0.5,
2565
+ z: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] / 2 + 2.5
2566
+ },
2567
+ material: {
2568
+ color: '#ffffff',
2569
+ transparent: true
2570
+ }
2571
+ };
2572
+ elements.labels = [].concat(normalAxis, reversedAxis);
2573
+ return elements;
2574
+ }
2575
+ });
2576
+ Object.defineProperty(this, _createTH2Histogram, {
2577
+ writable: true,
2578
+ value: function value(projectionFunction) {
2579
+ _classPrivateFieldLooseBase(_this, _selectedBins$1)[_selectedBins$1] = localStorageService.getBinsFromLocalStorage();
2580
+ var elements = {
2581
+ type: 'TH2',
2582
+ bins: [],
2583
+ labels: [],
2584
+ banners: [],
2585
+ ground: {},
2586
+ titles: [],
2587
+ axisLabels: []
2588
+ };
2589
+ var centeredYPosition;
2590
+ var xcenter, xmin, xmax, xwidth;
2591
+ var ycenter, ymin, ymax, ywidth;
2592
+ var c;
2593
+ var binName = '';
2594
+ var absoluteContent;
2595
+ var count = 0;
2596
+ var maxXLength = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fNbins ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fNbins : _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _range)[_range];
2597
+ var maxYLength = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fNbins ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fNbins : _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range];
2598
+ var xTitle = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fTitle !== '' ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fTitle : 'x';
2599
+ var yTitle = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fTitle !== '' ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fTitle : 'y';
2600
+ var xLabels = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fLabels ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.fLabels.arr : [];
2601
+ var yLabels = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fLabels ? _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.fLabels.arr : [];
2602
+ var currentBinScales = [];
2603
+
2604
+ for (var iy = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset]; iy <= maxYLength; iy++) {
2605
+ for (var ix = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset]; ix <= maxXLength; ix++) {
2606
+ xcenter = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.GetBinCenter(ix);
2607
+ xmin = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fXaxis.GetBinLowEdge(ix);
2608
+ xmax = xcenter + (xcenter - xmin);
2609
+ xwidth = xmax - xmin;
2610
+ ycenter = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.GetBinCenter(iy);
2611
+ ymin = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fYaxis.GetBinLowEdge(iy);
2612
+ ymax = ycenter + (ycenter - ymin);
2613
+ ywidth = ymax - ymin;
2614
+ absoluteContent = _classPrivateFieldLooseBase(_this, _histogram)[_histogram].getBinContent(ix, iy);
2615
+ c = _classPrivateFieldLooseBase(_this, _optimizeBinContent)[_optimizeBinContent](absoluteContent, _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fMaximum);
2616
+ centeredYPosition = c * _classPrivateFieldLooseBase(_this, _range)[_range] * _classPrivateFieldLooseBase(_this, _contentScale)[_contentScale] / 16;
2617
+
2618
+ if (c > _classPrivateFieldLooseBase(_this, _minDisplayedContent)[_minDisplayedContent]) {
2619
+ var projectionColor = _classPrivateFieldLooseBase(_this, _projectionFunction)[_projectionFunction](projectionFunction, xmin, ymin);
2620
+
2621
+ var color = projectionColor === '' ? _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getBinColor(c) : projectionColor;
2622
+ var id = _classPrivateFieldLooseBase(_this, _id)[_id] + xmin + 'th2' + xmax + 'th2' + ymin + 'th2' + ymax;
2623
+ var markedColor = void 0;
2624
+
2625
+ if (_classPrivateFieldLooseBase(_this, _checkBinState)[_checkBinState](id)) {
2626
+ markedColor = _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryAccentColor();
2627
+ } else {
2628
+ markedColor = color;
2629
+ }
2630
+
2631
+ var binData = "id: " + id + ";\n typeName: 'TH2'\n content: " + c + ";\n color: " + color + ";\n yTitle: " + yTitle + ";\n xTitle: " + xTitle + ";\n zTitle: 'none';\n absoluteContent: " + absoluteContent + ";\n binName: " + binName + ";\n xMin: " + xmin + ";\n yMin: " + ymin + ";\n zMin: " + 0 + ";\n xMax: " + xmax + ";\n yMax: " + ymax + ";\n zMax: " + 0 + ";\n xPos: " + ix + ";\n yPos: " + iy + ";\n zPos: " + 0 + ";\n xCenter: " + xcenter + ";\n yCenter: " + ycenter + ";\n yCenter: " + 0 + ";\n xWidth: " + xwidth + ";\n yWidth: " + ywidth + ";\n zWidth: " + 0 + ";\n markedColor: " + markedColor + ";\n selectColor: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryAccentColor() + ";\n axisX: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x') + ";\n axisY: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y') + ";\n axisZ: " + _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z');
2632
+
2633
+ var width = xwidth / _classPrivateFieldLooseBase(_this, _xWidth)[_xWidth] / _classPrivateFieldLooseBase(_this, _binScaleCoef)[_binScaleCoef];
2634
+
2635
+ var depth = ywidth / _classPrivateFieldLooseBase(_this, _yWidth)[_yWidth] / _classPrivateFieldLooseBase(_this, _binScaleCoef)[_binScaleCoef];
2636
+
2637
+ var posX = ix - 1;
2638
+ var posY = iy - 1;
2639
+ elements.bins[count] = {
2640
+ id: id,
2641
+ color: color,
2642
+ binData: binData,
2643
+ content: absoluteContent,
2644
+ animation: {
2645
+ fromWidth: width,
2646
+ fromHeight: _classPrivateFieldLooseBase(_this, _getPreviousBinScales)[_getPreviousBinScales](id),
2647
+ fromDepth: depth,
2648
+ toWidth: width,
2649
+ toHeight: c * _classPrivateFieldLooseBase(_this, _range)[_range] * _classPrivateFieldLooseBase(_this, _contentScale)[_contentScale] / 8,
2650
+ toDepth: depth
2651
+ },
2652
+ animation2: {
2653
+ fromX: posX + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2654
+ fromY: centeredYPosition,
2655
+ fromZ: posY + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2656
+ toX: posX,
2657
+ toY: centeredYPosition,
2658
+ toZ: posY
2659
+ },
2660
+ animation3: {
2661
+ fromColor: _classPrivateFieldLooseBase(_this, _getPreviousBinColor)[_getPreviousBinColor](id),
2662
+ toColor: markedColor
2663
+ }
2664
+ };
2665
+ currentBinScales[count] = {
2666
+ key: id,
2667
+ scale: c,
2668
+ color: markedColor
2669
+ };
2670
+ }
2671
+
2672
+ count++;
2673
+ }
2674
+ }
2675
+
2676
+ _classPrivateFieldLooseBase(_this, _previousBins)[_previousBins] = currentBinScales;
2677
+ var normalAxis = [];
2678
+ var reversedAxis = [];
2679
+ count = 0;
2680
+
2681
+ for (var _iy = _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset]; _iy <= maxYLength; _iy++) {
2682
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](1500 + count, _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2.5, 0, _iy - 1, 270, 180, 0, 2, 1, "" + (yLabels[_iy - 1] ? yLabels[_iy - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].yInitial + (_iy - 1) * _classPrivateFieldLooseBase(_this, _yWidth)[_yWidth] + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2683
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](3000 + count, maxXLength + 0.5, 0, _iy - 1, 270, 360, 0, 2, 1, "" + (yLabels[_iy - 1] ? yLabels[_iy - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].yInitial + (_iy - 1) * _classPrivateFieldLooseBase(_this, _yWidth)[_yWidth] + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2684
+ count++;
2685
+ }
2686
+
2687
+ elements.axisLabels[0] = {
2688
+ id: 'leftLabel',
2689
+ key: 4500 + _classPrivateFieldLooseBase(_this, _id)[_id],
2690
+ text: {
2691
+ value: yTitle,
2692
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z')
2693
+ },
2694
+ rotation: {
2695
+ x: 270,
2696
+ y: 270,
2697
+ z: 0
2698
+ },
2699
+ animation: {
2700
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 4 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2701
+ fromY: _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2702
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2703
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 4,
2704
+ toY: 0,
2705
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + 0.5
2706
+ }
2707
+ };
2708
+ elements.axisLabels[1] = {
2709
+ id: 'rightLabel',
2710
+ key: 6001 + _classPrivateFieldLooseBase(_this, _id)[_id],
2711
+ text: {
2712
+ value: yTitle,
2713
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('z')
2714
+ },
2715
+ rotation: {
2716
+ x: 270,
2717
+ y: 90,
2718
+ z: 0
2719
+ },
2720
+ animation: {
2721
+ fromX: maxXLength + 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2722
+ fromY: _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2723
+ fromZ: maxYLength - 2.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2724
+ toX: maxXLength + 2,
2725
+ toY: 0,
2726
+ toZ: maxYLength - 2.5
2727
+ }
2728
+ };
2729
+
2730
+ for (var _ix2 = _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset]; _ix2 <= maxXLength; _ix2++) {
2731
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](7500 + count, _ix2 - 1, 0, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 270, 0, 2, 1, "" + (xLabels[_ix2 - 1] ? xLabels[_ix2 - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].xInitial + (_ix2 - 1) * _classPrivateFieldLooseBase(_this, _xWidth)[_xWidth] + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2732
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](9000 + count, _ix2 - 1, 0, maxYLength + 0.5, 270, 90, 0, 2, 1, "" + (xLabels[_ix2 - 1] ? xLabels[_ix2 - 1].fString : Math.round((_classPrivateFieldLooseBase(_this, _labels)[_labels].xInitial + (_ix2 - 1) * _classPrivateFieldLooseBase(_this, _xWidth)[_xWidth] + Number.EPSILON) * 100) / 100), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2733
+ count++;
2734
+ }
2735
+
2736
+ elements.axisLabels[2] = {
2737
+ id: 'downLabel',
2738
+ key: 10502 + _classPrivateFieldLooseBase(_this, _id)[_id],
2739
+ text: {
2740
+ value: xTitle,
2741
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x')
2742
+ },
2743
+ rotation: {
2744
+ x: 270,
2745
+ y: 180,
2746
+ z: 0
2747
+ },
2748
+ animation: {
2749
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2750
+ fromY: _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2751
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 4 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2752
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset],
2753
+ toY: 0,
2754
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 4
2755
+ }
2756
+ };
2757
+ elements.axisLabels[3] = {
2758
+ id: 'upLabel',
2759
+ key: 12003 + _classPrivateFieldLooseBase(_this, _id)[_id],
2760
+ text: {
2761
+ value: xTitle,
2762
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('x')
2763
+ },
2764
+ rotation: {
2765
+ x: 270,
2766
+ y: 0,
2767
+ z: 0
2768
+ },
2769
+ animation: {
2770
+ fromX: maxXLength - 2.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2771
+ fromY: _classPrivateFieldLooseBase(_this, _shift)[_shift].zOffset,
2772
+ fromZ: maxYLength + 2 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2773
+ toX: maxXLength - 2.5,
2774
+ toY: 0,
2775
+ toZ: maxYLength + 2
2776
+ }
2777
+ };
2778
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](13500 + count, maxXLength + 0.5, 0, maxYLength + 0.5, 270, 360, 0, 2, 2, "0", _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2779
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](15000 + count, maxXLength + 0.5, 0, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2780
+ count++;
2781
+ normalAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](16500 + count, _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2.5, 0, maxYLength + 0.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2782
+ reversedAxis[count] = _classPrivateFieldLooseBase(_this, _createAxisEntity)[_createAxisEntity](18000 + count, _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 2.5, 0, _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2783
+ count++;
2784
+ elements.titles[0] = {
2785
+ key: 195000 + _classPrivateFieldLooseBase(_this, _id)[_id],
2786
+ text: {
2787
+ value: _classPrivateFieldLooseBase(_this, _histogram)[_histogram].fTitle,
2788
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2789
+ },
2790
+ rotation: {
2791
+ x: 0,
2792
+ y: 123,
2793
+ z: 0
2794
+ },
2795
+ position: {
2796
+ x: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] - 90,
2797
+ y: 16.5,
2798
+ z: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + 90
2799
+ },
2800
+ innerText: {
2801
+ value: 'Press V to show projections or controls',
2802
+ color: _classPrivateFieldLooseBase(_this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2803
+ }
2804
+ };
2805
+ count++;
2806
+ var bannerWidthX = _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(_this, _xLimit)[_xLimit] + 1 : _classPrivateFieldLooseBase(_this, _range)[_range];
2807
+ var bannerWidthY = _classPrivateFieldLooseBase(_this, _range)[_range] > _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(_this, _yLimit)[_yLimit] + 1 : _classPrivateFieldLooseBase(_this, _range)[_range];
2808
+ elements.ground = {
2809
+ key: 22500 + count + _classPrivateFieldLooseBase(_this, _id)[_id],
2810
+ scale: {
2811
+ width: bannerWidthX + 8,
2812
+ height: 0.2,
2813
+ depth: bannerWidthY + 8
2814
+ },
2815
+ animation: {
2816
+ fromX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1 + _classPrivateFieldLooseBase(_this, _shift)[_shift].xOffset,
2817
+ fromY: -0.5,
2818
+ fromZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5 + _classPrivateFieldLooseBase(_this, _shift)[_shift].yOffset,
2819
+ toX: _classPrivateFieldLooseBase(_this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1,
2820
+ toY: -0.5,
2821
+ toZ: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5
2822
+ }
2823
+ };
2824
+ count++;
2825
+ elements.banners[1] = {
2826
+ key: 240000 + count + _classPrivateFieldLooseBase(_this, _id)[_id],
2827
+ id: 'th-mapping',
2828
+ geometry: {
2829
+ width: 0.1,
2830
+ height: 15,
2831
+ depth: 22
2832
+ },
2833
+ position: {
2834
+ x: maxXLength + 8,
2835
+ y: 7,
2836
+ z: _classPrivateFieldLooseBase(_this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(_this, _range)[_range] / 2 + 2.5
2837
+ },
2838
+ material: {
2839
+ color: '#ffffff',
2840
+ transparent: true
2841
+ }
2842
+ };
2843
+ elements.labels = [].concat(normalAxis, reversedAxis);
2844
+ return elements;
2084
2845
  }
2085
2846
  });
2086
2847
  Object.defineProperty(this, _optimizeBinContent, {
@@ -2219,534 +2980,100 @@ var HistogramReactFactory = /*#__PURE__*/function () {
2219
2980
  value: function value(id) {
2220
2981
  var previousBin = _classPrivateFieldLooseBase(_this, _previousBins)[_previousBins].filter(function (prevBin) {
2221
2982
  return prevBin.key === id;
2222
- });
2223
-
2224
- if (previousBin[0] && previousBin[0].scale) {
2225
- return previousBin[0].scale;
2226
- }
2227
-
2228
- return 0;
2229
- }
2230
- });
2231
- Object.defineProperty(this, _getPreviousBinColor, {
2232
- writable: true,
2233
- value: function value(id) {
2234
- var previousBin = _classPrivateFieldLooseBase(_this, _previousBins)[_previousBins].filter(function (prevBin) {
2235
- return prevBin.key === id;
2236
- });
2237
-
2238
- if (previousBin[0] && previousBin[0].scale) {
2239
- return previousBin[0].color;
2240
- }
2241
-
2242
- return '#ffffff';
2243
- }
2244
- });
2245
- this.initializeFactory(uniqueName, histogram, section, range, projections, theme);
2246
- }
2247
-
2248
- var _proto = HistogramReactFactory.prototype;
2249
-
2250
- _proto.initializeFactory = function initializeFactory(uniqueName, histogram, section, range, projections, theme) {
2251
- _classPrivateFieldLooseBase(this, _id)[_id] = uniqueName;
2252
- _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider] = new ThemeProvider(theme);
2253
- _classPrivateFieldLooseBase(this, _projections)[_projections] = projections;
2254
- _classPrivateFieldLooseBase(this, _histogram)[_histogram] = histogram;
2255
- _classPrivateFieldLooseBase(this, _type)[_type] = histogram._typename;
2256
- _classPrivateFieldLooseBase(this, _range)[_range] = 8;
2257
- _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] = histogram.fXaxis.fNbins;
2258
- _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] = histogram.fYaxis.fNbins;
2259
- _classPrivateFieldLooseBase(this, _xWidth)[_xWidth] = histogram.fXaxis.fXmax / histogram.fXaxis.fNbins;
2260
- _classPrivateFieldLooseBase(this, _yWidth)[_yWidth] = histogram.fYaxis.fXmax / histogram.fYaxis.fNbins;
2261
-
2262
- if (section !== null && section !== undefined) {
2263
- _classPrivateFieldLooseBase(this, _range)[_range] = section.range;
2264
- if (section.xOffset) _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.xOffset, _classPrivateFieldLooseBase(this, _xLimit)[_xLimit]);
2265
- if (section.yOffset) _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.yOffset, _classPrivateFieldLooseBase(this, _yLimit)[_yLimit]);
2266
- } else {
2267
- if (range) _classPrivateFieldLooseBase(this, _range)[_range] = range;
2268
- }
2269
-
2270
- if (histogram._typename.includes('TH3')) {
2271
- _classPrivateFieldLooseBase(this, _range)[_range] = 4;
2272
- _classPrivateFieldLooseBase(this, _zLimit)[_zLimit] = histogram.fZaxis.fNbins;
2273
- _classPrivateFieldLooseBase(this, _zWidth)[_zWidth] = histogram.fZaxis.fXmax / histogram.fZaxis.fNbins;
2274
-
2275
- if (section !== null && section !== undefined) {
2276
- if (section.zOffset) _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.zOffset, _classPrivateFieldLooseBase(this, _zLimit)[_zLimit]);
2277
- } else {
2278
- if (range) _classPrivateFieldLooseBase(this, _range)[_range] = range;
2279
- }
2280
- }
2281
- };
2282
-
2283
- _proto.createTH3Histogram = function createTH3Histogram() {
2284
- _classPrivateFieldLooseBase(this, _selectedBins$1)[_selectedBins$1] = localStorageService.getBinsFromLocalStorage();
2285
- var elements = {
2286
- bins: [],
2287
- normalAxis: [],
2288
- reversedAxis: [],
2289
- banners: []
2290
- };
2291
- var xcenter, xmin, xmax, xwidth;
2292
- var ycenter, ymin, ymax, ywidth;
2293
- var zcenter, zmin, zmax, zwidth;
2294
- var binName = '';
2295
- var absoluteContent;
2296
- var c;
2297
- var count = 0;
2298
- var maxXLength = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] : _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _range)[_range];
2299
- var maxYLength = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] : _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range];
2300
- var maxZLength = _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _zLimit)[_zLimit] ? _classPrivateFieldLooseBase(this, _zLimit)[_zLimit] : _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(this, _range)[_range];
2301
-
2302
- var xTitle = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fTitle;
2303
-
2304
- var yTitle = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fTitle;
2305
-
2306
- var zTitle = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fZaxis.fTitle;
2307
-
2308
- var xLabels = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fLabels ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fLabels.arr : [];
2309
- var yLabels = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fLabels ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fLabels.arr : [];
2310
- var zLabels = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fZaxis.fLabels ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fZaxis.fLabels.arr : [];
2311
- var currentBinScales = [];
2312
-
2313
- for (var iz = _classPrivateFieldLooseBase(this, _zOffset)[_zOffset]; iz <= maxZLength; iz++) {
2314
- for (var iy = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset]; iy <= maxYLength; iy++) {
2315
- for (var ix = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset]; ix <= maxXLength; ix++) {
2316
- xcenter = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.GetBinCenter(ix);
2317
- xmin = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.GetBinLowEdge(ix);
2318
- xmax = xcenter + (xcenter - xmin);
2319
- xwidth = xmax - xmin;
2320
- ycenter = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.GetBinCenter(iy);
2321
- ymin = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.GetBinLowEdge(iy);
2322
- ymax = ycenter + (ycenter - ymin);
2323
- ywidth = ymax - ymin;
2324
- zcenter = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fZaxis.GetBinCenter(iz);
2325
- zmin = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fZaxis.GetBinLowEdge(iz);
2326
- zmax = zcenter + (zcenter - zmin);
2327
- zwidth = zmax - zmin;
2328
- absoluteContent = _classPrivateFieldLooseBase(this, _histogram)[_histogram].getBinContent(ix, iy, iz);
2329
- c = _classPrivateFieldLooseBase(this, _optimizeBinContent)[_optimizeBinContent](absoluteContent, _classPrivateFieldLooseBase(this, _histogram)[_histogram].fMaximum);
2330
-
2331
- if (c > 0) {
2332
- var size = c;
2333
- if (c < 0.15) size = 0.15;
2334
-
2335
- var color = _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getBinColor(c);
2336
-
2337
- var id = _classPrivateFieldLooseBase(this, _id)[_id] + xmin + 'th3' + xmax + 'th3' + zmin + 'th3' + zmax + 'th3' + ymin + 'th3' + ymax;
2338
- var markedColor = void 0;
2339
-
2340
- if (_classPrivateFieldLooseBase(this, _checkBinState)[_checkBinState](id)) {
2341
- markedColor = _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryAccentColor();
2342
- } else {
2343
- markedColor = color;
2344
- }
2345
-
2346
- var binData = "id: " + id + ";\n content: " + c + ";\n color: " + color + ";\n yTitle: " + yTitle + ";\n xTitle: " + xTitle + ";\n zTitle: " + zTitle + ";\n absoluteContent: " + absoluteContent + ";\n binName: " + binName + ";\n xMin: " + xmin + ";\n yMin: " + ymin + ";\n zMin: " + zmin + ";\n xMax: " + xmax + ";\n yMax: " + ymax + ";\n zMax: " + zmax + ";\n xCenter: " + xcenter + ";\n yCenter: " + ycenter + ";\n zCenter: " + zcenter + ";\n xWidth: " + xwidth + ";\n yWidth: " + ywidth + ";\n zWidth: " + zwidth + ";\n markedColor: " + markedColor + ";\n selectColor: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryAccentColor() + ";\n axisX: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + ";\n axisY: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + ";\n axisZ: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z');
2347
-
2348
- var width = size * 0.9;
2349
-
2350
- var posX = xmin / _classPrivateFieldLooseBase(this, _xWidth)[_xWidth];
2351
-
2352
- var posY = zmin / _classPrivateFieldLooseBase(this, _zWidth)[_zWidth] + 0.2;
2353
-
2354
- var posZ = ymin / _classPrivateFieldLooseBase(this, _yWidth)[_yWidth];
2355
-
2356
- elements.bins[count] = /*#__PURE__*/React.createElement("a-box", {
2357
- key: count,
2358
- "class": "clickable",
2359
- material: "color: " + markedColor + ";",
2360
- binth3: binData,
2361
- mouseevent: true,
2362
- animation: "property: scale; from: " + _classPrivateFieldLooseBase(this, _getPreviousBinScales)[_getPreviousBinScales](id) + " " + _classPrivateFieldLooseBase(this, _getPreviousBinScales)[_getPreviousBinScales](id) + " " + _classPrivateFieldLooseBase(this, _getPreviousBinScales)[_getPreviousBinScales](id) + "; to: " + width + " " + width + " " + width + "; dur: 1500; easing: linear;",
2363
- animation__1: "property: material.opacity; from: 0; to: 0.75; dur: 2600;",
2364
- animation__2: "property: position; from: " + (posX + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (posY + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (posZ + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + posX + " " + posY + " " + posZ + "; dur: 1000;",
2365
- animation__3: "property: material.color; from: " + _classPrivateFieldLooseBase(this, _getPreviousBinColor)[_getPreviousBinColor](id) + "; to: " + markedColor + "; dur: 2600;"
2366
- });
2367
- currentBinScales[count] = {
2368
- key: id,
2369
- scale: width,
2370
- color: markedColor
2371
- };
2372
- }
2373
-
2374
- count++;
2375
- }
2376
- }
2377
- }
2378
-
2379
- _classPrivateFieldLooseBase(this, _previousBins)[_previousBins] = currentBinScales;
2380
- count = 0;
2381
-
2382
- for (var _iz = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset]; _iz <= maxYLength; _iz++) {
2383
- var normalAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](50000 + count, -2.5 + _classPrivateFieldLooseBase(this, _xOffset)[_xOffset], _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, _iz - 1, 270, 180, 0, 2, 1, "" + (yLabels[_iz - 1] ? yLabels[_iz - 1].fString : _iz - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2384
-
2385
- var reversedAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](55000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, _iz - 1, 270, 360, 0, 2, 1, "" + (yLabels[_iz - 1] ? yLabels[_iz - 1].fString : _iz - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2386
-
2387
- elements.normalAxis[count] = normalAxis;
2388
- elements.reversedAxis[count] = reversedAxis;
2389
- count++;
2390
- }
2391
-
2392
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2393
- id: "leftLabel",
2394
- key: 60000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2395
- geometry: "primitive: plane; width:4; height:1;",
2396
- text: "value: " + yTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z') + "; width: 10; height:auto; align:center;",
2397
- rotation: 270 + " " + 270 + " " + 0,
2398
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 4 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 4) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 0.5) + "; dur: 1000;",
2399
- material: "opacity: 0;"
2400
- });
2401
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2402
- id: "rightLabel",
2403
- key: 65000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2404
- geometry: "primitive: plane; width:4; height:1;",
2405
- text: "value: " + yTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z') + "; width: 10; height:auto; align:center;",
2406
- rotation: 270 + " " + 90 + " " + 0,
2407
- animation: "property: position; from: " + (maxXLength + 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (maxYLength - 2.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength + 2) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1) + " " + (maxYLength - 2.5) + "; dur: 1000;",
2408
- material: "opacity: 0;"
2409
- });
2410
- count++;
2411
-
2412
- for (var _ix = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset]; _ix <= maxXLength; _ix++) {
2413
- var _normalAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](70000 + count, _ix - 1, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 270, 0, 2, 1, "" + (xLabels[_ix - 1] ? xLabels[_ix - 1].fString : _ix - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2414
-
2415
- var _reversedAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](75000 + count, _ix - 1, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 90, 0, 2, 1, "" + (xLabels[_ix - 1] ? xLabels[_ix - 1].fString : _ix - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2416
-
2417
- elements.normalAxis[count] = _normalAxis;
2418
- elements.reversedAxis[count] = _reversedAxis;
2419
- count++;
2420
- }
2421
-
2422
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2423
- id: "downLabel",
2424
- key: 80000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2425
- geometry: "primitive: plane; width:4; height:1;",
2426
- text: "value: " + xTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + "; width: 10; height:auto; align:center;",
2427
- rotation: 270 + " " + 180 + " " + 0,
2428
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 4 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 4) + "; dur: 1000;",
2429
- material: "opacity: 0;"
2430
- });
2431
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2432
- id: "upLabel",
2433
- key: 85000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2434
- geometry: "primitive: plane; width:4; height:1;",
2435
- text: "value: " + xTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + "; width: 10; height:auto; align:center;",
2436
- rotation: 270 + " " + 0 + " " + 0,
2437
- animation: "property: position; from: " + (maxXLength - 2.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (maxYLength + 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength - 2.5) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1) + " " + (maxYLength + 2) + "; dur: 1000;",
2438
- material: "opacity: 0;"
2439
- });
2440
- count++;
2441
- elements.normalAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](90000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 360, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1].fString : _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2442
- elements.reversedAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](91000 + count, maxXLength + 0.5, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 90, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1].fString : _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2443
- count++;
2444
- elements.normalAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](92000 + count, _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2.5, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, maxYLength + 0.5, 270, 270, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1].fString : _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2445
- elements.reversedAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](93000 + count, _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2.5, _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "" + (zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1] ? zLabels[_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1].fString : _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2446
- count++;
2447
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2448
- key: 95000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2449
- text: "value: " + zTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + "; width: 10; height:auto; align:center;",
2450
- rotation: 0 + " " + 270 + " " + 90,
2451
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 1.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (maxZLength - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 1.5) + " " + (maxZLength - 1) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2) + "; dur: 1000;",
2452
- material: "opacity: 0;"
2453
- });
2454
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2455
- key: 100000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2456
- text: "value: " + zTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + "; width: 10; height:auto; align:center;",
2457
- rotation: 0 + " " + 90 + " " + 90,
2458
- animation: "property: position; from: " + (maxXLength - 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (maxZLength - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (maxYLength + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength - 0.5) + " " + (maxZLength - 1) + " " + maxYLength + "; dur: 1000;",
2459
- material: "opacity: 0;"
2460
- });
2461
- count++;
2462
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2463
- key: 105000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2464
- text: "value: " + zTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + "; width: 10; height:auto; align:center;",
2465
- rotation: 0 + " " + 360 + " " + 90,
2466
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (maxZLength - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (maxYLength - 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2) + " " + (maxZLength - 1) + " " + (maxYLength - 0.5) + "; dur: 1000;",
2467
- material: "opacity: 0;"
2468
- });
2469
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2470
- key: 110000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2471
- text: "value: " + zTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + "; width: 10; height:auto; align:center;",
2472
- rotation: 0 + " " + 180 + " " + 90,
2473
- animation: "property: position; from: " + (maxXLength - 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (maxZLength - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 1.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength - 0.5) + " " + (maxZLength - 1) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 1.5) + "; dur: 1000;",
2474
- material: "opacity: 0;"
2475
- });
2476
- count++;
2477
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2478
- key: 115000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2479
- text: "value: " + _classPrivateFieldLooseBase(this, _histogram)[_histogram].fTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor() + "; width: 270; height:auto; align:center;",
2480
- rotation: 0 + " " + 123 + " " + 0,
2481
- position: _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 90 + " " + (maxZLength + 16.5) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 90)
2482
- }, /*#__PURE__*/React.createElement("a-text", {
2483
- value: "Press V to show projections or controls",
2484
- position: "0 10 0",
2485
- width: "150",
2486
- height: "auto",
2487
- align: "center",
2488
- color: _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2489
- }), /*#__PURE__*/React.createElement("a-entity", {
2490
- geometry: "primitive: plane; width:170; height:30;",
2491
- position: "0 0 -1",
2492
- material: "opacity: 0.9; color: white;"
2493
- }));
2494
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2495
- key: 120000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2496
- text: "value: " + _classPrivateFieldLooseBase(this, _histogram)[_histogram].fName + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor() + "; width: 230; height:auto; align:center;",
2497
- rotation: 0 + " " + 330 + " " + 0,
2498
- position: _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + 120 + " " + (maxZLength + 16.5) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 70)
2499
- }, /*#__PURE__*/React.createElement("a-text", {
2500
- value: "Press buttonY to show projections or controls",
2501
- position: "0 10 0",
2502
- width: "150",
2503
- height: "auto",
2504
- align: "center",
2505
- color: _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2506
- }), /*#__PURE__*/React.createElement("a-entity", {
2507
- geometry: "primitive: plane; width:170; height:30;",
2508
- position: "0 0 -1",
2509
- material: "opacity: 0.9; color: white;"
2510
- }));
2511
- count++;
2512
- var bannerWidthX = _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] + 1 : _classPrivateFieldLooseBase(this, _range)[_range];
2513
- var bannerWidthY = _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] + 1 : _classPrivateFieldLooseBase(this, _range)[_range];
2514
- elements.banners[0] = /*#__PURE__*/React.createElement("a-box", {
2515
- key: 125000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2516
- width: bannerWidthX + 8,
2517
- material: "color: #171717",
2518
- height: 0.2,
2519
- depth: bannerWidthY + 8,
2520
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset) + "\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + ";\n to: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1) + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] - 1.5) + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5) + "dur: 1100;"
2521
- });
2522
- count++;
2523
- elements.banners[1] = /*#__PURE__*/React.createElement("a-box", {
2524
- key: 130000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2525
- id: "th-mapping",
2526
- geometry: "width:1; height:15; depth:22;",
2527
- position: maxXLength + 8 + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 0.5) + "\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 2.5),
2528
- material: "transparent:true"
2983
+ });
2984
+
2985
+ if (previousBin[0] && previousBin[0].scale) {
2986
+ return previousBin[0].scale;
2987
+ }
2988
+
2989
+ return 0;
2990
+ }
2529
2991
  });
2530
- count++;
2531
- elements.banners[2] = /*#__PURE__*/React.createElement("a-box", {
2532
- key: 135000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2533
- id: "th-background",
2534
- geometry: "width:0.2; height:15; depth:24;",
2535
- position: maxXLength + 8.2 + " " + (_classPrivateFieldLooseBase(this, _zOffset)[_zOffset] + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 0.5) + "\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 1 + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 1.5),
2536
- material: "color: white, transparent:false"
2992
+ Object.defineProperty(this, _getPreviousBinColor, {
2993
+ writable: true,
2994
+ value: function value(id) {
2995
+ var previousBin = _classPrivateFieldLooseBase(_this, _previousBins)[_previousBins].filter(function (prevBin) {
2996
+ return prevBin.key === id;
2997
+ });
2998
+
2999
+ if (previousBin[0] && previousBin[0].scale) {
3000
+ return previousBin[0].color;
3001
+ }
3002
+
3003
+ return '#ffffff';
3004
+ }
2537
3005
  });
2538
- return elements;
3006
+ this.initializeFactory(uniqueName, histogram, section, range, projections, theme);
3007
+ }
3008
+
3009
+ var _proto = HistogramReactFactory.prototype;
3010
+
3011
+ _proto.initializeFactory = function initializeFactory(uniqueName, histogram, section, range, projections, theme) {
3012
+ this.setUniqueName(uniqueName);
3013
+ this.setTheme(theme);
3014
+ this.setHistogram(histogram, projections);
3015
+ this.setSection(section);
3016
+ this.setRange(range);
2539
3017
  };
2540
3018
 
2541
- _proto.createTH2Histogram = function createTH2Histogram(projectionFunction) {
2542
- _classPrivateFieldLooseBase(this, _selectedBins$1)[_selectedBins$1] = localStorageService.getBinsFromLocalStorage();
2543
- var elements = {
2544
- bins: [],
2545
- normalAxis: [],
2546
- reversedAxis: [],
2547
- banners: []
2548
- };
2549
- var centeredYPosition;
2550
- var xcenter, xmin, xmax, xwidth;
2551
- var ycenter, ymin, ymax, ywidth;
2552
- var c;
2553
- var binName = '';
2554
- var absoluteContent;
2555
- var count = 0;
2556
- var maxXLength = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fNbins ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fNbins : _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _range)[_range];
2557
- var maxYLength = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fNbins ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fNbins : _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range];
2558
- var xTitle = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fTitle !== '' ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fTitle : 'x';
2559
- var yTitle = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fTitle !== '' ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fTitle : 'y';
2560
- var xLabels = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fLabels ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.fLabels.arr : [];
2561
- var yLabels = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fLabels ? _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.fLabels.arr : [];
2562
- var currentBinScales = [];
2563
-
2564
- for (var iy = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset]; iy <= maxYLength; iy++) {
2565
- for (var ix = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset]; ix <= maxXLength; ix++) {
2566
- xcenter = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.GetBinCenter(ix);
2567
- xmin = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fXaxis.GetBinLowEdge(ix);
2568
- xmax = xcenter + (xcenter - xmin);
2569
- xwidth = xmax - xmin;
2570
- ycenter = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.GetBinCenter(iy);
2571
- ymin = _classPrivateFieldLooseBase(this, _histogram)[_histogram].fYaxis.GetBinLowEdge(iy);
2572
- ymax = ycenter + (ycenter - ymin);
2573
- ywidth = ymax - ymin;
2574
- absoluteContent = _classPrivateFieldLooseBase(this, _histogram)[_histogram].getBinContent(ix, iy);
2575
- c = _classPrivateFieldLooseBase(this, _optimizeBinContent)[_optimizeBinContent](absoluteContent, _classPrivateFieldLooseBase(this, _histogram)[_histogram].fMaximum);
2576
- centeredYPosition = c / 2;
2577
-
2578
- if (c > 0) {
2579
- var projectionColor = _classPrivateFieldLooseBase(this, _projectionFunction)[_projectionFunction](projectionFunction, xmin, ymin);
2580
-
2581
- var color = projectionColor === '' ? _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getBinColor(c) : projectionColor;
2582
- var id = _classPrivateFieldLooseBase(this, _id)[_id] + xmin + 'th2' + xmax + 'th2' + ymin + 'th2' + ymax;
2583
- var markedColor = void 0;
2584
-
2585
- if (_classPrivateFieldLooseBase(this, _checkBinState)[_checkBinState](id)) {
2586
- markedColor = _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryAccentColor();
2587
- } else {
2588
- markedColor = color;
2589
- }
3019
+ _proto.setUniqueName = function setUniqueName(uniqueName) {
3020
+ _classPrivateFieldLooseBase(this, _id)[_id] = uniqueName;
3021
+ };
2590
3022
 
2591
- var binData = "id: " + id + ";\n content: " + c + ";\n color: " + color + ";\n yTitle: " + yTitle + ";\n xTitle: " + xTitle + ";\n absoluteContent: " + absoluteContent + ";\n binName: " + binName + ";\n xMin: " + xmin + ";\n yMin: " + ymin + ";\n xMax: " + xmax + ";\n yMax: " + ymax + ";\n xCenter: " + xcenter + ";\n yCenter: " + ycenter + ";\n xWidth: " + xwidth + ";\n yWidth: " + ywidth + ";\n markedColor: " + markedColor + ";\n selectColor: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryAccentColor() + ";\n axisX: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + ";\n axisY: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y') + ";\n axisZ: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z');
2592
-
2593
- var width = xwidth / _classPrivateFieldLooseBase(this, _xWidth)[_xWidth] / 4;
2594
- var depth = ywidth / _classPrivateFieldLooseBase(this, _yWidth)[_yWidth] / 4;
2595
-
2596
- var posX = xmin / _classPrivateFieldLooseBase(this, _xWidth)[_xWidth];
2597
-
2598
- var posY = ymin / _classPrivateFieldLooseBase(this, _yWidth)[_yWidth];
2599
-
2600
- elements.bins[count] = /*#__PURE__*/React.createElement("a-box", {
2601
- key: id,
2602
- "class": "clickable",
2603
- material: "color: " + markedColor + "; opacity: 0.75;",
2604
- binth2: binData,
2605
- mouseevent: true,
2606
- animation: "property: scale; from: " + width + " " + _classPrivateFieldLooseBase(this, _getPreviousBinScales)[_getPreviousBinScales](id) + " " + depth + "; to: " + width + " " + c + " " + depth + "; delay:100; dur: 1500; easing: linear;",
2607
- animation__1: "property: material.opacity; from: 0; to: 0.75; dur: 2000;",
2608
- animation__2: "property: position; from: " + (posX + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + centeredYPosition + " " + (posY + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + posX + " " + centeredYPosition + " " + posY + "; dur: 1000;"
2609
- });
2610
- currentBinScales[count] = {
2611
- key: id,
2612
- scale: c,
2613
- color: markedColor
2614
- };
2615
- }
3023
+ _proto.setSection = function setSection(section) {
3024
+ if (section !== null && section !== undefined) {
3025
+ if (section.xOffset) _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.xOffset, _classPrivateFieldLooseBase(this, _xLimit)[_xLimit]);
3026
+ if (section.yOffset) _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.yOffset, _classPrivateFieldLooseBase(this, _yLimit)[_yLimit]);
3027
+ }
2616
3028
 
2617
- count++;
3029
+ if (_classPrivateFieldLooseBase(this, _histogram)[_histogram]._typename.includes('TH3')) {
3030
+ if (section !== null && section !== undefined) {
3031
+ if (section.zOffset) _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](section.zOffset, _classPrivateFieldLooseBase(this, _zLimit)[_zLimit]);
2618
3032
  }
2619
3033
  }
3034
+ };
2620
3035
 
2621
- _classPrivateFieldLooseBase(this, _previousBins)[_previousBins] = currentBinScales;
2622
- count = 0;
2623
-
2624
- for (var _iy = _classPrivateFieldLooseBase(this, _yOffset)[_yOffset]; _iy <= maxYLength; _iy++) {
2625
- var normalAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](1500 + count, _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2.5, 0, _iy - 1, 270, 180, 0, 2, 1, "" + (yLabels[_iy - 1] ? yLabels[_iy - 1].fString : (_iy - 1) * _classPrivateFieldLooseBase(this, _yWidth)[_yWidth]), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2626
-
2627
- var reversedAxis = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](3000 + count, maxXLength + 0.5, 0, _iy - 1, 270, 360, 0, 2, 1, "" + (yLabels[_iy - 1] ? yLabels[_iy - 1].fString : (_iy - 1) * _classPrivateFieldLooseBase(this, _yWidth)[_yWidth]), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
3036
+ _proto.setHistogram = function setHistogram(histogram, projections) {
3037
+ _classPrivateFieldLooseBase(this, _projections)[_projections] = projections;
3038
+ _classPrivateFieldLooseBase(this, _histogram)[_histogram] = histogram;
3039
+ _classPrivateFieldLooseBase(this, _type)[_type] = histogram._typename;
3040
+ _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] = histogram.fXaxis.fNbins;
3041
+ _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] = histogram.fYaxis.fNbins;
3042
+ _classPrivateFieldLooseBase(this, _xWidth)[_xWidth] = (histogram.fXaxis.fXmax - histogram.fXaxis.fXmin) / histogram.fXaxis.fNbins;
3043
+ _classPrivateFieldLooseBase(this, _yWidth)[_yWidth] = (histogram.fYaxis.fXmax - histogram.fYaxis.fXmin) / histogram.fYaxis.fNbins;
3044
+ _classPrivateFieldLooseBase(this, _labels)[_labels].xInitial = histogram.fXaxis.fXmin;
3045
+ _classPrivateFieldLooseBase(this, _labels)[_labels].yInitial = histogram.fYaxis.fXmin;
3046
+ _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](_classPrivateFieldLooseBase(this, _xOffset)[_xOffset], _classPrivateFieldLooseBase(this, _xLimit)[_xLimit]);
3047
+ _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](_classPrivateFieldLooseBase(this, _yOffset)[_yOffset], _classPrivateFieldLooseBase(this, _yLimit)[_yLimit]);
2628
3048
 
2629
- elements.normalAxis[count] = normalAxis;
2630
- elements.reversedAxis[count] = reversedAxis;
2631
- count++;
3049
+ if (histogram._typename.includes('TH3')) {
3050
+ _classPrivateFieldLooseBase(this, _zLimit)[_zLimit] = histogram.fZaxis.fNbins;
3051
+ _classPrivateFieldLooseBase(this, _zWidth)[_zWidth] = histogram.fZaxis.fXmax / histogram.fZaxis.fNbins;
3052
+ _classPrivateFieldLooseBase(this, _labels)[_labels].zInitial = histogram.fZaxis.fXmin;
3053
+ _classPrivateFieldLooseBase(this, _zOffset)[_zOffset] = _classPrivateFieldLooseBase(this, _checkOffsetValue)[_checkOffsetValue](_classPrivateFieldLooseBase(this, _zOffset)[_zOffset], _classPrivateFieldLooseBase(this, _zLimit)[_zLimit]);
2632
3054
  }
3055
+ };
2633
3056
 
2634
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2635
- id: "leftLabel",
2636
- key: 4500 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2637
- geometry: "primitive: plane; width:4; height:1;",
2638
- text: "value: " + yTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z') + "; width: 10; height:auto; align:center;",
2639
- rotation: 270 + " " + 270 + " " + 0,
2640
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 4 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 4) + " " + 0 + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 0.5) + "; dur: 1000;",
2641
- material: "opacity: 0;"
2642
- });
2643
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2644
- id: "rightLabel",
2645
- key: 6000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2646
- geometry: "primitive: plane; width:4; height:1;",
2647
- text: "value: " + yTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('z') + "; width: 10; height:auto; align:center;",
2648
- rotation: 270 + " " + 90 + " " + 0,
2649
- animation: "property: position; from: " + (maxXLength + 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset + " " + (maxYLength - 2.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength + 2) + " " + 0 + " " + (maxYLength - 2.5) + "; dur: 1000;",
2650
- material: "opacity: 0;"
2651
- });
2652
- count++;
3057
+ _proto.setRange = function setRange(range) {
3058
+ if (range) {
3059
+ if (range < 4) _classPrivateFieldLooseBase(this, _range)[_range] = 4;
3060
+ _classPrivateFieldLooseBase(this, _range)[_range] = range;
3061
+ }
3062
+ };
2653
3063
 
2654
- for (var _ix2 = _classPrivateFieldLooseBase(this, _xOffset)[_xOffset]; _ix2 <= maxXLength; _ix2++) {
2655
- var _normalAxis2 = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](7500 + count, _ix2 - 1, 0, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 270, 0, 2, 1, "" + (xLabels[_ix2 - 1] ? xLabels[_ix2 - 1].fString : (_ix2 - 1) * _classPrivateFieldLooseBase(this, _xWidth)[_xWidth]), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
3064
+ _proto.setTheme = function setTheme(theme) {
3065
+ _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider] = new ThemeProvider(theme);
3066
+ };
2656
3067
 
2657
- var _reversedAxis2 = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](9000 + count, _ix2 - 1, 0, maxYLength + 0.5, 270, 90, 0, 2, 1, "" + (xLabels[_ix2 - 1] ? xLabels[_ix2 - 1].fString : (_ix2 - 1) * _classPrivateFieldLooseBase(this, _xWidth)[_xWidth]), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
3068
+ _proto.getElements = function getElements(projectionFunction) {
3069
+ var elements = {};
2658
3070
 
2659
- elements.normalAxis[count] = _normalAxis2;
2660
- elements.reversedAxis[count] = _reversedAxis2;
2661
- count++;
3071
+ if (_classPrivateFieldLooseBase(this, _type)[_type].includes('TH2')) {
3072
+ elements = _classPrivateFieldLooseBase(this, _createTH2Histogram)[_createTH2Histogram](projectionFunction);
3073
+ } else if (_classPrivateFieldLooseBase(this, _type)[_type].includes('TH3')) {
3074
+ elements = _classPrivateFieldLooseBase(this, _createTH3Histogram)[_createTH3Histogram]();
2662
3075
  }
2663
3076
 
2664
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2665
- id: "downLabel",
2666
- key: 10500 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2667
- geometry: "primitive: plane; width:4; height:1;",
2668
- text: "value: " + xTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + "; width: 10; height:auto; align:center;",
2669
- rotation: 270 + " " + 180 + " " + 0,
2670
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 4 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + " " + 0 + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 4) + "; dur: 1000;",
2671
- material: "opacity: 0;"
2672
- });
2673
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2674
- id: "upLabel",
2675
- key: 12000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2676
- geometry: "primitive: plane; width:4; height:1;",
2677
- text: "value: " + xTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('x') + "; width: 10; height:auto; align:center;",
2678
- rotation: 270 + " " + 0 + " " + 0,
2679
- animation: "property: position; from: " + (maxXLength - 2.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + " " + _classPrivateFieldLooseBase(this, _shift)[_shift].zOffset + " " + (maxYLength + 2 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + "; to: " + (maxXLength - 2.5) + " " + 0 + " " + (maxYLength + 2) + "; dur: 1000;",
2680
- material: "opacity: 0;"
2681
- });
2682
- count++;
2683
- elements.normalAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](13500 + count, maxXLength + 0.5, 0, maxYLength + 0.5, 270, 360, 0, 2, 2, "0", _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2684
- elements.reversedAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](15000 + count, maxXLength + 0.5, 0, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2685
- count++;
2686
- elements.normalAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](16500 + count, _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2.5, 0, maxYLength + 0.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2687
- elements.reversedAxis[count] = _classPrivateFieldLooseBase(this, _createAxisEntity)[_createAxisEntity](18000 + count, _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 2.5, 0, _classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 2.5, 270, 180, 0, 2, 2, "0", _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getAxisColor('y'), _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getSecondaryFontColor());
2688
- count++;
2689
- elements.normalAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2690
- key: 19500 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2691
- text: "value: " + _classPrivateFieldLooseBase(this, _histogram)[_histogram].fTitle + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor() + "; width: 270; height:auto; align:center;",
2692
- rotation: 0 + " " + 123 + " " + 0,
2693
- position: _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] - 90 + " " + 16.5 + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 90)
2694
- }, /*#__PURE__*/React.createElement("a-text", {
2695
- value: "Press V to show projections or controls",
2696
- position: "0 10 0",
2697
- width: "150",
2698
- height: "auto",
2699
- align: "center",
2700
- color: _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2701
- }), /*#__PURE__*/React.createElement("a-entity", {
2702
- geometry: "primitive: plane; width:170; height:30;",
2703
- position: "0 0 -1",
2704
- material: "opacity: 0.9; color: white;"
2705
- }));
2706
- elements.reversedAxis[count] = /*#__PURE__*/React.createElement("a-entity", {
2707
- key: 21000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2708
- text: "value: " + _classPrivateFieldLooseBase(this, _histogram)[_histogram].fName + "; color: " + _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor() + "; width: 230; height:auto; align:center;",
2709
- rotation: 0 + " " + 330 + " " + 0,
2710
- position: _classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + 120 + " " + 16.5 + " " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] - 70)
2711
- }, /*#__PURE__*/React.createElement("a-text", {
2712
- value: "Press buttonY to show projections or controls",
2713
- position: "0 10 0",
2714
- width: "150",
2715
- height: "auto",
2716
- align: "center",
2717
- color: _classPrivateFieldLooseBase(this, _themeProvider)[_themeProvider].getPrimaryFontColor()
2718
- }), /*#__PURE__*/React.createElement("a-entity", {
2719
- geometry: "primitive: plane; width:170; height:30;",
2720
- position: "0 0 -1",
2721
- material: "opacity: 0.9; color: white;"
2722
- }));
2723
- count++;
2724
- var bannerWidthX = _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] ? _classPrivateFieldLooseBase(this, _xLimit)[_xLimit] + 1 : _classPrivateFieldLooseBase(this, _range)[_range];
2725
- var bannerWidthY = _classPrivateFieldLooseBase(this, _range)[_range] > _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] ? _classPrivateFieldLooseBase(this, _yLimit)[_yLimit] + 1 : _classPrivateFieldLooseBase(this, _range)[_range];
2726
- elements.banners[0] = /*#__PURE__*/React.createElement("a-box", {
2727
- key: 22500 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2728
- width: bannerWidthX + 8,
2729
- material: "color: #171717",
2730
- height: 0.2,
2731
- depth: bannerWidthY + 8,
2732
- animation: "property: position; from: " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1 + _classPrivateFieldLooseBase(this, _shift)[_shift].xOffset) + "\n -0.5\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5 + _classPrivateFieldLooseBase(this, _shift)[_shift].yOffset) + ";\n to:\n " + (_classPrivateFieldLooseBase(this, _xOffset)[_xOffset] + bannerWidthX * 0.5 - 1) + " -0.5 " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + bannerWidthY * 0.5 - 0.5) + "; dur: 1000;"
2733
- });
2734
- count++;
2735
- elements.banners[1] = /*#__PURE__*/React.createElement("a-box", {
2736
- key: 24000 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2737
- id: "th-mapping",
2738
- geometry: "width:0.1; height:15; depth:22;",
2739
- position: maxXLength + 8 + " 7\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 2.5),
2740
- material: "transparent:true"
2741
- });
2742
- count++;
2743
- elements.banners[2] = /*#__PURE__*/React.createElement("a-box", {
2744
- key: 25500 + count + _classPrivateFieldLooseBase(this, _id)[_id],
2745
- id: "th-background",
2746
- geometry: "width:0.2; height:16; depth:24;",
2747
- position: maxXLength + 8.2 + " 7\n " + (_classPrivateFieldLooseBase(this, _yOffset)[_yOffset] + 1 + _classPrivateFieldLooseBase(this, _range)[_range] / 2 + 1.5),
2748
- material: "color: white, transparent:false"
2749
- });
2750
3077
  return elements;
2751
3078
  };
2752
3079
 
@@ -2769,83 +3096,64 @@ var NdmVrHistogram3D = function NdmVrHistogram3D(_ref) {
2769
3096
  var _useState = useState(new HistogramReactFactory(name, histogram, histoSection || null, range, projections, theme || 'def')),
2770
3097
  factory = _useState[0];
2771
3098
 
2772
- var _useState2 = useState({
2773
- uniqueName: name,
2774
- histogram: histogram,
2775
- projections: projections || null,
2776
- typeName: histogram._typename,
2777
- xOffset: factory.getXOffset(),
2778
- zOffset: factory.getZOffset(),
2779
- yOffset: factory.getYOffset(),
2780
- range: factory.getRange()
2781
- }),
2782
- histo = _useState2[0],
2783
- setHisto = _useState2[1];
2784
-
2785
- var _useState3 = useState('default'),
2786
- mode = _useState3[0],
2787
- setMode = _useState3[1];
2788
-
2789
- var createElements = function createElements() {
2790
- var elements = {};
2791
-
2792
- if (histo.typeName.includes('TH2')) {
2793
- elements = factory.createTH2Histogram(mode);
2794
- } else if (histo.typeName.includes('TH3')) {
2795
- elements = factory.createTH3Histogram();
2796
- }
2797
-
2798
- return elements;
2799
- };
3099
+ var _useState2 = useState('default'),
3100
+ mode = _useState2[0],
3101
+ setMode = _useState2[1];
2800
3102
 
2801
- var _useState4 = useState(createElements),
2802
- elements = _useState4[0],
2803
- setElements = _useState4[1];
3103
+ var _useState3 = useState(factory.getElements(mode)),
3104
+ elements = _useState3[0],
3105
+ setElements = _useState3[1];
2804
3106
 
2805
- var updateHistogramSection = function updateHistogramSection(newSection) {
2806
- var object = histo;
2807
- object.xOffset = newSection.xOffset;
2808
- object.yOffset = newSection.yOffset;
2809
- object.zOffset = newSection.zOffset;
2810
- object.range = newSection.range;
2811
- setHisto(object);
2812
- setElements(createElements);
2813
- };
3107
+ var _useState4 = useState(1),
3108
+ binMarkState = _useState4[0],
3109
+ setBinMarkState = _useState4[1];
2814
3110
 
2815
3111
  var handleSubscription = function handleSubscription(data) {
2816
- if (histo.typeName.includes(data.name)) {
3112
+ if (histogram._typename.includes(data.name)) {
2817
3113
  if (data.axis) {
2818
- var section = factory.updateSection(data.axis, data.increment, data.defaultRange);
2819
- updateHistogramSection(section);
3114
+ factory.updateSection(data.axis, data.increment, data.defaultRange);
3115
+ setElements(factory.getElements(mode));
3116
+ } else if (data.binMarkMode) {
3117
+ setBinMarkState(function (prevState) {
3118
+ if (prevState + data.binMarkMode > 2) return 2;
3119
+ if (prevState + data.binMarkMode < 1) return 1;
3120
+ return prevState + data.binMarkMode;
3121
+ });
2820
3122
  } else {
2821
- setMode(data.fFunction);
3123
+ setMode(function (prevState) {
3124
+ return prevState !== data.fFunction ? data.fFunction : prevState;
3125
+ });
2822
3126
  }
2823
3127
  }
2824
3128
  };
2825
3129
 
2826
3130
  useEffect(function () {
2827
- setHisto({
2828
- uniqueName: name,
2829
- histogram: histogram,
2830
- typeName: histogram._typename,
2831
- projections: projections || null,
2832
- xOffset: factory.getXOffset(),
2833
- zOffset: factory.getZOffset(),
2834
- yOffset: factory.getYOffset(),
2835
- range: factory.getRange()
2836
- });
2837
- }, [histogram, histoSection, projections, name]);
3131
+ factory.setUniqueName(name);
3132
+ setElements(factory.getElements(mode));
3133
+ }, [name]);
3134
+ useEffect(function () {
3135
+ factory.setHistogram(histogram, projections);
3136
+ setElements(factory.getElements(mode));
3137
+ }, [histogram, projections]);
3138
+ useEffect(function () {
3139
+ factory.setSection(histoSection);
3140
+ setElements(factory.getElements(mode));
3141
+ }, [histoSection]);
3142
+ useEffect(function () {
3143
+ factory.setRange(range);
3144
+ setElements(factory.getElements(mode));
3145
+ }, [range]);
2838
3146
  useEffect(function () {
2839
- factory.initializeFactory(name, histogram, histoSection, range, projections, theme);
2840
- setElements(createElements);
2841
- }, [histo, theme]);
3147
+ factory.setTheme(theme);
3148
+ setElements(factory.getElements(mode));
3149
+ }, [theme]);
2842
3150
  useEffect(function () {
2843
- setElements(createElements);
3151
+ setElements(factory.getElements(mode));
2844
3152
  }, [mode]);
2845
3153
  useEffect(function () {
2846
- if (histo.typeName.includes('TH2')) {
3154
+ if (histogram._typename.includes('TH2')) {
2847
3155
  subscription = histogramTH2Service.getChangedSection().subscribe(handleSubscription);
2848
- } else if (histo.typeName.includes('TH3')) {
3156
+ } else if (histogram._typename.includes('TH3')) {
2849
3157
  subscription = histogramTH3Service.getChangedSection().subscribe(handleSubscription);
2850
3158
  }
2851
3159
 
@@ -2858,13 +3166,81 @@ var NdmVrHistogram3D = function NdmVrHistogram3D(_ref) {
2858
3166
  return /*#__PURE__*/React.createElement("a-entity", {
2859
3167
  "histogram-control": true
2860
3168
  }, elements.bins.map(function (bin) {
2861
- return bin;
2862
- }), elements.normalAxis.map(function (axis) {
2863
- return axis;
2864
- }), elements.reversedAxis.map(function (axis) {
2865
- return axis;
3169
+ return /*#__PURE__*/React.createElement("a-box", {
3170
+ key: bin.id,
3171
+ "class": "clickable",
3172
+ material: "color: " + bin.color + "; transparent: true",
3173
+ binth: bin.binData,
3174
+ mouseevent: true,
3175
+ animation: "property: scale; from: " + bin.animation.fromWidth + " " + bin.animation.fromHeight + " " + bin.animation.fromDepth + "; to: " + bin.animation.toWidth + " " + bin.animation.toHeight + " " + bin.animation.toDepth + "; delay:100; dur: 1500; easing: linear;",
3176
+ animation__1: "property: material.opacity; from: 0; to: 0.50; dur: 2000;",
3177
+ animation__2: "property: position; from: " + bin.animation2.fromX + " " + bin.animation2.fromY + " " + bin.animation2.fromZ + "; to: " + bin.animation2.toX + " " + bin.animation2.toY + " " + bin.animation2.toZ + "; dur: 1000;",
3178
+ animation__3: "property: material.color; from: " + bin.animation3.fromColor + "; to: " + bin.animation3.toColor + "; dur: 1600;"
3179
+ }, /*#__PURE__*/React.createElement("a-text", {
3180
+ value: bin.content,
3181
+ align: "center",
3182
+ width: "10",
3183
+ color: "black",
3184
+ geometry: "primitive:plane; width: 1; height: 1",
3185
+ material: "color: " + bin.animation3.toColor + "; opacity: 0.50; transparent: true",
3186
+ rotation: "270 180 0",
3187
+ position: "0 " + (binMarkState === 1 ? -0.5 : 0.501) + " 0"
3188
+ }));
3189
+ }), elements.labels.map(function (label) {
3190
+ return /*#__PURE__*/React.createElement("a-entity", {
3191
+ key: label.key,
3192
+ geometry: "primitive: " + label.geometry.primitive + "; width:" + label.geometry.width + "; height:" + label.geometry.height + ";",
3193
+ text: "color: " + label.text.color + "; width: " + label.text.width + "; height: " + label.text.height + "; align:center;",
3194
+ "label-handler": "value: " + label.labelHandler.value + "; delay:" + label.labelHandler.delay,
3195
+ rotation: label.rotation.x + " " + label.rotation.y + " " + label.rotation.z,
3196
+ material: "color: " + label.material.color + "; transparent: true",
3197
+ animation: "property: text.width; from: 0; to: 4; dur: 1000;",
3198
+ animation__1: "property: material.opacity; from: 0; to: 0.8; dur: 1500;",
3199
+ animation__2: "property: position; from: " + label.animation.fromX + " " + label.animation.fromY + " " + label.animation.fromZ + "; to: " + label.animation.toX + " " + label.animation.toY + " " + label.animation.toZ + "; dur: 1005;"
3200
+ });
3201
+ }), elements.titles.map(function (title) {
3202
+ return /*#__PURE__*/React.createElement("a-entity", {
3203
+ key: title.key,
3204
+ text: "value: " + title.text.value + "; color: " + title.text.color + "; width: 230; height:auto; align:center;",
3205
+ rotation: title.rotation.x + " " + title.rotation.y + " " + title.rotation.z,
3206
+ position: title.position.x + " " + title.position.y + " " + title.position.z,
3207
+ material: "transparent: true"
3208
+ }, /*#__PURE__*/React.createElement("a-text", {
3209
+ value: title.innerText.value,
3210
+ position: "0 10 0",
3211
+ width: "150",
3212
+ height: "auto",
3213
+ align: "center",
3214
+ color: title.innerText.color
3215
+ }), /*#__PURE__*/React.createElement("a-entity", {
3216
+ geometry: "primitive: plane; width:170; height:30;",
3217
+ position: "0 0 -1",
3218
+ material: "opacity: 0.9; color: white; transparent: true"
3219
+ }));
3220
+ }), elements.axisLabels.map(function (axisLabel) {
3221
+ return /*#__PURE__*/React.createElement("a-entity", {
3222
+ id: axisLabel.id,
3223
+ key: axisLabel.key,
3224
+ text: "value: " + axisLabel.text.value + "; color: " + axisLabel.text.color + "; width: 10; height:auto; align:center;",
3225
+ rotation: axisLabel.rotation.x + " " + axisLabel.rotation.y + " " + axisLabel.rotation.z,
3226
+ animation: "property: position; from: " + axisLabel.animation.fromX + " " + axisLabel.animation.fromY + " " + axisLabel.animation.fromZ + "; to: " + axisLabel.animation.toX + " " + axisLabel.animation.toY + " " + axisLabel.animation.toZ + "; dur: 1000;",
3227
+ material: "opacity: 0; transparent: true"
3228
+ });
3229
+ }), elements.ground && /*#__PURE__*/React.createElement("a-box", {
3230
+ key: elements.ground.key,
3231
+ width: elements.ground.scale.width,
3232
+ material: "color: #fafafa",
3233
+ height: elements.ground.scale.height,
3234
+ depth: elements.ground.scale.depth,
3235
+ animation: "property: position; from: " + elements.ground.animation.fromX + " " + elements.ground.animation.fromY + " " + elements.ground.animation.fromZ + ";\n to:\n " + elements.ground.animation.toX + " " + elements.ground.animation.toY + " " + elements.ground.animation.toZ + "; dur: 1000;"
2866
3236
  }), elements.banners.map(function (banner) {
2867
- return banner;
3237
+ return /*#__PURE__*/React.createElement("a-box", {
3238
+ key: banner.key,
3239
+ id: banner.id,
3240
+ geometry: "width:" + banner.geometry.width + "; height:" + banner.geometry.height + "; depth:" + banner.geometry.depth + ";",
3241
+ position: banner.position.x + " " + banner.position.y + " " + banner.position.z,
3242
+ material: "color: " + banner.material.color + ", transparent: " + banner.material.transparent
3243
+ });
2868
3244
  }));
2869
3245
  } else {
2870
3246
  return /*#__PURE__*/React.createElement("a-box", {
@@ -2876,18 +3252,119 @@ var NdmVrHistogram3D = function NdmVrHistogram3D(_ref) {
2876
3252
  }
2877
3253
  };
2878
3254
 
3255
+ function NdmVrLaboratory() {
3256
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a-sky", {
3257
+ color: "#dbf0fe"
3258
+ }), /*#__PURE__*/React.createElement("a-plane", {
3259
+ rotation: "-90 0 0",
3260
+ position: "0 -0.5 0",
3261
+ width: "1000",
3262
+ height: "1000",
3263
+ color: "#aaa",
3264
+ material: "shader:flat;"
3265
+ }));
3266
+ }
3267
+
3268
+ var Controller = function Controller(_ref) {
3269
+ var socket = _ref.socket;
3270
+
3271
+ var _useState = useState(0),
3272
+ time = _useState[0],
3273
+ setTime = _useState[1];
3274
+
3275
+ useEffect(function () {
3276
+ var camera = document.getElementById('camera');
3277
+ var absolutePosition = new Vector3();
3278
+ var rotationQuaternion = new Quaternion();
3279
+ camera.object3D.getWorldPosition(absolutePosition);
3280
+ var id = socket.id;
3281
+ var interval = setInterval(function () {
3282
+ camera.object3D.getWorldPosition(absolutePosition);
3283
+ camera.object3D.getWorldQuaternion(rotationQuaternion);
3284
+ socket.emit('move', {
3285
+ id: id,
3286
+ position: absolutePosition.toArray(),
3287
+ rotation: rotationQuaternion.toArray()
3288
+ });
3289
+ setTime(function (prevTime) {
3290
+ return prevTime + 1;
3291
+ });
3292
+ }, 10);
3293
+ return function () {
3294
+ return clearInterval(interval);
3295
+ };
3296
+ }, [time]);
3297
+ return /*#__PURE__*/React.createElement("a-entity", null);
3298
+ };
3299
+
3300
+ var UserWrapper = function UserWrapper(_ref) {
3301
+ var position = _ref.position,
3302
+ rotation = _ref.rotation,
3303
+ id = _ref.id;
3304
+ useEffect(function () {
3305
+ var quaternionToApply = new Quaternion().fromArray(rotation);
3306
+ var user = document.getElementById(id).object3D;
3307
+ user.setRotationFromQuaternion(quaternionToApply);
3308
+ }, [rotation]);
3309
+ return /*#__PURE__*/React.createElement("a-box", {
3310
+ position: position,
3311
+ id: id,
3312
+ color: "#4CC3D9"
3313
+ });
3314
+ };
3315
+
3316
+ var NetworkingComponent = function NetworkingComponent(_ref) {
3317
+ var socketClient = _ref.socketClient,
3318
+ clients = _ref.clients;
3319
+ return /*#__PURE__*/React.createElement("a-entity", null, /*#__PURE__*/React.createElement(Controller, {
3320
+ socket: socketClient
3321
+ }), Object.keys(clients).filter(function (clientKey) {
3322
+ return clientKey !== socketClient.id;
3323
+ }).map(function (client) {
3324
+ var _clients$client = clients[client],
3325
+ position = _clients$client.position,
3326
+ rotation = _clients$client.rotation;
3327
+ var positionParse = position.join(' ');
3328
+ return /*#__PURE__*/React.createElement(UserWrapper, {
3329
+ key: client,
3330
+ id: client,
3331
+ position: positionParse,
3332
+ rotation: rotation
3333
+ });
3334
+ }));
3335
+ };
3336
+
3337
+ var NdmVrShared = function NdmVrShared() {
3338
+ var _useState = useState(0),
3339
+ socketClient = _useState[0],
3340
+ setSocketClient = _useState[1];
3341
+
3342
+ var _useState2 = useState({}),
3343
+ clients = _useState2[0],
3344
+ setClients = _useState2[1];
3345
+
3346
+ useEffect(function () {
3347
+ setSocketClient(io.connect('http://localhost:3001'));
3348
+ return function () {
3349
+ if (socketClient) socketClient.disconnect();
3350
+ };
3351
+ }, []);
3352
+ useEffect(function () {
3353
+ if (socketClient) {
3354
+ socketClient.on('move', function (clients) {
3355
+ setClients(clients);
3356
+ });
3357
+ }
3358
+ }, [socketClient]);
3359
+ return socketClient && /*#__PURE__*/React.createElement(NetworkingComponent, {
3360
+ socketClient: socketClient,
3361
+ clients: clients
3362
+ });
3363
+ };
3364
+
2879
3365
  var NdmVrScene = function NdmVrScene(_ref) {
2880
3366
  var data = _ref.data,
2881
3367
  info = _ref.info;
2882
-
2883
- var _useState = useState({
2884
- url: info.background.url ? info.background.url : './ndmvr/backgrounds/background1.jpg',
2885
- radius: info.background.radius ? info.background.radius : '3000',
2886
- height: info.background.height ? info.background.height : '2048',
2887
- width: info.background.width ? info.background.width : '2048'
2888
- }),
2889
- background = _useState[0];
2890
-
2891
3368
  return /*#__PURE__*/React.createElement("a-scene", {
2892
3369
  embedded: true,
2893
3370
  style: {
@@ -2897,22 +3374,16 @@ var NdmVrScene = function NdmVrScene(_ref) {
2897
3374
  }
2898
3375
  }, /*#__PURE__*/React.createElement("a-assets", null, /*#__PURE__*/React.createElement("img", {
2899
3376
  id: "skyTexture",
2900
- src: background.url,
3377
+ src: info.background.url,
2901
3378
  alt: "background"
2902
- })), /*#__PURE__*/React.createElement(NdmVrCamera, null), /*#__PURE__*/React.createElement(NdmVrHistogram3D, {
3379
+ })), /*#__PURE__*/React.createElement(NdmVrLaboratory, null), /*#__PURE__*/React.createElement(NdmVrCamera, null), /*#__PURE__*/React.createElement(NdmVrHistogram3D, {
2903
3380
  name: info.name,
2904
3381
  histogram: data.histogram,
2905
3382
  histoSection: data.section,
2906
3383
  projections: data.projections,
2907
3384
  range: data.range,
2908
3385
  theme: info.theme
2909
- }), /*#__PURE__*/React.createElement("a-sky", {
2910
- height: background.height,
2911
- radius: background.radius,
2912
- width: background.width,
2913
- src: "#skyTexture",
2914
- position: "0 1000 0"
2915
- }));
3386
+ }), /*#__PURE__*/React.createElement(NdmVrShared, null));
2916
3387
  };
2917
3388
 
2918
3389
  var EntityBuilder = /*#__PURE__*/function () {
@@ -3496,6 +3967,123 @@ var optimizeBinContent = function optimizeBinContent(binContent, maxContent) {
3496
3967
  return binContent;
3497
3968
  };
3498
3969
 
3970
+ AFRAME$1.registerComponent('binth2', {
3971
+ schema: {
3972
+ id: {
3973
+ type: 'string'
3974
+ },
3975
+ content: {
3976
+ "default": 0
3977
+ },
3978
+ absoluteContent: {
3979
+ "default": 0
3980
+ },
3981
+ binName: {
3982
+ "default": ''
3983
+ },
3984
+ xTitle: {
3985
+ type: 'string'
3986
+ },
3987
+ yTitle: {
3988
+ type: 'string'
3989
+ },
3990
+ xMin: {
3991
+ type: 'number'
3992
+ },
3993
+ yMin: {
3994
+ type: 'number'
3995
+ },
3996
+ xMax: {
3997
+ type: 'number'
3998
+ },
3999
+ yMax: {
4000
+ type: 'number'
4001
+ },
4002
+ xCenter: {
4003
+ type: 'number'
4004
+ },
4005
+ yCenter: {
4006
+ type: 'number'
4007
+ },
4008
+ xWidth: {
4009
+ type: 'number'
4010
+ },
4011
+ yWidth: {
4012
+ type: 'number'
4013
+ },
4014
+ color: {
4015
+ type: 'string'
4016
+ },
4017
+ axisX: {
4018
+ type: 'string'
4019
+ },
4020
+ axisY: {
4021
+ type: 'string'
4022
+ },
4023
+ axisZ: {
4024
+ type: 'string'
4025
+ },
4026
+ selectColor: {
4027
+ type: 'string'
4028
+ },
4029
+ markedColor: {
4030
+ type: 'string'
4031
+ }
4032
+ },
4033
+ init: function init() {
4034
+ var el = this.el;
4035
+ el.userData = {
4036
+ typeName: 'TH2',
4037
+ id: this.data.id,
4038
+ content: this.data.content,
4039
+ absoluteContent: this.data.absoluteContent,
4040
+ binName: this.data.binName,
4041
+ xTitle: this.data.xTitle,
4042
+ yTitle: this.data.yTitle,
4043
+ xMin: this.data.xMin,
4044
+ yMin: this.data.yMin,
4045
+ xMax: this.data.xMax,
4046
+ yMax: this.data.yMax,
4047
+ xCenter: this.data.xCenter,
4048
+ yCenter: this.data.yCenter,
4049
+ xWidth: this.data.xWidth,
4050
+ yWidth: this.data.yWidth,
4051
+ color: this.data.color,
4052
+ axisX: this.data.axisX,
4053
+ axisY: this.data.axisY,
4054
+ axisZ: this.data.axisZ,
4055
+ selectColor: this.data.selectColor,
4056
+ markedColor: this.data.markedColor
4057
+ };
4058
+ },
4059
+ update: function update() {
4060
+ var el = this.el;
4061
+ el.userData = {
4062
+ typeName: 'TH2',
4063
+ id: this.data.id,
4064
+ content: this.data.content,
4065
+ absoluteContent: this.data.absoluteContent,
4066
+ binName: this.data.binName,
4067
+ xTitle: this.data.xTitle,
4068
+ yTitle: this.data.yTitle,
4069
+ xMin: this.data.xMin,
4070
+ yMin: this.data.yMin,
4071
+ xMax: this.data.xMax,
4072
+ yMax: this.data.yMax,
4073
+ xCenter: this.data.xCenter,
4074
+ yCenter: this.data.yCenter,
4075
+ xWidth: this.data.xWidth,
4076
+ yWidth: this.data.yWidth,
4077
+ color: this.data.color,
4078
+ axisX: this.data.axisX,
4079
+ axisY: this.data.axisY,
4080
+ axisZ: this.data.axisZ,
4081
+ selectColor: this.data.selectColor,
4082
+ markedColor: this.data.markedColor
4083
+ };
4084
+ }
4085
+ });
4086
+
3499
4087
  var _jsroot$1 = /*#__PURE__*/_classPrivateFieldLooseKey("jsroot");
3500
4088
 
3501
4089
  var HistogramDemoFactory = /*#__PURE__*/function () {
@@ -3561,7 +4149,7 @@ var HistogramDemoFactory = /*#__PURE__*/function () {
3561
4149
  return HistogramDemoFactory;
3562
4150
  }();
3563
4151
 
3564
- var index = AFRAME.registerComponent('th2-histogram', {
4152
+ var index = AFRAME$1.registerComponent('th2-histogram', {
3565
4153
  schema: {
3566
4154
  section: {
3567
4155
  type: 'string'
@@ -3700,7 +4288,7 @@ var index = AFRAME.registerComponent('th2-histogram', {
3700
4288
  }
3701
4289
  });
3702
4290
 
3703
- var infoBannerAframeComponent = AFRAME.registerComponent('banner-control', {
4291
+ var infoBannerAframeComponent = AFRAME$1.registerComponent('banner-control', {
3704
4292
  schema: {
3705
4293
  position: {
3706
4294
  name: 'position',
@@ -3878,7 +4466,7 @@ var oculusRedrawHistogramBanners = function oculusRedrawHistogramBanners() {
3878
4466
  });
3879
4467
  };
3880
4468
 
3881
- var leftOculusController = AFRAME.registerComponent('left-controller-logging', {
4469
+ var leftOculusController = AFRAME$1.registerComponent('left-controller-logging', {
3882
4470
  init: function init() {
3883
4471
  var gripActive = false;
3884
4472
  var speed = 1;
@@ -3925,7 +4513,7 @@ var leftOculusController = AFRAME.registerComponent('left-controller-logging', {
3925
4513
  }
3926
4514
  });
3927
4515
 
3928
- var rightOculusController = AFRAME.registerComponent('right-controller-logging', {
4516
+ var rightOculusController = AFRAME$1.registerComponent('right-controller-logging', {
3929
4517
  init: function init() {
3930
4518
  var gripActive = false;
3931
4519
  var el = this.el;
@@ -3980,5 +4568,5 @@ var rightOculusController = AFRAME.registerComponent('right-controller-logging',
3980
4568
 
3981
4569
  var ndmVrStorage = new NdmVrStorageService();
3982
4570
 
3983
- export { infoBannerAframeComponent as Banner, index as HistogramTH2, JsrootHistogram as JSrootHistogram, leftOculusController as LeftController, NdmVrScene, rightOculusController as RightController, ndmVrStorage };
4571
+ export { infoBannerAframeComponent as Banner, index as HistogramTH2, JsrootHistogram as JSrootHistogram, leftOculusController as LeftController, NdmVrScene, rightOculusController as RightController, binDataDistributor, ndmVrStorage };
3984
4572
  //# sourceMappingURL=index.modern.js.map