Vector2Input

A custom HTML element that represents a vector input with two numeric values (x, y) and allows for event handling when the values are changed.

Constructor

new Vector2Input(labelVector, step, value, labelsopt)

A custom element with two input fields for x and y values, and dispatches a 'change' event when any of the input values are changed.

Parameters:
NameTypeAttributesDescription
labelVectorstring

A string that represents the label for the vector input.

stepnumber

A number that specifies the increment or decrement value for the input fields.

valuenumber

The initial value that will be set for all two input fields (x and y).

labelsArray.<string><optional>

An optional array that contains the labels for the input fields. By default, it is set to ['x', 'y'].

Classes

Vector2Input

Members

inputElements

The function returns an array of input elements.