Skip to main content

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:
NameTypeDescription
phasePathBuilding.Pipeline.PhaseSpecifies the phase of the stroke
additionPathBuilding.Pipeline.InputNewly added stroke data that must be processed and accumulated
predictionPathBuilding.Pipeline.InputPredicted 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:
NameTypeDescription
additionPathBuilding.Pipeline.InputNewly added stroke data that must be processed and accumulated
predictionPathBuilding.Pipeline.InputPredicted 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:
NameTypeDescription
layoutArray.<PathBuilding.PathPoint.Property>A reference to the path point layout object associated with the path producer
pathPointCalculatorPathBuilding.CalculatorA 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:
NameTypeAttributesDefaultDescription
indexint<optional>1
nextPathBuilding.Pipeline.Smoother

Home