Coder Social home page Coder Social logo

heavyfishdesign's Introduction

This is Heavy Fish Design

It's for designing things that scale (get it, get it?).

At its heart, HFD is a json based design language. This package contains a compiler to SVG files, and various useful tools for working with 2d models.

Visit heavyfishdesign.com for full documentation

Features:

  • A fully functional JSON based language for designing parameterized 2d vector drawings
  • Set of useful transformations including joining, scaling, simplify and more
  • Outputs clear and concise svg
  • Layout engine will arrange parts to fit within the specified material size
  • Parts can be automatically split to fit within the cut material.

Usage:

The runnable contains a simple server for displaying in the browser, as well as commands for rendering designs on the command line.

Local Render:

To render an hfd file to the corresponding svg files use:

$ go run main.go render --path=designs/drawer_organizers/silverware.hfd --output_file=designs_rendered/silverware

Basic server operation:

To run a local server to see svg's rendered in the browser, do this. This is useful to use during design, but note that by default, the server only displays the first rendered svg document (i.e. if your document spans multiple pages only the first is desplayed)

go run main.go serve

then open browser to:

http://localhost:2003/json?file=<path_to_hfd_file>

ex: http://localhost:2003/json?file=designs/box/box_three_sided.hfd


Runbook

When making code changes, first run the unit tests then the comparison of all local designs (this will compare all the local designs to the last render)

$ go test ./...
$ go run main.go diff_test

This will output any rendering differences your change causes. Double check that changes are expected. if so, run:

$ go run main.go designs_updated

and commit

Build the docs:

$ cd docs && make html && cd ..

VSCODE

To set the .hfd file associations edit settings.hfd and add:

"files.associations": {
    "*.hfd": "json"
}

RELEASE

To create a release

$ git tag v1.0.X
$ git push origin master --tags

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.