Class: PathPoint
PathBuilding.PathPoint(x, y, zopt, propsopt)
Creates instance of path point
Constructor
new PathPoint(x, y, zopt, propsopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x | float | X coordinate | ||
y | float | Y coordinate | ||
z | float | <optional> | Z coordinate | |
props | PathBuilding.PathPointProperties | <optional> | Static point properties |
Properties:
Name | Type | Description |
---|---|---|
x | float | X coordinate |
y | float | Y coordinate |
z | float | Z coordinate |
red | byte | Red color value |
green | byte | Green color value |
blue | byte | Blue color value |
alpha | float | Alpha color value |
size | float | Size value associated with the path point |
rotation | float | Rotation value associated with the path point |
scaleX | float | X dimension scale value associated with the path point |
scaleY | float | Y dimension scale value associated with the path point |
scaleZ | float | Z dimension scale value associated with the path point |
offsetX | float | X dimension offset value associated with the path point |
offsetY | float | Y dimension offset value associated with the path point |
offsetZ | float | Z dimension offset value associated with the path point |
dX | float | Tangent vector X value |
dY | float | Tangent 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
absSelf() → Common.Point
Absolute point
Overrides:
Returns:
Current point
Type
add(point) → Common.Point
Applys addition. The original point is not altered.
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Transform as new Point
Type
addSelf(point) → Common.Point
Applys addition
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Current point
Type
divide(point) → Common.Point
Applys division. The original point is not altered.
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Transform as new Point
Type
divideSelf(point) → Common.Point
Applys division
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Current point
Type
fill(pointIndex, points, layout, propsopt)
Init point with values provided from flatten array with underlyin layout
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pointIndex | int | Index in path | ||
points | Array.<float> | Control points | ||
layout | Array.<PathBuilding.PathPoint.Property> | Path layout | ||
props | PathBuilding.PathPointProperties | <optional> |
getProperty(property) → {float|int}
Get value for particular property
Parameters:
Name | Type | Description |
---|---|---|
property | PathBuilding.PathPoint.Property |
Returns:
Property value
Type
float|int
multiply(point) → Common.Point
Applys multiplication. The original point is not altered.
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Transform as new Point
Type
multiplySelf(point) → Common.Point
Applys multiplication
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Current point
Type
scale(factor) → Common.Point
Scale point. The original point is not altered.
Parameters:
Name | Type | Description |
---|---|---|
factor | float | Scale factor |
Overrides:
Returns:
Transform as new Point
Type
scaleSelf(factor) → Common.Point
Scale point
Parameters:
Name | Type | Description |
---|---|---|
factor | float | Scale factor |
Overrides:
Returns:
Current point
Type
setProperty(property, value)
Value setter for particular property
Parameters:
Name | Type | Description |
---|---|---|
property | PathBuilding.PathPoint.Property | Property type |
value | float|int | Property value |
subtract(point) → Common.Point
Applys subtraction. The original point is not altered.
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Transform as new Point
Type
subtractSelf(point) → Common.Point
Applys subtraction
Parameters:
Name | Type | Description |
---|---|---|
point | Common.Point |
Overrides:
Returns:
Current point
Type
toArray(layout) → {Array.<(int|float)>}
Transform point in sequence of values based on path layout
Parameters:
Name | Type | Description |
---|---|---|
layout | Array.<PathBuilding.PathPoint.Property> | Path layout |
Returns:
Point as array
Type
Array.<(int|float)>
transform(matrix)
Transform point with given matrix
Parameters:
Name | Type | Description |
---|---|---|
matrix | Common.Matrix | Transform matrix |
Overrides:
transformSelf(matrix) → Common.Point
Transform point
Parameters:
Name | Type | Description |
---|---|---|
matrix | Common.Matrix | Transform matrix |
Overrides:
Returns:
Current point
Type
(static) createInstance(layout, propsopt, pointsopt, pointIndexopt) → PathBuilding.PathPoint
Creates point instance with values provided from flatten array with underlying layout
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layout | Array.<PathBuilding.PathPoint.Property> | Path layout | ||
props | PathBuilding.PathPointProperties | <optional> | ||
points | Array.<float> | <optional> | Control points | |
pointIndex | int | <optional> | 0 | Index in path |
Returns:
Type
Type Definitions
Property
Enum used in PathPoint that describes path point properties
Properties:
Name | Type | Description |
---|---|---|
X | object | X coordinate |
Y | object | Y coordinate |
Z | object | Z coordinate |
SIZE | object | Size value associated with the path point |
ROTATION | object | Rotation value associated with the path point |
RED | object | Red color value |
GREEN | object | Green color value |
BLUE | object | Blue color value |
ALPHA | object | Alpha color value |
SCALE_X | object | X dimension scale value associated with the path point |
SCALE_Y | object | Y dimension scale value associated with the path point |
SCALE_Z | object | Z dimension scale value associated with the path point |
OFFSET_X | object | X dimension offset value associated with the path point |
OFFSET_Y | object | Y dimension offset value associated with the path point |
OFFSET_Z | object | Z dimension offset value associated with the path point |
D_X | object | Tangent vector X value |
D_Y | object | Tangent vector Y value |
PropertySettings
PathPoint property settings
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value | PathBuilding.Range | <optional> | Range value for property configuration. Applicable for size and color properties. | |
velocity | PathBuilding.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. | ||||
pressure | PathBuilding.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. | ||||
altitude | PathBuilding.Range | <optional> | [0, Math.PI / 2] | Range value for tilt configuration. Applicable for scale and offset properties. |
radiusX | PathBuilding.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. |
radiusY | PathBuilding.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. |
dependencies | Array.<InkInput.SensorChannel.Type> | <optional> | Existance of at least one dependency enables layout property. Applicable for rotation, scale and offset properties. | |
resolve | PathBuilding.PropertyCalculator | <optional> | A delegate that calculates the value of a single path point property based on three sequential points from the pointer input. | |
disabled | boolean | <optional> | false | Flag that controls property availability. |