GE Lua Documentation

Press F to search!

getBlueNoise1d

Definition


-- @/lua/common/mathlib.lua:536

-- x is previous value, returns [0..1)
function getBlueNoise1d(x)
  return fractPos(x + 0.6180339887498949)
end

Callers

@/lua/ge/extensions/editor/tech/roadArchitect/profiles.lua
          local size = 0.5 + random() * 1.5
          local pos = getBlueNoise1d(lastPos)
          local limMin, limMax = size / rLength, 1 - (size / rLength)
          local size = 0.5 + random() * 1.5
          local pos = getBlueNoise1d(lastPos)
          local limMin, limMax = size / rLength, 1 - (size / rLength)
@/lua/vehicle/ai.lua
      end
      twt.blueNoiseRR = getBlueNoise1d(twt.blueNoiseRR)
      twt.blueNoiseCoefs[i] = getBlueNoise1d(twt.blueNoiseCoefs[i])
      twt.blueNoiseRR = getBlueNoise1d(twt.blueNoiseRR)
      twt.blueNoiseCoefs[i] = getBlueNoise1d(twt.blueNoiseCoefs[i])
      local criticality = 2 * twt.rayMins[i] / (twt.rayMins[i] + rayDist) + 0.25
@/lua/ge/extensions/core/audioRibbon.lua
    -- Third, try a random segment.
    emit.bN = getBlueNoise1d(emit.bN)
    local segSample = max(1, floor(emit.bN * ribbon.numSegs))
@/lua/ge/extensions/editor/toolUtilities/ribbonInput.lua
    -- Third, try a random segment.
    cursorBN = getBlueNoise1d(cursorBN)
    local segSample = max(1, floor(cursorBN * numSegs))
@/lua/ge/extensions/gameplay/drift/drift.lua
local function calculateDistWall()
  random = getBlueNoise1d(random)
  for _, scannerData in pairs(scanners) do