{"id":15672664,"url":"https://github.com/adarosecannon/aframe-surface-scatter","last_synced_at":"2025-05-06T22:22:15.212Z","repository":{"id":41232254,"uuid":"508757590","full_name":"AdaRoseCannon/aframe-surface-scatter","owner":"AdaRoseCannon","description":"Position objects randomly over an objects surface","archived":false,"fork":false,"pushed_at":"2022-11-16T13:47:51.000Z","size":350,"stargazers_count":15,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T16:21:43.450Z","etag":null,"topics":["aframe","aframevr","threejs"],"latest_commit_sha":null,"homepage":"https://ada.is/aframe-surface-scatter","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdaRoseCannon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-29T15:58:10.000Z","updated_at":"2024-05-03T14:42:55.000Z","dependencies_parsed_at":"2022-07-09T19:46:10.044Z","dependency_job_id":null,"html_url":"https://github.com/AdaRoseCannon/aframe-surface-scatter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaRoseCannon%2Faframe-surface-scatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaRoseCannon%2Faframe-surface-scatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaRoseCannon%2Faframe-surface-scatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaRoseCannon%2Faframe-surface-scatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdaRoseCannon","download_url":"https://codeload.github.com/AdaRoseCannon/aframe-surface-scatter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252777365,"owners_count":21802590,"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":["aframe","aframevr","threejs"],"created_at":"2024-10-03T15:29:45.131Z","updated_at":"2025-05-06T22:22:15.167Z","avatar_url":"https://github.com/AdaRoseCannon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AFrame-surface-scatter\n\n[Demo](https://ada.is/aframe-surface-scatter)\n\n![Screenshot of a 3D rendered field of grass with flowers](https://user-images.githubusercontent.com/4225330/176483332-1135d75d-d1fe-4e30-87ce-5852e2ce5c34.png)\n\n\n## Simple Example\n```html\n\u003ca-cylinder radius=\"0.02\" height=\"0.04\" color=\"red\"\u003e\u003c/a-cylinder\u003e\n\u003ca-sphere radius=\"0.5\" position=\"0 1 -2\" surface-scatter=\"object:#decoration;count:800;\"\u003e\u003ca-sphere\u003e\n```\n\nYou can use multiple `surface-scatter` components by appending `__name` to the component e.g. \n\n```html\n\u003ca-sphere radius=\"0.5\" surface-scatter__flowers=\"object:#flowers;count:800;\" surface-scatter__trees=\"object:#trees;count:20;\"\u003e\u003ca-sphere\u003e\n```\n\n\u003c!--DOCS--\u003e\n### surface-scatter component\n\nThis component uses instancing to cover one object in another.\n\n| Property        | Type     | Description                                                                                                                                                                                                                                                                                                                               | Default |\n| :-------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |\n| object          | selector | Object to place on the surface of this object                                                                                                                                                                                                                                                                                             |         |\n| count           | number   | Amount of objects                                                                                                                                                                                                                                                                                                                         | 128     |\n| weightAttribute | string   | Specifies a vertex attribute to be used as a weight when sampling from the surface. Faces with higher weights are more likely to be sampled, and those with weights of zero will not be sampled at all. For vector attributes, only .x is used in sampling. If no weight attribute is selected, sampling is randomly distributed by area. | \"\"      |\n| scale           | vec3     | Amount to scale the objects by                                                                                                                                                                                                                                                                                                            | {}      |\n| rotation        | vec3     | Amount to rotate the objects by                                                                                                                                                                                                                                                                                                           | {}      |\n| scaleJitter     | vec3     | Add randomness to the scaling                                                                                                                                                                                                                                                                                                             | {}      |\n| rotationJitter  | vec3     | Add randomness to the rotation                                                                                                                                                                                                                                                                                                            | {}      |\n| uniformJitter   | boolean  | Scale x,y,z together (true) or each independently (false)                                                                                                                                                                                                                                                                                 | true    |\n\n\u003c!--DOCS_END--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadarosecannon%2Faframe-surface-scatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadarosecannon%2Faframe-surface-scatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadarosecannon%2Faframe-surface-scatter/lists"}