Git Product home page Git Product logo

dapentry's Introduction

Dapentry

What is this?

This is heavily based on - some might call it a clone of - Drawing dynamic visualisations by Bret Victor

Live Demo

Live demo is here: https://dapentry.com/

How to build and run

$ npm run start

then open http://localhost:8080/index.html

How does it work?

It uses an interpreted language that resembles something like assembly to draw pictures. User interaction creates the program in the background. See here for more details on the language and the interpreter.

Todos:

https://trello.com/b/4Lzs5OFu/dapentry

Main Page

  • cool design
  • Why that name?

Introduction

  • Possibility to preload code into the designer instance
  • create polygons
  • extend polygons
  • working with data fields

Language/Interpreter

  • Language Version annotation
  • extend parser to recognize 43.34% as the number 0.4334
  • extend parser to recognise 1e12 as the number it is
  • Maybe configure what kind of Parameter-Class to use for a given token type. This removes dependency of Point2D from core runtime

Done

  • rotate around pivot
    • GrLine
  • Define aspect ratio for a drawing
    • Maybe determine bounding box for drawing automatically when storing
  • Rename fields
  • define stroke color separately
  • Show hints on what the active tool supports, like "hold shift to axis align, ..."
  • User friendly error messages.
  • Operation Editor
    • FOREACH
    • Enable the user to switch an DO/ENDDO to a FOREACH when assigning an array as the count
  • Auto growing input field
  • Fix scaling of rotated objects
  • Percentage-Point on vertical lines does not work
  • Tool Lifecycle: Abort/teardown is not called properly
  • Expressions are not displayed in steps and operation editor
  • Program does not always run as far as expected (better description needed)
  • Store app configuration in a central point
  • Annotate generated code to define
    • what statements to display on the ui
    • where to insert code
  • [ ] denote Points with <> instead of () Don't do that because we want to use () in expressions
  • [ ] denote expressions with () instead of {} Don't do that because we want to use () in expressions
  • Make a parameter type that evaluates an expression
  • Properly recognize when the user enters an expression when editing a statement
  • Switch the complex array iteration to FOREACH in updateStatement
  • Make DO/ENDDO work without an index register
  • Operation Editor
    • Make at-access working
    • DO
  • Enable the user to wrap the selected code into a DO/ENDDO 2
  • Delete Objects
  • Add a method getPointAtPercentage to GrObject
    • implement for lines
    • implement for circles
  • enable move and creation tools to use percentage points
    • create line on lines and circles
  • enable move and creation operations to use percentage points
    • move
    • create line
  • create operation to append a point to a polygon
  • Data Editor
    • Allow for expression in fields

Cancelled

  • make polygons open by default?
  • autoclose polygons?
  • enable fill rendering for open polygons

Tests

make sure that the peg-parser-module is build:

$ cd src/runtime/interpreter
$ pegjs language.peg

then simply

$ npm test

Test coverage

$ npm run coverage

Then open coverage/index.html

Profiling

You first need to build the code for node-js. Use WebstormConfig buildPerf for that. There are some WebstormConfigs for profiling. They run the buildPerf beforehand but complain about the test file not being there if the build didn't run once.

Documentation

See doc/Readme.md

License

Pending

(c) 2021, 2022 Stephan Smola

dapentry's People

Contributors

smoli 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.