@luma.gl/engine 9.0.5 → 9.0.7
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 +11 -7
- package/dist/dist.min.js +10 -10
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +2 -2
- package/dist/lib/pipeline-factory.d.ts.map +1 -1
- package/dist/lib/pipeline-factory.js +3 -3
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +10 -7
- package/package.json +3 -3
- package/src/lib/pipeline-factory.ts +4 -3
- package/src/model/model.ts +10 -7
package/dist/index.cjs
CHANGED
|
@@ -886,6 +886,8 @@ var _PipelineFactory = class {
|
|
|
886
886
|
const varyingHash = "-";
|
|
887
887
|
const bufferLayoutHash = this._getHash(JSON.stringify(props.bufferLayout));
|
|
888
888
|
switch (this.device.type) {
|
|
889
|
+
case "webgl":
|
|
890
|
+
return `${vsHash}/${fsHash}V${varyingHash}BL${bufferLayoutHash}`;
|
|
889
891
|
default:
|
|
890
892
|
const parameterHash = this._getHash(JSON.stringify(props.parameters));
|
|
891
893
|
return `${vsHash}/${fsHash}V${varyingHash}T${props.topology}P${parameterHash}BL${bufferLayoutHash}`;
|
|
@@ -1119,9 +1121,7 @@ var _Model = class {
|
|
|
1119
1121
|
this.setIndexBuffer(props.indexBuffer);
|
|
1120
1122
|
}
|
|
1121
1123
|
if (props.attributes) {
|
|
1122
|
-
this.setAttributes(props.attributes
|
|
1123
|
-
disableWarnings: props.disableWarnings
|
|
1124
|
-
});
|
|
1124
|
+
this.setAttributes(props.attributes);
|
|
1125
1125
|
}
|
|
1126
1126
|
if (props.constantAttributes) {
|
|
1127
1127
|
this.setConstantAttributes(props.constantAttributes);
|
|
@@ -1133,7 +1133,6 @@ var _Model = class {
|
|
|
1133
1133
|
this.setUniforms(props.uniforms);
|
|
1134
1134
|
}
|
|
1135
1135
|
if (props.moduleSettings) {
|
|
1136
|
-
import_core10.log.warn("Model.props.moduleSettings is deprecated. Use Model.shaderInputs.setProps()")();
|
|
1137
1136
|
this.updateModuleSettings(props.moduleSettings);
|
|
1138
1137
|
}
|
|
1139
1138
|
if (props.transformFeedback) {
|
|
@@ -1190,7 +1189,12 @@ var _Model = class {
|
|
|
1190
1189
|
vertexCount: this.vertexCount,
|
|
1191
1190
|
instanceCount: this.instanceCount,
|
|
1192
1191
|
indexCount,
|
|
1193
|
-
transformFeedback: this.transformFeedback
|
|
1192
|
+
transformFeedback: this.transformFeedback || void 0,
|
|
1193
|
+
// WebGL shares underlying cached pipelines even for models that have different parameters and topology,
|
|
1194
|
+
// so we must provide our unique parameters to each draw
|
|
1195
|
+
// (In WebGPU most parameters are encoded in the pipeline and cannot be changed per draw call)
|
|
1196
|
+
parameters: this.parameters,
|
|
1197
|
+
topology: this.topology
|
|
1194
1198
|
});
|
|
1195
1199
|
} finally {
|
|
1196
1200
|
this._logDrawCallEnd();
|
|
@@ -1334,7 +1338,7 @@ var _Model = class {
|
|
|
1334
1338
|
set = true;
|
|
1335
1339
|
}
|
|
1336
1340
|
}
|
|
1337
|
-
if (!set && !((options == null ? void 0 : options.disableWarnings)
|
|
1341
|
+
if (!set && !((options == null ? void 0 : options.disableWarnings) ?? this.props.disableWarnings)) {
|
|
1338
1342
|
import_core10.log.warn(`Model(${this.id}): Ignoring buffer "${buffer.id}" for unknown attribute "${bufferName}"`)();
|
|
1339
1343
|
}
|
|
1340
1344
|
}
|
|
@@ -1353,7 +1357,7 @@ var _Model = class {
|
|
|
1353
1357
|
const attributeInfo = this._attributeInfos[attributeName];
|
|
1354
1358
|
if (attributeInfo) {
|
|
1355
1359
|
this.vertexArray.setConstantWebGL(attributeInfo.location, value);
|
|
1356
|
-
} else if (!((options == null ? void 0 : options.disableWarnings)
|
|
1360
|
+
} else if (!((options == null ? void 0 : options.disableWarnings) ?? this.props.disableWarnings)) {
|
|
1357
1361
|
import_core10.log.warn(`Model "${this.id}: Ignoring constant supplied for unknown attribute "${attributeName}"`)();
|
|
1358
1362
|
}
|
|
1359
1363
|
}
|