@luma.gl/engine 9.0.0 → 9.0.3
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/dist.dev.js +260 -115
- package/dist/dist.min.js +13 -13
- package/dist/index.cjs +9 -12
- package/dist/index.cjs.map +2 -2
- package/dist/model/model.d.ts +6 -4
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +9 -13
- package/dist.min.js +25 -0
- package/package.json +4 -4
- package/src/model/model.ts +17 -20
package/dist/index.cjs
CHANGED
|
@@ -1115,15 +1115,12 @@ var _Model = class {
|
|
|
1115
1115
|
if (props.instanceCount) {
|
|
1116
1116
|
this.setInstanceCount(props.instanceCount);
|
|
1117
1117
|
}
|
|
1118
|
-
if (props.indices) {
|
|
1119
|
-
throw new Error("Model.props.indices removed. Use props.indexBuffer");
|
|
1120
|
-
}
|
|
1121
1118
|
if (props.indexBuffer) {
|
|
1122
1119
|
this.setIndexBuffer(props.indexBuffer);
|
|
1123
1120
|
}
|
|
1124
1121
|
if (props.attributes) {
|
|
1125
1122
|
this.setAttributes(props.attributes, {
|
|
1126
|
-
|
|
1123
|
+
disableWarnings: props.disableWarnings
|
|
1127
1124
|
});
|
|
1128
1125
|
}
|
|
1129
1126
|
if (props.constantAttributes) {
|
|
@@ -1181,7 +1178,7 @@ var _Model = class {
|
|
|
1181
1178
|
try {
|
|
1182
1179
|
this._logDrawCallStart();
|
|
1183
1180
|
this.pipeline = this._updatePipeline();
|
|
1184
|
-
this.pipeline.setBindings(this.bindings);
|
|
1181
|
+
this.pipeline.setBindings(this.bindings, { disableWarnings: this.props.disableWarnings });
|
|
1185
1182
|
if (!(0, import_core10.isObjectEmpty)(this.uniforms)) {
|
|
1186
1183
|
this.pipeline.setUniformsWebGL(this.uniforms);
|
|
1187
1184
|
}
|
|
@@ -1337,7 +1334,7 @@ var _Model = class {
|
|
|
1337
1334
|
set = true;
|
|
1338
1335
|
}
|
|
1339
1336
|
}
|
|
1340
|
-
if (!set && ((options == null ? void 0 : options.
|
|
1337
|
+
if (!set && !((options == null ? void 0 : options.disableWarnings) || this.props.disableWarnings)) {
|
|
1341
1338
|
import_core10.log.warn(`Model(${this.id}): Ignoring buffer "${buffer.id}" for unknown attribute "${bufferName}"`)();
|
|
1342
1339
|
}
|
|
1343
1340
|
}
|
|
@@ -1351,12 +1348,12 @@ var _Model = class {
|
|
|
1351
1348
|
* is read from the context's global constant value for that attribute location.
|
|
1352
1349
|
* @param constantAttributes
|
|
1353
1350
|
*/
|
|
1354
|
-
setConstantAttributes(attributes) {
|
|
1351
|
+
setConstantAttributes(attributes, options) {
|
|
1355
1352
|
for (const [attributeName, value] of Object.entries(attributes)) {
|
|
1356
1353
|
const attributeInfo = this._attributeInfos[attributeName];
|
|
1357
1354
|
if (attributeInfo) {
|
|
1358
1355
|
this.vertexArray.setConstantWebGL(attributeInfo.location, value);
|
|
1359
|
-
} else {
|
|
1356
|
+
} else if (!((options == null ? void 0 : options.disableWarnings) || this.props.disableWarnings)) {
|
|
1360
1357
|
import_core10.log.warn(`Model "${this.id}: Ignoring constant supplied for unknown attribute "${attributeName}"`)();
|
|
1361
1358
|
}
|
|
1362
1359
|
}
|
|
@@ -1413,9 +1410,9 @@ var _Model = class {
|
|
|
1413
1410
|
}
|
|
1414
1411
|
}
|
|
1415
1412
|
this.vertexCount = gpuGeometry.vertexCount;
|
|
1416
|
-
this.setIndexBuffer(gpuGeometry.indices);
|
|
1417
|
-
this.setAttributes(gpuGeometry.attributes, {
|
|
1418
|
-
this.setAttributes(attributes, {
|
|
1413
|
+
this.setIndexBuffer(gpuGeometry.indices || null);
|
|
1414
|
+
this.setAttributes(gpuGeometry.attributes, { disableWarnings: true });
|
|
1415
|
+
this.setAttributes(attributes, { disableWarnings: this.props.disableWarnings });
|
|
1419
1416
|
this.setNeedsRedraw("geometry attributes");
|
|
1420
1417
|
}
|
|
1421
1418
|
/** Mark pipeline as needing update */
|
|
@@ -1557,7 +1554,7 @@ __publicField(Model, "defaultProps", {
|
|
|
1557
1554
|
transformFeedback: void 0,
|
|
1558
1555
|
shaderAssembler: import_shadertools2.ShaderAssembler.getDefaultShaderAssembler(),
|
|
1559
1556
|
debugShaders: void 0,
|
|
1560
|
-
|
|
1557
|
+
disableWarnings: void 0
|
|
1561
1558
|
});
|
|
1562
1559
|
function mergeBufferLayouts(layouts1, layouts2) {
|
|
1563
1560
|
const layouts = [...layouts1];
|