Skip to content

Function: dashDistance() ​

ts
function dashDistance(along, pattern): number;

Experimental

Signed distance (in pattern units) from along to the nearest "on" interval of the repeating pattern — negative inside a dash. CPU mirror of hcDashDistance in line.glsl.ts.

Parameters ​

ParameterType
alongnumber
patternreadonly number[]

Returns ​

number

Released under the MIT License.