Composite

Implementation of a composite scaler.

Since

1.15.2

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
The global deserializer instance for scalers.

Functions

Link copied to clipboard
@NotNull
open fun composite(@NotNull scaler: @NotNull ModelScaler): @NotNull ModelScaler
Multiplies this scaler by another scaler.
@NotNull
open fun composite(@NotNull scalers: Array<@NotNull ModelScaler>): @NotNull ModelScaler
Creates a composite scaler that multiplies the results of multiple scalers.
Link copied to clipboard
open fun data(): JsonElement
Returns the configuration data for this scaler as a JSON element.
Link copied to clipboard
@NotNull
open fun defaultScaler(): @NotNull ModelScaler
Returns the default scaler (constant 1.0).
Link copied to clipboard
@NotNull
open fun deserialize(@NotNull element: @NotNull JsonObject): @NotNull ModelScaler
Deserializes a scaler from a JSON object.
Link copied to clipboard
@NotNull
open fun entity(): @NotNull ModelScaler
Returns a scaler that uses the entity's scale attribute.
Link copied to clipboard
@NotNull
open fun multiply(value: Float): @NotNull ModelScaler
Multiplies this scaler by a constant value.
Link copied to clipboard
@NotNull
open fun name(): @NotNull String
Returns the name of this scaler type.
Link copied to clipboard
open fun scale(@NotNull tracker: @NotNull Tracker): Float
Calculates the scale for a given tracker.
Link copied to clipboard
@NotNull
open fun serialize(): @NotNull JsonObject
Serializes this scaler to a JSON object.
Link copied to clipboard
@NotNull
open fun value(value: Float): @NotNull ModelScaler
Returns a constant value scaler.