{"id":16126898,"url":"https://github.com/mikolalysenko/simple-2d-shader","last_synced_at":"2025-07-07T00:06:30.233Z","repository":{"id":57359719,"uuid":"10853132","full_name":"mikolalysenko/simple-2d-shader","owner":"mikolalysenko","description":"A simple 2D shader","archived":false,"fork":false,"pushed_at":"2013-06-21T21:47:11.000Z","size":316,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-17T19:18:43.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mikolalysenko.github.io/simple-2d-shader/","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/mikolalysenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-21T21:36:48.000Z","updated_at":"2021-06-14T03:32:46.000Z","dependencies_parsed_at":"2022-09-06T21:41:33.703Z","dependency_job_id":null,"html_url":"https://github.com/mikolalysenko/simple-2d-shader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikolalysenko/simple-2d-shader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fsimple-2d-shader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fsimple-2d-shader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fsimple-2d-shader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fsimple-2d-shader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikolalysenko","download_url":"https://codeload.github.com/mikolalysenko/simple-2d-shader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fsimple-2d-shader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260547970,"owners_count":23026217,"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-10-09T21:40:52.378Z","updated_at":"2025-07-07T00:06:30.216Z","avatar_url":"https://github.com/mikolalysenko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"simple-2d-shader\n================\nA 2D webgl shader with a varying color attribute\n\n**TODO: Need to add more documentation and extra configuration stuff**\n\n## Example\n\n[Try this example in your browser](http://mikolalysenko.github.io/simple-2d-shader/)\n\n```javascript\nvar shell = require(\"gl-now\")()\nvar createBuffer = require(\"gl-buffer\")\nvar createSimpleShader = require(\"simple-2d-shader\")\n\nvar shader, buffer\n\nshell.on(\"gl-init\", function() {\n  var gl = shell.gl\n  \n  shader = createSimpleShader(gl)\n  \n  buffer = createBuffer(gl, [ 0, -1, -1, 0, 1, 1 ])\n})\n\nshell.on(\"gl-render\", function(t) {\n  shader.bind()\n\n  buffer.bind()\n  shader.attributes.position.pointer()\n  shader.attributes.position.enable()\n\n  shader.attributes.color = [1, 1, 0]\n\n  buffer.draw(shell.gl.TRIANGLES, 3)\n})\n```\n\nHere is a screen shot:\n\n\u003cimg src=https://raw.github.com/mikolalysenko/simple-2d-shader/master/images/simple2dshader.png\u003e\n\n## Install\n\n    npm install simple-2d-shader\n\n## API\n\n### `var shader = require(\"simple-2d-shader\")(gl)`\nCreates a simple 2D shader\n\n## Credits\n(c) 2013 Mikola Lysenko. MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fsimple-2d-shader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikolalysenko%2Fsimple-2d-shader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fsimple-2d-shader/lists"}