@loaders.gl/lerc 4.0.0-beta.7 → 4.0.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/LICENSE +7 -7
- package/README.md +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lerc-loader.js.map +1 -1
- package/dist/lib/parsers/lerc/lerc-types.js.map +1 -1
- package/dist/workers/lerc-worker.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -0
- package/src/lerc-loader.ts +1 -0
- package/src/lib/parsers/lerc/lerc-types.ts +1 -0
- package/src/workers/lerc-worker.ts +1 -0
package/LICENSE
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This software includes parts of PhiloGL (https://github.com/philogb/philogl)
|
|
4
|
-
under MIT license. PhiloGL parts Copyright © 2013 Sencha Labs.
|
|
1
|
+
loaders.gl is licensed under the MIT license
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
Copyright (c) vis.gl contributors
|
|
7
4
|
|
|
8
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -23,8 +20,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
23
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
21
|
THE SOFTWARE.
|
|
25
22
|
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2015 Uber Technologies, Inc.
|
|
26
26
|
|
|
27
|
-
loaders.gl includes certain files from Cesium (https://github.com/AnalyticalGraphicsInc/cesium)
|
|
27
|
+
loaders.gl includes certain files from Cesium (https://github.com/AnalyticalGraphicsInc/cesium)
|
|
28
|
+
under the Apache 2 License (found in the submodule: modules/3d-tiles):)
|
|
28
29
|
|
|
29
30
|
Copyright 2011-2018 CesiumJS Contributors
|
|
30
31
|
|
|
@@ -38,4 +39,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
38
39
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
40
|
See the License for the specific language governing permissions and limitations under the License.
|
|
40
41
|
|
|
41
|
-
Cesium-derived code can be found in the submodule: modules/3d-tiles
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# @loaders.gl/
|
|
1
|
+
# @loaders.gl/lerc
|
|
2
2
|
|
|
3
|
-
This module contains a
|
|
3
|
+
This module contains a loader for the LERC raster format.
|
|
4
4
|
|
|
5
5
|
[loaders.gl](https://loaders.gl/docs) is a collection of framework-independent visualization-focused loaders (parsers).
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LERCLoader"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// LERC - Limited Error Raster Compression\nexport type {LERCData} from './lib/parsers/lerc/lerc-types';\nexport {LERCLoader} from './lerc-loader';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["LERCLoader"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// LERC - Limited Error Raster Compression\nexport type {LERCData} from './lib/parsers/lerc/lerc-types';\nexport {LERCLoader} from './lerc-loader';\n"],"mappings":"SAKQA,UAAU"}
|
package/dist/lerc-loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-loader.js","names":["Lerc","VERSION","__VERSION__","LERCLoader","id","name","module","version","worker","extensions","mimeTypes","options","wms","parse","arrayBuffer","parseLERC","load","pixelBlock","decode","lerc"],"sources":["../src/lerc-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {LERCData} from './lib/parsers/lerc/lerc-types';\nimport * as Lerc from 'lerc';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type LERCLoaderOptions = LoaderOptions & {\n lerc?: {\n /**\tThe number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position. */\n inputOffset?: number;\n /**\tIt is recommended to use the returned mask instead of setting this value. */\n noDataValue?: number;\n /**\t(ndepth LERC2 only) If true, returned depth values are pixel-interleaved. */\n returnInterleaved?: boolean;\n };\n};\n\n/**\n * Loader for the LERC raster format\n */\nexport const LERCLoader: LoaderWithParser<LERCData, never, LERCLoaderOptions> = {\n id: 'lerc',\n name: 'LERC',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['lrc', 'lerc', 'lerc2', 'lerc1'],\n mimeTypes: ['application/octet-stream'],\n // test: ?,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions) =>\n parseLERC(arrayBuffer, options)\n};\n\nasync function parseLERC(arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions): Promise<LERCData> {\n // Load the WASM library\n await Lerc.load();\n // Perform the decode\n const pixelBlock = Lerc.decode(arrayBuffer, options?.lerc);\n return pixelBlock;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"lerc-loader.js","names":["Lerc","VERSION","__VERSION__","LERCLoader","id","name","module","version","worker","extensions","mimeTypes","options","wms","parse","arrayBuffer","parseLERC","load","pixelBlock","decode","lerc"],"sources":["../src/lerc-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {LERCData} from './lib/parsers/lerc/lerc-types';\nimport * as Lerc from 'lerc';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type LERCLoaderOptions = LoaderOptions & {\n lerc?: {\n /**\tThe number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position. */\n inputOffset?: number;\n /**\tIt is recommended to use the returned mask instead of setting this value. */\n noDataValue?: number;\n /**\t(ndepth LERC2 only) If true, returned depth values are pixel-interleaved. */\n returnInterleaved?: boolean;\n };\n};\n\n/**\n * Loader for the LERC raster format\n */\nexport const LERCLoader: LoaderWithParser<LERCData, never, LERCLoaderOptions> = {\n id: 'lerc',\n name: 'LERC',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['lrc', 'lerc', 'lerc2', 'lerc1'],\n mimeTypes: ['application/octet-stream'],\n // test: ?,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions) =>\n parseLERC(arrayBuffer, options)\n};\n\nasync function parseLERC(arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions): Promise<LERCData> {\n // Load the WASM library\n await Lerc.load();\n // Perform the decode\n const pixelBlock = Lerc.decode(arrayBuffer, options?.lerc);\n return pixelBlock;\n}\n"],"mappings":"AAKA,OAAO,KAAKA,IAAI,MAAM,MAAM;AAI5B,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAgB3E,OAAO,MAAMC,UAAgE,GAAG;EAC9EC,EAAE,EAAE,MAAM;EACVC,IAAI,EAAE,MAAM;EAEZC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEN,OAAO;EAChBO,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;EAC7CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAEvCC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAA2B,KACjEI,SAAS,CAACD,WAAW,EAAEH,OAAO;AAClC,CAAC;AAED,eAAeI,SAASA,CAACD,WAAwB,EAAEH,OAA2B,EAAqB;EAEjG,MAAMX,IAAI,CAACgB,IAAI,CAAC,CAAC;EAEjB,MAAMC,UAAU,GAAGjB,IAAI,CAACkB,MAAM,CAACJ,WAAW,EAAEH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,IAAI,CAAC;EAC1D,OAAOF,UAAU;AACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-types.js","names":[],"sources":["../../../../src/lib/parsers/lerc/lerc-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n/** Data returned by LERC loader */\nexport type LERCData = {\n /**\tWidth of decoded image */\n width: number;\n /**\tHeight of decoded image */\n height: number;\n /**\tThe type of pixels represented in the output */\n pixelType: LercPixelType;\n /**\t[statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values */\n statistics: BandStats[];\n /**\t[band1, band2, …] Each band is a typed array of width * height * depthCount */\n pixels: TypedArray[];\n /**\tTyped array with a size of width*height, or null if all pixels are valid */\n mask: Uint8Array;\n /**\tDepth count */\n depthCount: number;\n /**\tarray\t[band1_mask, band2_mask, …] Each band is a Uint8Array of width * height * depthCount */\n bandMasks?: Uint8Array[];\n};\n\nexport type LercPixelType = 'S8' | 'U8' | 'S16' | 'U16' | 'S32' | 'U32' | 'F32' | 'F64';\n\nexport interface BandStats {\n minValue: number;\n maxValue: number;\n depthStats?: {\n minValues: Float64Array;\n maxValues: Float64Array;\n };\n}\n\nexport type TypedArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Float32Array\n | Float64Array;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"lerc-types.js","names":[],"sources":["../../../../src/lib/parsers/lerc/lerc-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n/** Data returned by LERC loader */\nexport type LERCData = {\n /**\tWidth of decoded image */\n width: number;\n /**\tHeight of decoded image */\n height: number;\n /**\tThe type of pixels represented in the output */\n pixelType: LercPixelType;\n /**\t[statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values */\n statistics: BandStats[];\n /**\t[band1, band2, …] Each band is a typed array of width * height * depthCount */\n pixels: TypedArray[];\n /**\tTyped array with a size of width*height, or null if all pixels are valid */\n mask: Uint8Array;\n /**\tDepth count */\n depthCount: number;\n /**\tarray\t[band1_mask, band2_mask, …] Each band is a Uint8Array of width * height * depthCount */\n bandMasks?: Uint8Array[];\n};\n\nexport type LercPixelType = 'S8' | 'U8' | 'S16' | 'U16' | 'S32' | 'U32' | 'F32' | 'F64';\n\nexport interface BandStats {\n minValue: number;\n maxValue: number;\n depthStats?: {\n minValues: Float64Array;\n maxValues: Float64Array;\n };\n}\n\nexport type TypedArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Float32Array\n | Float64Array;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-worker.js","names":["createLoaderWorker","LERCLoader"],"sources":["../../src/workers/lerc-worker.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {createLoaderWorker} from '@loaders.gl/loader-utils';\nimport {LERCLoader} from '../lerc-loader';\n\ncreateLoaderWorker(LERCLoader);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"lerc-worker.js","names":["createLoaderWorker","LERCLoader"],"sources":["../../src/workers/lerc-worker.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {createLoaderWorker} from '@loaders.gl/loader-utils';\nimport {LERCLoader} from '../lerc-loader';\n\ncreateLoaderWorker(LERCLoader);\n"],"mappings":"AAGA,SAAQA,kBAAkB,QAAO,0BAA0B;AAAC,SACpDC,UAAU;AAElBD,kBAAkB,CAACC,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/lerc",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Framework-independent loader for LERC (Limited Error Raster Compression) files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"build-worker": "# esbuild src/workers/lerc-worker.ts --bundle --outfile=dist/lerc-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@loaders.gl/loader-utils": "4.0.0
|
|
43
|
-
"@loaders.gl/schema": "4.0.0
|
|
42
|
+
"@loaders.gl/loader-utils": "4.0.0",
|
|
43
|
+
"@loaders.gl/schema": "4.0.0",
|
|
44
44
|
"lerc": "^4.0.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9b4211dc0ecd4134a1638ac0a29c5ea9008fd971"
|
|
47
47
|
}
|
package/src/index.ts
CHANGED
package/src/lerc-loader.ts
CHANGED