Factorio Prototype DocsVersion 1.1.107

NoiseFunctionOffsetPoints :: struct Example code

The first argument represents a vector of how the positions should be shifted, and the second argument lists the positions that should be shifted.

Properties

type :: "function-application"
function_name :: "offset-points"
arguments :: {NoiseArrayConstruction, NoiseArrayConstruction}

Properties

type :: "function-application"

function_name :: "offset-points"

Example

-- Shifts "positions" by {100, 90}
local noise = require("noise")
local positions = noise.make_point_list({{-10, -40}, {-50, -20}})
local offset = noise.make_array({100, 90})
local offset_positions =
{
  type = "function-application",
  function_name = "offset-points",
  arguments = {offset, positions}
}
-- or with the noise lib
local also_offset_positions = noise.function_application("offset-points", {offset, positions})

Prototypes

Types