ReactiveModule Overview
ReactiveModule Overview
Point4DSignal

# Point4DSignal

### Contents

The Point4DSignal class monitors a 4D coordinate.

Inherits From : ISignal

## Properties

PropertyDescription
bottom
(get) bottom: ScalarSignal
(set) (Not Available)

Represents the bottom component of the Insets, the third element of the vector.
left
(get) left: ScalarSignal
(set) (Not Available)

Represents the left component of the Insets, the second element of the vector.
right
(get) right: ScalarSignal
(set) (Not Available)

Represents the bottom component of the Insets, the fourth element of the vector.
top
(get) top: ScalarSignal
(set) (Not Available)

Represents the top component of the Insets, the first element of the vector.
w
(get) w: ScalarSignal
(set) (Not Available)

Represents the W component, the fourth element of the vector.
x
(get) x: ScalarSignal
(set) (Not Available)

Represents the X coordinate, the first element of the vector.
y
(get) y: ScalarSignal
(set) (Not Available)

Represents the Y coordinate, the second elemnt of the vector.
z
(get) z: ScalarSignal
(set) (Not Available)

Represents the Z component, the third element of the vector.

## Methods

MethodDescription
abs
abs(): ScalarSignal

Returns a signal with the value that is the absolute value of the given signal.

Returns a signal with the value that is the sum of the values of the given signals.

Note: add and sum functions are synonyms, the behavior they provide is equivalent.

atan2
atan2(other: ScalarSignal): ScalarSignal

Returns a signal with the value that is the angle in radians between the x-axis and the ray from (0, 0) to (x, y) where x and y are the values of the specified signals. The range is -PI to +PI.

ceil
ceil(): ScalarSignal

Returns a signal with the value that is the smallest integer that is greater than or equal to the value of the given signal.

clamp
clamp(min: ScalarSignal, max: ScalarSignal): ScalarSignal
clamp(min: ScalarSignal, max: ScalarSignal): Point2DSignal
clamp(min: ScalarSignal, max: ScalarSignal): VectorSignal

Returns a signal with the value that is the value of the given x signal constrained to lie between the values of the given min and max signals.

Note: The behavior is undefined if min is greater than max.
cross
cross(other: VectorSignal): VectorSignal

Returns a vector signal with the value that is the cross product of the given signals.

distance
distance(other: PointSignal): ScalarSignal

Returns the distance from the point to another point as a ScalarSignal.
div
div(other: ScalarSignal): ScalarSignal

Returns a signal with the value that is the value of the first signal divided by the value of the second signal.

dot
dot(other: VectorSignal): ScalarSignal

Returns a scalar signal with the value that is the dot product of the given signals.

floor
floor(): ScalarSignal

Returns a signal with the value that is the largest integer that is less than or equal to the value of the given signal.

fromRange
fromRange(x: ScalarSignal, min: ScalarSignal, max: ScalarSignal): ScalarSignal

Maps x from [min, max] range to [0.0, 1.0] range.
history
history(framesCount: number): SignalHistory<Point4D>

Returns an object used to access signal values from past frames. The amount of frames tracked is customizable via framesCount parameter.
Historical signal values are going to be initialized with signal value at call time or using initialValues if provided.
magnitude
magnitude(): ScalarSignal

Returns the magnitude of the vector as a ScalarSignal.
magnitudeSquared
magnitudeSquared(): ScalarSignal

Returns the squared length (magnitude) of a given signal.

Calculating the squared magnitude instead of the magnitude is much faster.
Often if you are comparing magnitudes of two vectors you can just compare their squared magnitudes.
max
max(other: ScalarSignal): ScalarSignal
max(other: ScalarSignal): Point2DSignal
max(other: ScalarSignal): VectorSignal

Returns a signal with the component-wise values that are the greater of the values of the given signals.
min
min(other: ScalarSignal): ScalarSignal
min(other: ScalarSignal): Point2DSignal
min(other: ScalarSignal): VectorSignal

Returns a signal with the component-wise values that are the lesser of the values of the given signals.
mix
mix(signal: ScalarSignal, factor: ScalarSignal): ScalarSignal
mix(signal: Point2DSignal, factor: ScalarSignal): Point2DSignal
mix(signal: PointSignal, factor: ScalarSignal): PointSignal
mix(signal: VectorSignal, factor: ScalarSignal): VectorSignal
mix(signal: Point4DSignal, factor: ScalarSignal): Point4DSignal
mix(signal: TransformSignal, factor: ScalarSignal): TransformSignal

Returns a signal with the value that is the linear interpolation between this and another signal by a given factor.
mod
mod(other: ScalarSignal): ScalarSignal

Returns a signal with the value that is the floating-point remainder of the division of the value of the first signal by the value of the second signal.

mul
mul(other: ScalarSignal): ScalarSignal
mul(other: VectorSignal): VectorSignal
mul(other: ScalarSignal): VectorSignal

Returns a signal with the value that is the product of the values of the given signals.

neg
neg(): ScalarSignal
neg(): VectorSignal

Returns a signal with the negated value of the given signal.

normalize
normalize(): VectorSignal

Returns the normalized (unit) vector in the direction of the original vector as a VectorSignal.
pinLastValue
pinLastValue(): Point4DSignal

Returns a new Point4DSignal containing a constant value which is the last value of the specified signal before pinLastValue is called.
pow
pow(exponent: ScalarSignal): ScalarSignal

Returns a signal with the value that is the base signal raised to the power of the exponent signal. The result is undefined if the base is negative, or if the base is zero and the exponent is not positive.

reflect
reflect(normal: VectorSignal): VectorSignal

Calculates the reflection direction for an incident vector and a normal as a VectorSignal.
round
round(): ScalarSignal

Returns a signal with the value that is the rounded value of the given signal.

Note: When the fractional part is 0.5, it rounds the number away from zero, which is at odds with JavaScript standard behavior of rounding it always up in such cases. Therefore, this function is NOT exactly the reactive counterpart of the standard JavaScript Math.round utility.

sign
sign(): ScalarSignal

Returns a signal with the value that is the sign of the given signal. Possible sign values: NaN, -0.0, 0.0, -1.0, 1.0.

Note: this function is the reactive counterpart of the standard JavaScript Math.sign utility.

smoothStep
smoothStep(x: ScalarSignal, edge0: ScalarSignal, edge1: ScalarSignal): ScalarSignal

Returns 0.0 if x is less than edge0, and 1.0 if x is greater than edge1.
If x is between edge0 and edge1, smooth Hermite interpolation is performed.
sqrt
sqrt(): ScalarSignal

Returns a signal with the value that is the square root of the value of the given signal.

sub
sub(other: ScalarSignal): ScalarSignal
sub(other: PointSignal): VectorSignal
sub(other: VectorSignal): PointSignal
sub(other: VectorSignal): VectorSignal

Returns a signal with the value that is the difference of the values of the given signals.

sum
sum(other: ScalarSignal): ScalarSignal
sum(other: VectorSignal): PointSignal
sum(other: VectorSignal): VectorSignal
sum(other: PointSignal): PointSignal

Returns a signal with the value that is the sum of the values of the given signals.

Note: add and sum functions are synonyms, the behavior they provide is equivalent.

toHSVA
toHSVA(): HsvaSignal

Convert this signal to HSVA signal, using H, S, V, A from four components of vector respectively.
toRange
toRange(x: ScalarSignal, min: ScalarSignal, max: ScalarSignal): ScalarSignal

Maps x from [0.0, 1.0] range to [min, max] range.
toRGBA
toRGBA(): RgbaSignal

Convert this signal to RGBA signal, using R, G, B, A from four components of vector respectively.