Commit 3f77a0f3 authored by legoc's avatar legoc
Browse files

Added arrows for energy 0 in energy view

parent cceb77c7
......@@ -8,6 +8,7 @@ const { scattering, matrix, trajectoryData } = require('../../../server-state');
const { clientSettings } = require('../../../client-state');
const {scalarWorldToView} = require('../../../utils/conversion');
const Constants = require('../../../utils/constants');
const Arrow3D = require('../../../utils/shapes/arrow-3d');
class TrajectoryView3D extends View3D {
constructor(scene, dragControls, scatteringView) {
......@@ -34,6 +35,23 @@ class TrajectoryView3D extends View3D {
this._energyTranslationGroup = new THREE.Group();
this._energyViewGroup.add(this._energyTranslationGroup);
this._energyArrowX = new Arrow3D(0xffffff);
this._energyArrowX.object3D.position.copy(new THREE.Vector3(0, 0, 0));
this._energyArrowX.object3D.lookAt(new THREE.Vector3(1, 0, 0));
this._energyArrowX.object3D.scale.z = 10;
this._energyTranslationGroup.add(this._energyArrowX.object3D);
this._energyArrowY = new Arrow3D(0xffffff);
this._energyArrowY.object3D.position.copy(new THREE.Vector3(0, 0, 0));
this._energyArrowY.object3D.lookAt(new THREE.Vector3(0, 1, 0));
this._energyArrowY.object3D.scale.z = 10;
this._energyTranslationGroup.add(this._energyArrowY.object3D);
// Create fake trajectory lines to visualize.
this._hklLine = new HKLLine(this._type, this._hklViewGroup, new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), 11);
this._hklLine.setVisibility(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment