@@ -285,7 +285,7 @@ proto.update = function(data) {
285
285
}
286
286
287
287
if ( true ) {
288
- var delaunayOptions = calculateMesh ( this . data . x , this . data . y , this . data . z , this . scene . dataScale ) ;
288
+ var delaunayOptions = calculateMesh ( this . data . x , this . data . y , this . data . z , options . lineColor , this . scene . dataScale ) ;
289
289
if ( this . delaunayMesh ) {
290
290
this . delaunayMesh . update ( delaunayOptions ) ;
291
291
} else {
@@ -324,7 +324,7 @@ function createLineWithMarkers(scene, data) {
324
324
325
325
module . exports = createLineWithMarkers ;
326
326
327
- function calculateMesh ( inputX , inputY , inputZ , scalingFactor ) {
327
+ function calculateMesh ( inputX , inputY , inputZ , inputC , scalingFactor ) {
328
328
329
329
function addVertex ( X , Y , Z , x , y , z ) {
330
330
X . push ( x ) ;
@@ -788,9 +788,8 @@ function calculateMesh(inputX, inputY, inputZ, scalingFactor) {
788
788
}
789
789
790
790
function colorer ( d ) {
791
- return d ;
792
- var colorArray = [ Math . round ( 255 * d ) , 0 , Math . round ( 255 * ( 1 - d ) ) ] ;
793
- return 'rgb(' + colorArray . join ( ) + ')' ;
791
+ var colorArray = [ d , 0 , 1 - d ] ;
792
+ return colorArray ;
794
793
}
795
794
796
795
function makeCircularSampleModel ( ) {
@@ -831,7 +830,7 @@ function calculateMesh(inputX, inputY, inputZ, scalingFactor) {
831
830
y : inputY ,
832
831
z : inputZ ,
833
832
r : inputX . map ( function ( d ) { return 0.05 } ) ,
834
- c : inputX . map ( function ( d ) { return 1 } )
833
+ c : inputC
835
834
}
836
835
837
836
var rp = {
@@ -901,7 +900,7 @@ function calculateMesh(inputX, inputY, inputZ, scalingFactor) {
901
900
}
902
901
903
902
for ( n = 0 ; n < p . x . length ; n ++ ) {
904
- index = addPointMarker ( unitSphere , p . x [ n ] , p . y [ n ] , p . z [ n ] , 'rgb(64 ,64,255)' , 0.1 , index , X , Y , Z , I , J , K , F ) ;
903
+ index = addPointMarker ( unitSphere , p . x [ n ] , p . y [ n ] , p . z [ n ] , [ 64 / 255 , 64 / 255 , 255 / 255 ] , 0.1 , index , X , Y , Z , I , J , K , F ) ;
905
904
}
906
905
907
906
return {
@@ -911,7 +910,8 @@ function calculateMesh(inputX, inputY, inputZ, scalingFactor) {
911
910
Z [ i ] * scalingFactor [ 2 ]
912
911
] } ) ,
913
912
cells :I . map ( function ( d , i ) { return [ I [ i ] , J [ i ] , K [ i ] ] } ) ,
914
- meshColor : [ 0.12156862745098039 , 0.4666666666666667 , 0.9058823529411765 , 1 ] ,
913
+ cellColors : F ,
914
+ // meshColor: [0.12156862745098039,0.4666666666666667,0.9058823529411765,1],
915
915
opacity : 1 ,
916
916
lightPosition : [ 1e6 * scalingFactor [ 0 ] , 1e6 * scalingFactor [ 1 ] , 1e6 * scalingFactor [ 2 ] ] ,
917
917
ambient : 0 ,
0 commit comments