{"id":34613441,"url":"https://github.com/codeagent/rb-phys2d-renderer","last_synced_at":"2026-05-28T10:31:26.340Z","repository":{"id":65723112,"uuid":"598220383","full_name":"codeagent/rb-phys2d-renderer","owner":"codeagent","description":"The means for visualizing and interacting with world created by RbPhys2D","archived":false,"fork":false,"pushed_at":"2023-02-21T19:29:29.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-16T23:51:51.576Z","etag":null,"topics":["renderer","rigid-body-dynamics","simulation","viewport","visualizer","webgl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/codeagent.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":"2023-02-06T16:51:03.000Z","updated_at":"2023-02-21T19:28:54.000Z","dependencies_parsed_at":"2023-02-19T10:15:37.984Z","dependency_job_id":null,"html_url":"https://github.com/codeagent/rb-phys2d-renderer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/codeagent/rb-phys2d-renderer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeagent%2Frb-phys2d-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeagent%2Frb-phys2d-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeagent%2Frb-phys2d-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeagent%2Frb-phys2d-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeagent","download_url":"https://codeload.github.com/codeagent/rb-phys2d-renderer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeagent%2Frb-phys2d-renderer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33605377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["renderer","rigid-body-dynamics","simulation","viewport","visualizer","webgl"],"created_at":"2025-12-24T14:18:45.839Z","updated_at":"2026-05-28T10:31:26.335Z","avatar_url":"https://github.com/codeagent.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/codeagent/rb-phys2d-renderer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/codeagent/rb-phys2d-renderer/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/rb-phys2d-renderer.svg)](https://badge.fury.io/js/rb-phys2d-renderer)\n\n# Debug Renderer For RbPhys2D\n\nThe means for visualizing and interacting with world created by [RbPhys2D](https://github.com/codeagent/rb-phys2d)\n\n## What's Included:\n\n- Picking And Dragigin Objects (`LMB`)\n- Viewport Scaling And Navigation (`WHEEL`, `MMB`)\n- Rendering `Axes`, `Objects`, `Joints`, `Contacts`\n- Touch Devices Support\n\n## Installation\n\nUsing `npm` package manager:\n\n```bash\nnpm install rb-phys2d-renderer\n```\n\n## Usage\n\n### ESM\n\n```typescript\nimport { createViewport, createWorldRenderer } from 'rb-phys2d-renderer';\n\nconst canvas = document.getElementById('canvas');\n\n// Create Viewport And Assign Required Controls\nconst viewport = createViewport(canvas)\n  .addMousePickingControl(world)\n  .addViewportAdjustingControl();\n\nconst renderer = createWorldRenderer(viewport, world);\n\n// Somewhere in loop:\n\n// clear viewport\nrenderer.clear();\n\n// render parts determined by render mask\nrenderer.render(RenderMask.Default \u0026 ~RenderMask.Joint);\n```\n\n### Browser\n\n```html\n\u003c!-- include bundle  --\u003e\n\u003cscript src=\"./node_modules/rb-phys2d-renderer/dist/bundle/rb-phys2d-renderer.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\n  // use global accessible object rbPhys2dRenderer\n  const viewport = rbPhys2dRenderer\n    .createViewport(canvas)\n    .addMousePickingControl(world)\n    .addViewportAdjustingControl();\n\n  const renderer = rbPhys2dRenderer.createWorldRenderer(viewport, world);\n\n  // ...\n\n  renderer.clear();\n  renderer.render(\n    rbPhys2dRenderer.RenderMask.Default \u0026 ~rbPhys2dRenderer.RenderMask.Joint\n  );\n\u003c/script\u003e\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeagent%2Frb-phys2d-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeagent%2Frb-phys2d-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeagent%2Frb-phys2d-renderer/lists"}