@loaders.gl/tile-converter 4.0.0-alpha.12 → 4.0.0-alpha.14
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/dist/3d-tiles-converter/3d-tiles-converter.d.ts +0 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.js +8 -19
- package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts +4 -1
- package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
- package/dist/converter.min.js +66 -66
- package/dist/dist.min.js +1381 -331
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +34 -67
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-converter.js +6 -0
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/gltf-attributes.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +10 -21
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-converter/types.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js +8 -18
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/geometry-converter.js +6 -0
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/gltf-attributes.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +0 -7
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-converter/types.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +1 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.d.ts +2 -3
- package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.js +3 -0
- package/dist/i3s-converter/helpers/gltf-attributes.d.ts +2 -2
- package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +0 -5
- package/dist/i3s-converter/types.d.ts +32 -1
- package/dist/i3s-converter/types.d.ts.map +1 -1
- package/dist/i3s-converter/types.js +1 -1
- package/package.json +16 -18
- package/src/3d-tiles-converter/3d-tiles-converter.ts +10 -28
- package/src/3d-tiles-converter/helpers/b3dm-converter.ts +5 -2
- package/src/i3s-converter/helpers/batch-ids-extensions.ts +6 -6
- package/src/i3s-converter/helpers/geometry-converter.ts +17 -17
- package/src/i3s-converter/helpers/gltf-attributes.ts +2 -2
- package/src/i3s-converter/i3s-converter.ts +0 -5
- package/src/i3s-converter/types.ts +32 -1
- package/dist/3d-tiles-attributes-worker.d.ts +0 -28
- package/dist/3d-tiles-attributes-worker.d.ts.map +0 -1
- package/dist/3d-tiles-attributes-worker.js +0 -3
- package/dist/3d-tiles-attributes-worker.js.map +0 -7
- package/dist/es5/3d-tiles-attributes-worker.js +0 -25
- package/dist/es5/3d-tiles-attributes-worker.js.map +0 -1
- package/dist/es5/i3s-attributes-worker.js +0 -25
- package/dist/es5/i3s-attributes-worker.js.map +0 -1
- package/dist/es5/workers/3d-tiles-attributes-worker.js +0 -28
- package/dist/es5/workers/3d-tiles-attributes-worker.js.map +0 -1
- package/dist/es5/workers/i3s-attributes-worker.js +0 -30
- package/dist/es5/workers/i3s-attributes-worker.js.map +0 -1
- package/dist/esm/3d-tiles-attributes-worker.js +0 -16
- package/dist/esm/3d-tiles-attributes-worker.js.map +0 -1
- package/dist/esm/i3s-attributes-worker.js +0 -16
- package/dist/esm/i3s-attributes-worker.js.map +0 -1
- package/dist/esm/workers/3d-tiles-attributes-worker.js +0 -8
- package/dist/esm/workers/3d-tiles-attributes-worker.js.map +0 -1
- package/dist/esm/workers/i3s-attributes-worker.js +0 -7
- package/dist/esm/workers/i3s-attributes-worker.js.map +0 -1
- package/dist/i3s-attributes-worker.d.ts +0 -45
- package/dist/i3s-attributes-worker.d.ts.map +0 -1
- package/dist/i3s-attributes-worker.js +0 -9
- package/dist/i3s-attributes-worker.js.map +0 -7
- package/dist/workers/3d-tiles-attributes-worker.d.ts +0 -2
- package/dist/workers/3d-tiles-attributes-worker.d.ts.map +0 -1
- package/dist/workers/3d-tiles-attributes-worker.js +0 -9
- package/dist/workers/i3s-attributes-worker.d.ts +0 -2
- package/dist/workers/i3s-attributes-worker.d.ts.map +0 -1
- package/dist/workers/i3s-attributes-worker.js +0 -5
- package/src/3d-tiles-attributes-worker.ts +0 -43
- package/src/i3s-attributes-worker.ts +0 -59
- package/src/workers/3d-tiles-attributes-worker.ts +0 -6
- package/src/workers/i3s-attributes-worker.ts +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"3d-tiles-attributes-worker.d.ts","sourceRoot":"","sources":["../../src/workers/3d-tiles-attributes-worker.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
7
|
-
const b3dm_converter_1 = __importDefault(require("../3d-tiles-converter/helpers/b3dm-converter"));
|
|
8
|
-
const b3dmConverter = new b3dm_converter_1.default();
|
|
9
|
-
(0, worker_utils_1.createWorker)(async (data, options = {}) => b3dmConverter.convert(data, options.featureAttributes));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-attributes-worker.d.ts","sourceRoot":"","sources":["../../src/workers/i3s-attributes-worker.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
4
|
-
const geometry_converter_1 = require("../i3s-converter/helpers/geometry-converter");
|
|
5
|
-
(0, worker_utils_1.createWorker)(async (data, options = {}) => await (0, geometry_converter_1.convertAttributes)(data, options.materialAndTextureList, options.useCartesianPositions));
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type {WorkerObject} from '@loaders.gl/worker-utils';
|
|
2
|
-
import type {FeatureAttribute} from '@loaders.gl/i3s';
|
|
3
|
-
|
|
4
|
-
import {processOnWorker} from '@loaders.gl/worker-utils';
|
|
5
|
-
|
|
6
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
9
|
-
|
|
10
|
-
export type Tile3DAttributesWorkerOptions = {
|
|
11
|
-
featureAttributes: FeatureAttribute | null;
|
|
12
|
-
source: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type I3SAttributesData = {
|
|
16
|
-
tileContent: any;
|
|
17
|
-
textureFormat: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* I3S Attributes Worker to handle B3DM object
|
|
22
|
-
*/
|
|
23
|
-
export const Tile3dAttributesWorker = {
|
|
24
|
-
id: '3d-tiles-attributes',
|
|
25
|
-
name: '3DTiles Attributes Worker',
|
|
26
|
-
module: 'tile-converter',
|
|
27
|
-
version: VERSION,
|
|
28
|
-
options: {
|
|
29
|
-
featureAttributes: null
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Performs I3S attributes transformation
|
|
35
|
-
*/
|
|
36
|
-
export function transform3DTilesAttributesOnWorker(
|
|
37
|
-
i3sAttributesData: I3SAttributesData,
|
|
38
|
-
options: Tile3DAttributesWorkerOptions
|
|
39
|
-
): Promise<ArrayBuffer> {
|
|
40
|
-
return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const _typecheckI3SAttributesWorker: WorkerObject = Tile3dAttributesWorker;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type {WorkerObject} from '@loaders.gl/worker-utils';
|
|
2
|
-
import type {ConvertedAttributes} from './i3s-converter/types';
|
|
3
|
-
import type {Matrix4, Vector3} from '@math.gl/core';
|
|
4
|
-
import type {GLTFNodePostprocessed} from '@loaders.gl/gltf';
|
|
5
|
-
|
|
6
|
-
import {processOnWorker} from '@loaders.gl/worker-utils';
|
|
7
|
-
|
|
8
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
9
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
10
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
11
|
-
|
|
12
|
-
export type I3SAttributesWorkerOptions = {
|
|
13
|
-
_nodeWorkers: boolean;
|
|
14
|
-
reuseWorkers: boolean;
|
|
15
|
-
useCartesianPositions: boolean;
|
|
16
|
-
source: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type TextureImageProperties = {
|
|
20
|
-
data: Uint8Array;
|
|
21
|
-
compressed?: boolean;
|
|
22
|
-
height?: number;
|
|
23
|
-
width?: number;
|
|
24
|
-
components?: number;
|
|
25
|
-
mimeType?: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type B3DMAttributesData = {
|
|
29
|
-
gltfMaterials?: {id: string}[];
|
|
30
|
-
nodes: GLTFNodePostprocessed[];
|
|
31
|
-
images: (null | TextureImageProperties)[];
|
|
32
|
-
cartographicOrigin: Vector3;
|
|
33
|
-
cartesianModelMatrix: Matrix4;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* I3S Attributes Worker to handle B3DM object
|
|
38
|
-
*/
|
|
39
|
-
export const I3SAttributesWorker = {
|
|
40
|
-
id: 'i3s-attributes',
|
|
41
|
-
name: 'I3S Attributes Worker',
|
|
42
|
-
module: 'tile-converter',
|
|
43
|
-
version: VERSION,
|
|
44
|
-
options: {
|
|
45
|
-
useCartesianPositions: false
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Performs I3S attributes transformation
|
|
51
|
-
*/
|
|
52
|
-
export function transformI3SAttributesOnWorker(
|
|
53
|
-
attributesData: B3DMAttributesData,
|
|
54
|
-
options: I3SAttributesWorkerOptions
|
|
55
|
-
): Promise<Map<string, ConvertedAttributes>> {
|
|
56
|
-
return processOnWorker(I3SAttributesWorker, attributesData, options);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export const _typecheckI3SAttributesWorker: WorkerObject = I3SAttributesWorker;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import {createWorker} from '@loaders.gl/worker-utils';
|
|
2
|
-
import B3dmConverter from '../3d-tiles-converter/helpers/b3dm-converter';
|
|
3
|
-
|
|
4
|
-
const b3dmConverter = new B3dmConverter();
|
|
5
|
-
|
|
6
|
-
createWorker(async (data, options = {}) => b3dmConverter.convert(data, options.featureAttributes));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import {createWorker} from '@loaders.gl/worker-utils';
|
|
2
|
-
import {convertAttributes} from '../i3s-converter/helpers/geometry-converter';
|
|
3
|
-
|
|
4
|
-
createWorker(
|
|
5
|
-
async (data, options = {}) =>
|
|
6
|
-
await convertAttributes(data, options.materialAndTextureList, options.useCartesianPositions)
|
|
7
|
-
);
|