Giter Site home page Giter Site logo

grid's Introduction

This is a small library that produces grid papers. The resulting paper either contains actual grids or have dots at the vertices.

This is intended to be compiled into web assembly and used via a browser. A live version can be found at https://dec41.user.srcf.net/includes/grid/

The only dependency (apart from wasm-bindgen) is flate2, which is used to produce compressed pdf files. This dependency can be easily removed at the expense of large file sizes. The difference is somewhat significant when producing large dotted papers --- to produce an X by Y grid, we need to draw X + Y lines, but to produce the corresponding dotted paper, we need to draw XY dots.

Compiling

Compiling requires cargo to be installed. Once it is installed, run

 $ ./build.sh

to compile. The compiled web assembly file will be written into dist/. The directory dist/ should then be served via a web server. Be sure to use a web server that uses the correct MIME type for webassembly files, e.g. emrun. To serve with Apache, add the following line to .htaccess.

AddType application/wasm .wasm

Acknowledgements

The pdf part of the code is based on rust-pdf

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.