import { watcher } from '@feng3d/watcher'; import { TetrahedronGeometry } from '../../thirdparty/three/imports'; import { BufferGeometry3D } from '../core/BufferGeometry3D'; export class TetrahedronGeometry3D extends BufferGeometry3D { radius = 1; detail = 0; get _geometry() { if (!this.__geometry) { this.__geometry = new TetrahedronGeometry(this.radius, this.detail); } return this.__geometry; } declare protected __geometry: TetrahedronGeometry; constructor() { super(); watcher.watchs(this as TetrahedronGeometry3D, ['radius', 'detail'], this._invalidate, this); } destroy() { watcher.unwatchs(this as TetrahedronGeometry3D, ['radius', 'detail'], this._invalidate, this); } }