{"id":20778136,"url":"https://github.com/stackgl/glsl-extract","last_synced_at":"2025-04-30T18:42:12.426Z","repository":{"id":10249920,"uuid":"12356855","full_name":"stackgl/glsl-extract","owner":"stackgl","description":"extract uniforms and attributes from glsl programs","archived":false,"fork":false,"pushed_at":"2014-07-05T22:19:15.000Z","size":172,"stargazers_count":19,"open_issues_count":2,"forks_count":4,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-27T23:20:34.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/glsl-extract","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.mit","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-25T09:27:52.000Z","updated_at":"2022-12-14T11:13:20.000Z","dependencies_parsed_at":"2022-09-19T09:30:40.469Z","dependency_job_id":null,"html_url":"https://github.com/stackgl/glsl-extract","commit_stats":null,"previous_names":["gl-modules/glsl-extract"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackgl","download_url":"https://codeload.github.com/stackgl/glsl-extract/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225041100,"owners_count":17411592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T13:19:26.061Z","updated_at":"2024-11-17T13:19:26.653Z","avatar_url":"https://github.com/stackgl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glsl-extract\n\nextract attribute and uniform data from glsl files, no matter how nested.\n\n```javascript\nvar extract = require('glsl-extract')\n\nextract(fs.createReadStream('test.glsl'))(function(err, info) {\n  {attributes, uniforms} = info\n  for(var def of uniforms) {\n    {name, type} = def  // where \"name\" is the full dotted, array'd\n                        // gl.getUniformLocation lookup path and\n                        // type is the declared type.\n  }\n})\n\nextract(\"also works with just text\")(function(err, info) {\n  // should execute on same frame.\n})\n\n```\n\n# api\n\n### extract(ReadableStream | String | Buffer[, getContextFunction) -\u003e Continuable\n\nGiven a readable stream, string, or buffer, return a continuable that will trigger\nparsing. The continuable will call its callback with `err` (if any), and `data`,\nwhere `data` is comprised of `{attributes:[GLSLLocation], uniforms:[GLSLLocation]}`.\n\n### GLSLLocation\n\nA GLSLLocation is just a plain object containing `name` (the appropriate name to\npass to `gl.getUniformLocation`) and `type` (one of the primitive GLSL types).\n\n# license\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fglsl-extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackgl%2Fglsl-extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fglsl-extract/lists"}