ol 10.0.1-dev.1722678562646 → 10.0.1-dev.1722809835779

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.0.1-dev.1722678562646",
3
+ "version": "10.0.1-dev.1722809835779",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '10.0.1-dev.1722678562646';
36
+ export const VERSION = '10.0.1-dev.1722809835779';
@@ -1 +1 @@
1
- {"version":3,"file":"styleparser.d.ts","sourceRoot":"","sources":["styleparser.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AACH,qDALW,OAAO,gBAAgB,EAAE,kBAAkB,SAC3C,OAAO,uBAAuB,EAAE,iBAAiB,sCAEhD,MAAM,CAUjB;AAED;;;;GAIG;AACH,iCAHW,OAAO,aAAa,EAAE,KAAK,GAAC,MAAM,GACjC,KAAK,CAAC,MAAM,CAAC,CASxB;AAqCD;;;;GAIG;AACH,mCAHW,MAAO,MAAM,GACZ,MAAM,CAOjB;AAgvBD;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,yCAHW,OAAO,mBAAmB,EAAE,UAAU,GACrC,gBAAgB,CA0I3B;;;;;aAxJa,aAAa;;;;cACb,OAAO,wCAAwC,EAAE,kBAAkB;;;;gBACnE,OAAO,wCAAwC,EAAE,oBAAoB;;8BA30BvD,oBAAoB"}
1
+ {"version":3,"file":"styleparser.d.ts","sourceRoot":"","sources":["styleparser.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH,qDALW,OAAO,gBAAgB,EAAE,kBAAkB,SAC3C,OAAO,uBAAuB,EAAE,iBAAiB,sCAEhD,MAAM,CAUjB;AAED;;;;GAIG;AACH,iCAHW,OAAO,aAAa,EAAE,KAAK,GAAC,MAAM,GACjC,KAAK,CAAC,MAAM,CAAC,CASxB;AAqCD;;;;GAIG;AACH,mCAHW,MAAO,MAAM,GACZ,MAAM,CAOjB;AA4uBD;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,yCAHW,OAAO,mBAAmB,EAAE,UAAU,GACrC,gBAAgB,CA0I3B;;;;;aAxJa,aAAa;;;;cACb,OAAO,wCAAwC,EAAE,kBAAkB;;;;gBACnE,OAAO,wCAAwC,EAAE,oBAAoB;;8BAt0BvD,oBAAoB"}
@@ -12,14 +12,13 @@ import {
12
12
  newParsingContext,
13
13
  } from '../expr/expression.js';
14
14
  import {ShaderBuilder} from './ShaderBuilder.js';
15
+ import {asArray} from '../color.js';
15
16
  import {
16
- arrayToGlsl,
17
17
  buildExpression,
18
18
  getStringNumberEquivalent,
19
19
  stringToGlsl,
20
20
  uniformNameForVariable,
21
21
  } from '../expr/gpu.js';
22
- import {asArray} from '../color.js';
23
22
 
24
23
  /**
25
24
  * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a compilation context that
@@ -202,23 +201,19 @@ function getColorFromDistanceField(
202
201
  */
203
202
  function parseImageProperties(style, builder, uniforms, prefix, textureId) {
204
203
  const image = new Image();
205
- let size;
206
204
  image.crossOrigin =
207
205
  style[`${prefix}cross-origin`] === undefined
208
206
  ? 'anonymous'
209
207
  : style[`${prefix}cross-origin`];
210
208
  image.src = style[`${prefix}src`];
211
209
 
212
- if (image.complete && image.width && image.height) {
213
- size = arrayToGlsl([image.width, image.height]);
214
- } else {
215
- // the size is provided asynchronously using a uniform
216
- uniforms[`u_texture${textureId}_size`] = () => {
217
- return image.complete ? [image.width, image.height] : [0, 0];
218
- };
219
- builder.addUniform(`vec2 u_texture${textureId}_size`);
220
- size = `u_texture${textureId}_size`;
221
- }
210
+ // the size is provided asynchronously using a uniform
211
+ uniforms[`u_texture${textureId}_size`] = () => {
212
+ return image.complete ? [image.width, image.height] : [0, 0];
213
+ };
214
+ builder.addUniform(`vec2 u_texture${textureId}_size`);
215
+ const size = `u_texture${textureId}_size`;
216
+
222
217
  uniforms[`u_texture${textureId}`] = image;
223
218
  builder.addUniform(`sampler2D u_texture${textureId}`);
224
219
  return size;