@luma.gl/webgl 9.0.0-alpha.31 → 9.0.0-alpha.33
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/dist/adapter/helpers/set-uniform.d.ts +3 -2
- package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
- package/dist/adapter/helpers/set-uniform.js +25 -25
- package/dist/adapter/helpers/set-uniform.js.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +3 -2
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -1
- package/dist/classic/buffer-with-accessor.d.ts +0 -1
- package/dist/classic/buffer-with-accessor.d.ts.map +1 -1
- package/dist/classic/buffer-with-accessor.js +0 -1
- package/dist/classic/buffer-with-accessor.js.map +1 -1
- package/dist/dist.dev.js +36 -28
- package/dist/index.cjs +30 -28
- package/dist.min.js +20 -20
- package/package.json +5 -5
- package/src/adapter/helpers/set-uniform.ts +33 -33
- package/src/adapter/resources/webgl-render-pipeline.ts +12 -13
- package/src/classic/buffer-with-accessor.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -5121,34 +5121,34 @@ function parseUniformName(name2) {
|
|
|
5121
5121
|
var import_constants23 = require("@luma.gl/constants");
|
|
5122
5122
|
function setUniform(gl2, location, type, value) {
|
|
5123
5123
|
const gl22 = gl2;
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
case import_constants23.GL.SAMPLER_CUBE_SHADOW:
|
|
5133
|
-
case import_constants23.GL.INT_SAMPLER_2D:
|
|
5134
|
-
case import_constants23.GL.INT_SAMPLER_3D:
|
|
5135
|
-
case import_constants23.GL.INT_SAMPLER_CUBE:
|
|
5136
|
-
case import_constants23.GL.INT_SAMPLER_2D_ARRAY:
|
|
5137
|
-
case import_constants23.GL.UNSIGNED_INT_SAMPLER_2D:
|
|
5138
|
-
case import_constants23.GL.UNSIGNED_INT_SAMPLER_3D:
|
|
5139
|
-
case import_constants23.GL.UNSIGNED_INT_SAMPLER_CUBE:
|
|
5140
|
-
case import_constants23.GL.UNSIGNED_INT_SAMPLER_2D_ARRAY:
|
|
5141
|
-
return gl2.uniform1i(location, value);
|
|
5142
|
-
}
|
|
5143
|
-
}
|
|
5144
|
-
if (value === true) {
|
|
5145
|
-
value = 1;
|
|
5146
|
-
}
|
|
5147
|
-
if (value === false) {
|
|
5148
|
-
value = 0;
|
|
5149
|
-
}
|
|
5150
|
-
const arrayValue = typeof value === "number" ? [value] : value;
|
|
5124
|
+
let uniformValue = value;
|
|
5125
|
+
if (uniformValue === true) {
|
|
5126
|
+
uniformValue = 1;
|
|
5127
|
+
}
|
|
5128
|
+
if (uniformValue === false) {
|
|
5129
|
+
uniformValue = 0;
|
|
5130
|
+
}
|
|
5131
|
+
const arrayValue = typeof uniformValue === "number" ? [uniformValue] : uniformValue;
|
|
5151
5132
|
switch (type) {
|
|
5133
|
+
case import_constants23.GL.SAMPLER_2D:
|
|
5134
|
+
case import_constants23.GL.SAMPLER_CUBE:
|
|
5135
|
+
case import_constants23.GL.SAMPLER_3D:
|
|
5136
|
+
case import_constants23.GL.SAMPLER_2D_SHADOW:
|
|
5137
|
+
case import_constants23.GL.SAMPLER_2D_ARRAY:
|
|
5138
|
+
case import_constants23.GL.SAMPLER_2D_ARRAY_SHADOW:
|
|
5139
|
+
case import_constants23.GL.SAMPLER_CUBE_SHADOW:
|
|
5140
|
+
case import_constants23.GL.INT_SAMPLER_2D:
|
|
5141
|
+
case import_constants23.GL.INT_SAMPLER_3D:
|
|
5142
|
+
case import_constants23.GL.INT_SAMPLER_CUBE:
|
|
5143
|
+
case import_constants23.GL.INT_SAMPLER_2D_ARRAY:
|
|
5144
|
+
case import_constants23.GL.UNSIGNED_INT_SAMPLER_2D:
|
|
5145
|
+
case import_constants23.GL.UNSIGNED_INT_SAMPLER_3D:
|
|
5146
|
+
case import_constants23.GL.UNSIGNED_INT_SAMPLER_CUBE:
|
|
5147
|
+
case import_constants23.GL.UNSIGNED_INT_SAMPLER_2D_ARRAY:
|
|
5148
|
+
if (typeof value !== "number") {
|
|
5149
|
+
throw new Error("samplers must be set to integers");
|
|
5150
|
+
}
|
|
5151
|
+
return gl2.uniform1i(location, value);
|
|
5152
5152
|
case import_constants23.GL.FLOAT:
|
|
5153
5153
|
return gl2.uniform1fv(location, arrayValue);
|
|
5154
5154
|
case import_constants23.GL.FLOAT_VEC2:
|
|
@@ -5471,7 +5471,9 @@ var WEBGLRenderPipeline = class extends import_core23.RenderPipeline {
|
|
|
5471
5471
|
set = true;
|
|
5472
5472
|
}
|
|
5473
5473
|
if (!set) {
|
|
5474
|
-
import_core23.log.warn(
|
|
5474
|
+
import_core23.log.warn(
|
|
5475
|
+
`setAttributes(): Ignoring (buffer "${buffer.id}" for unknown attribute "${name}" in pipeline "${this.id}"`
|
|
5476
|
+
)();
|
|
5475
5477
|
}
|
|
5476
5478
|
}
|
|
5477
5479
|
}
|