Changelog
0.7.1 (May 23, 2018)
undefined
y
param when scaling vectors. (Fixes #52)Changelog
0.5.0 (Dec 26, 2014)
recalc
on Polygon
more memory efficient. It no longer does any allocations. The calcPoints
,edges
and normals
vector arrays are reused and only created in setPoints
when the number of new points is different than the current ones. (Fixes #15)
points
, angle
and offset
can no longer be manually changed. The setPoints
, setAngle
, and setOffset
methods must be used.recalc
method is no longer part of the API.getAABB
to Polygon
and Circle
that calculate Axis-Aligned Bounding Boxes - thanks TuurDutoit! (Fixes #17)Changelog
0.4.1 (Mar 23, 2014)
T_VECTORS.push()
- thanks shakiba! (Fixes #8)package.json
- released as npm
module (Fixes #11, Fixes #12)clone
method to Vector
that returns a new vector with the same coordinates.angle
and offset
to Polygon
that are used to modify the computed collision polygon (Fixes #3, Fixes #4)
rotate
and translate
methods still exist on Polygon
but they modify the original points
of the polygon, wheras angle
and offset
do not modify the original points, and are instead applied as computed values.setPoints
, setAngle
, and setOffset
methods to Polygon
pointInCircle
and pointInPolygon
functions for performing "hit tests" (Fixes #2)docco
to create an annotated source file.<script>
rotate
method to Vector
and Polygon
.translate
method to Polygon