---
title: "isoCubeFaces"
description: "Tumbling blocks: three shaded rhombus faces per hexagon that read as a field of 3D cubes."
group: "paint"
groupTitle: "Painting"
categoryId: "patterns"
categorySlug: "patterns"
categoryTitle: "Patterns & tiling"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/patterns.ts#L801"
---

# isoCubeFaces

Tumbling blocks: three shaded rhombus faces per hexagon that read as a field of 3D cubes.

```ts
isoCubeFaces(slots: {
    frame: PatternPaint
    thickness: PropRef
    softness: PropRef
}): {random: PatternPaint; tone: PatternPaint; wire: PatternPaint}
```

Import `patterns` from `shaders/std` and use `patterns.isoCubeFaces`.

Returns three values. `tone` is the face shading (1 on top, 0.74 on the right, 0.5 on the left) to multiply into the cube color. `random` is a 0–1 value per cube for varying cube colors. `wire` is the edge-line mask (1 on an edge). `thickness` 1 draws edges about 4% of a cell wide; 0 draws none. `softness` 0–1 blurs them. Draw it in a `'clockwise'` `cellFrame`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    frame: PatternPaint
    thickness: PropRef
    softness: PropRef
}` |  |

## Example

```ts
const faces = isoCubeFaces({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness')})
// paint: opaque(mixOf(times(rgbOf(cubeColor), faces.tone), rgbOf(p('lineColor')), faces.wire))
```

## See also

- [`cellFrame`](/docs/primitives/patterns/cellframe) — The shared coordinate system of a tiled pattern: how many cells fit down the canvas height and how far the whole lattice is rotated.
- [`hexLines`](/docs/primitives/patterns/hexlines) — Honeycomb lines (pointy-top hexagons) drawn in a `cellFrame`, plus a per-cell shade.
- [`times`](/docs/primitives/patterns/times) — The product of two values: a mask scaled by a prop, an RGB dimmed by a shade, two masks combined.
- [`opaque`](/docs/primitives/patterns/opaque) — An RGB value finished as a fully opaque color.

## Used by

[IsometricCubes](/docs/components/isometriccubes)