From 1f746457e38cd537b02fe7c9392f7044f314d4b6 Mon Sep 17 00:00:00 2001 From: liuxianghui <519646741@qq.com> Date: Tue, 23 Nov 2021 10:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9C=97=E8=AF=BB=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../babylon/view/mark-window/mark-window.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts index 2d75c24..ac974dd 100644 --- a/src/app/babylon/view/mark-window/mark-window.ts +++ b/src/app/babylon/view/mark-window/mark-window.ts @@ -29,6 +29,7 @@ import { BabylonTool } from "../../tool/babylon-tool"; import { LoadTool } from "../../tool/load-tool"; import { MeshPool, MeshPoolInfo } from "../../tool/mesh-pool"; import { ParticleSystemTool } from "../../tool/particle-system-tool"; +import { SpeakingTool } from "../../tool/speaking-tool"; import { BuildingUIItem } from "../building-window/building-ui-item"; import { BuildingWindow } from "../building-window/building-window"; import { IndoorFloorUIItem } from "../indoor-window/indoor-floorui-item"; @@ -302,6 +303,7 @@ export class MarkWindow extends UIBase { * @param planId 方案 * @param nodeId 节点 * @param changeBuildingByUI 是否在沙盘状态下,点UI切层、建筑 + * @param readDescribe 朗读描述 */ selectMarkNode(planId: number, nodeId: number, changeBuildingByUI: boolean = false, readDescribe = false) { // //还原数据 @@ -356,11 +358,16 @@ export class MarkWindow extends UIBase { this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy); //this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 this.updateNodeInfo(); + if (readDescribe) { + this.readDescribe(nodeCopy.describe); + } + } } + /** * 新建方案(一级节点) * @param name 新方案名称 @@ -1499,6 +1506,17 @@ export class MarkWindow extends UIBase { } + /** + * 朗读描述 + * @param describe + */ + readDescribe(describe: string) { + if (describe != null) { + SpeakingTool.Instance.clear(); + SpeakingTool.Instance.speak(describe); + } + } + //#endregion