<commit_before>var inherit = require('../inherit');
var registerFeature = require('../registry').registerFeature;
var quadFeature = require('../quadFeature');

//////////////////////////////////////////////////////////////////////////////
/**
 * Create a new instance of class quadFeature
 *
 * @class geo.gl.quadFeature
 * @param {Object} arg Options object
 * @extends geo.quadFeature
 * @returns {geo.gl.quadFeature}
 */
//////////////////////////////////////////////////////////////////////////////
var gl_quadFeature = function (arg) {
  'use strict';
  if (!(this instanceof gl_quadFeature)) {
    return new gl_quadFeature(arg);
  }
  quadFeature.call(this, arg);

  var $ = require('jquery');
  var vgl = require('vgl');
  var object = require('./object');

  object.call(this);

  var m_this = this,
      s_exit = this._exit,
      s_init = this._init,
      s_update = this._update,
      m_modelViewUniform,
      m_actor_image, m_actor_color, m_glBuffers = {}, m_imgposbuf,
      m_clrposbuf, m_clrModelViewUniform,
      m_glCompileTimestamp = vgl.timestamp(),
      m_glColorCompileTimestamp = vgl.timestamp(),
      m_quads;
  var fragmentShaderImageSource = [
    'varying highp vec2 iTextureCoord;',
    'uniform sampler2D sampler2d;',
    'uniform mediump float opacity;',
    'uniform highp vec2 crop;',
    'void main(void) {',
    '  mediump vec4 color = texture2D(sampler2d, iTextureCoord);',
    '  if (iTextureCoord.s > crop.s || 1.0 - iTextureCoord.t > crop.t) {',
    '    return;',
    '  }',
    '  color.w *= opacity;',
    '  gl_FragColor = color;',
    '}'].join('\n');
  var vertexShaderImageSource = [
    'attribute vec3 vertexPosition;',
    'attribute vec2 textureCoord;',
    'uniform mat4 modelViewMatrix;',
    'uniform mat4 projectionMatrix;',
    'varying highp vec2 iTextureCoord;',
    'void main(void) {',
    '  gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);',
    '  iTextureCoord = textureCoord;',
    '}'].join('\n');
  var vertexShaderColorSource = [<commit_msg>Use discard in the fragment shader.<commit_after>var inherit = require('../inherit');
var registerFeature = require('../registry').registerFeature;
var quadFeature = require('../quadFeature');

//////////////////////////////////////////////////////////////////////////////
/**
 * Create a new instance of class quadFeature
 *
 * @class geo.gl.quadFeature
 * @param {Object} arg Options object
 * @extends geo.quadFeature
 * @returns {geo.gl.quadFeature}
 */
//////////////////////////////////////////////////////////////////////////////
var gl_quadFeature = function (arg) {
  'use strict';
  if (!(this instanceof gl_quadFeature)) {
    return new gl_quadFeature(arg);
  }
  quadFeature.call(this, arg);

  var $ = require('jquery');
  var vgl = require('vgl');
  var object = require('./object');

  object.call(this);

  var m_this = this,
      s_exit = this._exit,
      s_init = this._init,
      s_update = this._update,
      m_modelViewUniform,
      m_actor_image, m_actor_color, m_glBuffers = {}, m_imgposbuf,
      m_clrposbuf, m_clrModelViewUniform,
      m_glCompileTimestamp = vgl.timestamp(),
      m_glColorCompileTimestamp = vgl.timestamp(),
      m_quads;
  var fragmentShaderImageSource = [
    'varying highp vec2 iTextureCoord;',
    'uniform sampler2D sampler2d;',
    'uniform mediump float opacity;',
    'uniform highp vec2 crop;',
    'void main(void) {',
    '  mediump vec4 color = texture2D(sampler2d, iTextureCoord);',
    '  if (iTextureCoord.s > crop.s || 1.0 - iTextureCoord.t > crop.t) {',
    '    discard;',
    '  }',
    '  color.w *= opacity;',
    '  gl_FragColor = color;',
    '}'].join('\n');
  var vertexShaderImageSource = [
    'attribute vec3 vertexPosition;',
    'attribute vec2 textureCoord;',
    'uniform mat4 modelViewMatrix;',
    'uniform mat4 projectionMatrix;',
    'varying highp vec2 iTextureCoord;',
    'void main(void) {',
    '  gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);',
    '  iTextureCoord = textureCoord;',
    '}'].join('\n');
  var vertexShaderColorSource = [
{'fraction_non_alphanumeric': 0.20759308834266244, 'fraction_numerical': 0.008274519347773181, 'mean_word_length': 2.546160483175151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7281691', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1243, 'n_words': 281}