view3d.ts

cad/view3d.ts
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
import { CSS2DObject, CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
import type { Cabinet, Part, PartBox } from "./model";
// Generic 3D CAD drawing of a Cabinet (see model.ts). Renders each part's
// assembled box (a part with a pocket renders as a solid slab with the
// center cleared), overall dimension callouts in the assembled state, and
// per-part cut-size callouts in the exploded state.
export interface Cabinet3D {
layers: { name: string; color: string }[];
setLayerVisible(name: string, on: boolean): void;
setExplode(t: number): void; // 0 assembled .. 1 exploded
resetView(): void;
show(): void;
hide(): void;
resize(): void;
}

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC