Class

Util

Util()

Utility class containing static helper methods

Constructor

# new Util()

View Source frontend/src/util.ts, line 5

Methods

# static clamp(value, min, max) → {number}

Clamps a value between min and max

Parameters:
Name Type Description
value number

Value to clamp

min number

Minimum value

max number

Maximum value

View Source frontend/src/util.ts, line 118

Clamped value

number

# static createPipelineDescriptor_pos4_uv2(device, shader_module, vs_entry_point, fs_entry_point, format) → {GPURenderPipelineDescriptor}

Creates a WebGPU pipeline descriptor for pos4_uv2 vertex format

Parameters:
Name Type Description
device GPUDevice

The WebGPU device

shader_module GPUShaderModule

The shader module

vs_entry_point string

Vertex shader entry point

fs_entry_point string

Fragment shader entry point

format GPUTextureFormat

The texture format

View Source frontend/src/util.ts, line 102

The pipeline descriptor

GPURenderPipelineDescriptor

# static minMaxOfArray(numbers) → {Array.<number>}

Finds minimum and maximum values in an array

Parameters:
Name Type Description
numbers Array.<number>

Array of numbers

View Source frontend/src/util.ts, line 109

Array containing [min, max]

Array.<number>

# static minMaxOfArray2D(array) → {Object}

Finds minimum and maximum values in a 2D array

Parameters:
Name Type Description
array Array.<Array.<number>>

2D array of numbers

View Source frontend/src/util.ts, line 125

Object containing min and max values

Object