Skip to content

Commit

Permalink
0.3.0, Color utilities, Arc.toBezier3, Stroke/Fill color Tween too
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Dec 3, 2022
1 parent 70c6a95 commit f70b71d
Show file tree
Hide file tree
Showing 12 changed files with 931 additions and 115 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,27 @@ const {Plane, Tween, Polygon, Circle} = Geometrize,
r = 50, cx = 100, cy = 100;
const plane = Plane(document.getElementById('container'), 300, 300);
const circle = Circle([cx,cy], r);
const square = Polygon([[cx+r,cy],[cx+r,cy-r],[cx,cy-r],[cx-r,cy-r],[cx-r,cy],[cx-r,cy+r],[cx,cy+r],[cx+r,cy+r]]);
const tween = Tween(circle, square, 1000);
const square = Polygon([
[cx+r,cy],
[cx+r,cy-r],
[cx,cy-r],
[cx-r,cy-r],
[cx-r,cy],
[cx-r,cy+r],
[cx,cy+r],
[cx+r,cy+r]
]);
const tween = Tween({
from: {
shape: circle,
stroke: 'cyan'
},
to: {
shape: square,
stroke: 'orange'
},
duration: 1000
});
plane.add(tween);
tween.start();
```
1 change: 1 addition & 0 deletions beeld.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tasks =[{}]
./src/Changeable.js
./src/Value.js
./src/Matrix.js
./src/Color.js
./src/Style.js
./src/Primitive.js
./src/Point.js
Expand Down
Loading

0 comments on commit f70b71d

Please sign in to comment.