Skip to content

applyGrainyTexture()

@blobs/sdk v0.1.0


@blobs/sdk / utils/themeUtils / applyGrainyTexture

applyGrainyTexture(opacity?): void

Defined in: utils/themeUtils.ts:109

Apply a subtle grainy noise texture as a fixed-position background overlay.

Generates a 200x200 noise canvas, encodes it as a data URL, and injects a body::before rule pinned to the viewport. Called by themes that want the platform’s “deep space” aesthetic.

Parameters

opacity?

number = 0.03

Texture opacity (0-1). Defaults to 0.03.

Returns

void