@needle-tools/three 0.185.0 → 0.185.2-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/three.cjs CHANGED
@@ -6,7 +6,7 @@
6
6
  'use strict';
7
7
 
8
8
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
- const REVISION = '185.0';
9
+ const REVISION = '185.2-alpha';
10
10
 
11
11
  /**
12
12
  * Represents mouse buttons and interaction types in context of controls.
@@ -59510,7 +59510,8 @@ class ShapePath {
59510
59510
  for ( let j = i - 1; j >= 0; j -- ) {
59511
59511
 
59512
59512
  const candidate = entries[ j ];
59513
- if ( ! candidate.boundingBox.containsPoint( entry.interiorPoint ) ) continue;
59513
+
59514
+ if ( ! candidate.boundingBox.containsBox( entry.boundingBox ) ) continue;
59514
59515
  if ( ! pointInPolygon( entry.interiorPoint, candidate.points ) ) continue;
59515
59516
 
59516
59517
  entry.container = candidate.exclude ? candidate.container : candidate;
@@ -65854,12 +65855,31 @@ function setValueV4uiArray( gl, v ) {
65854
65855
 
65855
65856
  // Array of textures (2D / 3D / Cube / 2DArray)
65856
65857
 
65858
+ const _warnedEmptySamplerArray = new Set();
65859
+
65857
65860
  function setValueT1Array( gl, v, textures ) {
65858
65861
 
65859
65862
  const cache = this.cache;
65860
65863
 
65861
65864
  const n = v.length;
65862
65865
 
65866
+ // An empty sampler array (`sampler2D x[0]`) has nothing to bind, and Chrome throws
65867
+ // "WebGL: INVALID_VALUE: uniform1iv: no array" on `gl.uniform1iv([])` — every frame.
65868
+ // Skip the upload (a genuine no-op) and warn once per uniform so the source of the
65869
+ // empty array can be tracked down. Seen with empty shadow sampler arrays (ContactShadows).
65870
+ if ( n === 0 ) {
65871
+
65872
+ if ( ! _warnedEmptySamplerArray.has( this.id ) ) {
65873
+
65874
+ _warnedEmptySamplerArray.add( this.id );
65875
+ console.warn( `THREE.WebGLUniforms: skipping empty sampler array uniform '${ this.id }' (nothing to bind).` );
65876
+
65877
+ }
65878
+
65879
+ return;
65880
+
65881
+ }
65882
+
65863
65883
  const units = allocTexUnits( textures, n );
65864
65884
 
65865
65885
  if ( ! arraysEqual( cache, units ) ) {
@@ -3,7 +3,7 @@
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
- const REVISION = '185.0';
6
+ const REVISION = '185.2-alpha';
7
7
 
8
8
  /**
9
9
  * Represents mouse buttons and interaction types in context of controls.
@@ -59529,7 +59529,8 @@ class ShapePath {
59529
59529
  for ( let j = i - 1; j >= 0; j -- ) {
59530
59530
 
59531
59531
  const candidate = entries[ j ];
59532
- if ( ! candidate.boundingBox.containsPoint( entry.interiorPoint ) ) continue;
59532
+
59533
+ if ( ! candidate.boundingBox.containsBox( entry.boundingBox ) ) continue;
59533
59534
  if ( ! pointInPolygon( entry.interiorPoint, candidate.points ) ) continue;
59534
59535
 
59535
59536
  entry.container = candidate.exclude ? candidate.container : candidate;