UNPKG

cube-parameters

Version:

A sophisticated 3D model viewer built with React, TypeScript, and Three.js, featuring advanced visualization tools, measurement capabilities, and lighting controls.

27 lines (22 loc) 597 B
import * as THREE from 'three'; export class SelectionMaterials { private overlayMaterial: THREE.MeshStandardMaterial | null = null; getOverlayMaterial(): THREE.MeshStandardMaterial { if (!this.overlayMaterial) { this.overlayMaterial = new THREE.MeshStandardMaterial({ color: 0xff0000, transparent: true, opacity: 0.3, depthTest: false, depthWrite: false }); } return this.overlayMaterial; } dispose() { if (this.overlayMaterial) { this.overlayMaterial.dispose(); this.overlayMaterial = null; } } }