Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / IntProvider

Variable: IntProvider โ€‹

IntProvider: object

Defined in: core/values/worldgen/int-provider.ts:4

Type Declaration โ€‹

biasedToBottom โ€‹

biasedToBottom: (minInclusive, maxInclusive) => JsonValue<"int_provider">

Weighted towards minInclusive.

Parameters โ€‹

minInclusive โ€‹

number

maxInclusive โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

clamped โ€‹

clamped: (f) => JsonValue<"int_provider">

source, clamped to minInclusive..maxInclusive.

Parameters โ€‹

f โ€‹
maxInclusive โ€‹

number

minInclusive โ€‹

number

source โ€‹

IntProvider

Returns โ€‹

JsonValue<"int_provider">

clampedNormal โ€‹

clampedNormal: (f) => JsonValue<"int_provider">

A normal distribution, clamped to minInclusive..maxInclusive.

Parameters โ€‹

f โ€‹
deviation โ€‹

number

maxInclusive โ€‹

number

mean โ€‹

number

minInclusive โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

constant โ€‹

constant: (value) => JsonValue<"int_provider">

Parameters โ€‹

value โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

trapezoid โ€‹

trapezoid: (f) => JsonValue<"int_provider">

Even odds across the middle plateau, falling off to min and max.

Parameters โ€‹

f โ€‹
max โ€‹

number

min โ€‹

number

plateau โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

uniform โ€‹

uniform: (minInclusive, maxInclusive) => JsonValue<"int_provider">

Parameters โ€‹

minInclusive โ€‹

number

maxInclusive โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

veryBiasedToBottom โ€‹

veryBiasedToBottom: (minInclusive, maxInclusive) => JsonValue<"int_provider">

Weighted further towards minInclusive.

Parameters โ€‹

minInclusive โ€‹

number

maxInclusive โ€‹

number

Returns โ€‹

JsonValue<"int_provider">

weightedList โ€‹

weightedList: (distribution) => JsonValue<"int_provider">

Picks one of distribution by weight.

Parameters โ€‹

distribution โ€‹

readonly object[]

Returns โ€‹

JsonValue<"int_provider">

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.