Skip to content

Latest commit

 

History

History
133 lines (84 loc) · 3.61 KB

README.md

File metadata and controls

133 lines (84 loc) · 3.61 KB

jsDrawings

github.com/fheyen/jsDrawings

Drawings in JavaScript / TypeScript. Suggestions are welcome.

  1. jsDrawings
    1. Finished
      1. Overview
      2. Yin Yang
      3. Ornament
      4. Mandelbrot
      5. Dragon Curve
      6. Gosper Curve
      7. Hilbert Curve
      8. Osgood Curve
      9. Sierpinski Triangle
      10. Sierpinski Carpet
      11. Hexaflake
      12. Rapidly-exploring Random Tree
      13. Pythagoras Tree
    2. Usage

Finished

The finished drawings are displayed on the GitHub.io page.

Overview

Yin Yang

wikipedia

Ornament

wikipedia

Mandelbrot

wikipedia

Dragon Curve

wikipedia

Gosper Curve

wikipedia

Hilbert Curve

wikipedia

Osgood Curve

wikipedia

Sierpinski Triangle

wikipedia

Sierpinski Carpet

wikipedia

Hexaflake

wikipedia

Rapidly-exploring Random Tree

wikipedia

Pythagoras Tree

wikipedia

Usage

Drawings are created via their constructor. You can then set their size (or only width or height) and call init() to draw them.

      const dc = new DragonCurve();
      dc.setSize(500, 500);
      dc.init();

Or via function chaining:

      const dc = new DragonCurve().setSize(500, 500).init();

See drawing.ts for all possible arguments.