{"id":14981332,"url":"https://github.com/rozek/aframe-rounded-box-component","last_synced_at":"2025-07-13T16:06:06.852Z","repository":{"id":58033919,"uuid":"529310618","full_name":"rozek/aframe-rounded-box-component","owner":"rozek","description":"an A-Frame component and primitive for boxes with rounded edges","archived":false,"fork":false,"pushed_at":"2022-11-23T11:23:46.000Z","size":220,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T04:05:24.384Z","etag":null,"topics":["a-frame","component","primitive","three-js","threejs"],"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/rozek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-26T15:27:39.000Z","updated_at":"2024-10-31T00:34:29.000Z","dependencies_parsed_at":"2023-01-22T02:15:15.164Z","dependency_job_id":null,"html_url":"https://github.com/rozek/aframe-rounded-box-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rozek/aframe-rounded-box-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Faframe-rounded-box-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Faframe-rounded-box-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Faframe-rounded-box-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Faframe-rounded-box-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rozek","download_url":"https://codeload.github.com/rozek/aframe-rounded-box-component/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Faframe-rounded-box-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265167530,"owners_count":23721461,"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":["a-frame","component","primitive","three-js","threejs"],"created_at":"2024-09-24T14:03:20.320Z","updated_at":"2025-07-13T16:06:06.833Z","avatar_url":"https://github.com/rozek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aframe-rounded-box-component #\n\nan A-Frame component and primitive for boxes with rounded edges\n\nBoxes with sharp edges are already part of A-Frame's built-in components and primitives - but those with rounded edges are missing. `aframe-rounded-box-component` fills this gap and provides both an A-Frame component and a primitive for such geometries.\n\n![Example Screenshot](screenshot.png)\n\nThe implementation was inspired by an old [discourse posting](https://discourse.threejs.org/t/round-edged-box/1402).\n\n**NPM users**: please consider the [Github README](https://github.com/rozek/aframe-vertical-billboard-component/blob/main/README.md) for the latest description of this package (as updating the docs would otherwise always require a new NPM package version)\n\n\u003e Just a small note: if you like this work and plan to use it, consider \"starring\" this repository (you will find the \"Star\" button on the top right of this page), so that I know which of my repositories to take most care of.\n\n## Installation ##\n\n`aframe-rounded-box-component` may be used as an ECMAScript module (ESM) or explicitly loaded after the `\u003cscript\u003e` tag for A-Frame itself.\n\nFor the ESM variant, install the package into your build environment using [NPM](https://docs.npmjs.com/) with the command\n\n```\nnpm install aframe-rounded-box-component\n```\n\nand `import` it into your code whereever needed\n\n```javascript\nimport \"aframe-rounded-box-component\"\n```\n\nOtherwise, load the plain script file directly\n\n```html\n\u003cscript src=\"https://unpkg.com/aframe-rounded-box-component\"\u003e\u003c/script\u003e\n```\n\n## Properties ##\n\n`aframe-rounded-box-component` is an A-Frame component with the following properties:\n\n\u003ctable\u003e\n \u003ctbody\u003e\n  \u003ctr\u003e\u003cth\u003eProperties\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n \u003ctbody\u003e\n  \u003ctr\u003e\u003ctd\u003ewidth\u003c/td\u003e\u003ctd\u003ethe box's width (default: 1)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eheight\u003c/td\u003e\u003ctd\u003ethe box's height (default: 1)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003edepth\u003c/td\u003e\u003ctd\u003ethe box's depth (default: 1)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eradius\u003c/td\u003e\u003ctd\u003ethe box's bevel radius (max. 50% of the smallest value among width, height and depth, default: 0.1)\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003esegments\u003c/td\u003e\u003ctd\u003ethe number of segments used to model round edges (default: 3)\u003c/td\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\nAdditionally, this module defines an A-Frame primitive named `a-rounded-box` for this component which maps its attributes `width`, `height`, `depth`, `radius` and `segments` to component properties of the same name (see usage below)\n\n## Usage ##\n\nOnce loaded or imported, `aframe-rounded-box-component` may be used as a component of a plain A-Frame entity\n\n```html\n\u003ca-scene\u003e\n  \u003ca-entity rounded-box=\"radius:0.3\" position=\"0 0 0\"\u003e\u003c/a-entity\u003e\n\u003c/a-scene\u003e\n```\n\n### Primitive ###\n\nAlternatively, the primitive `a-rounded-box` may be used in order to get a more compact code:\n\n```html\n\u003ca-scene\u003e\n  \u003ca-rounded-box radius=\"0.3\" material=\"color:green\" position=\"0 1 0\"\u003e\u003c/a-rounded-box\u003e\n\u003c/a-scene\u003e\n```\n\n## Example ##\n\nHere is a complete example (albeit without the HTML boilerplate)\n\n```html\n\u003cscript src=\"https://unpkg.com/aframe\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/aframe-hemisphere-controls\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/aframe-rounded-box-component\"\u003e\u003c/script\u003e\n\n\u003ca-scene embedded\n  hemisphere-controls=\"position:0 0.5 4; target:0 1 0\"\n  style=\"width:600px; height:450px\"\n\u003e\n  \u003ca-sky color=\"#555555\"\u003e\u003c/a-sky\u003e\n\n  \u003ca-entity light=\"type:ambient; color:#BBBBBB\"\u003e\u003c/a-entity\u003e\n  \u003ca-entity light=\"type:directional; intensity:0.6; castShadow:true\"\n    position=\"1 1 1\"\n  \u003e\u003c/a-entity\u003e\n\n  \u003ca-plane width=\"1000\" height=\"1000\" color=\"#555555\" shadow=\"receive:true\"\n    position=\"0 0 0\" rotation=\"-90 0 0\"\n  \u003e\u003c/a-plane\u003e\n\n  \u003ca-rounded-box radius=\"0.1\" material=\"color:#AA0000\" shadow=\"cast:true\"\n    position=\"-1.5 0.8 0\"\n  \u003e\u003c/a-rounded-box\u003e\n  \u003ca-rounded-box radius=\"0.3\" material=\"color:#00AA00\" shadow=\"cast:true\"\n    position=\"0    0.8 0\"\n  \u003e\u003c/a-rounded-box\u003e\n  \u003ca-rounded-box radius=\"0.5\" material=\"color:#0000CC\" shadow=\"cast:true\"\n    position=\"1.5  0.8 0\"\n  \u003e\u003c/a-rounded-box\u003e\n\u003c/a-scene\u003e\n```\n\n## Build Instructions ##\n\nYou may easily build this package yourself.\n\nJust install [NPM](https://docs.npmjs.com/) according to the instructions for your platform and follow these steps:\n\n1. either clone this repository using [git](https://git-scm.com/) or [download a ZIP archive](https://github.com/rozek/aframe-rounded-box-component/archive/refs/heads/main.zip) with its contents to your disk and unpack it there \n2. open a shell and navigate to the root directory of this repository\n3. run `npm install` in order to install the complete build environment\n4. execute `npm run build` to create a new build\n\nYou may also look into the author's [build-configuration-study](https://github.com/rozek/build-configuration-study) for a general description of his build environment.\n\n## License ##\n\n[MIT License](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Faframe-rounded-box-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frozek%2Faframe-rounded-box-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Faframe-rounded-box-component/lists"}