From 00f40dba9971a36940bec58f98ce5d611e874862 Mon Sep 17 00:00:00 2001 From: nicomacbookpro <805879871@qq.com> Date: Wed, 20 Aug 2025 15:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/three.js | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/utils/three.js b/src/utils/three.js index e833871..deb9d29 100644 --- a/src/utils/three.js +++ b/src/utils/three.js @@ -546,25 +546,24 @@ export function drawAxes(element, options = {}, ballCallBack) { g.position.set(0, 0, 0); gridGroup.add(g); } - if (typeof grid_uv_right !== "undefined" && grid_uv_right) { - // 右侧 - const g = createCustomGridAA(sizeZ, sizeY, ...grid_uv_right, color, px); - g.rotation.y = -Math.PI / 2; - g.position.set(sizeX, 0, 0); - gridGroup.add(g); - } - if (typeof grid_uv_front !== "undefined" && grid_uv_front) { - // 前侧 - const g = createCustomGridAA(sizeX, sizeY, ...grid_uv_front, color, px); - g.position.set(0, 0, sizeZ); - gridGroup.add(g); - } + // if (typeof grid_uv_right !== "undefined" && grid_uv_right) { + // // 右侧 + // const g = createCustomGridAA(sizeZ, sizeY, ...grid_uv_right, color, px); + // g.rotation.y = -Math.PI / 2; + // g.position.set(sizeX, 0, 0); + // gridGroup.add(g); + // } + // if (typeof grid_uv_front !== "undefined" && grid_uv_front) { + // // 前侧 + // const g = createCustomGridAA(sizeX, sizeY, ...grid_uv_front, color, px); + // g.position.set(0, 0, sizeZ); + // gridGroup.add(g); + // } + // 后侧 using let gris_back_g = null; if (typeof grid_uv_back !== "undefined" && grid_uv_back) { - // 后侧 gris_back_g = createCustomGridAA(sizeX, sizeY, ...grid_uv_back, color, px); gris_back_g.position.set(0, 0, 0); - gridGroup.add(gris_back_g); } @@ -1247,7 +1246,3 @@ async function addPositiveAxes(scene, sizeX, sizeY, sizeZ) { scene.add(zAxis); } - -/* ========== DEMO用例:直接渲染到页面的第一个div上 ========== */ -// const demo1 = drawAxes(document.querySelector("div"), {}); -// setInterval(()=>demo1.dispose(),2000); // 定时销毁示例(如需测试资源释放)