From 65697e0be09fbd6777c0bae3c9be4f8b2465c8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=82=B3=E6=9D=83?= <695601626@qq.com> Date: Thu, 5 Feb 2026 22:17:03 +0800 Subject: [PATCH 1/2] Editor: Cleanup (#32965) --- editor/js/Menubar.Edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/js/Menubar.Edit.js b/editor/js/Menubar.Edit.js index c083ec2ee0a493..e4a5d517daef94 100644 --- a/editor/js/Menubar.Edit.js +++ b/editor/js/Menubar.Edit.js @@ -1,11 +1,11 @@ import { Box3, Vector3 } from 'three'; +import { clone } from 'three/addons/utils/SkeletonUtils.js'; import { UIPanel, UIRow, UIHorizontalRule, UIText } from './libs/ui.js'; import { AddObjectCommand } from './commands/AddObjectCommand.js'; import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js'; import { SetPositionCommand } from './commands/SetPositionCommand.js'; -import { clone } from '../../examples/jsm/utils/SkeletonUtils.js'; function MenubarEdit( editor ) { From 0ad0c008bddd31416110466c989f15109f58fa31 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 5 Feb 2026 06:28:04 -0800 Subject: [PATCH 2/2] LineMaterial: Set needsupdate when changing worldUnits property (#32952) --- examples/jsm/lines/LineMaterial.js | 6 ++++++ examples/webgl_lines_fat.html | 1 - examples/webgl_lines_fat_raycasting.html | 3 --- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/jsm/lines/LineMaterial.js b/examples/jsm/lines/LineMaterial.js index f14534aa964f2b..a229da8aad675a 100644 --- a/examples/jsm/lines/LineMaterial.js +++ b/examples/jsm/lines/LineMaterial.js @@ -484,6 +484,12 @@ class LineMaterial extends ShaderMaterial { set worldUnits( value ) { + if ( ( value === true ) !== this.worldUnits ) { + + this.needsUpdate = true; + + } + if ( value === true ) { this.defines.WORLD_UNITS = ''; diff --git a/examples/webgl_lines_fat.html b/examples/webgl_lines_fat.html index 30576f8c29b43f..a55fa573c46c30 100644 --- a/examples/webgl_lines_fat.html +++ b/examples/webgl_lines_fat.html @@ -228,7 +228,6 @@ gui.add( param, 'world units' ).onChange( function ( val ) { matLine.worldUnits = val; - matLine.needsUpdate = true; } ); diff --git a/examples/webgl_lines_fat_raycasting.html b/examples/webgl_lines_fat_raycasting.html index 45b8d74bfb81e7..b3ca84dc89e196 100644 --- a/examples/webgl_lines_fat_raycasting.html +++ b/examples/webgl_lines_fat_raycasting.html @@ -307,10 +307,7 @@ gui.add( params, 'world units' ).onChange( function ( val ) { matLine.worldUnits = val; - matLine.needsUpdate = true; - matThresholdLine.worldUnits = val; - matThresholdLine.needsUpdate = true; } );