File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -331,11 +331,11 @@ function convertPlotlyOptions(scene, data) {
331
331
return params ;
332
332
}
333
333
334
- function arrayToColor ( color ) {
335
- if ( Array . isArray ( color ) ) {
334
+ function _arrayToColor ( color ) {
335
+ if ( Lib . isArrayOrTypedArray ( color ) ) {
336
336
var c = color [ 0 ] ;
337
337
338
- if ( Array . isArray ( c ) ) color = c ;
338
+ if ( Lib . isArrayOrTypedArray ( c ) ) color = c ;
339
339
340
340
return 'rgb(' + color . slice ( 0 , 3 ) . map ( function ( x ) {
341
341
return Math . round ( x * 255 ) ;
@@ -345,6 +345,16 @@ function arrayToColor(color) {
345
345
return null ;
346
346
}
347
347
348
+ function arrayToColor ( colors ) {
349
+ if ( ! Lib . isArrayOrTypedArray ( colors ) ) {
350
+ return _arrayToColor ( colors ) ;
351
+ }
352
+
353
+ return colors . map ( function ( color ) {
354
+ return _arrayToColor ( color ) ;
355
+ } ) ;
356
+ }
357
+
348
358
proto . update = function ( data ) {
349
359
var gl = this . scene . glplot . gl ;
350
360
var lineOptions ;
You can’t perform that action at this time.
0 commit comments