cube-parameters
Version:
A sophisticated 3D model viewer built with React, TypeScript, and Three.js, featuring advanced visualization tools, measurement capabilities, and lighting controls.
17 lines (13 loc) • 408 B
text/typescript
import * as THREE from 'three';
export const getCursorForTool = (activeTool: 'select' | 'point' | 'measure' | 'move'): string => {
const cursors = {
point: 'crosshair',
measure: 'crosshair',
move: 'move',
select: 'default'
};
return cursors[activeTool];
};
export const setCursor = (renderer: THREE.WebGLRenderer, cursor: string) => {
renderer.domElement.style.cursor = cursor;
};