廖杰:预览模式当风机离线(不在online下)会显示红色

This commit is contained in:
Hcat
2024-02-28 21:23:57 +08:00
parent 5e24845abb
commit 70364c8e10
4 changed files with 45 additions and 6 deletions

View File

@@ -388,6 +388,7 @@ export default class Demo {
// 初始化风机颜色
this.equMap.get("equ_fan").traverse((v) => {
v.material = new this.THREE.MeshBasicMaterial();
// v.material.color = new this.THREE.Color(0xFF0000);
v.material.color = new this.THREE.Color(0xC0C0C0);
if (/^leaf/.test(v.name) || /^roller/.test(v.name)) {
group.add(v.clone());
@@ -452,7 +453,7 @@ export default class Demo {
);
}
changeFanColor(fanData) {
console.log(this.scene.getObjectById(22));
console.log(this.scene.getObjectByName('fan'));
}
/**
*