@monogrid/gainmap-js 3.0.6 → 3.2.0
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 +14 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +106 -2
- package/dist/Loader-BZcKUVaX.js +424 -0
- package/dist/{QuadRenderer-B3h-sJtp.js → QuadRenderer-Y5tm-R3m.js} +39 -30
- package/dist/{_commonjsHelpers-UqyNh5ZN.js → _commonjsHelpers-CuGYGi_5.js} +2 -2
- package/dist/{compress-CAiPfiRr.js → compress-BaKKOAXI.js} +2 -3
- package/dist/core/QuadRenderer.d.ts +2 -2
- package/dist/core/get-data-texture.d.ts +4 -3
- package/dist/core/types.d.ts +2 -1
- package/dist/decode/index.d.ts +1 -11
- package/dist/decode/shared/Loader.d.ts +59 -0
- package/dist/decode/shared/decode.d.ts +24 -0
- package/dist/decode/{extract.d.ts → shared/extract.d.ts} +4 -4
- package/dist/decode/shared/index.d.ts +8 -0
- package/dist/decode/shared/types.d.ts +53 -0
- package/dist/decode/{utils → shared/utils}/MPFExtractor.d.ts +1 -1
- package/dist/decode/shared/utils/extractXMP.d.ts +2 -0
- package/dist/decode/{decode.d.ts → webgl/decode.d.ts} +6 -6
- package/dist/decode/webgl/index.d.ts +8 -0
- package/dist/decode/{loaders → webgl/loaders}/GainMapLoader.d.ts +5 -6
- package/dist/decode/{loaders → webgl/loaders}/HDRJPGLoader.d.ts +6 -7
- package/dist/decode/webgl/loaders/LoaderBaseWebGL.d.ts +20 -0
- package/dist/decode/{materials → webgl/materials}/GainMapDecoderMaterial.d.ts +2 -2
- package/dist/decode/webgpu/core/QuadRenderer.d.ts +153 -0
- package/dist/decode/webgpu/decode.d.ts +60 -0
- package/dist/decode/webgpu/index.d.ts +8 -0
- package/dist/decode/webgpu/loaders/GainMapLoader.d.ts +69 -0
- package/dist/decode/webgpu/loaders/HDRJPGLoader.d.ts +65 -0
- package/dist/decode/webgpu/loaders/LoaderBaseWebGPU.d.ts +20 -0
- package/dist/decode/webgpu/materials/GainMapDecoderMaterial.d.ts +78 -0
- package/dist/decode.js +45 -442
- package/dist/decode.umd.cjs +388 -358
- package/dist/decode.webgpu.js +814 -0
- package/dist/decode.webgpu.umd.cjs +1244 -0
- package/dist/encode/encode-and-compress.d.ts +3 -3
- package/dist/encode/encode.d.ts +3 -3
- package/dist/encode/find-texture-min-max.d.ts +4 -3
- package/dist/encode/types.d.ts +4 -3
- package/dist/encode.js +32 -11
- package/dist/encode.umd.cjs +67 -38
- package/dist/libultrahdr/decode-jpeg-metadata.d.ts +0 -3
- package/dist/libultrahdr/encode-jpeg-metadata.d.ts +2 -2
- package/dist/libultrahdr.js +42 -75
- package/dist/libultrahdr.umd.cjs +46 -79
- package/dist/worker-interface.js +74 -64
- package/dist/worker-interface.umd.cjs +73 -63
- package/dist/worker.js +103 -88
- package/dist/worker.umd.cjs +103 -89
- package/package.json +79 -72
- package/dist/decode/loaders/LoaderBase.d.ts +0 -45
- package/dist/decode/types.d.ts +0 -42
- package/dist/decode/utils/extractXMP.d.ts +0 -7
- /package/dist/decode/{errors → shared/errors}/GainMapNotFoundError.d.ts +0 -0
- /package/dist/decode/{errors → shared/errors}/XMPMetadataNotFoundError.d.ts +0 -0
- /package/dist/decode/{utils → shared/utils}/get-html-image-from-blob.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monogrid/gainmap-js",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A Javascript (TypeScript) Port of Adobe Gainmap Technology for storing HDR Images using an SDR Image + a gain map",
|
|
5
|
-
"homepage": "https://github.com/MONOGRID/gainmap-js#readme",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+ssh://git@github.com/MONOGRID/gainmap-js.git"
|
|
9
|
-
},
|
|
10
5
|
"keywords": [
|
|
11
6
|
"hdr",
|
|
12
7
|
"gain map",
|
|
@@ -14,23 +9,16 @@
|
|
|
14
9
|
"three",
|
|
15
10
|
"threejs"
|
|
16
11
|
],
|
|
17
|
-
"
|
|
18
|
-
"license": "MIT",
|
|
12
|
+
"homepage": "https://github.com/MONOGRID/gainmap-js#readme",
|
|
19
13
|
"bugs": {
|
|
20
14
|
"url": "https://github.com/MONOGRID/gainmap-js/issues"
|
|
21
15
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
},
|
|
26
|
-
"config": {
|
|
27
|
-
"commitizen": {
|
|
28
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
29
|
-
}
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+ssh://git@github.com/MONOGRID/gainmap-js.git"
|
|
30
19
|
},
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"types": "dist/decode.d.ts",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "MONOGRID <gainmap@monogrid.com>",
|
|
34
22
|
"sideEffects": false,
|
|
35
23
|
"type": "module",
|
|
36
24
|
"exports": {
|
|
@@ -39,6 +27,11 @@
|
|
|
39
27
|
"import": "./dist/decode.js",
|
|
40
28
|
"default": "./dist/decode.umd.cjs"
|
|
41
29
|
},
|
|
30
|
+
"./webgpu": {
|
|
31
|
+
"types": "./dist/decode/webgpu/index.d.ts",
|
|
32
|
+
"import": "./dist/decode.webgpu.js",
|
|
33
|
+
"default": "./dist/decode.webgpu.umd.cjs"
|
|
34
|
+
},
|
|
42
35
|
"./encode": {
|
|
43
36
|
"types": "./dist/encode.d.ts",
|
|
44
37
|
"import": "./dist/encode.js",
|
|
@@ -60,11 +53,20 @@
|
|
|
60
53
|
"default": "./dist/worker-interface.umd.cjs"
|
|
61
54
|
}
|
|
62
55
|
},
|
|
56
|
+
"main": "dist/decode.umd.cjs",
|
|
57
|
+
"module": "dist/decode.js",
|
|
58
|
+
"types": "dist/decode.d.ts",
|
|
63
59
|
"typesVersions": {
|
|
64
60
|
"*": {
|
|
65
61
|
".": [
|
|
66
62
|
"./dist/decode.d.ts"
|
|
67
63
|
],
|
|
64
|
+
"decode/webgpu": [
|
|
65
|
+
"./dist/decode/webgpu/index.d.ts"
|
|
66
|
+
],
|
|
67
|
+
"decode/webgl": [
|
|
68
|
+
"./dist/decode/webgl/index.d.ts"
|
|
69
|
+
],
|
|
68
70
|
"encode": [
|
|
69
71
|
"./dist/encode.d.ts"
|
|
70
72
|
],
|
|
@@ -81,80 +83,85 @@
|
|
|
81
83
|
},
|
|
82
84
|
"scripts": {
|
|
83
85
|
"build": "rollup -c",
|
|
84
|
-
"dev": "concurrently -n rollup,servez -c magenta,green \"rollup -c -w\" \"servez\"",
|
|
85
|
-
"start": "concurrently -n rollup,servez -c magenta,green \"rollup -c -w\" \"servez\"",
|
|
86
|
-
"test": "nyc --reporter=text --reporter=lcov playwright test",
|
|
87
|
-
"test:startserver": "rollup -c && servez",
|
|
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",
|
|
89
|
-
"test:codegen": "playwright codegen http://localhost:8080",
|
|
90
|
-
"prepack": "npm run build",
|
|
91
86
|
"check": "concurrently -c auto npm:check:*",
|
|
92
|
-
"check:
|
|
87
|
+
"check:eslint-examples": "eslint \"examples/**/*.{ts,html}\"",
|
|
93
88
|
"check:eslint-src": "eslint \"src/**/*.ts\"",
|
|
89
|
+
"check:eslint-tests": "eslint \"tests/**/*.ts\"",
|
|
94
90
|
"check:typecheck-examples": "tsc -p examples",
|
|
95
|
-
"check:
|
|
91
|
+
"check:typecheck-src": "tsc -p src",
|
|
96
92
|
"check:typecheck-tests": "tsc -p tests",
|
|
97
|
-
"check:eslint-tests": "eslint \"tests/**/*.ts\"",
|
|
98
93
|
"ci:check": "concurrently npm:ci:check:*",
|
|
99
|
-
"ci:check:
|
|
94
|
+
"ci:check:eslint-examples": "eslint --format json --output-file reports/eslint-examples.json \"examples/**/*.{ts,html}\"",
|
|
100
95
|
"ci:check:eslint-src": "eslint --format json --output-file reports/eslint-src.json \"src/**/*.ts\"",
|
|
96
|
+
"ci:check:eslint-tests": "eslint --format json --output-file reports/eslint-tests.json \"tests/**/*.ts\"",
|
|
101
97
|
"ci:check:typecheck-examples": "tsc --pretty false -p examples > reports/typecheck-examples.log",
|
|
102
|
-
"ci:check:
|
|
98
|
+
"ci:check:typecheck-src": "tsc --pretty false -p src > reports/typecheck.log",
|
|
103
99
|
"ci:check:typecheck-tests": "tsc --pretty false -p tests > reports/typecheck-tests.log",
|
|
104
|
-
"
|
|
100
|
+
"dev": "concurrently -n rollup,servez -c magenta,green \"rollup -c -w\" \"servez\"",
|
|
101
|
+
"prepack": "npm run build",
|
|
102
|
+
"start": "concurrently -n rollup,servez -c magenta,green \"rollup -c -w\" \"servez\"",
|
|
103
|
+
"test": "nyc --reporter=text --reporter=lcov playwright test",
|
|
104
|
+
"test:codegen": "playwright codegen http://localhost:8080",
|
|
105
|
+
"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.56.1-jammy /bin/bash",
|
|
106
|
+
"test:startserver": "rollup -c && servez"
|
|
105
107
|
},
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
+
"config": {
|
|
109
|
+
"commitizen": {
|
|
110
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
111
|
+
}
|
|
108
112
|
},
|
|
113
|
+
"browserslist": [
|
|
114
|
+
"> 1%, not dead, not ie 11, not op_mini all"
|
|
115
|
+
],
|
|
109
116
|
"dependencies": {
|
|
110
117
|
"promise-worker-transferable": "^1.0.4"
|
|
111
118
|
},
|
|
112
119
|
"devDependencies": {
|
|
113
|
-
"@
|
|
114
|
-
"@
|
|
120
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
121
|
+
"@playwright/test": "^1.56.1",
|
|
122
|
+
"@rollup/plugin-commonjs": "^28.0.9",
|
|
115
123
|
"@rollup/plugin-json": "^6.1.0",
|
|
116
|
-
"@rollup/plugin-node-resolve": "^
|
|
124
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
117
125
|
"@rollup/plugin-terser": "^0.4.4",
|
|
118
|
-
"@rollup/plugin-typescript": "^
|
|
126
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
119
127
|
"@semantic-release/changelog": "^6.0.3",
|
|
120
|
-
"@semantic-release/commit-analyzer": "^13.0.
|
|
128
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
121
129
|
"@semantic-release/git": "github:semantic-release/git",
|
|
122
|
-
"@semantic-release/github": "^
|
|
123
|
-
"@semantic-release/npm": "^
|
|
124
|
-
"@semantic-release/release-notes-generator": "^14.0
|
|
125
|
-
"@types/node": "^
|
|
126
|
-
"@types/three": "^0.
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"concurrently": "^8.2.2",
|
|
130
|
-
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
130
|
+
"@semantic-release/github": "^12.0.0",
|
|
131
|
+
"@semantic-release/npm": "^13.1.1",
|
|
132
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
133
|
+
"@types/node": "^22.18.12",
|
|
134
|
+
"@types/three": "^0.181.0",
|
|
135
|
+
"concurrently": "^9.2.1",
|
|
136
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
131
137
|
"cz-conventional-changelog": "^3.3.0",
|
|
132
|
-
"eslint": "^
|
|
138
|
+
"eslint": "^9.38.0",
|
|
133
139
|
"eslint-config-mdcs": "^5.0.0",
|
|
134
|
-
"eslint-
|
|
135
|
-
"eslint-plugin-
|
|
136
|
-
"eslint-plugin-
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"eslint-plugin-unused-imports": "^3.2.0",
|
|
142
|
-
"nyc": "^17.0.0",
|
|
143
|
-
"rollup": "^4.20.0",
|
|
140
|
+
"eslint-plugin-html": "^8.1.3",
|
|
141
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
142
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
143
|
+
"globals": "^16.4.0",
|
|
144
|
+
"neostandard": "^0.12.2",
|
|
145
|
+
"nyc": "^17.1.0",
|
|
146
|
+
"rollup": "^4.52.5",
|
|
144
147
|
"rollup-plugin-copy": "^3.5.0",
|
|
145
|
-
"rollup-plugin-delete": "^
|
|
148
|
+
"rollup-plugin-delete": "^3.0.1",
|
|
146
149
|
"rollup-plugin-istanbul": "^5.0.0",
|
|
147
|
-
"rollup-plugin-license": "^3.
|
|
148
|
-
"semantic-release": "^
|
|
149
|
-
"servez": "^2.2
|
|
150
|
-
"sharp": "^0.
|
|
151
|
-
"three": "^0.
|
|
152
|
-
"typedoc": "^0.
|
|
153
|
-
"typedoc-github-wiki-theme": "^2.
|
|
154
|
-
"typedoc-plugin-markdown": "^4.
|
|
155
|
-
"typescript": "
|
|
150
|
+
"rollup-plugin-license": "^3.6.0",
|
|
151
|
+
"semantic-release": "^25.0.1",
|
|
152
|
+
"servez": "^2.3.2",
|
|
153
|
+
"sharp": "^0.34.4",
|
|
154
|
+
"three": "^0.181.1",
|
|
155
|
+
"typedoc": "^0.28.14",
|
|
156
|
+
"typedoc-github-wiki-theme": "^2.1.0",
|
|
157
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
158
|
+
"typescript": "~5.9.0"
|
|
156
159
|
},
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
+
"peerDependencies": {
|
|
161
|
+
"three": ">= 0.159.0"
|
|
162
|
+
},
|
|
163
|
+
"publishConfig": {
|
|
164
|
+
"access": "public",
|
|
165
|
+
"registry": "https://registry.npmjs.org/"
|
|
166
|
+
}
|
|
160
167
|
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { HalfFloatType, Loader, LoadingManager, WebGLRenderer } from 'three';
|
|
2
|
-
import { QuadRenderer } from '../../core/QuadRenderer';
|
|
3
|
-
import { type GainMapMetadata, QuadRendererTextureOptions } from '../../core/types';
|
|
4
|
-
import { GainMapDecoderMaterial } from '../materials/GainMapDecoderMaterial';
|
|
5
|
-
export declare class LoaderBase<TUrl = string> extends Loader<QuadRenderer<typeof HalfFloatType, GainMapDecoderMaterial>, TUrl> {
|
|
6
|
-
private _renderer?;
|
|
7
|
-
private _renderTargetOptions?;
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
protected _internalLoadingManager: LoadingManager;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param renderer
|
|
15
|
-
* @param manager
|
|
16
|
-
*/
|
|
17
|
-
constructor(renderer?: WebGLRenderer, manager?: LoadingManager);
|
|
18
|
-
/**
|
|
19
|
-
* Specify the renderer to use when rendering the gain map
|
|
20
|
-
*
|
|
21
|
-
* @param renderer
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
setRenderer(renderer: WebGLRenderer): this;
|
|
25
|
-
/**
|
|
26
|
-
* Specify the renderTarget options to use when rendering the gain map
|
|
27
|
-
*
|
|
28
|
-
* @param options
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
setRenderTargetOptions(options: QuadRendererTextureOptions): this;
|
|
32
|
-
/**
|
|
33
|
-
* @private
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
protected prepareQuadRenderer(): QuadRenderer<1016, GainMapDecoderMaterial>;
|
|
37
|
-
/**
|
|
38
|
-
* @private
|
|
39
|
-
* @param quadRenderer
|
|
40
|
-
* @param metadata
|
|
41
|
-
* @param sdrBuffer
|
|
42
|
-
* @param gainMapBuffer
|
|
43
|
-
*/
|
|
44
|
-
protected render(quadRenderer: QuadRenderer<typeof HalfFloatType, GainMapDecoderMaterial>, metadata: GainMapMetadata, sdrBuffer: ArrayBuffer, gainMapBuffer?: ArrayBuffer): Promise<void>;
|
|
45
|
-
}
|
package/dist/decode/types.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Texture, type WebGLRenderer } from 'three';
|
|
2
|
-
import { type GainMapMetadata, type QuadRendererTextureOptions } from '../core/types';
|
|
3
|
-
/**
|
|
4
|
-
* Necessary parameters for decoding a Gainmap
|
|
5
|
-
*
|
|
6
|
-
* @category Specs
|
|
7
|
-
* @group Specs
|
|
8
|
-
*/
|
|
9
|
-
export type GainmapDecodingParameters = {
|
|
10
|
-
/**
|
|
11
|
-
* The maximum available boost supported by a display, at a given point in time.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* This value can change over time based on device settings and other factors,
|
|
15
|
-
* such as ambient light conditions, or how many bright pixels are on the screen.
|
|
16
|
-
*
|
|
17
|
-
* Non Logarithmic space
|
|
18
|
-
*/
|
|
19
|
-
maxDisplayBoost: number;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* @category Decoding Functions
|
|
23
|
-
* @group Decoding Functions
|
|
24
|
-
*/
|
|
25
|
-
export type DecodeParameters = {
|
|
26
|
-
/**
|
|
27
|
-
* An Texture containing the SDR Rendition
|
|
28
|
-
*/
|
|
29
|
-
sdr: Texture;
|
|
30
|
-
/**
|
|
31
|
-
* An Texture containing the GainMap recovery image
|
|
32
|
-
*/
|
|
33
|
-
gainMap: Texture;
|
|
34
|
-
/**
|
|
35
|
-
* WebGLRenderer used to decode the GainMap
|
|
36
|
-
*/
|
|
37
|
-
renderer?: WebGLRenderer;
|
|
38
|
-
/**
|
|
39
|
-
* Options to use when creating the output renderTarget
|
|
40
|
-
*/
|
|
41
|
-
renderTargetOptions?: QuadRendererTextureOptions;
|
|
42
|
-
} & GainmapDecodingParameters & GainMapMetadata;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|