Some major refactoring needed. I suspect a new class should be implemented to manipulate the parents' shapes.
The flow is as follows:
_scaleVertices() returns the vertices scaled down by a factor to prevent offspring from being too large. This isn't a very maintainable solution unfortunately but I haven't come up with anything better.
__parentVertices() returns a concatenation of the parents' vertices.
_inheritedVertices() returns the vertices that will be given to the offspring. In other words, the parentVertices have been scaled.
I've also added functionality to insert square, triangular and rhombus shaped-cells. These use vectors to define these cells but really, we could use matter's built in Bodies methods to generate these in fewer lines.
No tests written as yet because I wasn't sure exactly what we wanted.
Closes #74
Some major refactoring needed. I suspect a new class should be implemented to manipulate the parents' shapes.
The flow is as follows:
I've also added functionality to insert square, triangular and rhombus shaped-cells. These use vectors to define these cells but really, we could use matter's built in Bodies methods to generate these in fewer lines.
No tests written as yet because I wasn't sure exactly what we wanted.