From b61142f7486aded914596f96113c4d5ccf231b6b Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 14 Apr 2026 13:43:01 +0200 Subject: [PATCH 1/3] CCDIKSolver: Fix limitation handling. (#33386) --- examples/jsm/animation/CCDIKSolver.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/jsm/animation/CCDIKSolver.js b/examples/jsm/animation/CCDIKSolver.js index c29169a456eb13..ebde2b9e83b9ae 100644 --- a/examples/jsm/animation/CCDIKSolver.js +++ b/examples/jsm/animation/CCDIKSolver.js @@ -204,7 +204,11 @@ class CCDIKSolver { if ( c > 1.0 ) c = 1.0; - const c2 = math.sqrt( 1 - c * c ); + // preserve sign of the rotation along the limitation axis, + // otherwise negative rotations get mirrored to positive + const dot = link.quaternion.x * limitation.x + link.quaternion.y * limitation.y + link.quaternion.z * limitation.z; + const sign = dot < 0 ? - 1 : 1; + const c2 = sign * math.sqrt( 1 - c * c ); link.quaternion.set( limitation.x * c2, limitation.y * c2, limitation.z * c2, From d38c1179c5a805a0e9f14dcc22354d7ed094d574 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 14 Apr 2026 15:38:27 +0200 Subject: [PATCH 2/3] EXRLoader: Remove buggy `getBigInt64()` fallback. (#33387) --- examples/jsm/loaders/EXRLoader.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/examples/jsm/loaders/EXRLoader.js b/examples/jsm/loaders/EXRLoader.js index eb12d79d93fbef..8fbb362a9a5009 100644 --- a/examples/jsm/loaders/EXRLoader.js +++ b/examples/jsm/loaders/EXRLoader.js @@ -2082,17 +2082,7 @@ class EXRLoader extends DataTextureLoader { const parseInt64 = function ( dataView, offset ) { - let int; - - if ( 'getBigInt64' in DataView.prototype ) { - - int = Number( dataView.getBigInt64( offset.value, true ) ); - - } else { - - int = dataView.getUint32( offset.value + 4, true ) + Number( dataView.getUint32( offset.value, true ) << 32 ); - - } + const int = Number( dataView.getBigInt64( offset.value, true ) ); offset.value += ULONG_SIZE; From d291f9bb3f3e48cea2fdf3eb8e8f213d502b7476 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 14 Apr 2026 16:21:36 +0200 Subject: [PATCH 3/3] WebGPUBackend: Simplify code. (#33388) --- src/renderers/webgpu/WebGPUBackend.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/renderers/webgpu/WebGPUBackend.js b/src/renderers/webgpu/WebGPUBackend.js index 06ada1d039d8a6..0320d99d03572c 100644 --- a/src/renderers/webgpu/WebGPUBackend.js +++ b/src/renderers/webgpu/WebGPUBackend.js @@ -1613,20 +1613,17 @@ class WebGPUBackend extends Backend { for ( let i = 0; i < drawCount; i ++ ) { - const count = 1; - const firstInstance = count > 1 ? 0 : i; - if ( hasIndex === true ) { - passEncoderGPU.drawIndexed( counts[ i ], count, starts[ i ] / bytesPerElement, 0, firstInstance ); + passEncoderGPU.drawIndexed( counts[ i ], 1, starts[ i ] / bytesPerElement, 0, i ); } else { - passEncoderGPU.draw( counts[ i ], count, starts[ i ], firstInstance ); + passEncoderGPU.draw( counts[ i ], 1, starts[ i ], i ); } - info.update( object, counts[ i ], count ); + info.update( object, counts[ i ], 1 ); }