8a92adcInitial commit: mesh-studio POC (OpenCASCADE.js + three.js, NURBS extraction)Jeremy Magland 1import * as THREE from 'three'
3/**
4 * A distinct color per face id, spread around the hue circle by the golden
5 * ratio so neighbouring faces stay easy to tell apart at any face count.
6 */
7export function faceColor(id: number): THREE.Color {
8 const h = (id * 0.618033988749895) % 1
9 return new THREE.Color().setHSL(h, 0.55, 0.62)
10}
12export const SELECTED_COLOR = new THREE.Color('#ffb020')
13export const NET_COLOR = new THREE.Color('#9b6bff')
14export const POLE_COLOR = new THREE.Color('#ffd166')
15export const ISO_COLOR = new THREE.Color('#3fc7ff')