{"id":16250905,"url":"https://github.com/jingwood/js-graphics-math","last_synced_at":"2025-03-19T19:32:23.659Z","repository":{"id":42928007,"uuid":"226141426","full_name":"jingwood/js-graphics-math","owner":"jingwood","description":"Math library for JavaScript 2D/3D graphics rendering.","archived":false,"fork":false,"pushed_at":"2024-09-12T02:37:39.000Z","size":540,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-17T17:55:19.693Z","etag":null,"topics":["2d","3d","calulation","distance","graphics","intersection","javascript","js","library","math","matrix","ray","rendering","vector"],"latest_commit_sha":null,"homepage":null,"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/jingwood.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-05T16:14:19.000Z","updated_at":"2024-09-12T02:37:43.000Z","dependencies_parsed_at":"2024-06-21T12:56:21.698Z","dependency_job_id":"3ced3557-fc6a-4a2c-8ec8-7d49ce6d1ced","html_url":"https://github.com/jingwood/js-graphics-math","commit_stats":{"total_commits":97,"total_committers":2,"mean_commits":48.5,"dds":0.07216494845360821,"last_synced_commit":"94f30a9df1e2a1fc7dfdc7cd8aaf1e8609396ef4"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fjs-graphics-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fjs-graphics-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fjs-graphics-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fjs-graphics-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jingwood","download_url":"https://codeload.github.com/jingwood/js-graphics-math/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221730671,"owners_count":16871294,"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":["2d","3d","calulation","distance","graphics","intersection","javascript","js","library","math","matrix","ray","rendering","vector"],"created_at":"2024-10-10T15:07:33.611Z","updated_at":"2024-10-27T20:39:26.720Z","avatar_url":"https://github.com/jingwood.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![https://www.npmjs.com/package/@jingwood/graphics-math](https://img.shields.io/npm/v/@jingwood/graphics-math.svg)\n\n# js-graphics-math\n\nMath library for JavaScript 2D/3D graphics rendering.\n\n# Classes\n\nThe following classes available under [src](src) folder.\n\n- [Vector2](src/vec2.js)\n- [Vector3](src/vec3.js)\n- [Matrix3](src/matrix3.js)\n- [Matrix4](src/matrix4.js)\n- [Quaternion](src/quaternion.js)\n- [BoundingBox 2D](src/bbox2.js)\n- [BoundingBox 3D](src/bbox3.js)\n- KDTree for 2D points\n- KDTree for 3D points\n- KDTree for 3D triangles\n- [OCTree for 3D triangles](src/spacetree.js)\n- [Ray](src/ray.js)\n- [Color3 (RGB)](src/color3.js)\n- [Color4 (RGBA)](src/color4.js)\n\n# Functions\n\nFunctions below available at [src/functions.js](src/functions.js).\n\n## Base math functions\n\n- clamp (1D/2D/3D)\n- smoothstep\n- angleToArc\n\n## Distance measuring\n\n- distancePointToPoint (2D/3D)\n- distancePointToLine (2D)\n- distancePointToLineSegment (2D)\n- distancePointToRect (2D)\n- distancePointToPolygon (2D)\n- findNearestPointToLineSegement (2D)\n- findNearestPointToPolygon (2D)\n\n## Intersecting test\n\n- lineIntersectsLine (2D)\n- lineIntersectsRect (2D)\n- lineIntersectsPolygon (2D)\n- rectIntersectsRect (2D)\n- rectIntersectsPolygon (2D)\n- checkLineParallel\n\n## Containing test\n\n- rectContainsPoint (2D)\n- triangleContainsPoint (2D)\n- polygonContainsPoint (2D)\n- polygonContainsRect (2D)\n- calcPolygonArea (2D)\n\n## Ray test\n\n- rayIntersectsPlane (3D)\n- rayIntersectsTriangle (3D)\n- rayIntersectsSphere (3D)\n- rayIntersectsBox (3D)\n\n## Vertex interpolation\n\n- **calcVertexInterpolation (3D)**\n  Calculate the interpolated vertex coordinate on a specified point of a 3D triangle with vertex coordinates.\n\n# Software uses this library\n\n- tarumae-viewer - Optimized WebGL engine for Showcase application\u003cbr/\u003e\n  [https://github.com/bulbinc/tarumae-viewer](https://github.com/bulbinc/tarumae-viewer)\n\n# Related Libraries\n\n- cpp-graphics-module (A C++ version of this library)\u003cbr/\u003e\n  [https://github.com/jingwood/cpp-graphics-module](https://github.com/jingwood/cpp-graphics-module)\n\n# License\n\nReleased under MIT License.\n\nCopyright (C) Jingwood \u0026 unvell.com, all rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingwood%2Fjs-graphics-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjingwood%2Fjs-graphics-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingwood%2Fjs-graphics-math/lists"}