Add API function to receive the color for a given distance and token
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {getCostFromSpeedProvider} from "./api.js";
|
||||
import {getColorForDistance} from "./main.js"
|
||||
import {settingsKey} from "./settings.js";
|
||||
import {getAreaFromPositionAndShape, highlightTokenShape} from "./util.js";
|
||||
|
||||
@@ -10,7 +9,7 @@ export function getHexSizeSupportTokenGridCenter(token) {
|
||||
|
||||
export function highlightMeasurementTerrainRuler(ray, startDistance, tokenShape=[{x: 0, y: 0}], alpha=1) {
|
||||
for (const space of ray.terrainRulerVisitedSpaces.reverse()) {
|
||||
const color = getColorForDistance.call(this, startDistance, space.distance)
|
||||
const color = this.dragRulerGetColorForDistance(startDistance + space.distance);
|
||||
highlightTokenShape.call(this, space, tokenShape, color, alpha)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user