feat: vertice iterator
This commit is contained in:
parent
d64ec2d10c
commit
a21b3d6934
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue
Block a user