@monogrid/gainmap-js 3.0.4 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.0.6](https://github.com/MONOGRID/gainmap-js/compare/v3.0.5...v3.0.6) (2024-09-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove LogLuv following threejs removal https://github.com/mrdoob/three.js/pull/29144 ([1df2154](https://github.com/MONOGRID/gainmap-js/commit/1df2154dce59aff39439eb4974c42b55eddc862b))
7
+
8
+ ## [3.0.5](https://github.com/MONOGRID/gainmap-js/compare/v3.0.4...v3.0.5) (2024-04-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **package.json:** publint fixes so that package is correctly imported in next.js ([#36](https://github.com/MONOGRID/gainmap-js/issues/36)) ([490df10](https://github.com/MONOGRID/gainmap-js/commit/490df10f401a82267595dd9e161cc6a0bbce3d94))
14
+
1
15
  ## [3.0.4](https://github.com/MONOGRID/gainmap-js/compare/v3.0.3...v3.0.4) (2024-04-02)
2
16
 
3
17
 
package/README.md CHANGED
@@ -68,7 +68,6 @@ The disadvantages are:
68
68
  import { HDRJPGLoader } from '@monogrid/gainmap-js'
69
69
  import {
70
70
  EquirectangularReflectionMapping,
71
- LinearFilter,
72
71
  Mesh,
73
72
  MeshBasicMaterial,
74
73
  PerspectiveCamera,
@@ -92,7 +91,6 @@ const mesh = new Mesh(
92
91
  scene.add(mesh)
93
92
  renderer.render(scene, new PerspectiveCamera())
94
93
 
95
-
96
94
  // Starting from three.js r159
97
95
  // `result.renderTarget.texture` can
98
96
  // also be used as Equirectangular scene background
@@ -102,11 +100,9 @@ renderer.render(scene, new PerspectiveCamera())
102
100
  scene.background = result.renderTarget.texture
103
101
  scene.background.mapping = EquirectangularReflectionMapping
104
102
 
105
-
106
103
  // result must be manually disposed
107
104
  // when you are done using it
108
105
  result.dispose()
109
-
110
106
  ```
111
107
 
112
108
  ### Using separate files
@@ -122,7 +118,6 @@ Using separate files will get rid of the limitations of using a single JPEG file
122
118
  import { GainMapLoader } from '@monogrid/gainmap-js'
123
119
  import {
124
120
  EquirectangularReflectionMapping,
125
- LinearFilter,
126
121
  Mesh,
127
122
  MeshBasicMaterial,
128
123
  PerspectiveCamera,
@@ -146,7 +141,6 @@ const mesh = new Mesh(
146
141
  scene.add(mesh)
147
142
  renderer.render(scene, new PerspectiveCamera())
148
143
 
149
-
150
144
  // Starting from three.js r159
151
145
  // `result.renderTarget.texture` can
152
146
  // also be used as Equirectangular scene background
@@ -169,7 +163,7 @@ This is generally not useful in a `three.js` site but this library exposes metho
169
163
  that allow to encode an `.exr` or `hdr` file into a `jpeg` with an embedded gain map.
170
164
 
171
165
  ```ts
172
- import { compress, encode, findTextureMinMax } from '@monogrid/gainmap-js'
166
+ import { compress, encode, findTextureMinMax } from '@monogrid/gainmap-js/encode'
173
167
  import { encodeJPEGMetadata } from '@monogrid/gainmap-js/libultrahdr'
174
168
  import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
175
169
 
@@ -178,7 +172,7 @@ const loader = new EXRLoader()
178
172
  const image = await loader.loadAsync('image.exr')
179
173
 
180
174
  // find RAW RGB Max value of a texture
181
- const textureMax = await findTextureMinMax(image)
175
+ const textureMax = findTextureMinMax(image)
182
176
 
183
177
  // Encode the gainmap
184
178
  const encodingResult = encode({
@@ -188,17 +182,9 @@ const encodingResult = encode({
188
182
  })
189
183
 
190
184
  // obtain the RAW RGBA SDR buffer and create an ImageData
191
- const sdrImageData = new ImageData(
192
- encodingResult.sdr.toArray(),
193
- encodingResult.sdr.width,
194
- encodingResult.sdr.height
195
- )
185
+ const sdrImageData = new ImageData(encodingResult.sdr.toArray(), encodingResult.sdr.width, encodingResult.sdr.height)
196
186
  // obtain the RAW RGBA Gain map buffer and create an ImageData
197
- const gainMapImageData = new ImageData(
198
- encodingResult.gainMap.toArray(),
199
- encodingResult.gainMap.width,
200
- encodingResult.gainMap.height
201
- )
187
+ const gainMapImageData = new ImageData(encodingResult.gainMap.toArray(), encodingResult.gainMap.width, encodingResult.gainMap.height)
202
188
 
203
189
  // parallel compress the RAW buffers into the specified mimeType
204
190
  const mimeType = 'image/jpeg'
@@ -233,6 +219,12 @@ const jpeg = await encodeJPEGMetadata({
233
219
  })
234
220
 
235
221
  // `jpeg` will be an `Uint8Array` which can be saved somewhere
222
+
223
+ // encoder must be manually disposed
224
+ // when no longer needed
225
+ encodingResult.gainMap.dispose()
226
+ encodingResult.sdr.dispose()
227
+
236
228
  ```
237
229
 
238
230
  ## Libultrahdr in Vite
@@ -253,10 +245,6 @@ module.exports = defineConfig({
253
245
  ```
254
246
 
255
247
 
256
- Hi, thanks for reporting this.
257
- I'm afraid this is a documentation issue on my side, I'm going to update the README after resolving this
258
- Here's a rough draft, let me know if it works for you (I already pushed the `rollup.config.decodeonly.mjs`)
259
-
260
248
  ## Building with full encoding support (libultrahdr-wasm)
261
249
 
262
250
  Clone the repository with git submodules recursively:
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -182,7 +182,7 @@ class QuadRenderer {
182
182
  * Performs a readPixel operation in the renderTarget
183
183
  * and returns a DataTexture containing the read data
184
184
  *
185
- * @params options
185
+ * @param options options
186
186
  * @returns
187
187
  */
188
188
  toDataTexture(options) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -83,7 +83,7 @@ export declare class QuadRenderer<TType extends TextureDataType, TMaterial exten
83
83
  * Performs a readPixel operation in the renderTarget
84
84
  * and returns a DataTexture containing the read data
85
85
  *
86
- * @params options
86
+ * @param options options
87
87
  * @returns
88
88
  */
89
89
  toDataTexture(options?: QuadRendererTextureOptions): DataTexture;
@@ -1,6 +1,5 @@
1
1
  import { DataTexture } from 'three';
2
2
  import { EXR } from 'three/examples/jsm/loaders/EXRLoader';
3
- import { LogLuv } from 'three/examples/jsm/loaders/LogLuvLoader';
4
3
  import { RGBE } from 'three/examples/jsm/loaders/RGBELoader';
5
4
  /**
6
5
  * Utility function to obtain a `DataTexture` from various input formats
@@ -11,4 +10,4 @@ import { RGBE } from 'three/examples/jsm/loaders/RGBELoader';
11
10
  * @param image
12
11
  * @returns
13
12
  */
14
- export declare const getDataTexture: (image: EXR | RGBE | LogLuv | DataTexture) => DataTexture;
13
+ export declare const getDataTexture: (image: EXR | RGBE | DataTexture) => DataTexture;
@@ -68,7 +68,7 @@ export type GainMapMetadata = {
68
68
  */
69
69
  export type QuadRendererTextureOptions = Omit<RenderTargetOptions, 'type' | 'format' | 'colorSpace' | 'encoding' | 'depthTexture' | 'stencilBuffer' | 'depthBuffer' | 'internalFormat'> & {
70
70
  /**
71
- * @defaultValue {@link UVMapping}
71
+ * @defaultValue {@link Mapping}
72
72
  */
73
73
  mapping?: Mapping;
74
74
  /**
@@ -1,3 +1,4 @@
1
+ import { HalfFloatType } from 'three';
1
2
  import { QuadRenderer } from '../core/QuadRenderer';
2
3
  import { GainMapDecoderMaterial } from './materials/GainMapDecoderMaterial';
3
4
  import { DecodeParameters } from './types';
@@ -56,4 +57,4 @@ import { DecodeParameters } from './types';
56
57
  * @returns
57
58
  * @throws {Error} if the WebGLRenderer fails to render the gain map
58
59
  */
59
- export declare const decode: (params: DecodeParameters) => QuadRenderer<1016, GainMapDecoderMaterial>;
60
+ export declare const decode: (params: DecodeParameters) => InstanceType<typeof QuadRenderer<typeof HalfFloatType, InstanceType<typeof GainMapDecoderMaterial>>>;
package/dist/decode.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
6
- import { Q as QuadRenderer } from './QuadRenderer-C4ionbnq.js';
6
+ import { Q as QuadRenderer } from './QuadRenderer-B3h-sJtp.js';
7
7
  import { ShaderMaterial, Vector3, NoBlending, SRGBColorSpace, LinearSRGBColorSpace, HalfFloatType, Loader, LoadingManager, Texture, UVMapping, ClampToEdgeWrapping, LinearFilter, LinearMipMapLinearFilter, RGBAFormat, UnsignedByteType, FileLoader } from 'three';
8
8
 
9
9
  const vertexShader = /* glsl */ `
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -186,7 +186,7 @@
186
186
  * Performs a readPixel operation in the renderTarget
187
187
  * and returns a DataTexture containing the read data
188
188
  *
189
- * @params options
189
+ * @param options options
190
190
  * @returns
191
191
  */
192
192
  toDataTexture(options) {
@@ -1,15 +1,14 @@
1
1
  import { DataTexture, WebGLRenderer } from 'three';
2
2
  import { EXR } from 'three/examples/jsm/loaders/EXRLoader';
3
- import { LogLuv } from 'three/examples/jsm/loaders/LogLuvLoader';
4
3
  import { RGBE } from 'three/examples/jsm/loaders/RGBELoader';
5
4
  /**
6
5
  *
7
6
  * @category Utility
8
7
  * @group Utility
9
8
  *
10
- * @param srcTex
9
+ * @param image
11
10
  * @param mode
12
11
  * @param renderer
13
12
  * @returns
14
13
  */
15
- export declare const findTextureMinMax: (image: EXR | RGBE | LogLuv | DataTexture, mode?: 'min' | 'max', renderer?: WebGLRenderer) => number[];
14
+ export declare const findTextureMinMax: (image: EXR | RGBE | DataTexture, mode?: "min" | "max", renderer?: WebGLRenderer) => number[];
@@ -1,4 +1,4 @@
1
- import { DataTexture, ToneMapping, WebGLRenderer } from 'three';
1
+ import { DataTexture, ToneMapping, UnsignedByteType, WebGLRenderer } from 'three';
2
2
  import { QuadRenderer } from '../core/QuadRenderer';
3
3
  import { QuadRendererTextureOptions } from '../decode';
4
4
  import { SDRMaterial } from './materials/SDRMaterial';
@@ -14,4 +14,4 @@ import { SDRMaterial } from './materials/SDRMaterial';
14
14
  * @param renderTargetOptions (optional) Options to use when creating the output renderTarget
15
15
  * @throws {Error} if the WebGLRenderer fails to render the SDR image
16
16
  */
17
- export declare const getSDRRendition: (hdrTexture: DataTexture, renderer?: WebGLRenderer, toneMapping?: ToneMapping, renderTargetOptions?: QuadRendererTextureOptions) => QuadRenderer<1009, SDRMaterial>;
17
+ export declare const getSDRRendition: (hdrTexture: DataTexture, renderer?: WebGLRenderer, toneMapping?: ToneMapping, renderTargetOptions?: QuadRendererTextureOptions) => InstanceType<typeof QuadRenderer<typeof UnsignedByteType, InstanceType<typeof SDRMaterial>>>;
@@ -1,6 +1,5 @@
1
1
  import { type DataTexture, ToneMapping, WebGLRenderer } from 'three';
2
2
  import { type EXR } from 'three/examples/jsm/loaders/EXRLoader';
3
- import { type LogLuv } from 'three/examples/jsm/loaders/LogLuvLoader';
4
3
  import { type RGBE } from 'three/examples/jsm/loaders/RGBELoader';
5
4
  import { QuadRendererTextureOptions } from '../decode';
6
5
  import { WorkerInterfaceImplementation } from '../worker-types';
@@ -71,7 +70,7 @@ export type EncodingParametersBase = GainmapEncodingParameters & {
71
70
  /**
72
71
  * Input image for encoding, must be an HDR image
73
72
  */
74
- image: EXR | RGBE | LogLuv | DataTexture;
73
+ image: EXR | RGBE | DataTexture;
75
74
  /**
76
75
  * Optional WebGLRenderer
77
76
  * @remarks
@@ -101,7 +100,7 @@ export type CompressionMimeType = 'image/png' | 'image/jpeg' | 'image/webp';
101
100
  * @category Utility
102
101
  * @group Utility
103
102
  */
104
- export type HDRRawImageBuffer = EXR['data'] | RGBE['data'] | LogLuv['data'];
103
+ export type HDRRawImageBuffer = EXR['data'] | RGBE['data'];
105
104
  /**
106
105
  * Raw HDR image data
107
106
  *
package/dist/encode.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
6
- import { c as compress } from './compress-CQEeAo-R.js';
6
+ import { c as compress } from './compress-CAiPfiRr.js';
7
7
  import { DataTexture, RGBAFormat, UVMapping, RepeatWrapping, LinearFilter, LinearSRGBColorSpace, ShaderMaterial, Vector3, NoBlending, UnsignedByteType, ACESFilmicToneMapping, LinearToneMapping, CineonToneMapping, ReinhardToneMapping, SRGBColorSpace, Vector2, WebGLRenderTarget, NearestFilter, ClampToEdgeWrapping, FloatType, DataUtils } from 'three';
8
- import { Q as QuadRenderer } from './QuadRenderer-C4ionbnq.js';
8
+ import { Q as QuadRenderer } from './QuadRenderer-B3h-sJtp.js';
9
9
 
10
10
  /**
11
11
  * Utility function to obtain a `DataTexture` from various input formats
@@ -694,7 +694,7 @@ void main() {
694
694
  * @category Utility
695
695
  * @group Utility
696
696
  *
697
- * @param srcTex
697
+ * @param image
698
698
  * @param mode
699
699
  * @param renderer
700
700
  * @returns
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -300,7 +300,7 @@
300
300
  * Performs a readPixel operation in the renderTarget
301
301
  * and returns a DataTexture containing the read data
302
302
  *
303
- * @params options
303
+ * @param options options
304
304
  * @returns
305
305
  */
306
306
  toDataTexture(options) {
@@ -1074,7 +1074,7 @@ void main() {
1074
1074
  * @category Utility
1075
1075
  * @group Utility
1076
1076
  *
1077
- * @param srcTex
1077
+ * @param image
1078
1078
  * @param mode
1079
1079
  * @param renderer
1080
1080
  * @returns
@@ -23,7 +23,7 @@ export declare const decodeJPEGMetadata: (file: Uint8Array) => Promise<{
23
23
  * Parsed metadata
24
24
  */
25
25
  parsedMetadata: GainMapMetadata;
26
- metadata: string | Uint8ClampedArray | Int8Array | ArrayBuffer | Uint8Array;
26
+ metadata: ArrayBuffer | Uint8Array | Uint8ClampedArray | Int8Array | string;
27
27
  success: boolean;
28
28
  errorMessage: any;
29
29
  sdr: any;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -2750,7 +2750,7 @@ function unexportedRuntimeSymbol(sym) {
2750
2750
 
2751
2751
  /** @type {function(string, boolean=, number=)} */
2752
2752
  function intArrayFromString(stringy, dontAddNull, length) {
2753
- var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
2753
+ var len = lengthBytesUTF8(stringy)+1;
2754
2754
  var u8array = new Array(len);
2755
2755
  var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
2756
2756
  if (dontAddNull) u8array.length = numBytesWritten;
@@ -3291,7 +3291,7 @@ function unexportedRuntimeSymbol(sym) {
3291
3291
 
3292
3292
  /** @param {boolean=} noRunDep */
3293
3293
  var asyncLoad = (url, onload, onerror, noRunDep) => {
3294
- var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
3294
+ var dep = getUniqueRunDependency(`al ${url}`) ;
3295
3295
  readAsync(url, (arrayBuffer) => {
3296
3296
  assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
3297
3297
  onload(new Uint8Array(arrayBuffer));
@@ -5262,9 +5262,6 @@ function unexportedRuntimeSymbol(sym) {
5262
5262
  if (curr < 0) return -1;
5263
5263
  ret += curr;
5264
5264
  if (curr < len) break; // nothing more to read
5265
- if (typeof offset !== 'undefined') {
5266
- offset += curr;
5267
- }
5268
5265
  }
5269
5266
  return ret;
5270
5267
  };
@@ -5315,9 +5312,6 @@ function unexportedRuntimeSymbol(sym) {
5315
5312
  var curr = FS.write(stream, HEAP8, ptr, len, offset);
5316
5313
  if (curr < 0) return -1;
5317
5314
  ret += curr;
5318
- if (typeof offset !== 'undefined') {
5319
- offset += curr;
5320
- }
5321
5315
  }
5322
5316
  return ret;
5323
5317
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
13
13
  var Module = (() => {
14
- var _scriptDir = (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.js', document.baseURI).href));
14
+ var _scriptDir = (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.cjs', document.baseURI).href));
15
15
 
16
16
  return (
17
17
  async function(moduleArg = {}) {
@@ -107,7 +107,7 @@
107
107
  // TODO: Swap all `require()`'s with `import()`'s?
108
108
  const { createRequire } = await import('module');
109
109
  /** @suppress{duplicate} */
110
- var require$1 = createRequire((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.js', document.baseURI).href)));
110
+ var require$1 = createRequire((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.cjs', document.baseURI).href)));
111
111
  // These modules will usually be used on Node.js. Load them eagerly to avoid
112
112
  // the complexity of lazy-loading.
113
113
  var fs = require$1('fs');
@@ -119,7 +119,7 @@
119
119
  // EXPORT_ES6 + ENVIRONMENT_IS_NODE always requires use of import.meta.url,
120
120
  // since there's no way getting the current absolute path of the module when
121
121
  // support for that is not available.
122
- scriptDirectory = require$1('url').fileURLToPath(new URL('./', (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.js', document.baseURI).href)))); // includes trailing slash
122
+ scriptDirectory = require$1('url').fileURLToPath(new URL('./', (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.cjs', document.baseURI).href)))); // includes trailing slash
123
123
  }
124
124
 
125
125
  // include: node_shell_read.js
@@ -709,7 +709,7 @@
709
709
  }
710
710
  } else {
711
711
  // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
712
- wasmBinaryFile = new URL('libultrahdr-esm.wasm', (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.js', document.baseURI).href))).href;
712
+ wasmBinaryFile = new URL('libultrahdr-esm.wasm', (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('libultrahdr.umd.cjs', document.baseURI).href))).href;
713
713
  }
714
714
 
715
715
  function getBinarySync(file) {
@@ -2757,7 +2757,7 @@
2757
2757
 
2758
2758
  /** @type {function(string, boolean=, number=)} */
2759
2759
  function intArrayFromString(stringy, dontAddNull, length) {
2760
- var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
2760
+ var len = lengthBytesUTF8(stringy)+1;
2761
2761
  var u8array = new Array(len);
2762
2762
  var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
2763
2763
  if (dontAddNull) u8array.length = numBytesWritten;
@@ -3298,7 +3298,7 @@
3298
3298
 
3299
3299
  /** @param {boolean=} noRunDep */
3300
3300
  var asyncLoad = (url, onload, onerror, noRunDep) => {
3301
- var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
3301
+ var dep = getUniqueRunDependency(`al ${url}`) ;
3302
3302
  readAsync(url, (arrayBuffer) => {
3303
3303
  assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
3304
3304
  onload(new Uint8Array(arrayBuffer));
@@ -5269,9 +5269,6 @@
5269
5269
  if (curr < 0) return -1;
5270
5270
  ret += curr;
5271
5271
  if (curr < len) break; // nothing more to read
5272
- if (typeof offset !== 'undefined') {
5273
- offset += curr;
5274
- }
5275
5272
  }
5276
5273
  return ret;
5277
5274
  };
@@ -5322,9 +5319,6 @@
5322
5319
  var curr = FS.write(stream, HEAP8, ptr, len, offset);
5323
5320
  if (curr < 0) return -1;
5324
5321
  ret += curr;
5325
- if (typeof offset !== 'undefined') {
5326
- offset += curr;
5327
- }
5328
5322
  }
5329
5323
  return ret;
5330
5324
  };
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
6
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-DXfhkIdK.js';
6
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-UqyNh5ZN.js';
7
7
 
8
8
  var lib$1;
9
9
  var hasRequiredLib$1;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
package/dist/worker.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
6
- import { g as getDefaultExportFromCjs } from './_commonjsHelpers-DXfhkIdK.js';
7
- import { c as compress } from './compress-CQEeAo-R.js';
6
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers-UqyNh5ZN.js';
7
+ import { c as compress } from './compress-CAiPfiRr.js';
8
8
 
9
9
  var isPromise$2 = {exports: {}};
10
10
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v3.0.4
2
+ * @monogrid/gainmap-js v3.0.6
3
3
  * With ❤️, by MONOGRID <rnd@monogrid.com>
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monogrid/gainmap-js",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "A Javascript (TypeScript) Port of Adobe Gainmap Technology for storing HDR Images using an SDR Image + a gain map",
5
5
  "homepage": "https://github.com/MONOGRID/gainmap-js#readme",
6
6
  "repository": {
@@ -28,31 +28,36 @@
28
28
  "path": "./node_modules/cz-conventional-changelog"
29
29
  }
30
30
  },
31
- "main": "dist/decode.umd.js",
31
+ "main": "dist/decode.umd.cjs",
32
32
  "module": "dist/decode.js",
33
33
  "types": "dist/decode.d.ts",
34
34
  "sideEffects": false,
35
35
  "type": "module",
36
36
  "exports": {
37
37
  ".": {
38
+ "types": "./dist/decode.d.ts",
38
39
  "import": "./dist/decode.js",
39
- "types": "./dist/decode.d.ts"
40
+ "default": "./dist/decode.umd.cjs"
40
41
  },
41
42
  "./encode": {
43
+ "types": "./dist/encode.d.ts",
42
44
  "import": "./dist/encode.js",
43
- "types": "./dist/encode.d.ts"
45
+ "default": "./dist/encode.umd.cjs"
44
46
  },
45
47
  "./libultrahdr": {
48
+ "types": "./dist/libultrahdr.d.ts",
46
49
  "import": "./dist/libultrahdr.js",
47
- "types": "./dist/libultrahdr.d.ts"
50
+ "default": "./dist/libultrahdr.umd.cjs"
48
51
  },
49
52
  "./worker": {
53
+ "types": "./dist/worker.d.ts",
50
54
  "import": "./dist/worker.js",
51
- "types": "./dist/worker.d.ts"
55
+ "default": "./dist/worker.umd.cjs"
52
56
  },
53
57
  "./worker-interface": {
58
+ "types": "./dist/worker-interface.d.ts",
54
59
  "import": "./dist/worker-interface.js",
55
- "types": "./dist/worker-interface.d.ts"
60
+ "default": "./dist/worker-interface.umd.cjs"
56
61
  }
57
62
  },
58
63
  "typesVersions": {
@@ -80,7 +85,7 @@
80
85
  "start": "concurrently -n rollup,servez -c magenta,green \"rollup -c -w\" \"servez\"",
81
86
  "test": "nyc --reporter=text --reporter=lcov playwright test",
82
87
  "test:startserver": "rollup -c && servez",
83
- "test:docker": "docker run --rm --network host -v $(pwd):/work -w /work -it -u $(id -u ${USER}):$(id -g ${USER}) mcr.microsoft.com/playwright:v1.40.0-jammy /bin/bash",
88
+ "test:docker": "docker run --rm --network host -v $(pwd):/work -w /work -it -u $(id -u ${USER}):$(id -g ${USER}) mcr.microsoft.com/playwright:v1.46.0-jammy /bin/bash",
84
89
  "test:codegen": "playwright codegen http://localhost:8080",
85
90
  "prepack": "npm run build",
86
91
  "check": "concurrently -c auto npm:check:*",
@@ -105,49 +110,49 @@
105
110
  "promise-worker-transferable": "^1.0.4"
106
111
  },
107
112
  "devDependencies": {
108
- "@playwright/test": "^1.42.1",
109
- "@rollup/plugin-commonjs": "^25.0.7",
113
+ "@playwright/test": "^1.46.0",
114
+ "@rollup/plugin-commonjs": "^26.0.1",
110
115
  "@rollup/plugin-json": "^6.1.0",
111
116
  "@rollup/plugin-node-resolve": "^15.2.3",
112
117
  "@rollup/plugin-terser": "^0.4.4",
113
118
  "@rollup/plugin-typescript": "^11.1.6",
114
119
  "@semantic-release/changelog": "^6.0.3",
115
- "@semantic-release/commit-analyzer": "^12.0.0",
120
+ "@semantic-release/commit-analyzer": "^13.0.0",
116
121
  "@semantic-release/git": "github:semantic-release/git",
117
- "@semantic-release/github": "^10.0.2",
118
- "@semantic-release/npm": "^12.0.0",
119
- "@semantic-release/release-notes-generator": "^13.0.0",
120
- "@types/node": "^20.12.2",
121
- "@types/three": "^0.163.0",
122
- "@typescript-eslint/eslint-plugin": "^7.5.0",
123
- "@typescript-eslint/parser": "^7.5.0",
122
+ "@semantic-release/github": "^10.1.3",
123
+ "@semantic-release/npm": "^12.0.1",
124
+ "@semantic-release/release-notes-generator": "^14.0.1",
125
+ "@types/node": "^20.14.9",
126
+ "@types/three": "^0.168.0",
127
+ "@typescript-eslint/eslint-plugin": "^7.15.0",
128
+ "@typescript-eslint/parser": "^7.15.0",
124
129
  "concurrently": "^8.2.2",
125
- "conventional-changelog-conventionalcommits": "^7.0.2",
130
+ "conventional-changelog-conventionalcommits": "^8.0.0",
126
131
  "cz-conventional-changelog": "^3.3.0",
127
- "eslint": "^8.57.0",
132
+ "eslint": "^8.56.0",
128
133
  "eslint-config-mdcs": "^5.0.0",
129
134
  "eslint-config-standard": "^17.1.0",
130
135
  "eslint-plugin-compat": "^4.2.0",
131
136
  "eslint-plugin-html": "^8.0.0",
132
137
  "eslint-plugin-import": "^2.29.1",
133
138
  "eslint-plugin-n": "^16.6.2",
134
- "eslint-plugin-promise": "^6.1.1",
139
+ "eslint-plugin-promise": "^6.4.0",
135
140
  "eslint-plugin-simple-import-sort": "^12.0.0",
136
- "eslint-plugin-unused-imports": "^3.1.0",
137
- "nyc": "^15.1.0",
138
- "rollup": "^4.13.2",
141
+ "eslint-plugin-unused-imports": "^3.2.0",
142
+ "nyc": "^17.0.0",
143
+ "rollup": "^4.20.0",
139
144
  "rollup-plugin-copy": "^3.5.0",
140
145
  "rollup-plugin-delete": "^2.0.0",
141
146
  "rollup-plugin-istanbul": "^5.0.0",
142
- "rollup-plugin-license": "^3.3.1",
143
- "semantic-release": "^23.0.6",
144
- "servez": "^2.1.4",
145
- "sharp": "^0.33.3",
146
- "three": "^0.163.0",
147
- "typedoc": "^0.25.12",
148
- "typedoc-github-wiki-theme": "^1.1.0",
149
- "typedoc-plugin-markdown": "^3.17.1",
150
- "typescript": "^5.4.3"
147
+ "rollup-plugin-license": "^3.5.2",
148
+ "semantic-release": "^24.0.0",
149
+ "servez": "^2.2.3",
150
+ "sharp": "^0.33.4",
151
+ "three": "^0.168.0",
152
+ "typedoc": "^0.26.5",
153
+ "typedoc-github-wiki-theme": "^2.0.0",
154
+ "typedoc-plugin-markdown": "^4.2.3",
155
+ "typescript": "^5.5.4"
151
156
  },
152
157
  "browserslist": [
153
158
  "> 1%, not dead, not ie 11, not op_mini all"