Template:Team:UC Davis/MutantWidget

From 2011.igem.org

(Difference between revisions)
Line 108: Line 108:
}
}
-
cool_color_ramp = [[0.00000,  0.00000,  0.50000]
+
cool_color_ramp = [[0.00000,  0.00000,  0.50000],
   [0.00000,  0.00000,  0.56349],
   [0.00000,  0.00000,  0.56349],
   [0.00000,  0.00000,  0.62698],
   [0.00000,  0.00000,  0.62698],
Line 417: Line 417:
thisdataz[i] = parseFloat(thisdataz[i]);
thisdataz[i] = parseFloat(thisdataz[i]);
var particle = new THREE.Vertex(
var particle = new THREE.Vertex(
-
             new THREE.Vector3(thisdatax[i%thisdatax.length], thisdatay[Math.floor(i/thisdatax.length)], thisdataz[i])
+
             new THREE.Vector3(thisdatax[i%thisdatax.length]/axisdimensions[1]*100, thisdatay[Math.floor(i/thisdatax.length)]*axisdimensions[3]*100, thisdataz[i]*axisdimensions[5]*100)
         );
         );
particles.vertices.push(particle);
particles.vertices.push(particle);
Line 477: Line 477:
}
}
)]);
)]);
 +
var newcolor = colorRamp(thisfacecolor, cool_color_ramp);
var newcolor = colorRamp(thisfacecolor, cool_color_ramp);
materials[i][0].color.setRGB(newcolor[0], newcolor[1], newcolor[2]);
materials[i][0].color.setRGB(newcolor[0], newcolor[1], newcolor[2]);

Revision as of 02:37, 26 September 2011