Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jeremie Garcia
Trajectoires
Commits
d4beb737
Commit
d4beb737
authored
Nov 05, 2015
by
Jérémie Garcia
Browse files
alternative for color selection
parent
cef151ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
WOB/server/interfaces/js/View.js
View file @
d4beb737
...
...
@@ -34,11 +34,20 @@ Traj.View = {
start_hue
:
0.34
,
initSourcesColors
:
function
(
nbSources
){
//using golden ratio
for
(
var
i
=
0
;
i
<
Traj
.
Manager
.
NB_SOURCES
;
i
++
){
var
h
=
(
this
.
start_hue
+
i
*
Traj
.
Utils
.
golden_ratio_conjugate
)
%
1
,
col
=
Traj
.
Utils
.
HSVtoRGB
(
h
,
0.95
,
0.68
);
this
.
default_colors
[
i
]
=
Traj
.
Utils
.
rgbToHex
(
col
);
}
/*
for(var i = 0; i< Traj.Manager.NB_SOURCES;i++){
var h = (this.start_hue + i*(1/(1+ Traj.Manager.NB_SOURCES)))%1,
col = Traj.Utils.HSVtoRGB(h, 0.95, 0.68);
this.default_colors[i] = Traj.Utils.rgbToHex(col);
}
*/
},
FIRST_POINT_SIZE
:
5
,
//pix
...
...
@@ -278,7 +287,6 @@ Traj.View = {
for
(
var
i
=
0
;
i
<
trajectories
.
length
;
i
++
)
{
if
(
i
!=
Traj
.
Manager
.
currentCurveIndex
){
alpha_stroke
=
(
multiplay_idx
.
indexOf
(
i
)
!==-
1
)
?
this
.
CURVE_ACTIVE_ALPHA
:
this
.
CURVE_ALPHA
;
lwidth
=
this
.
CURVE_STROKE_SIZE
;
drawPoint
=
false
;
...
...
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