---
title: "transformWorleyMode"
description: "The `transform` for a `worleyNoise` `mode` prop: maps `'f1'`, `'f2'`, `'f2MinusF1'`, `'f1PlusF2'` or `'f1TimesF2'` 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#L1127"
---

# transformWorleyMode

The `transform` for a `worleyNoise` `mode` prop: maps `'f1'`, `'f2'`, `'f2MinusF1'`, `'f1PlusF2'` or `'f1TimesF2'` to the number the paint reads.

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

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

## Parameters

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

## Example

```ts
mode: {default: 'f1', transform: transformWorleyMode, compileTime: true}
```

## See also

- [`worleyNoise`](/docs/primitives/noise/worleynoise) — A complete cellular-noise paint: distances to drifting cell points, read through the color ramp.
- [`transformWorleyDistance`](/docs/primitives/noise/transformworleydistance) — The `transform` for a `worleyNoise` `distance` prop: maps `'euclidean'`, `'manhattan'` or `'chebyshev'` to the number the paint reads.

## Used by

[WorleyNoise](/docs/components/worleynoise)