feat: vertice iterator

This commit is contained in:
cha0s 2019-03-22 13:15:28 -05:00
parent d64ec2d10c
commit a21b3d6934

View File

@ -30,6 +30,12 @@ export class PolygonShape extends Shape {
});
}
*[Symbol.iterator]() {
for (const vertice of this._translatedVertices) {
yield vertice;
}
}
get aabb() {
if (0 === this._vertices.length) {
return [0, 0, 0, 0];