UNPKG
cdf
Version:
latest (0.4.0)
0.4.0
A library for creating oldschool demo-like animations with JavaScript
cdf
/
src
/
methods
/
Canvas.ngon.js
6 lines
(5 loc)
•
197 B
JavaScript
View Raw
1
2
3
4
5
6
var
shapes =
require
(
'inc/shapes'
);
var
utils =
require
(
'utils'
);
module
.
exports
=
function
(
xyPair,r,n,color,ro
){
return
this
.
poly
(shapes.
ngon
(n).
scale
(r).
rotate
(ro).
translate
(xyPair),color); };