{"id":19689880,"url":"https://github.com/mithi/bare-minimum-3d","last_synced_at":"2025-07-16T18:32:50.549Z","repository":{"id":42584373,"uuid":"289870138","full_name":"mithi/bare-minimum-3d","owner":"mithi","description":"A small package to transform declared 3d data (points, polygons, lines) to 2d data.","archived":false,"fork":false,"pushed_at":"2022-07-29T23:46:41.000Z","size":1821,"stargazers_count":35,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-23T12:55:14.273Z","etag":null,"topics":["3d-graphics","3d-plot","computer-graphics","data-visualization","graphics-programming","hacktoberfest","javascript","javascript-library","plotly","svg","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://mithi.github.io/hello-3d-world/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mithi.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":"2020-08-24T08:24:04.000Z","updated_at":"2025-04-30T08:26:34.000Z","dependencies_parsed_at":"2022-08-24T00:41:09.525Z","dependency_job_id":null,"html_url":"https://github.com/mithi/bare-minimum-3d","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mithi/bare-minimum-3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithi%2Fbare-minimum-3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithi%2Fbare-minimum-3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithi%2Fbare-minimum-3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithi%2Fbare-minimum-3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mithi","download_url":"https://codeload.github.com/mithi/bare-minimum-3d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mithi%2Fbare-minimum-3d/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265530611,"owners_count":23783124,"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":["3d-graphics","3d-plot","computer-graphics","data-visualization","graphics-programming","hacktoberfest","javascript","javascript-library","plotly","svg","typescript","typescript-library"],"created_at":"2024-11-11T19:03:32.204Z","updated_at":"2025-07-16T18:32:50.528Z","avatar_url":"https://github.com/mithi.png","language":"TypeScript","readme":"[![NPM](https://img.shields.io/npm/v/@mithi/bare-minimum-3d.svg)](https://www.npmjs.com/package/@mithi/bare-minimum-3d)\n[![MINIFIED](https://img.shields.io/bundlephobia/min/@mithi/bare-minimum-3d?color=%2300BCD4\u0026label=minified)](https://bundlephobia.com/result?p=@mithi/bare-minimum-3d)\n[![GZIPPED](https://img.shields.io/bundlephobia/minzip/@mithi/bare-minimum-3d?color=%2300BCD4\u0026label=minified%20%2B%20gzipped)](https://bundlephobia.com/result?p=bare-minimum-3d)\n[![Install Size](https://packagephobia.now.sh/badge?p=@mithi/bare-minimum-3d)](https://packagephobia.com/result?p=%40mithi%2Fbare-minimum-3d)\n[![Coverage Status](https://coveralls.io/repos/github/mithi/bare-minimum-3d/badge.svg?branch=master)](https://coveralls.io/github/mithi/bare-minimum-3d?branch=master)\n![Test Passing](https://github.com/mithi/bare-minimum-3d/workflows/test/badge.svg)\n[![Code Climate](https://codeclimate.com/github/mithi/bare-minimum-3d/badges/gpa.svg)](https://codeclimate.com/github/mithi/bare-minimum-3d)\n[![technical debt](https://img.shields.io/codeclimate/tech-debt/mithi/bare-minimum-3d)](https://codeclimate.com/github/mithi/bare-minimum-3d/trends/technical_debt)\n[![buy me coffee](https://img.shields.io/badge/Buy%20me%20-coffee!-orange.svg?logo=buy-me-a-coffee\u0026color=795548)](https://ko-fi.com/minimithi)\n\n# Bare Minimum 3d\n\nA small package to transform declared 3d data (points, polygons, lines) to 2d data. The output is intended to be fed to a [`BareMinimum2d`](https://github.com/mithi/bare-minimum-2d) React component.\n\nExtremely lightweight and fairly configurable, this package has zero dependencies and a relatively straightforward declarative API. See also: [why I created this project](https://github.com/mithi/bare-minimum-3d/wiki/Why-I-created-this-project).\n\n\nYou can checkout a demo application (and play with the parameters!) at: https://mithi.github.io/hello-3d-world\n\n![](https://user-images.githubusercontent.com/1670421/91668232-c04c9c00-eb3d-11ea-8673-c1a525c7bc27.png)\n\n## Getting started\n\n```\n$ npm i @mithi/bare-minimum-3d\n$ npm i bare-minimum-2d\n```\n\nYou can check out the examples of [`SceneOptions`, `SceneSettings`, `ViewSettings`](https://github.com/mithi/bare-minimum-3d/blob/master/test/data/input-settings.ts) that you can pass to the `renderScene()` function. You can pass 3d data such as this [`hexapod`](https://github.com/mithi/bare-minimum-3d/blob/master/test/data/input-data-3d.ts) or [`pyramid`](https://github.com/mithi/hello-3d-world/blob/master/src/data/input-3d-pyramid.ts). When you pass the hexapod data along with the other example parameters linked above, [`this is the corresponding 2d data`](https://github.com/mithi/bare-minimum-3d/blob/master/test/data/output-data-2d.ts) that `renderScene()` would return.\n\n```js\nimport BareMinimum2d from \"bare-minimum-2d\"\nimport renderScene from \"@mithi/bare-minimum-3d\"\n\nconst { container, data } = renderScene(\n    viewSettings, sceneSettings, sceneOptions, data3d\n)\n\n\u003cBareMinimum2d {...{container, data} /\u003e\n```\n\nPlease check the [wiki / documentation](https://github.com/mithi/bare-minimum-3d/wiki), to learn more about the arguments that you'll need to pass to `BareMinimum3d`'s `renderScene()` function.\n\n-   [`SceneOptions`](https://github.com/mithi/bare-minimum-3d/wiki/SceneOptions)\n-   [`SceneSettings`](https://github.com/mithi/bare-minimum-3d/wiki/SceneSettings)\n-   [`ViewSettings`](https://github.com/mithi/bare-minimum-3d/wiki/ViewSettings)\n\n## `0.4.0` Update\n\nIn Version `0.4.0` all utility functions are now exposed to the users, so you can use it however you like. With all the building blocks available to you, you can even build your own custom `renderScene` function, should you want to!\n\n```js\nimport {\n    renderScene,\n    SCENE_ORIENTATION,\n    getWorldWrtCameraMatrix,\n    AxesRenderer,\n    SceneCube,\n    DataRenderer,\n    SceneCubeRenderer,\n    Vector,\n    rotateXYZmatrix,\n    multiply4x4matrix,\n    radians,\n} from \"@mithi/bare-minimum-3d\"\n```\n\n## ⚠️❗ Limitations\n\nThis library does NOT perform [clipping](https://www.gabrielgambetta.com/computer-graphics-from-scratch/clipping.html) or [hidden surface removal](https://www.gabrielgambetta.com/computer-graphics-from-scratch/hidden-surface-removal.html). Each element are just painted to the screen in the order that you declare them in your array of data, and the scene elements are always rendered first, meaning your data will be rendered on top of any scene element. This means that it is possible that elements will incorrectly overlap other elements that are actually nearer to the camera. There is no plan to fix this... unless someone [makes a pull request](https://github.com/mithi/bare-minimum-3d/issues/20)! :heart:\n\n## Contributing [![PRs welcome!](https://img.shields.io/badge/PRs-welcome-orange.svg?style=flat)](./CONTRIBUTING.md)\n\nPlease read the [contributing guidelines](https://github.com/mithi/hexapod/blob/master/CONTRIBUTING.md) and the recommended [commit style guide](https://github.com/mithi/hexapod/wiki/A-Commit-Style-Guide)! Thank you!\n","funding_links":["https://ko-fi.com/minimithi"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithi%2Fbare-minimum-3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmithi%2Fbare-minimum-3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithi%2Fbare-minimum-3d/lists"}