@deck.gl/core 9.3.0-alpha.5 → 9.3.0-alpha.6

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/index.cjs CHANGED
@@ -82,9 +82,9 @@ __export(dist_exports, {
82
82
  createIterable: () => createIterable,
83
83
  fp64LowPart: () => fp64LowPart,
84
84
  getShaderAssembler: () => getShaderAssembler,
85
- gouraudMaterial: () => import_shadertools4.gouraudMaterial,
85
+ gouraudMaterial: () => import_shadertools3.gouraudMaterial,
86
86
  log: () => log_default,
87
- phongMaterial: () => import_shadertools4.phongMaterial,
87
+ phongMaterial: () => import_shadertools3.phongMaterial,
88
88
  picking: () => picking_default,
89
89
  project: () => project_default,
90
90
  project32: () => project32_default,
@@ -230,7 +230,7 @@ var json_loader_default = {
230
230
 
231
231
  // dist/lib/init.js
232
232
  function checkVersion() {
233
- const version = true ? "9.3.0-alpha.5" : globalThis.DECK_VERSION || "untranspiled source";
233
+ const version = true ? "9.3.0-alpha.6" : globalThis.DECK_VERSION || "untranspiled source";
234
234
  const existingVersion = globalThis.deck && globalThis.deck.VERSION;
235
235
  if (existingVersion && existingVersion !== version) {
236
236
  throw new Error(`deck.gl - multiple versions detected: ${existingVersion} vs ${version}`);
@@ -257,7 +257,6 @@ var VERSION = checkVersion();
257
257
 
258
258
  // dist/shaderlib/index.js
259
259
  var import_shadertools3 = require("@luma.gl/shadertools");
260
- var import_shadertools4 = require("@luma.gl/shadertools");
261
260
 
262
261
  // dist/shaderlib/misc/layer-uniforms.js
263
262
  var uniformBlockWGSL = (
@@ -1664,6 +1663,16 @@ var Pass = class {
1664
1663
  };
1665
1664
 
1666
1665
  // dist/passes/layers-pass.js
1666
+ var WEBGPU_DEFAULT_DRAW_PARAMETERS = {
1667
+ depthWriteEnabled: true,
1668
+ depthCompare: "less-equal",
1669
+ blendColorOperation: "add",
1670
+ blendColorSrcFactor: "src-alpha",
1671
+ blendColorDstFactor: "one",
1672
+ blendAlphaOperation: "add",
1673
+ blendAlphaSrcFactor: "one-minus-dst-alpha",
1674
+ blendAlphaDstFactor: "one"
1675
+ };
1667
1676
  var LayersPass = class extends Pass {
1668
1677
  constructor() {
1669
1678
  super(...arguments);
@@ -1752,7 +1761,9 @@ var LayersPass = class extends Pass {
1752
1761
  layerParam.shouldDrawLayer = true;
1753
1762
  layerParam.layerRenderIndex = indexResolver(layer, shouldDrawLayer);
1754
1763
  layerParam.shaderModuleProps = this._getShaderModuleProps(layer, effects, pass, shaderModuleProps);
1764
+ const defaultParams = layer.context.device.type === "webgpu" ? WEBGPU_DEFAULT_DRAW_PARAMETERS : null;
1755
1765
  layerParam.layerParameters = {
1766
+ ...defaultParams,
1756
1767
  ...(_a = layer.context.deck) == null ? void 0 : _a.props.parameters,
1757
1768
  ...this.getLayerParameters(layer, layerIndex, viewport)
1758
1769
  };
@@ -2971,7 +2982,7 @@ var SunLight = class extends DirectionalLight {
2971
2982
  };
2972
2983
 
2973
2984
  // dist/effects/post-process-effect.js
2974
- var import_shadertools5 = require("@luma.gl/shadertools");
2985
+ var import_shadertools4 = require("@luma.gl/shadertools");
2975
2986
 
2976
2987
  // dist/passes/screen-pass.js
2977
2988
  var import_engine = require("@luma.gl/engine");
@@ -3050,7 +3061,7 @@ var PostProcessEffect = class {
3050
3061
  constructor(module2, props) {
3051
3062
  this.id = `${module2.name}-pass`;
3052
3063
  this.props = props;
3053
- (0, import_shadertools5.initializeShaderModule)(module2);
3064
+ (0, import_shadertools4.initializeShaderModule)(module2);
3054
3065
  this.module = module2;
3055
3066
  }
3056
3067
  setup({ device }) {
@@ -7403,9 +7414,9 @@ TooltipWidget.defaultProps = {
7403
7414
  // dist/lib/deck.js
7404
7415
  var import_core17 = require("@luma.gl/core");
7405
7416
  var import_webgl = require("@luma.gl/webgl");
7417
+ var import_constants11 = require("@luma.gl/webgl/constants");
7406
7418
  var import_engine3 = require("@luma.gl/engine");
7407
7419
  var import_engine4 = require("@luma.gl/engine");
7408
- var import_constants11 = require("@luma.gl/webgl/constants");
7409
7420
  var import_stats2 = require("@probe.gl/stats");
7410
7421
  var import_mjolnir2 = require("mjolnir.js");
7411
7422
  function noop2() {
@@ -9238,7 +9249,7 @@ var Attribute = class extends DataColumn {
9238
9249
 
9239
9250
  // dist/transitions/gpu-interpolation-transition.js
9240
9251
  var import_engine5 = require("@luma.gl/engine");
9241
- var import_shadertools6 = require("@luma.gl/shadertools");
9252
+ var import_shadertools5 = require("@luma.gl/shadertools");
9242
9253
  var import_constants14 = require("@luma.gl/webgl/constants");
9243
9254
 
9244
9255
  // dist/utils/array-utils.js
@@ -9602,7 +9613,7 @@ function getTransform(device, attribute) {
9602
9613
  }
9603
9614
  ],
9604
9615
  // @ts-expect-error fp64 module only sets ONE uniform via defaultUniforms
9605
- modules: [import_shadertools6.fp64arithmetic, interpolationUniforms],
9616
+ modules: [import_shadertools5.fp64arithmetic, interpolationUniforms],
9606
9617
  defines: {
9607
9618
  // @ts-expect-error TODO fix luma type
9608
9619
  ATTRIBUTE_TYPE: attributeType,
@@ -10544,6 +10555,8 @@ function createTexture(owner, device, image, sampler) {
10544
10555
  });
10545
10556
  if (device.type === "webgl") {
10546
10557
  texture.generateMipmapsWebGL();
10558
+ } else if (device.type === "webgpu") {
10559
+ device.generateMipmapsWebGPU(texture);
10547
10560
  }
10548
10561
  internalTextures[texture.id] = owner;
10549
10562
  return texture;