Skip to content

Releases: rough-stuff/rough

Three new fill styles: dashed, sunburst, zigzag-line

14 Mar 19:05
3b212e9
Compare
Choose a tag to compare

Refactor to be more tree shakable

07 Jan 19:26
Compare
Choose a tag to compare
v3.0.0

fixed example

v2.2.5: Merge pull request #84 from pshihn/type-mismatch

14 Jul 03:14
05fb7ab
Compare
Choose a tag to compare

v2.2.4: Merge pull request #83 from pshihn/optional-options

14 Jul 02:16
938faec
Compare
Choose a tag to compare

v2.2.3: Merge pull request #78 from pshihn/offscreen-fill

26 Jun 18:35
3acd388
Compare
Choose a tag to compare

2.2.1 TypeScript and More Fill Options

19 Jun 07:52
Compare
Choose a tag to compare

TypeScript

With this release, Rough.js code has been ported to TypeScript. Moving to a typed language helps a lot as the codebase evolves and gets more complex.

Filling Shapes

I also added a few more fill types when filling shapes. In the previous versions, the shapes could be filled with a solid color or sketchy hachure parallel lines. Now there are a few more options:

hachure(default), solid, zigzag, cross-hatch, or dots

Rough.js fill examples

Code example

rc.rectangle(140, 130, 100, 100, {
  fill: 'rgba(255,0,0,0.5)',
  fillStyle: 'zigzag',
  hachureGap: 8
});

rc.rectangle(270, 130, 100, 100, {
  fill: 'rgba(255,0,0,0.5)',
  fillStyle: 'cross-hatch',
  hachureAngle: 60
});

rc.rectangle(660, 130, 100, 100, {
  fill: 'rgba(0,0,0,0.6)',
  fillStyle: 'dots',
  hachureGap: 5,
  fillWeight: 2    // affects the diameter of the dots
});

Typescript port

18 Jun 22:42
0225355
Compare
Choose a tag to compare
Typescript port Pre-release
Pre-release
Merge pull request #72 from pshihn/dev

Typescript port

v2.1.3: Merge pull request #64 from pshihn/path-arc-bug

12 May 22:03
a0042a0
Compare
Choose a tag to compare

v2.1.2

16 Apr 02:27
Compare
Choose a tag to compare

Fix for #55

Support for toPath method in Generators

12 Apr 21:21
6876ac4
Compare
Choose a tag to compare