@loaders.gl/3d-tiles 4.0.0-alpha.1 → 4.0.0-alpha.11
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/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +2 -2
- package/dist/cesium-ion-loader.d.ts +6 -0
- package/dist/cesium-ion-loader.d.ts.map +1 -0
- package/dist/cesium-ion-loader.js +37 -32
- package/dist/dist.min.js +14805 -0
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/cesium-ion-loader.js +77 -0
- package/dist/es5/cesium-ion-loader.js.map +1 -0
- package/dist/es5/index.js +63 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js +114 -0
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -0
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js +180 -0
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -0
- package/dist/es5/lib/classes/tile-3d-batch-table.js +285 -0
- package/dist/es5/lib/classes/tile-3d-batch-table.js.map +1 -0
- package/dist/es5/lib/classes/tile-3d-feature-table.js +97 -0
- package/dist/es5/lib/classes/tile-3d-feature-table.js.map +1 -0
- package/dist/es5/lib/constants.js +32 -0
- package/dist/es5/lib/constants.js.map +1 -0
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js +49 -0
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js.map +1 -0
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js +30 -0
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js.map +1 -0
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js +47 -0
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -0
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js +48 -0
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -0
- package/dist/es5/lib/encoders/encode-3d-tile.js +35 -0
- package/dist/es5/lib/encoders/encode-3d-tile.js.map +1 -0
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js +35 -0
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -0
- package/dist/es5/lib/ion/ion.js +170 -0
- package/dist/es5/lib/ion/ion.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js +65 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js +32 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js +32 -0
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js +280 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js +110 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js +22 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js +145 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js +85 -0
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -0
- package/dist/es5/lib/parsers/helpers/parse-utils.js +28 -0
- package/dist/es5/lib/parsers/helpers/parse-utils.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js +51 -0
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js +48 -0
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js +52 -0
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-header.js +289 -0
- package/dist/es5/lib/parsers/parse-3d-tile-header.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js +163 -0
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js +295 -0
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -0
- package/dist/es5/lib/parsers/parse-3d-tile.js +74 -0
- package/dist/es5/lib/parsers/parse-3d-tile.js.map +1 -0
- package/dist/es5/lib/utils/obb/s2-corners-to-obb.js +30 -0
- package/dist/es5/lib/utils/obb/s2-corners-to-obb.js.map +1 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-boundary.js +44 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-boundary.js.map +1 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-obb-points.js +30 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-obb-points.js.map +1 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-region.js +52 -0
- package/dist/es5/lib/utils/s2/converters/s2-to-region.js.map +1 -0
- package/dist/es5/lib/utils/s2/index.js +90 -0
- package/dist/es5/lib/utils/s2/index.js.map +1 -0
- package/dist/es5/lib/utils/s2/s2-geometry-functions.js +19 -0
- package/dist/es5/lib/utils/s2/s2-geometry-functions.js.map +1 -0
- package/dist/es5/lib/utils/s2/s2-token-functions.js +41 -0
- package/dist/es5/lib/utils/s2/s2-token-functions.js.map +1 -0
- package/dist/es5/lib/utils/s2/s2geometry/s2-cell-utils.js +22 -0
- package/dist/es5/lib/utils/s2/s2geometry/s2-cell-utils.js.map +1 -0
- package/dist/es5/lib/utils/s2/s2geometry/s2-geometry.js +207 -0
- package/dist/es5/lib/utils/s2/s2geometry/s2-geometry.js.map +1 -0
- package/dist/es5/lib/utils/version.js +9 -0
- package/dist/es5/lib/utils/version.js.map +1 -0
- package/dist/es5/tile-3d-subtree-loader.js +22 -0
- package/dist/es5/tile-3d-subtree-loader.js.map +1 -0
- package/dist/es5/tile-3d-writer.js +26 -0
- package/dist/es5/tile-3d-writer.js.map +1 -0
- package/dist/es5/tiles-3d-loader.js +133 -0
- package/dist/es5/tiles-3d-loader.js.map +1 -0
- package/dist/es5/types.js +2 -0
- package/dist/es5/types.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/cesium-ion-loader.js +36 -0
- package/dist/esm/cesium-ion-loader.js.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/classes/helpers/tile-3d-accessor-utils.js +96 -0
- package/dist/esm/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -0
- package/dist/esm/lib/classes/tile-3d-batch-table-hierarchy.js +171 -0
- package/dist/esm/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -0
- package/dist/esm/lib/classes/tile-3d-batch-table.js +231 -0
- package/dist/esm/lib/classes/tile-3d-batch-table.js.map +1 -0
- package/dist/esm/lib/classes/tile-3d-feature-table.js +70 -0
- package/dist/esm/lib/classes/tile-3d-feature-table.js.map +1 -0
- package/dist/esm/lib/constants.js +22 -0
- package/dist/esm/lib/constants.js.map +1 -0
- package/dist/esm/lib/encoders/encode-3d-tile-batched-model.js +40 -0
- package/dist/esm/lib/encoders/encode-3d-tile-batched-model.js.map +1 -0
- package/dist/esm/lib/encoders/encode-3d-tile-composite.js +21 -0
- package/dist/esm/lib/encoders/encode-3d-tile-composite.js.map +1 -0
- package/dist/esm/lib/encoders/encode-3d-tile-instanced-model.js +36 -0
- package/dist/esm/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -0
- package/dist/esm/lib/encoders/encode-3d-tile-point-cloud.js +39 -0
- package/dist/esm/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -0
- package/dist/esm/lib/encoders/encode-3d-tile.js +29 -0
- package/dist/esm/lib/encoders/encode-3d-tile.js.map +1 -0
- package/dist/esm/lib/encoders/helpers/encode-3d-tile-header.js +28 -0
- package/dist/esm/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -0
- package/dist/esm/lib/ion/ion.js +70 -0
- package/dist/esm/lib/ion/ion.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-colors.js +58 -0
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -0
- package/{src → dist/esm}/lib/parsers/helpers/normalize-3d-tile-normals.js +5 -10
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-positions.js +26 -0
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js +241 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-gltf-view.js +67 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-header.js +16 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-subtree.js +67 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-tables.js +80 -0
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -0
- package/dist/esm/lib/parsers/helpers/parse-utils.js +20 -0
- package/dist/esm/lib/parsers/helpers/parse-utils.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-batched-model.js +25 -0
- package/dist/esm/lib/parsers/parse-3d-tile-batched-model.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js +15 -0
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-gltf.js +20 -0
- package/dist/esm/lib/parsers/parse-3d-tile-gltf.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-header.js +181 -0
- package/dist/esm/lib/parsers/parse-3d-tile-header.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-instanced-model.js +138 -0
- package/dist/esm/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile-point-cloud.js +232 -0
- package/dist/esm/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -0
- package/dist/esm/lib/parsers/parse-3d-tile.js +30 -0
- package/dist/esm/lib/parsers/parse-3d-tile.js.map +1 -0
- package/dist/esm/lib/utils/obb/s2-corners-to-obb.js +23 -0
- package/dist/esm/lib/utils/obb/s2-corners-to-obb.js.map +1 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-boundary.js +40 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-boundary.js.map +1 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-obb-points.js +24 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-obb-points.js.map +1 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-region.js +42 -0
- package/dist/esm/lib/utils/s2/converters/s2-to-region.js.map +1 -0
- package/dist/esm/lib/utils/s2/index.js +7 -0
- package/dist/esm/lib/utils/s2/index.js.map +1 -0
- package/dist/esm/lib/utils/s2/s2-geometry-functions.js +12 -0
- package/dist/esm/lib/utils/s2/s2-geometry-functions.js.map +1 -0
- package/dist/esm/lib/utils/s2/s2-token-functions.js +32 -0
- package/dist/esm/lib/utils/s2/s2-token-functions.js.map +1 -0
- package/dist/esm/lib/utils/s2/s2geometry/s2-cell-utils.js +15 -0
- package/dist/esm/lib/utils/s2/s2geometry/s2-cell-utils.js.map +1 -0
- package/dist/esm/lib/utils/s2/s2geometry/s2-geometry.js +186 -0
- package/dist/esm/lib/utils/s2/s2geometry/s2-geometry.js.map +1 -0
- package/dist/esm/lib/utils/version.js +2 -0
- package/dist/esm/lib/utils/version.js.map +1 -0
- package/dist/esm/tile-3d-subtree-loader.js +14 -0
- package/dist/esm/tile-3d-subtree-loader.js.map +1 -0
- package/dist/esm/tile-3d-writer.js +19 -0
- package/dist/esm/tile-3d-writer.js.map +1 -0
- package/dist/esm/tiles-3d-loader.js +68 -0
- package/dist/esm/tiles-3d-loader.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -8
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts +8 -0
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts.map +1 -0
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.js +106 -89
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.d.ts +10 -0
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.d.ts.map +1 -0
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.js +184 -202
- package/dist/lib/classes/tile-3d-batch-table.d.ts +34 -0
- package/dist/lib/classes/tile-3d-batch-table.d.ts.map +1 -0
- package/dist/lib/classes/tile-3d-batch-table.js +223 -267
- package/dist/lib/classes/tile-3d-feature-table.d.ts +15 -0
- package/dist/lib/classes/tile-3d-feature-table.d.ts.map +1 -0
- package/dist/lib/classes/tile-3d-feature-table.js +64 -79
- package/dist/lib/constants.d.ts +22 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +23 -18
- package/dist/lib/encoders/encode-3d-tile-batched-model.d.ts +2 -0
- package/dist/lib/encoders/encode-3d-tile-batched-model.d.ts.map +1 -0
- package/dist/lib/encoders/encode-3d-tile-batched-model.js +45 -45
- package/dist/lib/encoders/encode-3d-tile-composite.d.ts +2 -0
- package/dist/lib/encoders/encode-3d-tile-composite.d.ts.map +1 -0
- package/dist/lib/encoders/encode-3d-tile-composite.js +23 -24
- package/dist/lib/encoders/encode-3d-tile-instanced-model.d.ts +2 -0
- package/dist/lib/encoders/encode-3d-tile-instanced-model.d.ts.map +1 -0
- package/dist/lib/encoders/encode-3d-tile-instanced-model.js +37 -37
- package/dist/lib/encoders/encode-3d-tile-point-cloud.d.ts +2 -0
- package/dist/lib/encoders/encode-3d-tile-point-cloud.d.ts.map +1 -0
- package/dist/lib/encoders/encode-3d-tile-point-cloud.js +36 -38
- package/dist/lib/encoders/encode-3d-tile.d.ts +2 -0
- package/dist/lib/encoders/encode-3d-tile.d.ts.map +1 -0
- package/dist/lib/encoders/encode-3d-tile.js +30 -32
- package/dist/lib/encoders/helpers/encode-3d-tile-header.d.ts +3 -0
- package/dist/lib/encoders/helpers/encode-3d-tile-header.d.ts.map +1 -0
- package/dist/lib/encoders/helpers/encode-3d-tile-header.js +28 -29
- package/dist/lib/ion/ion.d.ts +4 -0
- package/dist/lib/ion/ion.d.ts.map +1 -0
- package/dist/lib/ion/ion.js +60 -69
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.d.ts +9 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js +60 -62
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.d.ts +7 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js +26 -26
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.d.ts +2 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js +39 -28
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.d.ts +57 -0
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js +266 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.d.ts +10 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js +90 -63
- package/dist/lib/parsers/helpers/parse-3d-tile-header.d.ts +3 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-header.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-header.js +26 -15
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts +10 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js +104 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.d.ts +5 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.js +85 -81
- package/dist/lib/parsers/helpers/parse-utils.d.ts +4 -0
- package/dist/lib/parsers/helpers/parse-utils.d.ts.map +1 -0
- package/dist/lib/parsers/helpers/parse-utils.js +29 -16
- package/dist/lib/parsers/parse-3d-tile-batched-model.d.ts +5 -0
- package/dist/lib/parsers/parse-3d-tile-batched-model.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-batched-model.js +30 -26
- package/dist/lib/parsers/parse-3d-tile-composite.d.ts +8 -0
- package/dist/lib/parsers/parse-3d-tile-composite.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-composite.js +23 -16
- package/dist/lib/parsers/parse-3d-tile-gltf.d.ts +5 -0
- package/dist/lib/parsers/parse-3d-tile-gltf.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-gltf.js +28 -0
- package/dist/lib/parsers/parse-3d-tile-header.d.ts +20 -0
- package/dist/lib/parsers/parse-3d-tile-header.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-header.js +186 -71
- package/dist/lib/parsers/parse-3d-tile-instanced-model.d.ts +5 -0
- package/dist/lib/parsers/parse-3d-tile-instanced-model.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-instanced-model.js +165 -170
- package/dist/lib/parsers/parse-3d-tile-point-cloud.d.ts +6 -0
- package/dist/lib/parsers/parse-3d-tile-point-cloud.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile-point-cloud.js +372 -184
- package/dist/lib/parsers/parse-3d-tile.d.ts +5 -0
- package/dist/lib/parsers/parse-3d-tile.d.ts.map +1 -0
- package/dist/lib/parsers/parse-3d-tile.js +32 -27
- package/dist/lib/utils/obb/s2-corners-to-obb.d.ts +15 -0
- package/dist/lib/utils/obb/s2-corners-to-obb.d.ts.map +1 -0
- package/dist/lib/utils/obb/s2-corners-to-obb.js +37 -0
- package/dist/lib/utils/s2/converters/s2-to-boundary.d.ts +9 -0
- package/dist/lib/utils/s2/converters/s2-to-boundary.d.ts.map +1 -0
- package/dist/lib/utils/s2/converters/s2-to-boundary.js +61 -0
- package/dist/lib/utils/s2/converters/s2-to-obb-points.d.ts +15 -0
- package/dist/lib/utils/s2/converters/s2-to-obb-points.d.ts.map +1 -0
- package/dist/lib/utils/s2/converters/s2-to-obb-points.js +36 -0
- package/dist/lib/utils/s2/converters/s2-to-region.d.ts +13 -0
- package/dist/lib/utils/s2/converters/s2-to-region.d.ts.map +1 -0
- package/dist/lib/utils/s2/converters/s2-to-region.js +59 -0
- package/dist/lib/utils/s2/index.d.ts +8 -0
- package/dist/lib/utils/s2/index.d.ts.map +1 -0
- package/dist/lib/utils/s2/index.js +23 -0
- package/dist/lib/utils/s2/s2-geometry-functions.d.ts +14 -0
- package/dist/lib/utils/s2/s2-geometry-functions.d.ts.map +1 -0
- package/dist/lib/utils/s2/s2-geometry-functions.js +29 -0
- package/dist/lib/utils/s2/s2-token-functions.d.ts +23 -0
- package/dist/lib/utils/s2/s2-token-functions.d.ts.map +1 -0
- package/dist/lib/utils/s2/s2-token-functions.js +68 -0
- package/dist/lib/utils/s2/s2geometry/s2-cell-utils.d.ts +14 -0
- package/dist/lib/utils/s2/s2geometry/s2-cell-utils.d.ts.map +1 -0
- package/dist/lib/utils/s2/s2geometry/s2-cell-utils.js +32 -0
- package/dist/lib/utils/s2/s2geometry/s2-geometry.d.ts +52 -0
- package/dist/lib/utils/s2/s2geometry/s2-geometry.d.ts.map +1 -0
- package/dist/lib/utils/s2/s2geometry/s2-geometry.js +260 -0
- package/dist/lib/utils/version.d.ts +2 -0
- package/dist/lib/utils/version.d.ts.map +1 -0
- package/dist/lib/utils/version.js +7 -2
- package/dist/tile-3d-subtree-loader.d.ts +7 -0
- package/dist/tile-3d-subtree-loader.d.ts.map +1 -0
- package/dist/tile-3d-subtree-loader.js +23 -0
- package/dist/tile-3d-writer.d.ts +6 -0
- package/dist/tile-3d-writer.d.ts.map +1 -0
- package/dist/tile-3d-writer.js +24 -17
- package/dist/tiles-3d-loader.d.ts +20 -0
- package/dist/tiles-3d-loader.d.ts.map +1 -0
- package/dist/tiles-3d-loader.js +69 -65
- package/dist/types.d.ts +335 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -2
- package/package.json +14 -13
- package/src/cesium-ion-loader.ts +1 -0
- package/src/index.ts +13 -1
- package/src/lib/classes/{tile-3d-batch-table.js → tile-3d-batch-table.ts} +14 -4
- package/src/lib/classes/{tile-3d-feature-table.js → tile-3d-feature-table.ts} +5 -2
- package/src/lib/{constants.js → constants.ts} +2 -1
- package/src/lib/parsers/helpers/{normalize-3d-tile-colors.js → normalize-3d-tile-colors.ts} +10 -4
- package/src/lib/parsers/helpers/normalize-3d-tile-normals.ts +35 -0
- package/src/lib/parsers/helpers/parse-3d-implicit-tiles.ts +396 -0
- package/src/lib/parsers/helpers/{parse-3d-tile-gltf-view.js → parse-3d-tile-gltf-view.ts} +40 -16
- package/src/lib/parsers/helpers/{parse-3d-tile-header.js → parse-3d-tile-header.ts} +7 -1
- package/src/lib/parsers/helpers/parse-3d-tile-subtree.ts +148 -0
- package/src/lib/parsers/helpers/{parse-3d-tile-tables.js → parse-3d-tile-tables.ts} +33 -12
- package/src/lib/parsers/{parse-3d-tile-batched-model.js → parse-3d-tile-batched-model.ts} +18 -3
- package/src/lib/parsers/{parse-3d-tile-composite.js → parse-3d-tile-composite.ts} +20 -8
- package/src/lib/parsers/parse-3d-tile-gltf.ts +33 -0
- package/src/lib/parsers/parse-3d-tile-header.ts +253 -0
- package/src/lib/parsers/{parse-3d-tile-instanced-model.js → parse-3d-tile-instanced-model.ts} +41 -30
- package/src/lib/parsers/{parse-3d-tile-point-cloud.js → parse-3d-tile-point-cloud.ts} +73 -14
- package/src/lib/parsers/{parse-3d-tile.js → parse-3d-tile.ts} +14 -1
- package/src/lib/utils/obb/s2-corners-to-obb.ts +51 -0
- package/src/lib/utils/s2/converters/s2-to-boundary.ts +67 -0
- package/src/lib/utils/s2/converters/s2-to-obb-points.ts +46 -0
- package/src/lib/utils/s2/converters/s2-to-region.ts +69 -0
- package/src/lib/utils/s2/index.ts +17 -0
- package/src/lib/utils/s2/s2-geometry-functions.ts +28 -0
- package/src/lib/utils/s2/s2-token-functions.ts +67 -0
- package/src/lib/utils/s2/s2geometry/s2-cell-utils.ts +33 -0
- package/src/lib/utils/s2/s2geometry/s2-geometry.ts +296 -0
- package/src/tile-3d-subtree-loader.ts +19 -0
- package/src/tiles-3d-loader.ts +68 -37
- package/src/types.ts +321 -13
- package/dist/bundle.js.map +0 -1
- package/dist/cesium-ion-loader.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.js.map +0 -1
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.js.map +0 -1
- package/dist/lib/classes/tile-3d-batch-table.js.map +0 -1
- package/dist/lib/classes/tile-3d-feature-table.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/encoders/encode-3d-tile-batched-model.js.map +0 -1
- package/dist/lib/encoders/encode-3d-tile-composite.js.map +0 -1
- package/dist/lib/encoders/encode-3d-tile-instanced-model.js.map +0 -1
- package/dist/lib/encoders/encode-3d-tile-point-cloud.js.map +0 -1
- package/dist/lib/encoders/encode-3d-tile.js.map +0 -1
- package/dist/lib/encoders/helpers/encode-3d-tile-header.js.map +0 -1
- package/dist/lib/ion/ion.js.map +0 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js.map +0 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js.map +0 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js.map +0 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +0 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-header.js.map +0 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.js.map +0 -1
- package/dist/lib/parsers/helpers/parse-utils.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile-batched-model.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile-composite.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile-header.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile-instanced-model.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile-point-cloud.js.map +0 -1
- package/dist/lib/parsers/parse-3d-tile.js.map +0 -1
- package/dist/lib/utils/version.js.map +0 -1
- package/dist/tile-3d-writer.js.map +0 -1
- package/dist/tiles-3d-loader.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/src/lib/parsers/parse-3d-tile-header.js +0 -69
- /package/src/lib/classes/helpers/{tile-3d-accessor-utils.js → tile-3d-accessor-utils.ts} +0 -0
- /package/src/lib/classes/{tile-3d-batch-table-hierarchy.js → tile-3d-batch-table-hierarchy.ts} +0 -0
- /package/src/lib/encoders/{encode-3d-tile-batched-model.js → encode-3d-tile-batched-model.ts} +0 -0
- /package/src/lib/encoders/{encode-3d-tile-composite.js → encode-3d-tile-composite.ts} +0 -0
- /package/src/lib/encoders/{encode-3d-tile-instanced-model.js → encode-3d-tile-instanced-model.ts} +0 -0
- /package/src/lib/encoders/{encode-3d-tile-point-cloud.js → encode-3d-tile-point-cloud.ts} +0 -0
- /package/src/lib/encoders/{encode-3d-tile.js → encode-3d-tile.ts} +0 -0
- /package/src/lib/encoders/helpers/{encode-3d-tile-header.js → encode-3d-tile-header.ts} +0 -0
- /package/src/lib/ion/{ion.js → ion.ts} +0 -0
- /package/src/lib/parsers/helpers/{normalize-3d-tile-positions.js → normalize-3d-tile-positions.ts} +0 -0
- /package/src/lib/parsers/helpers/{parse-utils.js → parse-utils.ts} +0 -0
- /package/src/lib/utils/{version.js → version.ts} +0 -0
|
@@ -1,215 +1,197 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file is derived from the Cesium code base under Apache 2 license
|
|
3
|
+
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.traverseHierarchy = exports.initializeHierarchy = void 0;
|
|
6
|
+
// TODO - Finish hierarchy suypport: this file is only half ported
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
// @ts-nocheck
|
|
9
|
+
const defined = (x) => x !== undefined;
|
|
10
|
+
function initializeHierarchy(batchTable, jsonHeader, binaryBody) {
|
|
11
|
+
if (!jsonHeader) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
let hierarchy = batchTable.getExtension('3DTILES_batch_table_hierarchy');
|
|
15
|
+
const legacyHierarchy = jsonHeader.HIERARCHY;
|
|
16
|
+
if (legacyHierarchy) {
|
|
17
|
+
// eslint-disable-next-line
|
|
18
|
+
console.warn('3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy.');
|
|
19
|
+
jsonHeader.extensions = jsonHeader.extensions || {};
|
|
20
|
+
jsonHeader.extensions['3DTILES_batch_table_hierarchy'] = legacyHierarchy;
|
|
21
|
+
hierarchy = legacyHierarchy;
|
|
22
|
+
}
|
|
23
|
+
if (!hierarchy) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return initializeHierarchyValues(hierarchy, binaryBody);
|
|
23
27
|
}
|
|
24
|
-
|
|
28
|
+
exports.initializeHierarchy = initializeHierarchy;
|
|
29
|
+
// eslint-disable-next-line max-statements
|
|
25
30
|
function initializeHierarchyValues(hierarchyJson, binaryBody) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
let i;
|
|
32
|
+
let classId;
|
|
33
|
+
let binaryAccessor;
|
|
34
|
+
const instancesLength = hierarchyJson.instancesLength;
|
|
35
|
+
const classes = hierarchyJson.classes;
|
|
36
|
+
let classIds = hierarchyJson.classIds;
|
|
37
|
+
let parentCounts = hierarchyJson.parentCounts;
|
|
38
|
+
let parentIds = hierarchyJson.parentIds;
|
|
39
|
+
let parentIdsLength = instancesLength;
|
|
40
|
+
if (defined(classIds.byteOffset)) {
|
|
41
|
+
classIds.componentType = defaultValue(classIds.componentType, GL.UNSIGNED_SHORT);
|
|
42
|
+
classIds.type = AttributeType.SCALAR;
|
|
43
|
+
binaryAccessor = getBinaryAccessor(classIds);
|
|
44
|
+
classIds = binaryAccessor.createArrayBufferView(binaryBody.buffer, binaryBody.byteOffset + classIds.byteOffset, instancesLength);
|
|
45
|
+
}
|
|
46
|
+
let parentIndexes;
|
|
47
|
+
if (defined(parentCounts)) {
|
|
48
|
+
if (defined(parentCounts.byteOffset)) {
|
|
49
|
+
parentCounts.componentType = defaultValue(parentCounts.componentType, GL.UNSIGNED_SHORT);
|
|
50
|
+
parentCounts.type = AttributeType.SCALAR;
|
|
51
|
+
binaryAccessor = getBinaryAccessor(parentCounts);
|
|
52
|
+
parentCounts = binaryAccessor.createArrayBufferView(binaryBody.buffer, binaryBody.byteOffset + parentCounts.byteOffset, instancesLength);
|
|
53
|
+
}
|
|
54
|
+
parentIndexes = new Uint16Array(instancesLength);
|
|
55
|
+
parentIdsLength = 0;
|
|
56
|
+
for (i = 0; i < instancesLength; ++i) {
|
|
57
|
+
parentIndexes[i] = parentIdsLength;
|
|
58
|
+
parentIdsLength += parentCounts[i];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (defined(parentIds) && defined(parentIds.byteOffset)) {
|
|
62
|
+
parentIds.componentType = defaultValue(parentIds.componentType, GL.UNSIGNED_SHORT);
|
|
63
|
+
parentIds.type = AttributeType.SCALAR;
|
|
64
|
+
binaryAccessor = getBinaryAccessor(parentIds);
|
|
65
|
+
parentIds = binaryAccessor.createArrayBufferView(binaryBody.buffer, binaryBody.byteOffset + parentIds.byteOffset, parentIdsLength);
|
|
66
|
+
}
|
|
67
|
+
const classesLength = classes.length;
|
|
68
|
+
for (i = 0; i < classesLength; ++i) {
|
|
69
|
+
const classInstancesLength = classes[i].length;
|
|
70
|
+
const properties = classes[i].instances;
|
|
71
|
+
const binaryProperties = getBinaryProperties(classInstancesLength, properties, binaryBody);
|
|
72
|
+
classes[i].instances = combine(binaryProperties, properties);
|
|
73
|
+
}
|
|
74
|
+
const classCounts = new Array(classesLength).fill(0);
|
|
75
|
+
const classIndexes = new Uint16Array(instancesLength);
|
|
56
76
|
for (i = 0; i < instancesLength; ++i) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (i = 0; i < classesLength; ++i) {
|
|
72
|
-
const classInstancesLength = classes[i].length;
|
|
73
|
-
const properties = classes[i].instances;
|
|
74
|
-
const binaryProperties = getBinaryProperties(classInstancesLength, properties, binaryBody);
|
|
75
|
-
classes[i].instances = combine(binaryProperties, properties);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const classCounts = new Array(classesLength).fill(0);
|
|
79
|
-
const classIndexes = new Uint16Array(instancesLength);
|
|
80
|
-
|
|
81
|
-
for (i = 0; i < instancesLength; ++i) {
|
|
82
|
-
classId = classIds[i];
|
|
83
|
-
classIndexes[i] = classCounts[classId];
|
|
84
|
-
++classCounts[classId];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const hierarchy = {
|
|
88
|
-
classes,
|
|
89
|
-
classIds,
|
|
90
|
-
classIndexes,
|
|
91
|
-
parentCounts,
|
|
92
|
-
parentIndexes,
|
|
93
|
-
parentIds
|
|
94
|
-
};
|
|
95
|
-
validateHierarchy(hierarchy);
|
|
96
|
-
return hierarchy;
|
|
77
|
+
classId = classIds[i];
|
|
78
|
+
classIndexes[i] = classCounts[classId];
|
|
79
|
+
++classCounts[classId];
|
|
80
|
+
}
|
|
81
|
+
const hierarchy = {
|
|
82
|
+
classes,
|
|
83
|
+
classIds,
|
|
84
|
+
classIndexes,
|
|
85
|
+
parentCounts,
|
|
86
|
+
parentIndexes,
|
|
87
|
+
parentIds
|
|
88
|
+
};
|
|
89
|
+
validateHierarchy(hierarchy);
|
|
90
|
+
return hierarchy;
|
|
97
91
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return traverseHierarchySingleParent(hierarchy, instanceIndex, endConditionCallback);
|
|
92
|
+
// HELPER CODE
|
|
93
|
+
// Traverse over the hierarchy and process each instance with the endConditionCallback.
|
|
94
|
+
// When the endConditionCallback returns a value, the traversal stops and that value is returned.
|
|
95
|
+
function traverseHierarchy(hierarchy, instanceIndex, endConditionCallback) {
|
|
96
|
+
if (!hierarchy) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const parentCounts = hierarchy.parentCounts;
|
|
100
|
+
const parentIds = hierarchy.parentIds;
|
|
101
|
+
if (parentIds) {
|
|
102
|
+
return endConditionCallback(hierarchy, instanceIndex);
|
|
103
|
+
}
|
|
104
|
+
if (parentCounts > 0) {
|
|
105
|
+
return traverseHierarchyMultipleParents(hierarchy, instanceIndex, endConditionCallback);
|
|
106
|
+
}
|
|
107
|
+
return traverseHierarchySingleParent(hierarchy, instanceIndex, endConditionCallback);
|
|
116
108
|
}
|
|
117
|
-
|
|
109
|
+
exports.traverseHierarchy = traverseHierarchy;
|
|
110
|
+
// eslint-disable-next-line max-statements
|
|
118
111
|
function traverseHierarchyMultipleParents(hierarchy, instanceIndex, endConditionCallback) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return null;
|
|
112
|
+
const classIds = hierarchy.classIds;
|
|
113
|
+
const parentCounts = hierarchy.parentCounts;
|
|
114
|
+
const parentIds = hierarchy.parentIds;
|
|
115
|
+
const parentIndexes = hierarchy.parentIndexes;
|
|
116
|
+
const instancesLength = classIds.length;
|
|
117
|
+
// Ignore instances that have already been visited. This occurs in diamond inheritance situations.
|
|
118
|
+
// Use a marker value to indicate that an instance has been visited, which increments with each run.
|
|
119
|
+
// This is more efficient than clearing the visited array every time.
|
|
120
|
+
const visited = scratchVisited;
|
|
121
|
+
visited.length = Math.max(visited.length, instancesLength);
|
|
122
|
+
const visitedMarker = ++marker;
|
|
123
|
+
const stack = scratchStack;
|
|
124
|
+
stack.length = 0;
|
|
125
|
+
stack.push(instanceIndex);
|
|
126
|
+
while (stack.length > 0) {
|
|
127
|
+
instanceIndex = stack.pop();
|
|
128
|
+
if (visited[instanceIndex] === visitedMarker) {
|
|
129
|
+
// This instance has already been visited, stop traversal
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
visited[instanceIndex] = visitedMarker;
|
|
133
|
+
const result = endConditionCallback(hierarchy, instanceIndex);
|
|
134
|
+
if (defined(result)) {
|
|
135
|
+
// The end condition was met, stop the traversal and return the result
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
const parentCount = parentCounts[instanceIndex];
|
|
139
|
+
const parentIndex = parentIndexes[instanceIndex];
|
|
140
|
+
for (let i = 0; i < parentCount; ++i) {
|
|
141
|
+
const parentId = parentIds[parentIndex + i];
|
|
142
|
+
// Stop the traversal when the instance has no parent (its parentId equals itself)
|
|
143
|
+
// else add the parent to the stack to continue the traversal.
|
|
144
|
+
if (parentId !== instanceIndex) {
|
|
145
|
+
stack.push(parentId);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
158
150
|
}
|
|
159
|
-
|
|
160
151
|
function traverseHierarchySingleParent(hierarchy, instanceIndex, endConditionCallback) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
throw new Error('traverseHierarchySingleParent');
|
|
152
|
+
let hasParent = true;
|
|
153
|
+
while (hasParent) {
|
|
154
|
+
const result = endConditionCallback(hierarchy, instanceIndex);
|
|
155
|
+
if (defined(result)) {
|
|
156
|
+
// The end condition was met, stop the traversal and return the result
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
const parentId = hierarchy.parentIds[instanceIndex];
|
|
160
|
+
hasParent = parentId !== instanceIndex;
|
|
161
|
+
instanceIndex = parentId;
|
|
162
|
+
}
|
|
163
|
+
throw new Error('traverseHierarchySingleParent');
|
|
176
164
|
}
|
|
177
|
-
|
|
165
|
+
// DEBUG CODE
|
|
178
166
|
function validateHierarchy(hierarchy) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
167
|
+
const scratchValidateStack = [];
|
|
168
|
+
const classIds = hierarchy.classIds;
|
|
169
|
+
const instancesLength = classIds.length;
|
|
170
|
+
for (let i = 0; i < instancesLength; ++i) {
|
|
171
|
+
validateInstance(hierarchy, i, stack);
|
|
172
|
+
}
|
|
186
173
|
}
|
|
187
|
-
|
|
188
174
|
function validateInstance(hierarchy, instanceIndex, stack) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
stack.pop(instanceIndex);
|
|
175
|
+
const parentCounts = hierarchy.parentCounts;
|
|
176
|
+
const parentIds = hierarchy.parentIds;
|
|
177
|
+
const parentIndexes = hierarchy.parentIndexes;
|
|
178
|
+
const classIds = hierarchy.classIds;
|
|
179
|
+
const instancesLength = classIds.length;
|
|
180
|
+
if (!defined(parentIds)) {
|
|
181
|
+
// No need to validate if there are no parents
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
assert(instanceIndex < instancesLength, `Parent index ${instanceIndex} exceeds the total number of instances: ${instancesLength}`);
|
|
185
|
+
assert(stack.indexOf(instanceIndex) === -1, 'Circular dependency detected in the batch table hierarchy.');
|
|
186
|
+
stack.push(instanceIndex);
|
|
187
|
+
const parentCount = defined(parentCounts) ? parentCounts[instanceIndex] : 1;
|
|
188
|
+
const parentIndex = defined(parentCounts) ? parentIndexes[instanceIndex] : instanceIndex;
|
|
189
|
+
for (let i = 0; i < parentCount; ++i) {
|
|
190
|
+
const parentId = parentIds[parentIndex + i];
|
|
191
|
+
// Stop the traversal when the instance has no parent (its parentId equals itself), else continue the traversal.
|
|
192
|
+
if (parentId !== instanceIndex) {
|
|
193
|
+
validateInstance(hierarchy, parentId, stack);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
stack.pop(instanceIndex);
|
|
214
197
|
}
|
|
215
|
-
//# sourceMappingURL=tile-3d-batch-table-hierarchy.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default class Tile3DBatchTableParser {
|
|
2
|
+
json: any;
|
|
3
|
+
binary: any;
|
|
4
|
+
featureCount: any;
|
|
5
|
+
_extensions: any;
|
|
6
|
+
_properties: any;
|
|
7
|
+
_binaryProperties: any;
|
|
8
|
+
_hierarchy: any;
|
|
9
|
+
constructor(json: any, binary: any, featureCount: any, options?: {});
|
|
10
|
+
getExtension(extensionName: any): any;
|
|
11
|
+
memorySizeInBytes(): number;
|
|
12
|
+
isClass(batchId: any, className: string): boolean;
|
|
13
|
+
isExactClass(batchId: any, className: any): boolean;
|
|
14
|
+
getExactClassName(batchId: any): any;
|
|
15
|
+
hasProperty(batchId: any, name: any): boolean;
|
|
16
|
+
getPropertyNames(batchId: any, results: any): any;
|
|
17
|
+
getProperty(batchId: any, name: any): any;
|
|
18
|
+
setProperty(batchId: any, name: any, value: any): void;
|
|
19
|
+
_checkBatchId(batchId: any): void;
|
|
20
|
+
_getBinaryProperty(binaryProperty: any, index: any): any;
|
|
21
|
+
_setBinaryProperty(binaryProperty: any, index: any, value: any): void;
|
|
22
|
+
_initializeBinaryProperties(): Record<string, any> | null;
|
|
23
|
+
_initializeBinaryProperty(name: any, property: any): {
|
|
24
|
+
typedArray: import("@math.gl/types").TypedArray;
|
|
25
|
+
componentCount: any;
|
|
26
|
+
unpack: any;
|
|
27
|
+
pack: any;
|
|
28
|
+
} | null;
|
|
29
|
+
_hasPropertyInHierarchy(batchId: any, name: any): boolean;
|
|
30
|
+
_getPropertyNamesInHierarchy(batchId: any, results: any): void;
|
|
31
|
+
_getHierarchyProperty(batchId: any, name: any): any;
|
|
32
|
+
_setHierarchyProperty(batchTable: any, batchId: any, name: any, value: any): boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=tile-3d-batch-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tile-3d-batch-table.d.ts","sourceRoot":"","sources":["../../../src/lib/classes/tile-3d-batch-table.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,OAAO,OAAO,sBAAsB;IACzC,IAAI,MAAC;IACL,MAAM,MAAC;IACP,YAAY,MAAC;IACb,WAAW,MAAC;IAEZ,WAAW,MAAC;IACZ,iBAAiB,MAAC;IAElB,UAAU,MAAC;gBAEC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,YAAY,KAAA,EAAE,OAAO,KAAK;IAwBpD,YAAY,CAAC,aAAa,KAAA;IAI1B,iBAAiB,IAAI,MAAM;IAI3B,OAAO,CAAC,OAAO,KAAA,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAoB5C,YAAY,CAAC,OAAO,KAAA,EAAE,SAAS,KAAA;IAM/B,iBAAiB,CAAC,OAAO,KAAA;IAazB,WAAW,CAAC,OAAO,KAAA,EAAE,IAAI,KAAA;IAOzB,gBAAgB,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA;IAgBjC,WAAW,CAAC,OAAO,KAAA,EAAE,IAAI,KAAA;IA2BzB,WAAW,CAAC,OAAO,KAAA,EAAE,IAAI,KAAA,EAAE,KAAK,KAAA;IAiChC,aAAa,CAAC,OAAO,KAAA;IAOrB,kBAAkB,CAAC,cAAc,KAAA,EAAE,KAAK,KAAA;IAIxC,kBAAkB,CAAC,cAAc,KAAA,EAAE,KAAK,KAAA,EAAE,KAAK,KAAA;IAI/C,2BAA2B;IAe3B,yBAAyB,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA;;;;;;IA8BxC,uBAAuB,CAAC,OAAO,KAAA,EAAE,IAAI,KAAA;IAcrC,4BAA4B,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA;IAc7C,qBAAqB,CAAC,OAAO,KAAA,EAAE,IAAI,KAAA;IAgBnC,qBAAqB,CAAC,UAAU,KAAA,EAAE,OAAO,KAAA,EAAE,IAAI,KAAA,EAAE,KAAK,KAAA;CAmBvD"}
|