Skip to content

Commit

Permalink
v.0.5.0, qbezier+intersections,boundingbox not tight
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Dec 7, 2022
1 parent 17d05fe commit 6489e9e
Show file tree
Hide file tree
Showing 15 changed files with 670 additions and 194 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Computational Geometry and Rendering library for JavaScript

**in progress**
**version: 0.5.0** (74 kB minified)

Examples:

Expand All @@ -13,11 +13,12 @@ Examples:
![geometrize intersections](/intersections.png)

```javascript
const {Plane, Ellipse, Circle, Arc, Line} = Geometrize;
const {Plane, Ellipse, Circle, Arc, QBezier, Line, Polyline, Polygon} = Geometrize;
const plane = Plane(document.getElementById('container'), 300, 300);
const ellipse = Ellipse([40,40], 30, 10, -45);
const circle = Circle([30,30], 20);
const arc = Arc([100,100], [170,90], 30, 10, 30, 0, 1);
const qbezier = QBezier([[80,110], [120,40], [160,120]]);
const line1 = Line([20,20], [60,60]).setStyle('stroke', 'blue');
const line2 = Line([50,2], [20,70]).setStyle('stroke', 'green');
const line3 = Line([60,160], [300,0]).setStyle('stroke', 'orange');
Expand All @@ -31,14 +32,15 @@ plane.add(line4);
plane.add(ellipse);
plane.add(circle);
plane.add(arc);
plane.add(qbezier);

intersections = plane.getIntersections();
intersections.forEach(p => {
plane.add(p.setStyle('stroke', 'red').setStyle('stroke-width', 2));
});
```

**Shape Tween** (in progress)
**Shape Tween**

![geometrize tween between multiple shapes](/shapetween.gif)

Expand Down
Loading

0 comments on commit 6489e9e

Please sign in to comment.