import { Five } from '@realsee/five'; import * as THREE from 'three'; import type { FireSpreadBounds } from './typing'; /** * 消防演绎的三维实体控制器 * 管理三类实体:火、烟、消防员 */ export declare class FireControl { readonly five: Five; private fireManager; private smokeManager; /** 已添加的起火点 */ private fires; /** 已添加的烟雾*/ private smokes; /** 已添加的消防员 */ private firefighters; /** 消防员加载代次,用于丢弃加载期间已经失效的结果 */ private firefighterTokens; /** 粒子贴图 */ private particleTexture; private unsubscribeTexture; private resourceConfig; private resourceConfigResolvers; private workUtil; constructor(five: Five); set workCode(workCode: string); get workCode(): string; /** 粒子贴图是否已配置 */ get hasParticleTexture(): boolean; /** 消防员模型 URL 是否已配置 */ get hasWaterGunModel(): boolean; /** 更新资源配置 */ updateResourceConfig(config: { waterGunObj?: string; particleTexture?: string; }): void; /** * 等待某项资源配置就位 */ waitForResourceConfig(kind: 'particle' | 'firefighter'): Promise; /** * 添加一个起火点 */ addFire(id: string, position: [number, number, number], options?: { size?: number; floorIndex?: number; fadeInMs?: number; }): void; /** * 让指定起火点开始在给定区域内蔓延。 */ igniteFire(id: string, bounds: FireSpreadBounds, options?: { spreadSpeed?: number; }): void; /** 熄灭:渐进减少火点直到完全消失 */ extinguishFire(id: string, options?: { duration?: number; onComplete?: () => void; }): void; /** 停止熄灭过程 */ stopExtinguishFire(id: string): void; /** * 移动起火点 */ moveFire(id: string, position: [number, number, number]): void; /** * 缩放起火点 */ scaleFire(id: string, size: number): void; /** 移除起火点 */ removeFire(id: string): void; /** * 按楼层控制起火点的可见性 */ changeFireVisibleByFloorIndex(floorIndex: number | null): void; /** * 添加烟雾。 */ addSmoke(id: string, position: [number, number, number], options?: { intensity?: number; fadeInMs?: number; }): void; /** * 让烟雾在所属区域内扩散 */ spreadSmoke(id: string, bounds: FireSpreadBounds, options?: { spreadSpeed?: number; }): void; /** * 移动烟雾。 */ moveSmoke(id: string, position: [number, number, number]): void; /** * 缩放烟雾 */ scaleSmoke(id: string, size: number): void; /** * 烟雾渐隐并移除。 */ dissipateSmoke(id: string, options?: { duration?: number; onComplete?: () => void; }): void; /** * 停止消散 */ stopDissipateSmoke(id: string): void; /** 移除烟雾 */ removeSmoke(id: string): void; /** * 添加消防员。 */ addFirefighter(options: { id: string; position: [number, number, number]; rotation: THREE.Euler; /** 是否喷水 */ spray?: boolean; /** 等比缩放 */ scale?: number; }): Promise; private invalidateFirefighter; /** * 把相机移到某个实体上(以最佳视角观察它)。 */ focusEntity(id: string, options?: { scale?: number; }): Promise; /** 移除消防员 */ removeFirefighter(id?: string): void; /** 清空所有实体,保留管理器与资源配置 */ clearAll(): void; /** 销毁控制器 */ destroy(): void; /** * 创建火焰管理器。 */ private ensureFireManager; /** * 创建烟雾管理器。 */ private ensureSmokeManager; private ensureParticleTexture; /** 把数据里的 work 局部坐标变换为场景世界坐标 */ private toWorld; /** * 把局部坐标的包围盒变换为世界坐标包围盒。 */ private toWorldBounds; /** 创建消防员的喷水粒子 */ private createSprayParticle; }