Tw1ddle / geometrize-haxe

:triangular_ruler: Geometrize is a Haxe port of primitive that geometrizes images into geometric primitives
https://www.geometrize.co.uk/
Other
348 stars 31 forks source link

Optional ImageRunnerOptions properties #18

Closed cancerberoSgx closed 5 years ago

cancerberoSgx commented 5 years ago

Right now all ImageRunnerOptions are mandatory and new users basically need to find and copy/paste their values from an example in order to make it work. No matter if they understand options semantics is imposible for them to know which values or at which scale makes sense.

This PR has option defaults and declare all options as optional, Then in the runner default options are mixed with user's to build the final ones currently used.This way users can just call runner.step() passing an empty object or an object with just the options they want to customize.

If this acceptable for you, the only missing part I would like you to define is the default values that make a fast/nice result.

It's working fine in my projects although I didn't run unit-tests yet