aura radius appears to be off by 2.5ft

1531406331

Edited 1531425541
Mark
Pro
reference with details:  https://app.roll20.net/forum/post/4461349/slug%7D more specifically half a grid size error (we generally use 5ft grid spacing) if 5ft radius is entered on the token , the rendered radius is 7.5ft. It appears to be adding 2.5ft to all radius values entered.
1531407223
Scott C.
Pro
Sheet Author
API Scripter
The light or aura is projected from the center of the token and is sized so that it looks like it is outputting from the edges of a circular (or square in the case of a square aura) token. That extra 2.5ft is to account for the radius of a 5ftX5ft token.
1531407391

Edited 1531425458
Mark
Pro
Yeah so 0ft affects a token but that added 2.5ft doesn't make sense for any radius > 0. I'd add a special case which sets the aura radius to the Math.max(aura radius, half a grid unit), for hex maps do something similar so the minimum aura is a hex for the polygon. here's the relevant source code, I suspect the half grid size error is coming in from r n = Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) the radius used in the canvas arc method context .arc( x,y,r,sAngle,eAngle,counterclockwise );             drawAuras: function(e) {                 var t, n, i = this.model.collection.page, o = this, r = Math.floor(this.graphic.get("width") / 2), a = (Math.floor(this.graphic.get("height") / 2),                 parseFloat(i.get("scale_number")));                 "" != this.model.get("aura1_radius") && (window.is_gm || this.model.get("showplayers_aura1") || this.model.currentPlayerControls() && this.model.get("playersedit_aura1")) && ((t = fabric.Color.fromHex(this.model.get("aura1_color")))._source && (this.model.get("aura1_square") ? (e.fillStyle = t.setAlpha(.35).toRgba(),                 e.beginPath(),                 (n = Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) < 0 && (n = 0),                 e.rect(-n, -n, 2 * n, 2 * n),                 e.closePath(),                 e.fill()) : (e.fillStyle = t.setAlpha(.35).toRgba(),                 e.beginPath(),                 (n = Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) < 0 && (n = 0),                 e.arc(0, 0, n, 0, 2 * Math.PI, !0),                 e.closePath(),                 e.fill())));                 "" != this.model.get("aura2_radius") && (window.is_gm || this.model.get("showplayers_aura2") || this.model.currentPlayerControls() && this.model.get("playersedit_aura2")) && ((t = fabric.Color.fromHex(this.model.get("aura2_color")))._source && (this.model.get("aura2_square") ? (e.fillStyle = t.setAlpha(.35).toRgba(),                 e.beginPath(),                 (n = Math.floor(parseFloat(o.model.get("aura2_radius")) * window.dpi / a) + r) < 0 && (n = 0),                 e.rect(-n, -n, 2 * n, 2 * n),                 e.closePath(),                 e.fill()) : (e.fillStyle = t.setAlpha(.35).toRgba(),                 e.beginPath(),                 (n = Math.floor(parseFloat(o.model.get("aura2_radius")) * window.dpi / a) + r) < 0 && (n = 0),                 e.arc(0, 0, n, 0, 2 * Math.PI, !0),                 e.closePath(),                 e.fill())))             },
1531512559
Drespar
Roll20 Team
Hi everyone! I have appended this information to the existing ticket for the devs so they can better investigate. Thank you!