Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
vEXP
Commits
3f77a0f3
Commit
3f77a0f3
authored
Mar 28, 2022
by
legoc
Browse files
Added arrows for energy 0 in energy view
parent
cceb77c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/client/views/3D/reciprocal/trajectory-view.js
View file @
3f77a0f3
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment