All Projects → lykhonis → Terramach

lykhonis / Terramach

Licence: gpl-3.0
Terra Mach is a mapping frontend system to build graphical interfaces for devices.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Terramach

react-mapboxgl
Declarative React components for mapbox-gl-js.
Stars: ✭ 15 (-89.44%)
Mutual labels:  mapbox-gl, mapbox
Mappa
A canvas wrapper for Maps 🗺 🌍
Stars: ✭ 290 (+104.23%)
Mutual labels:  mapbox, mapbox-gl
maptalks.mapboxgl
MapboxglLayer for maptalks.js
Stars: ✭ 51 (-64.08%)
Mutual labels:  mapbox-gl, mapbox
deck.gl-time-series-widget
A React Time Slider implementation for DECK.GL - (non)temporal data - by CPU filtering ⌛
Stars: ✭ 19 (-86.62%)
Mutual labels:  mapbox-gl, mapbox
Martin
Blazing fast and lightweight PostGIS vector tiles server
Stars: ✭ 540 (+280.28%)
Mutual labels:  mapbox, mapbox-gl
Mapdeck
R interface to Deck.gl and Mapbox
Stars: ✭ 296 (+108.45%)
Mutual labels:  mapbox, mapbox-gl
angular-mapboxgl-directive
AngularJS directive for Mapbox GL
Stars: ✭ 43 (-69.72%)
Mutual labels:  mapbox-gl, mapbox
Maplibre Gl Native
An open-source fork of Mapbox GL SDK for iOS and Android and other platforms
Stars: ✭ 65 (-54.23%)
Mutual labels:  mapbox, mapbox-gl
Mapbox Gl Native
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
Stars: ✭ 4,091 (+2780.99%)
Mutual labels:  mapbox, mapbox-gl
Vue Mapbox
Vuejs 2 components for interacting with mapbox-gl-js
Stars: ✭ 359 (+152.82%)
Mutual labels:  mapbox, mapbox-gl
Mapbox Gl Js
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
Stars: ✭ 8,017 (+5545.77%)
Mutual labels:  mapbox, mapbox-gl
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (-4.93%)
Mutual labels:  mapbox, mapbox-gl
Pure Maps
Maps and navigation
Stars: ✭ 136 (-4.23%)
Mutual labels:  mapbox-gl
Homebridge Config Ui X
The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
Stars: ✭ 1,967 (+1285.21%)
Mutual labels:  gui
Attendace management system
In this system we can fill attendance by face recognition
Stars: ✭ 135 (-4.93%)
Mutual labels:  gui
Git Cola
git-cola: The highly caffeinated Git GUI
Stars: ✭ 1,787 (+1158.45%)
Mutual labels:  gui
Stratosdb
☄️ ☁️ An All-in-One GUI for Cloud SQL that can help users design and test their AWS RDS Instances
Stars: ✭ 140 (-1.41%)
Mutual labels:  gui
Elements
Elements C++ GUI library
Stars: ✭ 2,004 (+1311.27%)
Mutual labels:  gui
Kanban App
Kanban board built with Rust and Elm
Stars: ✭ 1,711 (+1104.93%)
Mutual labels:  gui
Imgui sdl
ImGuiSDL: SDL2 based renderer for Dear ImGui
Stars: ✭ 134 (-5.63%)
Mutual labels:  gui

Terra Mach

Terra Mach is a mapping frontend system to build graphical interfaces for devices.

This project focuses on experiences around statistical data (graphs, diagrams), mapping, and user input. When it comes to user experience, elements a user interacts with are flexible enough to build most of common experiences.

The project is in active development. Most of the APIs are stable, though some breaking changes are still possible.

This project is highly inspired by Flutter. Terra Mach is written in a systems programming language Rust. It leverages graphics library Skia to enable high performant 2D graphics.

How to Use

Terra Mach crate is located in terramach folder. To use it checkout Terra Mach to your workspace and link it locally by supplying a path.

git clone https://github.com/lykhonis/terramach.git
cd MyProject

Add dependency in Cargo.toml.

[dependencies.terramach]
path = "../terramach/terramach"

Examples

Terra Mach comes with some prebuilt examples of what can be built with it.

Dashboard

Dashboard Preview

A dashboard sample app inspired by Dark Version design. The dashboard integrates Mapbox to access maps. The integration module is located in third-party crate.

Try example by running in command line:

cd examples/dashboard
cargo run --release

This may take awhile for initial build, so don't hesitate to grab some ☕️.

In order to access maps, you would need to supply Mapbox access token in Settings.toml. Register and get Mapbox access token by signing up here.

cd examples/dashboard
touch Settings.toml

and insert following content:

[mapbox]
access-token = "ACCESS_TOKEN_GOES_HERE"
cache-path = "/tmp/mapbox.cache.db"

Build a Widget

TerraMach GUI is a composition of widgets and/or direct painting. For example, a Decoration widget paints background color but also manages its child widget.

A simple example of a counter app. On a tap, the counter is increased and UI is updated to reflect the change.

  1. Define a widget and its state (state is optional)
#[derive(Default, Clone, PartialEq, PartialWidget)]
struct Counter {}

#[derive(Default)]
struct CounterState {
    counter: usize,
}
  1. Implement a counter widget
impl Widget for Counter {
    // prepare state for the counter
    fn mount(&self, context: &mut WidgetContext, mount: &mut MountContext) {
        context.set_state(CounterState::default());
    }
    
    // build a counter widget with tap gesture and white background
    fn build(&self, context: &mut WidgetContext, build: &mut BuildContext) {
        let state = context.state::<CounterState>().unwrap();
        build.add_child(
            Gesture::new(
                0,
                build.event_emitter(),
                TapGesture::default(),
                None,
                Decoration::new(
                    Color::WHITE,
                    None,
                    Align::new(
                        Alignment::center(),
                        Text::new_text(format!("Counter {}", state.counter).as_str()),
                    ),
                ),
            ),
        );
    }
    
    // handle a single tap
    fn event(&self, context: &mut WidgetContext, event: &mut EventContext) {
        if let Event::Tap(_) = event.get() {
            let state = context.state_mut::<CounterState>().unwrap();
            state.counter += 1;
            event.mark_need_build();
        }
    }
}
  1. Start the app
fn main() {
    App::new((1020, 640))
        .with_title("Counter")
        .run(Counter::default());
}

Supported Platforms

In order:

Platform Status
Mac OS Supported
Android Partial
Linux Planned
Windows Planned
iOS Planned
Web Considered

License

This software is available publicly via GPLv3 license which can be found here. For any other request please contact me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].