<commit_before>/*
* Shader.js
* Parameters:
* use: GLOW.ShaderCompiledData
* except: object, holding data that should be overwritten in GLOW.ShaderCompiledData
* vertexShader: string, vertex shader code
* fragmentShader: string, fragment shader code
* data: attributes and uniforms
* elements: elements (array or UInt16Array)
*/

GLOW.Shader = (function() {
    
    "use strict"; "use restrict";

    // private data, functions and initializations here

    // constructor
    function shader(parameters) {
        this.id = GLOW.uniqueId();

        this.compiledData = parameters.use ?
            parameters.use.clone(parameters.except) :
            GLOW.Compiler.compile(parameters);

        this.attachData();
    }

    // methods
    shader.prototype.attachData = function() {
        var u, a;

        for (u in this.compiledData.uniforms) {
            if (this[u] === undefined) {
                this[u] = this.compiledData.uniforms[u].data;
            }
            else {
                console.warn("GLOW.Shader.attachUniformAndAttributeData: name collision on uniform " + u + ", not attaching for easy access. Please use Shader.uniforms." + u + ".data to access data.");
            }
        }

        for (a in this.compiledData.attributes) {
            if (this[a] === undefined) {
                this[a] = this.compiledData.attributes[a].data;
            }
            else {
                console.warn("GLOW.Shader.attachUniformAndAttributeData: name collision on attribute " + a + ", not attaching for easy access. Please use Shader.attributes." + a + ".data to access data.");<commit_msg>Attached uniforms, attributes, elements and program from .compiledData for easier access<commit_after>/*
* Shader.js
* Parameters:
* use: GLOW.ShaderCompiledData
* except: object, holding data that should be overwritten in GLOW.ShaderCompiledData
* vertexShader: string, vertex shader code
* fragmentShader: string, fragment shader code
* data: attributes and uniforms
* elements: elements (array or UInt16Array)
*/

GLOW.Shader = (function() {
    
    "use strict"; "use restrict";

    // private data, functions and initializations here

    // constructor
    function shader(parameters) {
        this.id = GLOW.uniqueId();

        this.compiledData = parameters.use ?
            parameters.use.clone(parameters.except) :
            GLOW.Compiler.compile(parameters);

        this.attachData();
    }

    // methods
    shader.prototype.attachData = function() {
        var u, a;

        this.uniforms = this.compiledData.uniforms;
        this.attributes = this.compiledData.attributes;
        this.elements = this.compiledData.elements;
        this.program = this.compiledData.program;

        for (u in this.compiledData.uniforms) {
            if (this[u] === undefined) {
                this[u] = this.compiledData.uniforms[u].data;
            }
            else {
                console.warn("GLOW.Shader.attachUniformAndAttributeData: name collision on uniform " + u + ", not attaching for easy access. Please use Shader.uniforms." + u + ".data to access data.");
            }
        }

        for (a in this.compiledData.attributes) {
            if (this[a] === undefined) {
                this[a] = this.compiledData.attributes[a].data;
            }
            else {
                console.warn("GLOW.Shader.attachUniformAndAttributeData: name collision on attribute " + a + ", not attaching for easy access. Please use Shader.attributes." + a + ".data to access data.");
{'fraction_non_alphanumeric': 0.10963172804532578, 'fraction_numerical': 0.0011331444759206798, 'mean_word_length': 2.3919308357348705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2841538', 'n_tokens_mistral': 977, 'n_tokens_neox': 923, 'n_words': 257}