{"id":26953226,"url":"https://github.com/elementalhaven/topdown-framework","last_synced_at":"2025-04-03T01:29:20.469Z","repository":{"id":174328264,"uuid":"505071646","full_name":"ElementalHaven/Topdown-Framework","owner":"ElementalHaven","description":"Framework for plotting 2D data graphically in Java","archived":false,"fork":false,"pushed_at":"2022-10-23T08:36:23.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-26T13:23:03.727Z","etag":null,"topics":["java","library","mapping","mapping-tools"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ElementalHaven.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,"governance":null}},"created_at":"2022-06-19T10:01:23.000Z","updated_at":"2022-10-23T08:38:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"37e570dd-8543-45ce-84d4-45ef03b53249","html_url":"https://github.com/ElementalHaven/Topdown-Framework","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"9a7048f25294086ce757c154f816aac772afbc23"},"previous_names":["elementalhaven/topdown-framework"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementalHaven%2FTopdown-Framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementalHaven%2FTopdown-Framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementalHaven%2FTopdown-Framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementalHaven%2FTopdown-Framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElementalHaven","download_url":"https://codeload.github.com/ElementalHaven/Topdown-Framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246921313,"owners_count":20855236,"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":["java","library","mapping","mapping-tools"],"created_at":"2025-04-03T01:29:19.906Z","updated_at":"2025-04-03T01:29:20.457Z","avatar_url":"https://github.com/ElementalHaven.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Topdown Framework\nLibrary for plotting 2D data such as maps in Java\n\n## Requirements\n\n- JDK 8 or newer to build and Java 8 or newer to run.\n\n## Usage\n\nAll classes in the library are in the `tdf` package.\nThe core of the library is handled in two classes: `Config` and `Renderer`.\nBoth of these classes are meant to be subclassed to add extra functionality,\nalthough doing so may not be necessary, especially for the `Renderer`.\n\nThe `Renderer` class is a viewport for rendering data. It can be embedded within an existing swing UI,\nhowever a convenience method, `Renderer.simpleSetup(String, Config)`, \nis also provided to create a window consisting of only the Renderer.\n\nThe `Config` class contains customizable settings.\nThe Config is linked to a Renderer using the `Config.init(Renderer)` method.\nConfigs are mapped to Renderers in a 1 to 1 manner, meaning that each Config can only be tied to one Renderer.\nThe Config file needs to be linked to a Renderer so the Renderer knows what settings to use\nand so the Config can properly set and update key bindings in the Renderer.\n\nGenerally, settings are loaded from file using `Config.load()` method.\nDoing so will load settings from the file specified in Config's constructor,\nor `config.ini` within the current working directory if the default constructor is used.\nThe `load` method is automatically called when the Config is linked to a Renderer with `init`.\nConfiguration settings can also be set manually.\nAfter manually modifying settings, `Config.setModified()` should be called so\nthe Renderer know's to update its own internal copy before the next time the viewport is redrawn.\n\nRendered items are implemented by extending the `Renderable` class\nand adding them using `Renderer.add(Renderable)` or `Renderer.add(Renderable, int)`.\nThe first method is a convenience method for the second, with the layer parameter defaulting to 0.\nLayers are rendered low to high, meaning layer 1 will appear on top of layer 0.\nThe grid is rendered immediately before layer 0, if enabled.\nWhile implementing the `Renderable.render(Graphics2D, Config)` is the only thing that's required\nfor an item to be rendered, there's a few other things that can be modified to improve rendering.\n- `Rectangle bounds` - can be set so the Renderer knows not to draw it if it lies completely outside the viewport.\n- `boolean visible` - can be modified to toggle rendering of the item completely.\n- `boolean canBeAntialiased()` - can be overridden to make sure no antialiasing is applied to this object.\nThis is useful for cases such as filled triangles that might have gaps between them if antialiased.\n\n## Builtin Features\n- Viewport panning and zooming\n- Togglable grid\n- Layers for sorting of items\n- Customizable background color\n- Customizable grid size and colors\n- Antialiasing that can be toggled in the config and selectively disabled for individual rendered items\n- Customizable key bindings with convenience methods for adding more\n- Coordinate readout\n- Reversible Y axis\n- Occlusion culling support\n- Convience method to focus viewport on a specific area\n\n## Default Controls\n\n- **C**: Reload the config file.\n- **E**: Clear/empty/erase the viewport of any data.\n- **G**: Toggle grid.\n- **Mouse Drag**: Move the viewport.\n- **Mousewheel**: Zoom in/out.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementalhaven%2Ftopdown-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementalhaven%2Ftopdown-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementalhaven%2Ftopdown-framework/lists"}