{"id":17164529,"url":"https://github.com/werehamster/simple-square-packing","last_synced_at":"2025-06-19T13:39:57.886Z","repository":{"id":17370808,"uuid":"74143629","full_name":"wereHamster/simple-square-packing","owner":"wereHamster","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-02T10:56:48.000Z","size":499,"stargazers_count":18,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T14:53:09.633Z","etag":null,"topics":["algorithm","d3","javascript"],"latest_commit_sha":null,"homepage":"https://werehamster.github.io/simple-square-packing/","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/wereHamster.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,"zenodo":null}},"created_at":"2016-11-18T15:48:10.000Z","updated_at":"2025-01-08T06:21:17.000Z","dependencies_parsed_at":"2025-04-13T14:50:59.577Z","dependency_job_id":"bf0c756e-1b2b-4301-b1ad-34ff36841b4d","html_url":"https://github.com/wereHamster/simple-square-packing","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wereHamster/simple-square-packing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wereHamster%2Fsimple-square-packing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wereHamster%2Fsimple-square-packing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wereHamster%2Fsimple-square-packing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wereHamster%2Fsimple-square-packing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wereHamster","download_url":"https://codeload.github.com/wereHamster/simple-square-packing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wereHamster%2Fsimple-square-packing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260760406,"owners_count":23058592,"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":["algorithm","d3","javascript"],"created_at":"2024-10-14T22:52:10.840Z","updated_at":"2025-06-19T13:39:52.869Z","avatar_url":"https://github.com/wereHamster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Square Packing Algorithm\n\nYou can find an interactive example here: https://werehamster.github.io/simple-square-packing\n\nBlog post explaining the algorithm: https://blog.interactivethings.com/simple-square-packing-algorithm-ddd3c2793711\n\n```javascript\nimport {packSquares} from './index';\n\n// The values which you want to show.\nconst values = [4, 3, 1, 0.2];\n\n// The sizes of the squares are relative to this value. You can use it if you\n// want to render multiple figures which need to be sized relatively\n// to each other.\nconst maxValue = 7;\n\nconst result = packSquares(values, maxValue);\n```\n\nConsult the source file to see which fields are available in the result.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerehamster%2Fsimple-square-packing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwerehamster%2Fsimple-square-packing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerehamster%2Fsimple-square-packing/lists"}