Open mack3457 opened 11 years ago
Thank you for posting this. The only problem I found is where you do:
if (bounding_box[0] > 0 && bounding_box[1] > 0) {
This needs to be: if (bounding_box && bounding_box[0] > 0 && bounding_box[1] > 0) {
else it crashes if "bounding_box" is not defined. Other than that it works great for me.
To fit differently sized images nicely into a given environment, I added an option named 'bounding_box' holding the size, the images should be scaled to. Use [0, 0] to keep default behaviour.
Added a function setBoundingBox(width, height) to change behaviour afterwards.