{"id":22740240,"url":"https://github.com/a-type/clouds","last_synced_at":"2025-08-23T05:05:47.806Z","repository":{"id":44739797,"uuid":"213000090","full_name":"a-type/clouds","owner":"a-type","description":"Procedurally generated 3D clouds in the browser.","archived":false,"fork":false,"pushed_at":"2023-07-11T01:28:12.000Z","size":634,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T05:05:10.943Z","etag":null,"topics":["clouds","generative-art","marching-cubes","react","threejs"],"latest_commit_sha":null,"homepage":"https://grantforrest.dev/demos/clouds/","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/a-type.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-05T13:00:23.000Z","updated_at":"2025-02-18T12:22:33.000Z","dependencies_parsed_at":"2025-04-14T05:52:47.684Z","dependency_job_id":"e6c5637c-141b-47ab-b8ed-a632455a5f4a","html_url":"https://github.com/a-type/clouds","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/a-type/clouds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fclouds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fclouds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fclouds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fclouds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-type","download_url":"https://codeload.github.com/a-type/clouds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fclouds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745472,"owners_count":24813500,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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":["clouds","generative-art","marching-cubes","react","threejs"],"created_at":"2024-12-10T23:07:58.589Z","updated_at":"2025-08-23T05:05:47.784Z","avatar_url":"https://github.com/a-type.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clouds\n\n![clouds rendering](docs/React%20App.png)\n\nThis is a ThreeJS experiment which eventually found a home on my [personal website](https://gfor.rest). I've created a simple algorithm to construct realistic, diverse cumulonimbus cloud formations in a voxel field, and render them with marching cubes. The cloud meshes are generated on a worker thread, then copied back to the main thread and loaded into a ThreeJS buffer geometry. I'm also using the excellent [react-three-fiber](https://github.com/react-spring/react-three-fiber) library to bind React to ThreeJS.\n\n## The Algorithm\n\n![illustration of inflation algorithm steps](docs/Sketch001.jpg)\n\nThe algorithm to \"inflate\" the clouds is in [`src/cloudInflator.ts`](src/cloudInflator.ts). It works in stages:\n\n1. Draw a 2d Perlin noise slice near the 'floor' of the voxel field, masked to a circle\n2. In passes, iterate over each voxel and 'inflate' it based on certain criteria:\n   1. If the voxel is empty, don't inflate it\n   2. Inflation scales proportionally to how close the voxel is to the center of the voxel field\n\n\"Inflation\" is accomplished by adding the values of a sphere centered on the target voxel, with a radius determined by the inflation 'score' of that particular voxel according to the rules above.\n\nAlthough not precisely accurate to actual meteorological processes, this serves as a pretty good approximation of how rising air inflates the shape of a real cumulonimbus cloud. It results in a puffy, voluminous center with smaller formations on the boundaries of the circle.\n\nTo complete the illusion, the whole structure is rotated and scaled randomly to avoid the appearance of being locked to a grid.\n\n## License\n\nMIT. Feel free to use the algorithm, including the exact code, however you like! Credit is appreciated. Make beautiful clouds.\n\n## Developing\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\u003cbr /\u003e\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\u003cbr /\u003e\nYou will also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\u003cbr /\u003e\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\u003cbr /\u003e\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\u003cbr /\u003e\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-type%2Fclouds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-type%2Fclouds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-type%2Fclouds/lists"}