Class: PathPointContext
PathBuilding.PathPointContext()
Defines ink behaviour
Constructor
new PathPointContext()
Since:
- version 3.0
Methods
reset(sample, brush, dynamics, statics)
Reconfigure context for started inking
Parameters:
Name | Type | Description |
---|---|---|
sample | InkInput.SensorPoint | |
brush | Rendering.Brush | |
dynamics | PathBuilding.PathPointSettings | |
statics | PathBuilding.PathPointProperties |
Examples
Example of dynamics configuration
{ size: { value: { min: 4, max: 12, remap: v => v ** 1.19 }, velocity: { min: 100, max: 4000, remap: v => 0.5 - 0.5 * Math.cos(0.9 * Math.PI * v), }, pressure: { min: 0.2, max: 0.8 } }, red: { value: { min: 0, max: 255 } }, green: { resolve: "app://owner-host/action-resolve/RandomInt?min=128&max=211" }, blue: { resolve: { name: "app://owner-host/action-resolve/RandomInt?min=[0]&max=[255]", action: (previous, current, next) => Math.ceil(Math.random() * 255) } }, alpha: { value: { min: 0.1, max: 0.3 }, velocity: { min: 100, max: 4000 }, pressure: { min: 0.2, max: 0.8 } }, rotation: { dependencies: [SensorChannel.Type.ROTATION, SensorChannel.Type.AZIMUTH] }, scaleX: { dependencies: [SensorChannel.Type.RADIUS_X, SensorChannel.Type.ALTITUDE], value: { min: 1, max: 3 }, altitude: { min: 0, max: Math.PI / 2 }, radiusX: { min: 10, max: 30 } }, scaleY: { dependencies: [SensorChannel.Type.RADIUS_Y] value: { min: 1, max: 3 }, radiusY: { min: 10, max: 30 } }, offsetX: { dependencies: [SensorChannel.Type.ALTITUDE], value: { min: 0, max: 10 }, altitude: { min: 0, max: Math.PI / 2 } }, offsetY: { disabled: true }}
Example of statics configuration
{ size: 5, red: 231, green: 128, rotation: 15, scaleX: 0.1, scaleY: 2.5, offsetX: 2.3}