Browse Source

提交朗读功能

dev
刘向辉 3 years ago
parent
commit
1f746457e3
  1. 18
      src/app/babylon/view/mark-window/mark-window.ts

18
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

Loading…
Cancel
Save