Commit d4beb737 authored by Jérémie Garcia's avatar Jérémie Garcia

alternative for color selection

parent cef151ce
......@@ -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 ;
......
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