{"size": 1803, "ext": "js", "max_stars_repo_path": "public/dev/native/Cell.js", "max_stars_repo_name": "CiscoDevNet/Glance", "max_stars_repo_stars_event_min_datetime": "2019-07-15T21:55:21.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-23T17:41:39.000Z", "max_issues_repo_path": "public/dev/native/Cell.js", "max_issues_repo_name": "CiscoDevNet/Glance", "max_issues_repo_issues_event_min_datetime": "2021-06-18T02:33:06.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-21T02:45:21.000Z", "max_forks_repo_path": "public/dev/native/Cell.js", "max_forks_repo_name": "CiscoDevNet/Glance", "max_forks_repo_forks_event_min_datetime": "2021-08-20T10:41:27.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-11T22:27:59.000Z"}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 34.6730769231, "max_line_length": 116, "alphanum_fraction": 0.4514697726}
(function (nx) {
    var EXPORT = nx.define("sanvy.Cell", {
        properties: {
            sanvy: null,
            buffer: null,
            matrices: {
                value: function () {
                    return new nx.List();
                }
            },
            program: {
                dependencies: "sanvy,texture,vertexBuffer,colorBuffer,indexBuffer,matrixUniforms.length",
                value: function (sanvy, texture, vertexBuffer, colorBuffer, indexBuffer, numMatrix) {
                    if (sanvy) {
                        var context = sanvy.context();
                    }
                }
            }
        },
        methods: {
            init: function (sanvy, data) {
                this.inherited();
                this.sanvy(sanvy);
                // TODO initialize
            },
            draw: function () {
                var context = this.context();
                var bufferIndex = this.bufferIndex();
                if (bufferIndex) {
                    context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, bufferIndex.buffer());
                    context.drawElements(context.TRIANGLES, bufferIndex.triangles().length(), gl.UNSIGNED_SHORT, 0);
                } else{
		    gl.drawArrays(gl.TRIANGLES, 0, );
		}
            }
        },
        statics: {
            GLSL_TEXTURE: {
                uniform: "uniform sampler2D uSampler;",
                varying: "varying vec2 vTextureCoord;",
                main: {
                    fragment: "gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));",
                    vertex: "vTextureCoord = {name}"
                }
            },
            GLSL_MATRIX: {
                uniform: "uniform mat4 uMatrix{index}"
            }
        }
    });
})(nx);
