style = new g.SideStyle({
color: (side, resolution) => {
const dz = sideValue(side);
const slopeAngle = Math.atan2(dz, resolution);
let coeff = (slopeAngle * 2) / Math.PI;
coeff = scale(Math.abs(coeff));
coeff = coeff > 1 ? 1 : coeff;
const hue =
(dz > 0 && side.or === "h") || (dz < 0 && side.or === "v")
? t * 255 + "," + t * 245 + "," + t * 156
: (1 - t) * 255 + "," + (1 - t) * 245 + "," + (1 - t) * 156;
return "rgba(" + hue + "," + coeff + ")";
},
width: (side, r, s, z) => {
return r;
}
})