jetColor
Definition
-- @/lua/common/utils.lua:93
-- x in [0..1]
function jetColor(x, a)
return color(255*min(1, max(0, 4 * x - 2)), 255*min(1, max(0, 2 - abs(4 * x - 2))), 255*min(1, max(0, 2 - 4 * x)), a)
end
Callers
@/lua/vehicle/ai.lua
for i = 1, thisPathCount-1 do
debugDrawer:drawCylinder(mapData.positions[thisPath[i]], mapData.positions[thisPath[i+1]], 0.5, jetColor(thisScore, 200))
end
local thisPathLastNode = thisPath[thisPathCount]
debugDrawer:drawSphere(4, mapData.positions[thisPathLastNode], jetColor(thisScore, 255))
if thisPathLastNode == winner then
@/lua/vehicle/bdebugImpl.lua
local clusterId = obj:getNodeCluster(node.cid)
local col = jetColor(clusterIndexToColorIndex[clusterId] / numberOfClusters)
obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
local clusterId = obj:getNodeCluster(node.cid)
local col = jetColor(refClusterId == clusterId and 0.5 or 0)
obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
if modeID == 2 then
local col = jetColor(0)
initRenderBeamTexts(partsSelected, showWheels)
elseif modeID == 3 then
local col = jetColor(0.1)
initRenderBeamTexts(partsSelected, showWheels)
elseif modeID == 4 then
local col = jetColor(0.2)
initRenderBeamTexts(partsSelected, showWheels)
--local col = jetColor((startAngle + (endAngle - startAngle) * torbar.cid / (torsionBarsCount+1))/ 360, alpha)
drawTorsionBar(torbar, nodeScale * sizeMult, beamScale * sizeMult, alpha, col1, col2)
local slidenodes = getSlideNodes(name)
local col = jetColor(rail.cid/(railsCount + 1), alpha)
local startAngle, endAngle = 90, 240
local col = jetColor((startAngle + (endAngle - startAngle) * rail.cid / (railsCount + 1)) / 360, alpha)
startAngle, endAngle = 0, 45
local brokenCol = jetColor((startAngle + (endAngle - startAngle) * rail.cid / (railsCount + 1)) / 360, alpha)
@/lua/vehicle/ve_utils.lua
function getContrastColor(i, a)
return jetColor((i % 17) / 16, a)
end
function getContrastColorStringRGB(i)
local c1, c2, c3 = colorGetRGBA(jetColor((i % 17) / 16))
return stringformat("#%02x%02x%02x", c1, c2, c3)
@/lua/common/guihooks.lua
v[5] = v[5] or false -- renderNegatives
v[6] = v[6] or { colorGetRGBA(jetColor(i / numOfSteps)) }
end