{"id":13339997,"url":"https://github.com/alvinwan/aframe-low-poly","last_synced_at":"2026-03-02T21:36:39.782Z","repository":{"id":89467714,"uuid":"159003558","full_name":"alvinwan/aframe-low-poly","owner":"alvinwan","description":"low poly add-ons for aframe virtual reality","archived":false,"fork":false,"pushed_at":"2019-05-31T06:56:03.000Z","size":33,"stargazers_count":21,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-14T04:51:04.435Z","etag":null,"topics":["aframe","javascript","low-poly","virtual-reality"],"latest_commit_sha":null,"homepage":"http://alvinwan.com/aframe-low-poly","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/alvinwan.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":"2018-11-25T06:12:39.000Z","updated_at":"2025-08-27T12:18:33.000Z","dependencies_parsed_at":"2023-03-08T21:30:16.272Z","dependency_job_id":null,"html_url":"https://github.com/alvinwan/aframe-low-poly","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/alvinwan/aframe-low-poly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2Faframe-low-poly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2Faframe-low-poly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2Faframe-low-poly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2Faframe-low-poly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvinwan","download_url":"https://codeload.github.com/alvinwan/aframe-low-poly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinwan%2Faframe-low-poly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30020724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T20:56:45.032Z","status":"ssl_error","status_checked_at":"2026-03-02T20:51:18.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aframe","javascript","low-poly","virtual-reality"],"created_at":"2024-07-29T19:22:05.123Z","updated_at":"2026-03-02T21:36:39.756Z","avatar_url":"https://github.com/alvinwan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A-Frame Low Poly\n\nLow poly add-ons for a-frame virtual reality models. [View the aframe low-poly demo \u0026raquo;](http://alvinwan.com/aframe-low-poly/demo)\n\n\u003cimg width=\"1429\" alt=\"Screen Shot 2019-05-30 at 11 42 04 PM\" src=\"https://user-images.githubusercontent.com/2068077/58686776-969e3700-8334-11e9-8b91-2ed7b0a5c56a.png\"\u003e\n\nTake any existing a-frame primitive, such as `a-sphere` and replace the prefix to obtain a low-poly\nversion, such as `lp-sphere`. For example, the below is a low-poly sphere for a tree's foliage:\n\n```\n\u003clp-sphere color=\"#59810C\" max-amplitude=\"0.2\" position=\"0 0.6 0\"\u003e\u003c/lp-sphere\u003e\n```\n\nThe above spheres are used in the demo pictured below at [aaalv.in/vr/low-poly-trees](http://alvinwan.com/vr/low-poly-trees). For more, see [aaalv.in/vr](http://alvinwan.com/vr)\n\n\u003cimg width=\"1203\" alt=\"screen shot 2018-11-24 at 11 32 11 pm\" src=\"https://user-images.githubusercontent.com/2068077/48976744-31921d80-f041-11e8-8aa3-1959bc6fa65b.png\"\u003e\n\n# Usage\n\nLooks like what you need? To get started, include the minified javascript in your a-frame project.\n\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/alvinwan/aframe-low-poly@0.0.5/dist/aframe-low-poly.min.js\"\u003e\u003c/script\u003e\n```\n\n## Low-Poly Attributes\n\nEvery low-poly object supports the following attributes. Modify the following attributes just like you would any other AFrame VR attribute:\n\n**`max-amplitude: \u003cx double\u003e \u003cy double\u003e \u003cz double\u003e`**\n\n**`min-amplitude: \u003cx double\u003e \u003cy double\u003e \u003cz double\u003e`**\n\nMaximum and minimum amount of perturbation allowed for each vertex. The vertex will not be moved more or less than this amount away from the original position.\n\nExample:\n\n```\n\u003clp-plane max-amplitude=\"1 0 0\" min-amplitude=\"0.5 0 0\"\u003e\u003c/lp-plane\u003e\n```\n\n**`seed`**\n\nSeed for random-number generator, allowing you to fix randomness during design.\n\n\u003e **`max-amplitude-difference: \u003cx double\u003e \u003cy double\u003e \u003cz double\u003e`** *coming soon*\n\u003e\n\u003e **`min-amplitude-difference: \u003cx double\u003e \u003cy double\u003e \u003cz double\u003e`** *coming soon*\n\u003e\n\u003e Maximum and minimum difference in perturbation between adjacent points. For now,\n\u003e use the curvature specification below to achieve a similar effect.\n\n## Terrain\n\n**`LowPolyTerrain.registerCurvature(componentName, function({x, y, z}, {xmin, ymin, zmin}, {xmax, ymax, zmax})`**\n\nAllows you to specify curvature of the surface. Function that accepts the vertex's *original position* and outputs the vertex's new position. This is applied *before* customizable randomization. All random perturbations are applied to the vertex's new position.\n\nExample:\n\n```\nLowPolyTerrain.registerCurvature('sine', function (vertex, min, max) {\n    var py = (vertex.y - min.y) / (max.y - min.y);\n    var z = Math.sin(py * 2 * Math.PI) + min.z;\n    return {x: vertex.x, y: vertex.y, z: z}\n});\n```\n\n## Cloning\n\n**`clone=\u003cselector\u003e`**\n\nDuplicate entire entities without repeating common HTML. For example, say you have a template tree and many trees in your environment. Simply create one tree, and use the `clone` attribute for the rest, changing the position and rotating as necessary. This keeps your code streamlined and eases development (e.g., changing tree trunks for all cloned trees involves a single-line change)\n\nExample:\n\n```\n\u003ca-entity id=\"tree\" ... \u003e\u003c/a-entity\u003e\n\u003ca-entity clone=\"#tree\"\u003e\u003c/a-entity\u003e\n```\n\n## Projects\n\nProjects that use `aframe-low-poly`:\n\n- Ergo ([aaalv.in/ergo](http://alvinwan.com/ergo)): an endless runner game\n- Tree Editor ([trees.aaalv.in](http://trees.alvinwan.com)): a simplistic low-poly tree editor\n- Tree Carousel ([aaalv.in/vr/low-poly-trees](http://alvinwan.com/vr/low-poly-trees)): a demo carousel for low-poly trees\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinwan%2Faframe-low-poly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvinwan%2Faframe-low-poly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinwan%2Faframe-low-poly/lists"}