---
title: "transformWorleyDistance"
description: "The `transform` for a `worleyNoise` `distance` prop: maps `'euclidean'`, `'manhattan'` or `'chebyshev'` to the number the paint reads."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "noise"
categorySlug: "noise"
categoryTitle: "Noise"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/noise.ts#L1138"
---

# transformWorleyDistance

The `transform` for a `worleyNoise` `distance` prop: maps `'euclidean'`, `'manhattan'` or `'chebyshev'` to the number the paint reads.

```ts
transformWorleyDistance(value: string): number
```

Import `noise` from `shaders/std` and use `noise.transformWorleyDistance`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `value` | `string` |  |

## Example

```ts
distance: {default: 'euclidean', transform: transformWorleyDistance, compileTime: true}
```

## See also

- [`worleyNoise`](/docs/primitives/noise/worleynoise) — A complete cellular-noise paint: distances to drifting cell points, read through the color ramp.
- [`transformWorleyMode`](/docs/primitives/noise/transformworleymode) — The `transform` for a `worleyNoise` `mode` prop: maps `'f1'`, `'f2'`, `'f2MinusF1'`, `'f1PlusF2'` or `'f1TimesF2'` to the number the paint reads.

## Used by

[WorleyNoise](/docs/components/worleynoise)