Skip to main content

Class: PathPoint

PathBuilding.PathPoint(x, y, zopt, propsopt)

Creates instance of path point

Constructor

new PathPoint(x, y, zopt, propsopt)

Parameters:
NameTypeAttributesDefaultDescription
xfloatX coordinate
yfloatY coordinate
zfloat<optional>Z coordinate
propsPathBuilding.PathPointProperties<optional>Static point properties
Properties:
NameTypeDescription
xfloatX coordinate
yfloatY coordinate
zfloatZ coordinate
redbyteRed color value
greenbyteGreen color value
bluebyteBlue color value
alphafloatAlpha color value
sizefloatSize value associated with the path point
rotationfloatRotation value associated with the path point
scaleXfloatX dimension scale value associated with the path point
scaleYfloatY dimension scale value associated with the path point
scaleZfloatZ dimension scale value associated with the path point
offsetXfloatX dimension offset value associated with the path point
offsetYfloatY dimension offset value associated with the path point
offsetZfloatZ dimension offset value associated with the path point
dXfloatTangent vector X value
dYfloatTangent vector Y value

Since:

  • version 3.0

Extends

Methods

abs() → Common.Point

Absolute point. The original point is not altered.

Overrides:

Returns:

Transform as new Point

Type

Common.Point

absSelf() → Common.Point

Absolute point

Overrides:

Returns:

Current point

Type

Common.Point

add(point) → Common.Point

Applys addition. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Transform as new Point

Type

Common.Point

addSelf(point) → Common.Point

Applys addition

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Current point

Type

Common.Point

divide(point) → Common.Point

Applys division. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Transform as new Point

Type

Common.Point

divideSelf(point) → Common.Point

Applys division

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Current point

Type

Common.Point

fill(pointIndex, points, layout, propsopt)

Init point with values provided from flatten array with underlyin layout

Parameters:
NameTypeAttributesDefaultDescription
pointIndexintIndex in path
pointsArray.<float>Control points
layoutArray.<PathBuilding.PathPoint.Property>Path layout
propsPathBuilding.PathPointProperties<optional>

getProperty(property) → {float|int}

Get value for particular property

Parameters:
NameTypeDescription
propertyPathBuilding.PathPoint.Property
Returns:

Property value

Type

float|int

multiply(point) → Common.Point

Applys multiplication. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Transform as new Point

Type

Common.Point

multiplySelf(point) → Common.Point

Applys multiplication

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Current point

Type

Common.Point

scale(factor) → Common.Point

Scale point. The original point is not altered.

Parameters:
NameTypeDescription
factorfloatScale factor

Overrides:

Returns:

Transform as new Point

Type

Common.Point

scaleSelf(factor) → Common.Point

Scale point

Parameters:
NameTypeDescription
factorfloatScale factor

Overrides:

Returns:

Current point

Type

Common.Point

setProperty(property, value)

Value setter for particular property

Parameters:
NameTypeDescription
propertyPathBuilding.PathPoint.PropertyProperty type
valuefloat|intProperty value

subtract(point) → Common.Point

Applys subtraction. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Transform as new Point

Type

Common.Point

subtractSelf(point) → Common.Point

Applys subtraction

Parameters:
NameTypeDescription
pointCommon.Point

Overrides:

Returns:

Current point

Type

Common.Point

toArray(layout) → {Array.<(int|float)>}

Transform point in sequence of values based on path layout

Parameters:
NameTypeDescription
layoutArray.<PathBuilding.PathPoint.Property>Path layout
Returns:

Point as array

Type

Array.<(int|float)>

transform(matrix)

Transform point with given matrix

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix

Overrides:

transformSelf(matrix) → Common.Point

Transform point

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix

Overrides:

Returns:

Current point

Type

Common.Point

(static) createInstance(layout, propsopt, pointsopt, pointIndexopt) → PathBuilding.PathPoint

Creates point instance with values provided from flatten array with underlying layout

Parameters:
NameTypeAttributesDefaultDescription
layoutArray.<PathBuilding.PathPoint.Property>Path layout
propsPathBuilding.PathPointProperties<optional>
pointsArray.<float><optional>Control points
pointIndexint<optional>0Index in path
Returns:

Type

PathBuilding.PathPoint

Type Definitions

Property

Enum used in PathPoint that describes path point properties

Properties:
NameTypeDescription
XobjectX coordinate
YobjectY coordinate
ZobjectZ coordinate
SIZEobjectSize value associated with the path point
ROTATIONobjectRotation value associated with the path point
REDobjectRed color value
GREENobjectGreen color value
BLUEobjectBlue color value
ALPHAobjectAlpha color value
SCALE_XobjectX dimension scale value associated with the path point
SCALE_YobjectY dimension scale value associated with the path point
SCALE_ZobjectZ dimension scale value associated with the path point
OFFSET_XobjectX dimension offset value associated with the path point
OFFSET_YobjectY dimension offset value associated with the path point
OFFSET_ZobjectZ dimension offset value associated with the path point
D_XobjectTangent vector X value
D_YobjectTangent vector Y value

PropertySettings

PathPoint property settings

Properties:
NameTypeAttributesDefaultDescription
valuePathBuilding.Range<optional>Range value for property configuration. Applicable for size and color properties.
velocityPathBuilding.Range<optional>Range [0, 4000] value for speed configuration. Defines effective speed. Applicable for size and color properties.
Velocity remap value transformer if available, overrides Value remap, else if value remap is available is applied.
pressurePathBuilding.Range<optional>[0, 1]Range [0, 1] value for pressure configuration. Defines effective pressure. Applicable for size and color properties.
When pressure is not normalized (is not in range [0, 1] should be normalized before to be processed).
Pressure remap value transformer if available, overrides Value remap, else if value remap is available is applied.
altitudePathBuilding.Range<optional>[0, Math.PI / 2]Range value for tilt configuration. Applicable for scale and offset properties.
radiusXPathBuilding.Range<optional>[1, 50]Range value for raidus configuration. Applicable for scaleX property. Some older devices reports radius in range [0, 1] - in this case default range is [0, 1] and remap could be applied.
radiusYPathBuilding.Range<optional>[1, 50]Range value for raidus configuration. Applicable for scaleY property. Some older devices reports radius in range [0, 1] - in this case default range is [0, 1] and remap could be applied.
dependenciesArray.<InkInput.SensorChannel.Type><optional>Existance of at least one dependency enables layout property. Applicable for rotation, scale and offset properties.
resolvePathBuilding.PropertyCalculator<optional>A delegate that calculates the value of a single path point property based on three sequential points from the pointer input.
disabledboolean<optional>falseFlag that controls property availability.

Home