Option to increase sample rate of freehand drawings
Closed this issue · 3 comments
Maybe it's even possible to adjust the sample rate dynamically based on the speed of pointer. Drawing.FREEHAND_SAMPLE_RATE
controls the sample rate of the freehand tool:
/**
* The rate at which points are sampled (in milliseconds) during a freehand drawing workflow
* @type {number}
*/
static FREEHAND_SAMPLE_RATE = 75;
This was originally a feature request for Advanced Drawing Tools (dev7355608/advanced-drawing-tools#2). But it is definitely be a better fit for Precise Drawing Tools.
Interesting feature request!
Doing it dynamically would be a cool idea, as it means that if the cursor moves in a large quick arc the drawing will be nicer looking rather than jagged. However, I think even then there will be a hardware limit of the mouse itself only sending events every so often. Will require testing to see how good this can get.
- foundry default sample rate is 75
- testing on my own computer shows that the real sample rate is approximately every 15 milliseconds
- I'll try having the module set it close to 75 when the pointer is very slow and to 10 when the pointer is very fast
Added in v1.2.0, please give it a try!