|
@@ -3508,5 +3508,74 @@ export class TypeViewEvent {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将指定的物体列表,控制可见度,以及 是否可选中
|
|
|
+ * meshList 物体列表
|
|
|
+ * visibility 可见度
|
|
|
+ * isPickable 是否可选中
|
|
|
+ */
|
|
|
+ public meshVisibilityUpdate = (meshList : any, visibility : any, isPickable : any) => {
|
|
|
+
|
|
|
+ for (let i = 0; i < meshList.length; i++) {
|
|
|
+
|
|
|
+ let thisMeshId = meshList[i];
|
|
|
+ let objNode = this.ChengGuangYuanJing.CommonVal.find().objScene.getNodeById(thisMeshId);
|
|
|
+ let objMesh = this.ChengGuangYuanJing.CommonVal.find().objScene.getMeshById(thisMeshId);
|
|
|
+
|
|
|
+ if (objNode != null && objNode != undefined) {
|
|
|
+
|
|
|
+ if (objNode._children != null && objNode._children != undefined) {
|
|
|
+
|
|
|
+ for (let j = 0; j < objNode._children.length; j++) {
|
|
|
+
|
|
|
+ let thisChildren = objNode._children[j];
|
|
|
+
|
|
|
+ if (thisChildren.getClassName() == "Mesh") {
|
|
|
+
|
|
|
+ // 可见度没效果,改成缩放的方式
|
|
|
+ thisChildren.scaling.x = visibility;
|
|
|
+ thisChildren.scaling.y = visibility;
|
|
|
+ thisChildren.scaling.z = visibility;
|
|
|
+
|
|
|
+ if (isPickable == false) {
|
|
|
+ thisChildren.isPickable = isPickable;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (objMesh != null && objMesh != undefined) {
|
|
|
+
|
|
|
+ if (objMesh.getClassName() == "Mesh") {
|
|
|
+
|
|
|
+ // 可见度没效果,改成缩放的方式
|
|
|
+ objMesh.scaling.x = visibility;
|
|
|
+ objMesh.scaling.y = visibility;
|
|
|
+ objMesh.scaling.z = visibility;
|
|
|
+
|
|
|
+ if (isPickable == false) {
|
|
|
+ objMesh.isPickable = isPickable;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|