bundle.js
function marker(markers, group, options) {
        var activation = group.activation; // reset marker elements

        activation.forEach(function (buffer) {
          return buffer && buffer.destroy && buffer.destroy();
        });
        activation.length = 0; // single sdf marker

        if (!markers || typeof markers[0] === 'number') {
          var id = _this3.addMarker(markers);

          activation[id] = true;
        } // per-point markers use mask buffers to enable markers in vert shader
        else {
            var markerMasks = [];

            for (var _i = 0, l = Math.min(markers.length, group.count); _i < l; _i++) {
              var _id = _this3.addMarker(markers[_i]);

              if (!markerMasks[_id]) markerMasks[_id] = new Uint8Array(group.count); // enable marker by default

              markerMasks[_id][_i] = 1;
            }

            for (var _id2 = 0; _id2 < markerMasks.length; _id2++) {
              if (!markerMasks[_id2]) continue;
              var opts = {
                data: markerMasks[_id2],
                type: 'uint8',
                usage: 'static'
              };

              if (!activation[_id2]) {
                activation[_id2] = regl.buffer(opts);
              } else {
                activation[_id2](opts);
              }

              activation[_id2].data = markerMasks[_id2];
            }
          }

        return markers;
      }
function marker(markers, group, options) {
        var activation = group.activation; // reset marker elements

        activation.forEach(function (buffer) {
          return buffer && buffer.destroy && buffer.destroy();
        });
        activation.length = 0; // single sdf marker

        if (!markers || typeof markers[0] === 'number') {
          var id = _this3.addMarker(markers);

          activation[id] = true;
        } // per-point markers use mask buffers to enable markers in vert shader
        else {
            var markerMasks = [];

            for (var _i = 0, l = Math.min(markers.length, group.count); _i < l; _i++) {
              var _id = _this3.addMarker(markers[_i]);

              if (!markerMasks[_id]) markerMasks[_id] = new Uint8Array(group.count); // enable marker by default

              markerMasks[_id][_i] = 1;
            }

            for (var _id2 = 0; _id2 < markerMasks.length; _id2++) {
              if (!markerMasks[_id2]) continue;
              var opts = {
                data: markerMasks[_id2],
                type: 'uint8',
                usage: 'static'
              };

              if (!activation[_id2]) {
                activation[_id2] = regl.buffer(opts);
              } else {
                activation[_id2](opts);
              }

              activation[_id2].data = markerMasks[_id2];
            }
          }

        return markers;
      }
function marker ( markers , group , options ) { var activation = group . activation ; // reset marker elements activation . forEach ( function ( buffer ) { return buffer && buffer . destroy && buffer . destroy ( ) ; } ) ; activation . length = 0 ; // single sdf marker if ( ! markers || typeof markers [ 0 ] === 'number' ) { var id = _this3 . addMarker ( markers ) ; activation [ id ] = true ; } // per-point markers use mask buffers to enable markers in vert shader else { var markerMasks = [ ] ; for ( var _i = 0 , l = Math . min ( markers . length , group . count ) ; _i < l ; _i ++ ) { var _id = _this3 . addMarker ( markers [ _i ] ) ; if ( ! markerMasks [ _id ] ) markerMasks [ _id ] = new Uint8Array ( group . count ) ; // enable marker by default markerMasks [ _id ] [ _i ] = 1 ; } for ( var _id2 = 0 ; _id2 < markerMasks . length ; _id2 ++ ) { if ( ! markerMasks [ _id2 ] ) continue ; var opts = { data : markerMasks [ _id2 ] , type : 'uint8' , usage : 'static' } ; if ( ! activation [ _id2 ] ) { activation [ _id2 ] = regl . buffer ( opts ) ; } else { activation [ _id2 ] ( opts ) ; } activation [ _id2 ] . data = markerMasks [ _id2 ] ; } } return markers ; }
create marker ids corresponding to known marker textures
create marker ids corresponding to known marker textures