Coder Social home page Coder Social logo

dotscape's Introduction

dotscape

What is this?

Dotscape is a simple GUI program for composing 2D shapes out of triangles and exporting them to code for use with OpenGL or other graphics libraries.

Why

I wanted to create glyphs in OpenGL for one of my other projects.

I coded vectors for 'A' and 'B' (containing 72 elements and 128 elements respectively), but the process was time consuming.

I wanted there to be a lightweight GUI editor specialised for creating 2D shapes that can be exported as code for use with OpenGL, and that's what this project is for.

Demo

Building

Build requirements

Dotscape has only been tested on aarch64-linux (a Raspberry Pi 5) but it may work on other platforms.

Requirements include:

  • The MLton compiler for Standard ML
  • OpenG ES 3.0
  • The GLFW windowing library

The last two requirements may be a bit malleable because the project follows the Functional Core, Imperative Shell architecture, maintaining a strict separation between pure and impure code.

How to build

  1. git clone https://github.com/hummy123/dotscape
  2. cd dotscape
  3. ./build-unix.sh
  4. ./dotscape

To do

This isn't an exhaustive list, but these are some features I would like to add to this project at some point from the top of my head.

  • Display clicked positions
  • Redraw components when resized
  • Support undo (with <Ctrl-z>) and redo (with <Ctrl-y> or <Ctrl-Shift-z>)
  • Save drawn project to a custom file format and allow reloading
  • Export to code with <Ctrl-E>.
    • Exports a function which takes (xPos, yPos, xLength, yLength, windowWidth, windowHeight) arguments and returns a vector where the object is fitted in these coordinates.
  • Add right-side panel
    • With options (like adjusting x/y coordinates in a number input, possibly layers, selecting export options...)
  • Support setting more z coordinates and (r,g,b,a) colour values.

There's quite a bit to do!

dotscape's People

Contributors

hummy123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.