{"id":20767756,"url":"https://github.com/dmnsgn/glsl-constants","last_synced_at":"2026-01-30T14:16:25.482Z","repository":{"id":62354783,"uuid":"126908527","full_name":"dmnsgn/glsl-constants","owner":"dmnsgn","description":"Common GLSL math constants (with 11 decimals) available both as ES modules strings and as GLSL files for use with glslify.","archived":false,"fork":false,"pushed_at":"2024-07-06T14:45:25.000Z","size":44,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T05:53:07.643Z","etag":null,"topics":["constants","degrees","gamma","glsl","golden-ratio","phi","pi","radians","tau"],"latest_commit_sha":null,"homepage":"https://dmnsgn.github.io/glsl-constants/","language":"GLSL","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/dmnsgn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-27T01:00:50.000Z","updated_at":"2024-12-03T15:07:50.000Z","dependencies_parsed_at":"2024-11-18T01:34:23.017Z","dependency_job_id":null,"html_url":"https://github.com/dmnsgn/glsl-constants","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"aebf09a11d2964dd93e9f2d0aa55e315b45a3cd6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dmnsgn/glsl-constants","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fglsl-constants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fglsl-constants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fglsl-constants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fglsl-constants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmnsgn","download_url":"https://codeload.github.com/dmnsgn/glsl-constants/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fglsl-constants/sbom","scorecard":{"id":348183,"data":{"date":"2025-08-11","repo":{"name":"github.com/dmnsgn/glsl-constants","commit":"84c91531406dc5c650b705e506a36b28fb884a38"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.MD:0","Info: FSF or OSI recognized license: MIT License: LICENSE.MD:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:40:15.843Z","repository_id":62354783,"created_at":"2025-08-18T07:40:15.843Z","updated_at":"2025-08-18T07:40:15.843Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["constants","degrees","gamma","glsl","golden-ratio","phi","pi","radians","tau"],"created_at":"2024-11-17T11:33:16.396Z","updated_at":"2026-01-30T14:16:25.461Z","avatar_url":"https://github.com/dmnsgn.png","language":"GLSL","funding_links":["https://paypal.me/dmnsgn"],"categories":[],"sub_categories":[],"readme":"# glsl-constants\n\n[![npm version](https://img.shields.io/npm/v/glsl-constants)](https://www.npmjs.com/package/glsl-constants)\n[![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)](https://www.npmjs.com/package/glsl-constants)\n[![npm minzipped size](https://img.shields.io/bundlephobia/minzip/glsl-constants)](https://bundlephobia.com/package/glsl-constants)\n[![dependencies](https://img.shields.io/librariesio/release/npm/glsl-constants)](https://github.com/dmnsgn/glsl-constants/blob/main/package.json)\n[![types](https://img.shields.io/npm/types/glsl-constants)](https://github.com/microsoft/TypeScript)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-fa6673.svg)](https://conventionalcommits.org)\n[![styled with prettier](https://img.shields.io/badge/styled_with-Prettier-f8bc45.svg?logo=prettier)](https://github.com/prettier/prettier)\n[![linted with eslint](https://img.shields.io/badge/linted_with-ES_Lint-4B32C3.svg?logo=eslint)](https://github.com/eslint/eslint)\n[![license](https://img.shields.io/github/license/dmnsgn/glsl-constants)](https://github.com/dmnsgn/glsl-constants/blob/main/LICENSE.md)\n\nCommon GLSL math constants (with 11 decimals) available both as ES modules strings and as GLSL files for use with glslify.\n\n[![paypal](https://img.shields.io/badge/donate-paypal-informational?logo=paypal)](https://paypal.me/dmnsgn)\n[![coinbase](https://img.shields.io/badge/donate-coinbase-informational?logo=coinbase)](https://commerce.coinbase.com/checkout/56cbdf28-e323-48d8-9c98-7019e72c97f3)\n[![twitter](https://img.shields.io/twitter/follow/dmnsgn?style=social)](https://twitter.com/dmnsgn)\n\n## Installation\n\n```bash\nnpm install glsl-constants\n```\n\n## Usage\n\n### ESM\n\n```js\nimport * as glslConstants from \"glsl-constants\";\nimport * as glslRotate from \"glsl-rotate\";\n\nconst shader = /* glsl */ `\n${glslConstants.GAMMA}\n${glslConstants.RECIPROCAL_GAMMA}\n${glslConstants.TAU}\n${glslConstants.PI}\n${glslConstants.HALF_PI}\n${glslConstants.QUARTER_PI}\n${glslConstants.RECIPROCAL_PI}\n${glslConstants.RECIPROCAL_TAU}\n${glslConstants.TO_RADIANS}\n${glslConstants.TO_DEGREES}\n\n// ...\n\nvec3 toGamma(vec3 v) {\n  return pow(v, vec3(RECIPROCAL_GAMMA));\n}\n\n${glslRotate.rotate}\n\nvoid main() {\n  vec2 p2d = vec2(1.0, 0.0);\n  p2d = rotate(p2d, TAU);\n  p2d = rotate(p2d, PI);\n  p2d = rotate(p2d, HALF_PI);\n  p2d = rotate(p2d, QUARTER_PI);\n  p2d = rotate(p2d, PHI);\n  p2d = rotate(p2d, RECIPROCAL_PI);\n  p2d = rotate(p2d, RECIPROCAL_TAU);\n  p2d = rotate(p2d, 90.0 * TO_RADIANS);\n\n  // ...\n  gl_FragColor.rgb = toGamma(color.rgb);\n}\n`;\n```\n\n### glslify\n\n```glsl\n#pragma glslify: GAMMA = require(glsl-constants/GAMMA)\n#pragma glslify: TAU = require(glsl-constants/TAU)\n#pragma glslify: PI = require(glsl-constants/PI)\n#pragma glslify: HALF_PI = require(glsl-constants/HALF_PI)\n#pragma glslify: QUARTER_PI = require(glsl-constants/QUARTER_PI)\n#pragma glslify: PHI = require(glsl-constants/PHI)\n#pragma glslify: RECIPROCAL_PI = require(glsl-constants/RECIPROCAL_PI)\n#pragma glslify: RECIPROCAL_TAU = require(glsl-constants/RECIPROCAL_TAU)\n#pragma glslify: TO_RADIANS = require(glsl-constants/TO_RADIANS)\n#pragma glslify: TO_DEGREES = require(glsl-constants/TO_DEGREES)\n\n// ...\n\nvec3 toGamma(vec3 v) {\n  return pow(v, vec3(RECIPROCAL_GAMMA));\n}\n\n#pragma glslify: rotate = require(glsl-rotate)\n\nvoid main() {\n  vec2 p2d = vec2(1.0, 0.0);\n  p2d = rotate(p2d, TAU);\n  p2d = rotate(p2d, PI);\n  p2d = rotate(p2d, HALF_PI);\n  p2d = rotate(p2d, QUARTER_PI);\n  p2d = rotate(p2d, PHI);\n  p2d = rotate(p2d, RECIPROCAL_PI);\n  p2d = rotate(p2d, RECIPROCAL_TAU);\n  p2d = rotate(p2d, 90.0 * TO_RADIANS);\n\n  // ...\n  gl_FragColor.rgb = toGamma(color.rgb);\n}\n```\n\n## License\n\nMIT. See [license file](https://github.com/dmnsgn/glsl-constants/blob/main/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnsgn%2Fglsl-constants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmnsgn%2Fglsl-constants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnsgn%2Fglsl-constants/lists"}