{"id":26662862,"url":"https://github.com/speciesfilegroup/waxy","last_synced_at":"2025-10-12T12:03:05.152Z","repository":{"id":56897881,"uuid":"171354430","full_name":"SpeciesFileGroup/waxy","owner":"SpeciesFileGroup","description":"Hexagonal SVG from Ruby","archived":false,"fork":false,"pushed_at":"2023-03-03T17:48:07.000Z","size":1107,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T18:23:57.989Z","etag":null,"topics":["dataviz","hexagon","ruby","svg"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpeciesFileGroup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-18T20:51:45.000Z","updated_at":"2023-03-03T17:48:06.000Z","dependencies_parsed_at":"2022-08-21T02:20:18.502Z","dependency_job_id":"d87c37d5-8253-4bec-9d17-faaa1da5815b","html_url":"https://github.com/SpeciesFileGroup/waxy","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"beeada0a30b8c15e9168954b064d230d14e05ebc"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fwaxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fwaxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fwaxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpeciesFileGroup%2Fwaxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpeciesFileGroup","download_url":"https://codeload.github.com/SpeciesFileGroup/waxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456382,"owners_count":21106607,"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":["dataviz","hexagon","ruby","svg"],"created_at":"2025-03-25T14:18:45.807Z","updated_at":"2025-10-12T12:03:00.112Z","avatar_url":"https://github.com/SpeciesFileGroup.png","language":"Ruby","readme":"[![Continuous Integration Status][1]][2]\n\n# Waxy\n\nWaxy is an experimental visualization tool to generate SVG hexagons and their layouts, it is in Ruby.\n\nThe library is solely possible thanks to the wonderful Amit Patel sharing his knowledge at [the Red Blob Games blog](https://www.redblobgames.com/), in particular [the hexagon tutorial](https://www.redblobgames.com/grids/hexagons/).  Most of the serious code herein is simply an implementation of the metacode therein. All of the misinterpretations and problems are ours, not Amit's!\n\n![random](/examples/img/random.png)\n![rectangle](/examples/img/rectangle.png)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'waxy'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install waxy\n\n## Usage\n\n_The API will most certainly change if/when the code is deemed more than a playground. Nothing is really optimized._\n\n```Ruby\nrequire 'waxy'\n\nsrand\n\nlayout = Waxy::Geometry::Layout.new(\n  Waxy::Geometry::Orientation::LAYOUT_POINTY,\n  Waxy::Geometry::Point.new(20,20), # size\n  Waxy::Geometry::Point.new(20, 20), # start\n  5.0 # padding\n) \n\nmeta = []\n\n(0..400).each do |i|\n  a = Waxy::Meta.new\n  a.size = (0..5).collect{ rand(0.0..1.0) } \n  a.stroke = 'purple'\n  a.link = 'http://127.0.0.1:3000/'\n  a.link_title = \"RECORD #{i}\"\n  \n  meta.push a \nend\n\nmeta.sort!{ |a,b| a.sum_size \u003c=\u003e b.sum_size }\n\nc = Waxy::Render::Svg::Canvas.new(1000, 1000)\nc.body \u003c\u003c Waxy::Render::Svg.rectangle(layout, meta, 5)\nputs c.to_svg\n```\n\nthen\n\n```Bash\nruby go.rb \u003e svg.html\nopen svg.html\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/SpeciesFileGroup/waxy.\n\n## License\n\nThe gem is available as open source under the terms of the [NCSA](https://opensource.org/licenses/NCSA).\n\n[1]: https://secure.travis-ci.org/SpeciesFileGroup/waxy.png?branch=master\n[2]: http://travis-ci.org/SpeciesFileGroup/waxy?branch=master\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeciesfilegroup%2Fwaxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeciesfilegroup%2Fwaxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeciesfilegroup%2Fwaxy/lists"}