I already have a Canvas Draw method:
drawParam(){
this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
this.ctx.fillStyle = this.htmlColor();
let params = this.actor.parameters[this.type];
let s = ([0,1].includes(this.type)) ? 100 : 10;
let ch = 100 / this.ctx.canvas.height * 100;
let cw = this.ctx.canvas.width / params.length, w = Math.ceil(cw);
for (let i = 0; i < params.length; i++){
let x = i * cw;
let h = parseInt((params[i]) / s / (1 / (this.ctx.canvas.height / 100)));
let y = this.ctx.canvas.height - h;
this.ctx.fillRect(x, y, w, h);
}
}
Im stuck on this line, I dont see where to use Math.pow(x, y) in the call...
actor.parameters[selectedParameterId][i] = Math.round(min + Math.pow(i * n, rate));
I need the LAST VALUE to end up at 5000, or whatever the user has in the "Level 99" value, not just unlimited growth into the stratosphere...