Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
vEXP
Commits
39f5617f
Commit
39f5617f
authored
May 23, 2020
by
legoc
Browse files
Do not draw data sphere for points with intensity < 0: they have been skipped
parent
fd515c66
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/client/utils/shapes/energy-line.js
View file @
39f5617f
...
...
@@ -108,11 +108,13 @@ class EnergyLine extends TrajectoryLine {
for
(
let
i
=
0
;
i
<
this
.
_intervals
+
1
;
i
++
)
{
let
position
=
new
THREE
.
Vector3
(
0
,
0
,
i
*
delta
);
let
intensity
=
this
.
_data
[
i
];
// Draw a data sphere.
if
(
i
<
this
.
_data
.
length
)
{
// Do not draw the sphere if intensity < 0 i.e. point has been skipped.
if
(
i
<
this
.
_data
.
length
&&
intensity
>=
0
)
{
let
dataMaterial
=
new
THREE
.
MeshBasicMaterial
({
color
:
0xffffff
,
depthTest
:
true
,
transparent
:
false
});
const
color
=
mapColor
(
this
.
_data
[
i
]
,
0
,
clientSettings
.
maxIntensity
);
const
color
=
mapColor
(
intensity
,
0
,
clientSettings
.
maxIntensity
);
dataMaterial
.
color
.
setRGB
(
color
.
r
/
255
,
color
.
g
/
255
,
color
.
b
/
255
);
let
sphere
=
new
THREE
.
Mesh
(
this
.
sphereGeometry
,
dataMaterial
);
sphere
.
scale
.
multiplyScalar
(
zSphereRadius
);
...
...
js/client/views/panels/trajectory-settings-view.js
View file @
39f5617f
...
...
@@ -13,7 +13,7 @@ class TrajectorySettingsPanelView {
<input class='col-sm-6 custom-range' type="range" min="1" max="1000" value="1000" class="slider" id="energyScaleRange">
</div>
<div class='row'>
<label class='col-sm-3' for='dataSphereRadius'>Data
Sphere
Radius</label>
<label class='col-sm-3' for='dataSphereRadius'>Data Radius</label>
<input class='col-sm-2 type='text' name='dataSphereRadius' id='dataSphereRadius' />
<input class='col-sm-6 custom-range' type="range" min="0" max="900" value="400" class="slider" id="dataSphereRadiusRange">
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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