Class: PathProducer
PathBuilding.Pipeline.PathProducer()
A data processor that converts pointer input data to path points.Provided with PointerData objects (x, y, timestamp, pressure, tilt, etc.)Produces PathPoint: sequence of x, y, size, scaleX, scaleY, rotation etc.Configured with layout definition (list of geometry properties) and a calculator function that returns the geometry based on the touch data.
Constructor
new PathProducer()
Since:
- version 3.0
Extends
Methods
add(phase, addition, prediction) → PathBuilding.Pipeline.DataOutput
Inputs stroke data in the pipeline stage and processes it
Parameters:
Name | Type | Description |
---|---|---|
phase | PathBuilding.Pipeline.Phase | Specifies the phase of the stroke |
addition | PathBuilding.Pipeline.Input | Newly added stroke data that must be processed and accumulated |
prediction | PathBuilding.Pipeline.Input | Predicted continuation of the stroke data. Can be used temporarily before the next data addition occurs. |
Overrides:
Returns:
Plain object containing added and predicted data of the output type
Type
PathBuilding.Pipeline.DataOutput
(abstract) addImpl(addition, prediction) → PathBuilding.Pipeline.DataOutput
Parameters:
Name | Type | Description |
---|---|---|
addition | PathBuilding.Pipeline.Input | Newly added stroke data that must be processed and accumulated |
prediction | PathBuilding.Pipeline.Input | Predicted continuation of the stroke data. Can be used temporarily before the next data addition occurs. |
Overrides:
Returns:
Plain object containing added and predicted data of the output type
Type
PathBuilding.Pipeline.DataOutput
configure(layout, pathPointCalculator)
Configures path producing process
Parameters:
Name | Type | Description |
---|---|---|
layout | Array.<PathBuilding.PathPoint.Property> | A reference to the path point layout object associated with the path producer |
pathPointCalculator | PathBuilding.Calculator | A method that is used for transforming input data to path point values |
reset()
Resets the processor to its initial state
Overrides:
Type Definitions
Input
PathProducer input type
Type:
Output
PathProducer output type
Type:
- Array.<float>
PipelineStage
Type:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
index | int | <optional> | 1 | |
next | PathBuilding.Pipeline.Smoother |