@needle-tools/three 0.185.1 → 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 +20 -1
- package/build/three.core.js +1 -1
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +19 -0
- package/build/three.module.min.js +1 -1
- package/package.json +1 -1
- package/src/constants.js +1 -1
- package/src/renderers/webgl/WebGLUniforms.js +19 -0
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.
|
|
9
|
+
const REVISION = '185.2-alpha';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents mouse buttons and interaction types in context of controls.
|
|
@@ -65855,12 +65855,31 @@ function setValueV4uiArray( gl, v ) {
|
|
|
65855
65855
|
|
|
65856
65856
|
// Array of textures (2D / 3D / Cube / 2DArray)
|
|
65857
65857
|
|
|
65858
|
+
const _warnedEmptySamplerArray = new Set();
|
|
65859
|
+
|
|
65858
65860
|
function setValueT1Array( gl, v, textures ) {
|
|
65859
65861
|
|
|
65860
65862
|
const cache = this.cache;
|
|
65861
65863
|
|
|
65862
65864
|
const n = v.length;
|
|
65863
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
|
+
|
|
65864
65883
|
const units = allocTexUnits( textures, n );
|
|
65865
65884
|
|
|
65866
65885
|
if ( ! arraysEqual( cache, units ) ) {
|