# GlyphField.scaleTransform

## Summary
GlyphField.scaleTransform reads the current `scaleTransform` value from this GlyphField instance. Use it to inspect runtime state without mutating resources.

## Syntax
```ts
GlyphField.scaleTransform: ScaleTransform
const value = glyphField.scaleTransform;
```

## Parameters
This API does not take parameters.

## Returns
`ScaleTransform` - Normalized scale-transform snapshot currently active on this object.

## Type Details
### ScaleTransform

```ts
type ScaleTransform = {
    mode: ScaleMode;
    clampMode: ScaleClampMode;
    valueMode: ScaleValueMode;
    componentCount: number;
    componentIndex: number;
    stride: number;
    offset: number;
    domainMin: number;
    domainMax: number;
    clampMin: number;
    clampMax: number;
    percentileLow: number;
    percentileHigh: number;
    logBase: number;
    symlogLinThresh: number;
    gamma: number;
    invert: boolean;
};
```

#### ScaleTransform Fields
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | `ScaleMode` | Yes | Mode selector controlling behavior for this operation or descriptor. |
| `clampMode` | `ScaleClampMode` | Yes | Clamping mode used by scale transforms. |
| `valueMode` | `ScaleValueMode` | Yes | Value extraction mode used when mapping source data into scale inputs. |
| `componentCount` | `number` | Yes | Numeric input controlling `componentCount` for this operation. |
| `componentIndex` | `number` | Yes | Numeric input controlling `componentIndex` for this operation. |
| `stride` | `number` | Yes | Numeric input controlling `stride` for this operation. |
| `offset` | `number` | Yes | Numeric input controlling `offset` for this operation. |
| `domainMin` | `number` | Yes | Numeric input controlling `domainMin` for this operation. |
| `domainMax` | `number` | Yes | Numeric input controlling `domainMax` for this operation. |
| `clampMin` | `number` | Yes | Numeric input controlling `clampMin` for this operation. |
| `clampMax` | `number` | Yes | Numeric input controlling `clampMax` for this operation. |
| `percentileLow` | `number` | Yes | Numeric input controlling `percentileLow` for this operation. |

### ScaleMode

```ts
type ScaleMode = "linear" | "log" | "symlog";
```

### ScaleClampMode

```ts
type ScaleClampMode = "none" | "range" | "percentile";
```

### ScaleValueMode

```ts
type ScaleValueMode = "component" | "magnitude";
```

## Example
```js
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const glyphField = wgpu.createGlyphField({ instanceCount: 1, positions: new Float32Array([0, 0, 0, 0]), rotations: new Float32Array([0, 0, 0, 1]), scales: new Float32Array([1, 1, 1, 0]), attributes: new Float32Array([0.5, 0, 0, 0]), scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 } });
const value = glyphField.scaleTransform;
console.log(value);
```

## See Also
- [GlyphField.applyScaleStats](./wasmgpu-objects-glyphfield-applyscalestats.md)
- [GlyphField.colormap](./wasmgpu-objects-glyphfield-colormap.md)
- [GlyphField.colormapStops](./wasmgpu-objects-glyphfield-colormapstops.md)
- [GlyphField.colorMode](./wasmgpu-objects-glyphfield-colormode.md)
- [GlyphField.computeBoundsFromCPUData](./wasmgpu-objects-glyphfield-computeboundsfromcpudata.md)
- [GlyphField.destroy](./wasmgpu-objects-glyphfield-destroy.md)
- [GlyphField.dirtyUniforms](./wasmgpu-objects-glyphfield-dirtyuniforms.md)
- [GlyphField.getAttributeRecord](./wasmgpu-objects-glyphfield-getattributerecord.md)
- [GlyphField.getBounds](./wasmgpu-objects-glyphfield-getbounds.md)
- [GlyphField.getColormapForBinding](./wasmgpu-objects-glyphfield-getcolormapforbinding.md)
- [GlyphField.getColormapKey](./wasmgpu-objects-glyphfield-getcolormapkey.md)
- [GlyphField.getLocalBounds](./wasmgpu-objects-glyphfield-getlocalbounds.md)
