From d12d58f9df8a8a05466496e12f2dbd02e8f51a31 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 05 五月 2024 16:29:49 +0800
Subject: [PATCH] #

---
 src/utils/common.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils/common.js b/src/utils/common.js
index 25d76a5..149c847 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -47,13 +47,13 @@
     }
 };
 
-export const setColor = (obj) => {
+export const setColor = (obj, color = 0x4680BF) => {
     if (obj.material) {
-        obj.material.color.set(0x4680BF);
+        obj.material.color.set(color);
     }
     if (obj.children) {
         obj.children.forEach((child) => {
-            setColor(child);
+            setColor(child, color);
         });
     }
 };

--
Gitblit v1.9.1