@@ -13,7 +13,6 @@ var createSurface = require('gl-surface3d');
13
13
14
14
var ndarray = require ( 'ndarray' ) ;
15
15
var homography = require ( 'ndarray-homography' ) ;
16
- var fill = require ( 'ndarray-fill' ) ;
17
16
18
17
var isArrayOrTypedArray = require ( '../../lib' ) . isArrayOrTypedArray ;
19
18
var parseColorScale = require ( '../../lib/gl_format_color' ) . parseColorScale ;
@@ -511,9 +510,13 @@ proto.update = function(data) {
511
510
ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] ) ,
512
511
ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] )
513
512
] ;
514
- fill ( coords [ 0 ] , function ( row , col ) { return rawCoords [ 0 ] [ row ] [ col ] ; } ) ;
515
- fill ( coords [ 1 ] , function ( row , col ) { return rawCoords [ 1 ] [ row ] [ col ] ; } ) ;
516
- fill ( coords [ 2 ] , function ( row , col ) { return rawCoords [ 2 ] [ row ] [ col ] ; } ) ;
513
+ for ( i = 0 ; i < 3 ; i ++ ) {
514
+ for ( j = 0 ; j < xlen ; j ++ ) {
515
+ for ( k = 0 ; k < ylen ; k ++ ) {
516
+ coords [ i ] . set ( j , k , rawCoords [ i ] [ j ] [ k ] ) ;
517
+ }
518
+ }
519
+ }
517
520
rawCoords = [ ] ; // free memory
518
521
519
522
var params = {
@@ -543,9 +546,11 @@ proto.update = function(data) {
543
546
if ( data . surfacecolor ) {
544
547
var intensity = ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] ) ;
545
548
546
- fill ( intensity , function ( row , col ) {
547
- return data . surfacecolor [ col ] [ row ] ;
548
- } ) ;
549
+ for ( j = 0 ; j < xlen ; j ++ ) {
550
+ for ( k = 0 ; k < ylen ; k ++ ) {
551
+ intensity . set ( j , k , data . surfacecolor [ k ] [ j ] ) ;
552
+ }
553
+ }
549
554
550
555
coords . push ( intensity ) ;
551
556
} else {
0 commit comments