{"id":20778068,"url":"https://github.com/stackgl/gl-flags","last_synced_at":"2025-04-30T18:41:18.103Z","repository":{"id":32412173,"uuid":"35989084","full_name":"stackgl/gl-flags","owner":"stackgl","description":"Easily change and access your WebGL flags set by gl.enable/gl.disable with minimised overhead.","archived":false,"fork":false,"pushed_at":"2015-05-21T04:00:43.000Z","size":120,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-09T19:39:19.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-21T03:36:21.000Z","updated_at":"2022-02-26T17:30:15.000Z","dependencies_parsed_at":"2022-08-23T03:30:53.474Z","dependency_job_id":null,"html_url":"https://github.com/stackgl/gl-flags","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fgl-flags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fgl-flags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fgl-flags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fgl-flags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackgl","download_url":"https://codeload.github.com/stackgl/gl-flags/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224410381,"owners_count":17306477,"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:18:58.619Z","updated_at":"2024-11-17T13:19:01.476Z","avatar_url":"https://github.com/stackgl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gl-flags\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nEasily change and access your WebGL flags set by `gl.enable`/`gl.disable` with\nminimised overhead. This package transparently adds a caching layer to these\nfunctions, providing a more convenient API, smoothly interoperating with\nother libraries unaware of `gl-flags`, and only requiring to read from the GPU\nonce for each parameter on creation.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/gl-flags.png)](https://nodei.co/npm/gl-flags/)\n\n### `flags = glFlags(gl)`\n\nCreates a new `flags` instance attached to `gl`, which is a\n`WebGLRenderingContext`.\n\n### `flags.FLAG_NAME`\n\nReturns a boolean value reflecting whether `gl.FLAG_NAME` is enabled or not.\nFor example, the following:\n\n``` javascript\nvar flags = require('gl-flags')(gl)\n\nflags.BLEND = true\nflags.CULL_FACE = true\n```\n\nIs equivalent to this:\n\n``` javascript\ngl.enable(gl.BLEND)\ngl.disable(gl.CULL_FACE)\n```\n\nYou can access each property without needing to hit the GPU either, so you can\neasily toggle flags temporarily without effecting global state like so:\n\n``` javascript\nvar previousBlend = flags.BLEND\n\nflags.BLEND = true\n// drawing API\nflags.BLEND = previousBlend\n```\n\nParameters are only changed if their state has changed.\n\n## Contributing\n\nSee [stackgl/contributing](https://github.com/stackgl/contributing) for details.\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/stackgl/gl-flags/blob/master/LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fgl-flags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackgl%2Fgl-flags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fgl-flags/lists"}