@@ -13,7 +13,6 @@ var createSurface = require('gl-surface3d');
1313
1414var ndarray = require ( 'ndarray' ) ;
1515var homography = require ( 'ndarray-homography' ) ;
16- var fill = require ( 'ndarray-fill' ) ;
1716
1817var isArrayOrTypedArray = require ( '../../lib' ) . isArrayOrTypedArray ;
1918var parseColorScale = require ( '../../lib/gl_format_color' ) . parseColorScale ;
@@ -511,9 +510,13 @@ proto.update = function(data) {
511510 ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] ) ,
512511 ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] )
513512 ] ;
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+ }
517520 rawCoords = [ ] ; // free memory
518521
519522 var params = {
@@ -543,9 +546,11 @@ proto.update = function(data) {
543546 if ( data . surfacecolor ) {
544547 var intensity = ndarray ( new Float32Array ( xlen * ylen ) , [ xlen , ylen ] ) ;
545548
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+ }
549554
550555 coords . push ( intensity ) ;
551556 } else {
0 commit comments