@maptiler/sdk 3.4.1-rc3 → 3.5.0-rc1

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.
@@ -149,7 +149,7 @@ declare class CubemapLayer implements CustomLayerInterface {
149
149
  * @param {WebGLContext} gl - The WebGL context used for rendering.
150
150
  * @param {CustomRenderMethodInput} _options - Additional options for the render method.
151
151
  */
152
- prerender(gl: WebGLContext, _options: CustomRenderMethodInput): void;
152
+ prerender(_gl: WebGLContext, _options: CustomRenderMethodInput): void;
153
153
  /**
154
154
  * Lerps the background color transition of the cubemap layer.
155
155
  * This method smoothly transitions the background color from the previous color to the target color.
@@ -2,7 +2,7 @@ import { CubemapFaces } from './types';
2
2
  interface LoadCubemapTextureOptions {
3
3
  gl: WebGLRenderingContext | WebGL2RenderingContext;
4
4
  faces?: CubemapFaces;
5
- onLoadedCallback?: () => void;
5
+ onReady: (texture: WebGLTexture, images?: HTMLImageElement[]) => void;
6
6
  forceRefresh?: boolean;
7
7
  }
8
8
  /**
@@ -16,7 +16,7 @@ interface LoadCubemapTextureOptions {
16
16
  * @param {WebGLRenderingContext | WebGL2RenderingContext} options.gl - The WebGL rendering context.
17
17
  * @param {CubemapFaces} options.faces - An object containing URLs for each face of the cubemap.
18
18
  * Must contain exactly 6 faces.
19
- * @param {Function} [options.onLoadedCallback] - Optional callback function to be called when all faces are loaded.
19
+ * @param {Function} [options.onReady] - Optional callback function to be called when all faces are loaded.
20
20
  * @param {boolean} [options.forceRefresh] - If true, forces creation of a new texture instead of returning the memoized one.
21
21
  *
22
22
  * @returns {WebGLTexture | undefined} The created WebGL cubemap texture, or undefined if there was an error.
@@ -34,8 +34,8 @@ interface LoadCubemapTextureOptions {
34
34
  * pz: 'front.jpg',
35
35
  * nz: 'back.jpg'
36
36
  * },
37
- * onLoadedCallback: () => console.log('Cubemap loaded')
37
+ * onReady: () => console.log('Cubemap loaded')
38
38
  * });
39
39
  */
40
- export declare function loadCubemapTexture({ gl, faces, onLoadedCallback, forceRefresh }: LoadCubemapTextureOptions): WebGLTexture | undefined;
40
+ export declare function loadCubemapTexture({ gl, faces, onReady, forceRefresh }: LoadCubemapTextureOptions): void;
41
41
  export {};
package/eslint.config.mjs CHANGED
@@ -107,7 +107,7 @@ export default tseslint.config(
107
107
  "@typescript-eslint/no-unnecessary-condition": "warn",
108
108
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
109
109
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
110
- "@typescript-eslint/no-unnecessary-type-parameters": "off", // as we are a lib, types serve as documentation
110
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
111
111
  "@typescript-eslint/no-unused-vars": "warn",
112
112
  "@typescript-eslint/no-unsafe-argument": "warn",
113
113
  "@typescript-eslint/no-unsafe-assignment": "warn",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "3.4.1-rc3",
3
+ "version": "3.5.0-rc1",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",