Skip to content

ui gauge

laurel Lin edited this page Aug 22, 2026 · 2 revisions

src/ui/gauge.ts — Gauge converter dialog

A single dialog showing inches / millimeters / pixels (1/16 block) / output value at once. Entering a value in any input updates the other two and the "output value" (Create curve scale constant, read-only): px is the generation basis (mm = px×1000/16, in = mm/25.4), and the output scale is computed from the pixel gauge via the quadratic fit (scaleForPx).

Types

// smoke-test driver hook (not used by real Blockbench)
export interface GaugeDriver {
	setInch(v: number): void;
	setMM(v: number): void;
	setPx(v: number): void;
	getState(): GaugeState;
}

Styles

// clean up the gauge dialog styles on unload
export function disposeGaugeStyles(): void;

Entry point

// opens the gauge converter dialog (inch/mm/px/output linked). Defaults to Create's nominal gauge 1600 mm.
export function runGaugeConverter(): void;

← Back to English API Reference

Clone this wiki locally