Git Product home page Git Product logo

mondrian's Introduction

Mondrian

Mondrian is a smart and easy-to-learn vector graphics web app.

Try it at mondrian.io.

mondrian.io

Features

Basic

Mondrian offers all the tools needed to create, modify, and export simple SVG files.

  • Basic editing capabilities
    • Strict drawing with the pen tool
    • Loose drawing with the crayon tool
    • Shape manipulation (scaling & rotation)
    • Individual point manipulation with bezier controls
    • Basic typography
    • Zoom, eyedropper
    • Smooth, efficient tools & operations
  • File import (via FileReader)
    • SVG
  • File export
    • SVG
    • PNG (via canvas API)
  • Clean UI
    • Minimal "flat" aesthetic with little visual distraction
    • A smart UI that shows only utilities that can be used at that moment
  • Layout
    • Basic dot grid with snapping for layout

Innovations

Mondrian also supports undo/redo through a (somewhat rough and unstable) file history API that

  • stores operations, not states
  • is tiny and JSON-serializable, so it can be persisted to a server and loaded back up in another session
  • can visually reconstruct a file's entire history step-by-step

There are no tests written for this system. It's a big todo.

Building the app

The app works out of the box. It's a simple static site. To run it locally:

git clone [email protected]:artursapek/mondrian.git
cd mondrian
npm install
coffee server.coffee --nodejs

Then, open localhost:3000 in your web browser, and there you have it!

You can also access the latest stable build at mondrian.io.

Installing Dependencies

npm install

Building the JavaScript

Run the build task to compile all of the files into the executable build.js:

cake build

It features a dumb progress bar that's based off the last compile time. It's actually pretty accurate.

> cake build
Compiling 16455 lines
[██████------------------------] 14 seconds remaining

The entire app is written in Coffeescript. You have to manually compile the app every time you make changes.

The source files are specified in an ordered map in build.yml. They are nested under their directory names. You can specify a different directory name using the _dir: key. null means no directory.

For example,

src: !!omap
  - setup:
    - _dir: null
    - settings
    - setup
  - userInterface:
    - _dir: ui
    - selection
  - geometry:
    - posn
    - line-segment

refers to

src/settings.coffee
src/setup.coffee
src/ui/selection.coffee
src/geometry/posn.coffee
src/geometry/line-segment.coffee

Building the CSS

The stylesheets are written in LESS, and compiled into CSS like so:

cake styles

Contributing

There's a lot to do! Read CONTRIBUTING.md for a list of what you can work on, context around the project, and guidelines.

Supported Browsers

Mondrian officially supports only the latest desktop stable versions of Chrome, Firefox, and Safari.

License

All of the Mondrian code and documentation is available under the MIT License.

Contact

You're welcome to contact me at [email protected].

mondrian's People

Contributors

fishrock123 avatar tombyrer avatar mkly avatar colmtuite avatar silasb avatar

Watchers

James Cloos avatar Mikhail N 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.