{"id":22120318,"url":"https://github.com/joshbrew/3d_and_physics","last_synced_at":"2025-06-25T07:03:20.946Z","repository":{"id":133634509,"uuid":"457508555","full_name":"joshbrew/3d_and_physics","owner":"joshbrew","description":"Some 3D and rendering math in js. Basic physics (with AABB trees and octrees), graph node trees for meshes, 3D math, pinhole camera model","archived":false,"fork":false,"pushed_at":"2022-02-11T01:04:29.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T07:03:19.893Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshbrew.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":"2022-02-09T19:57:19.000Z","updated_at":"2022-02-10T01:41:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"20f4a8ec-96b8-45b2-9f1b-3a8b12e5c417","html_url":"https://github.com/joshbrew/3d_and_physics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joshbrew/3d_and_physics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbrew%2F3d_and_physics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbrew%2F3d_and_physics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbrew%2F3d_and_physics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbrew%2F3d_and_physics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshbrew","download_url":"https://codeload.github.com/joshbrew/3d_and_physics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbrew%2F3d_and_physics/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261823686,"owners_count":23215140,"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-12-01T14:22:47.758Z","updated_at":"2025-06-25T07:03:20.930Z","avatar_url":"https://github.com/joshbrew.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3D and Physics Math Tests - JS\n Some 3D and rendering math in js. \n \n - Basic physics (with AABB trees and octrees, but not implemented yet in the collision checks), \n - graph node trees for translating/rotating meshes \n - 3D math e.g. basic linear algebra and calculus. Efficient nearest neighbor search.\n - pinhole camera model\n\nLargely untested, more for exercise but eventually will get used by me (and thus cleaned up \u0026 demo'd). \n\nThe Mat4 and Camera matrix math in this version is based on using 2D arrays which is not quite as efficient but is conceptually easier. Meshes are still 1D arrays e.g. `[p0x,p0y,p0z,p1x,p1y,p1z,p2x,p2y,p2z]`\nLots of better libraries for 1D array based matrix operations.\n\nBonus jank Double Pendulum simulation with 3 different derivations rendering side by side. They all have... issues... \nThis is being made to explore more of the math of complex systems and learn lagrangian mechanics.\n\nThe web does not have good options for efficient pluggable 2d and 3d physics models to go on top of, say, a ThreeJS renderer. There are some things to do to leverage the gpu for simulating large physics body collections that I cannot find any JS implementations for that are developer oriented (if not behind a paywall or deeply integated in a larger system). I prefer few to no dependencies and otherwise just keeping my object formats fairly standard and general across libraries so it's easier to mix and match based on my needs. Maybe there will be a standard some day for all of the expected systems and data structures we are constantly redeveloping in each language etc, since right now that is mainly managed by what is actually efficient - which gets really esoteric really fast.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshbrew%2F3d_and_physics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshbrew%2F3d_and_physics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshbrew%2F3d_and_physics/lists"}