@baidumap/mapv-three 1.3.3 → 1.4.1
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/README.md +3 -3
- package/dist/assets/textures/cloud/stbn.bin +0 -0
- package/dist/assets/textures/weather/thunder.jpg +0 -0
- package/dist/assets/wasm/lanelet.js +3296 -165
- package/dist/assets/wasm/lanelet.wasm +0 -0
- package/dist/assets/workers/{BaiduVectorParser.worker-d550338e.js → BaiduVectorParser.worker-486240e8.js} +977 -930
- package/dist/assets/workers/{CesiumTerrainParser.worker-20119751.js → CesiumTerrainParser.worker-ba35b937.js} +1032 -954
- package/dist/assets/workers/{MVTParser.worker-7dc8b0e4.js → MVTParser.worker-bb80e3b4.js} +755 -699
- package/dist/devtool/panel.js +108 -29
- package/dist/mapvthree.module.js +45540 -46298
- package/dist/mapvthree.umd.js +13 -7
- package/dist/types/Internal.d.ts +2 -0
- package/dist/types/adapters/bmap/Icon.d.ts +18 -0
- package/dist/types/adapters/bmap/InfoWindow.d.ts +124 -0
- package/dist/types/adapters/bmap/Label.d.ts +58 -0
- package/dist/types/adapters/bmap/Map.d.ts +124 -0
- package/dist/types/adapters/bmap/Marker.d.ts +28 -0
- package/dist/types/adapters/bmap/Overlay.d.ts +18 -0
- package/dist/types/adapters/bmap/Pixel.d.ts +1 -0
- package/dist/types/adapters/bmap/Point.d.ts +8 -0
- package/dist/types/adapters/bmap/Size.d.ts +8 -0
- package/dist/types/adapters/bmap/index.d.ts +8 -0
- package/dist/types/adapters/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.open.d.ts +5 -0
- package/dist/types/threejs/controls/PointerLockControls.d.ts +2 -0
- package/dist/types/threejs/geometries/text/ScreenTextGeometry.d.ts +15 -0
- package/dist/types/threejs/loaders/utilities/BatchTableHierarchyExtension.d.ts +4 -4
- package/dist/types/threejs/loaders/utilities/FeatureTable.d.ts +1 -1
- package/dist/types/threejs/materials/effects/LightningBillboardMaterial.d.ts +3 -0
- package/dist/types/threejs/materials/effects/LightningMaterial.d.ts +9 -0
- package/dist/types/threejs/materials/extend/ExtendMeshStandardMaterial.d.ts +1 -0
- package/dist/types/threejs/materials/natural/DynamicSkyMaterial.d.ts +1 -0
- package/dist/types/threejs/materials/natural/StaticSkyMaterial.d.ts +1 -0
- package/dist/types/threejs/materials/natural/VerticalGradientSkyMaterial.d.ts +1 -0
- package/dist/types/threejs/materials/polygon/PolygonMaterial.d.ts +1 -0
- package/dist/types/threejs/materials/text/ScreenTextMaterial.d.ts +25 -0
- package/dist/types/threejs/objects/GeoInstancedMesh.d.ts +1 -0
- package/dist/types/threejs/objects/line/FatLineInternal.d.ts +4 -0
- package/dist/types/threejs/objects/line/Polyline.d.ts +1 -1
- package/dist/types/threejs/objects/point/Icon.d.ts +1 -0
- package/dist/types/threejs/objects/point/Label.d.ts +15 -2
- package/dist/types/threejs/objects/point/label/GeometryBufferBuilder.d.ts +3 -0
- package/dist/types/threejs/objects/point/label/TextBoxCalculator.d.ts +5 -3
- package/dist/types/threejs/objects/text/ScreenText.d.ts +273 -0
- package/dist/types/threejs/objects/text/font-atlas-manager.d.ts +10 -2
- package/dist/types/threejs/objects/text/utils.d.ts +1 -1
- package/dist/types/threemap/3dtiles/HDMap3DTiles.d.ts +26 -0
- package/dist/types/threemap/3dtiles/materials/Default3DTilesMaterialManager.d.ts +51 -3
- package/dist/types/threemap/Engine.d.ts +23 -4
- package/dist/types/threemap/animations/ObjectTracker.d.ts +73 -44
- package/dist/types/threemap/animations/PathTracker.d.ts +92 -24
- package/dist/types/threemap/animations/RotateTracker.d.ts +115 -21
- package/dist/types/threemap/animations/TrackerAbstract.d.ts +15 -11
- package/dist/types/threemap/controls/PointerLockControls.d.ts +8 -2
- package/dist/types/threemap/controls/controller/ColumbusController.d.ts +10 -0
- package/dist/types/threemap/controls/controller/Scene3DController.d.ts +9 -0
- package/dist/types/threemap/controls/editors/Editor.d.ts +3 -0
- package/dist/types/threemap/engine/Clock.d.ts +156 -0
- package/dist/types/threemap/engine/Controller.d.ts +141 -0
- package/dist/types/threemap/engine/Map.d.ts +34 -4
- package/dist/types/threemap/engine/Rendering.d.ts +15 -0
- package/dist/types/threemap/engine/event/EntityProxy.d.ts +1 -0
- package/dist/types/threemap/engine/map/BlankMap.d.ts +1 -1
- package/dist/types/threemap/engine/map/BlankMap3DControl.d.ts +4 -1
- package/dist/types/{threejs → threemap/engine/map}/controls/DraggingMovementAggregator.d.ts +3 -0
- package/dist/types/{threejs → threemap/engine/map}/controls/MapControl3D.d.ts +19 -2
- package/dist/types/{threejs → threemap/engine/map}/controls/PointerMovementAggregator.d.ts +3 -0
- package/dist/types/threemap/engine/map/earth/Earth.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/Collision.d.ts +5 -0
- package/dist/types/threemap/engine/rendering/Label.d.ts +15 -0
- package/dist/types/threemap/engine/rendering/MainNew.d.ts +1 -1
- package/dist/types/threemap/engine/rendering/postprocessing/OpaquePostprocessings.d.ts +1 -1
- package/dist/types/threemap/engine/rendering/postprocessing/SkyAtmospherePass.d.ts +1 -0
- package/dist/types/threemap/engine/rendering/scene/DirectSceneRendering.d.ts +5 -0
- package/dist/types/threemap/mapView/geo/terrainData/QuantizedMeshTerrainData.d.ts +1 -1
- package/dist/types/threemap/mapView/grid/BaiduVectorOfflineGrid.d.ts +5 -0
- package/dist/types/threemap/mapView/map/MapView.d.ts +3 -0
- package/dist/types/threemap/mapView/parser/baidulane/ElementParser.d.ts +86 -0
- package/dist/types/threemap/mapView/parser/baidulane/StyleParser.d.ts +28 -0
- package/dist/types/threemap/mapView/parser/baidulane/constants/index.d.ts +25 -0
- package/dist/types/threemap/mapView/parser/baidulane/constants/types.d.ts +47 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/GeometryBuilder.d.ts +40 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/LayerManager.d.ts +41 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/MaterialFactory.d.ts +71 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/StyleManager.d.ts +50 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/TextureManager.d.ts +65 -0
- package/dist/types/threemap/mapView/parser/baidulane/core/wasmManager.d.ts +18 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Base.d.ts +46 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Building3d.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/FlatSymbol.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/LabelLine.d.ts +36 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Line.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Line3d.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Line3dTexture.d.ts +3 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/LineDash.d.ts +7 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/LineTexture.d.ts +7 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Poi.d.ts +26 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Polygon.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/Polygon3d.d.ts +40 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/PolygonExtrude.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/PolygonExtrudeTexture.d.ts +18 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/PolygonOpacity.d.ts +7 -0
- package/dist/types/threemap/mapView/parser/baidulane/generators/SimplePoint.d.ts +39 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Background.d.ts +11 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Base.d.ts +27 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/BridgePier.d.ts +20 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/DebugLine.d.ts +16 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/DebugPoint.d.ts +5 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/DebugPolygon.d.ts +20 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/GaoqingGradient.d.ts +16 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/GaoqingGuide.d.ts +11 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/GaoqingLine.d.ts +11 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/GaoqingPoly.d.ts +15 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/GaoqingRoad.d.ts +13 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/HRegion.d.ts +11 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/LineName.d.ts +48 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Link.d.ts +10 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Poi.d.ts +7 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Poly.d.ts +11 -0
- package/dist/types/threemap/mapView/parser/baidulane/processors/Texture.d.ts +10 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/color.d.ts +13 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/coordinate.d.ts +18 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/geometry.d.ts +3 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/icon.d.ts +8 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/merge.d.ts +7 -0
- package/dist/types/threemap/mapView/parser/baidulane/utils/tracer.d.ts +7 -0
- package/dist/types/{util/mapbox.d.ts → threemap/mapView/parser/mapbox/util.d.ts} +1 -1
- package/dist/types/threemap/mapView/surface/GroundSceneRenderer.d.ts +7 -2
- package/dist/types/threemap/mapView/surface/MapSurface.d.ts +2 -0
- package/dist/types/threemap/mapView/surface/strategy/FastTileLoaderStrategy.d.ts +16 -0
- package/dist/types/threemap/mapView/tileProvider/terrain/CesiumTerrainTileProvider.d.ts +3 -0
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduLaneVectorTileProvider.d.ts +7 -0
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduVectorTileProvider.d.ts +3 -0
- package/dist/types/threemap/mapView/tileProvider/vector/MapboxVectorTileProvider.d.ts +6 -10
- package/dist/types/threemap/mapView/utils/createGroundTileMesh.d.ts +2 -1
- package/dist/types/threemap/mapView/utils/projectVertices.d.ts +1 -1
- package/dist/types/threemap/materials/BatchBuildingMaterial.d.ts +9 -11
- package/dist/types/threemap/materials/RoadMarkingMaterial.d.ts +2 -11
- package/dist/types/threemap/materials/TerrainClassificationMaterial.d.ts +9 -7
- package/dist/types/threemap/natural/DynamicSky.d.ts +68 -22
- package/dist/types/threemap/natural/DynamicWeather.d.ts +17 -105
- package/dist/types/threemap/natural/EmptySky.d.ts +48 -62
- package/dist/types/threemap/natural/PhysicalSky.d.ts +220 -0
- package/dist/types/threemap/natural/Rain.d.ts +5 -2
- package/dist/types/threemap/natural/Snow.d.ts +5 -2
- package/dist/types/threemap/natural/StaticSky.d.ts +1 -0
- package/dist/types/threemap/natural/Thunderstorm.d.ts +46 -0
- package/dist/types/threemap/natural/clouds/CascadedShadowMaps.d.ts +31 -0
- package/dist/types/threemap/natural/clouds/CloudLayer.d.ts +19 -0
- package/dist/types/threemap/natural/clouds/CloudLayers.d.ts +13 -0
- package/dist/types/threemap/natural/clouds/CloudShape.d.ts +4 -0
- package/dist/types/threemap/natural/clouds/CloudShapeDetail.d.ts +4 -0
- package/dist/types/threemap/natural/clouds/CloudsEffect.d.ts +173 -0
- package/dist/types/threemap/natural/clouds/CloudsMaterial.d.ts +35 -0
- package/dist/types/threemap/natural/clouds/CloudsPass.d.ts +39 -0
- package/dist/types/threemap/natural/clouds/CloudsPostPass.d.ts +10 -0
- package/dist/types/threemap/natural/clouds/CloudsResolveMaterial.d.ts +13 -0
- package/dist/types/threemap/natural/clouds/DensityProfile.d.ts +10 -0
- package/dist/types/threemap/natural/clouds/LocalWeather.d.ts +4 -0
- package/dist/types/threemap/natural/clouds/PassBase.d.ts +7 -0
- package/dist/types/threemap/natural/clouds/Procedural3DTexture.d.ts +15 -0
- package/dist/types/threemap/natural/clouds/ProceduralTexture.d.ts +15 -0
- package/dist/types/threemap/natural/clouds/ShaderArrayPass.d.ts +3 -0
- package/dist/types/threemap/natural/clouds/ShadowMaterial.d.ts +14 -0
- package/dist/types/threemap/natural/clouds/ShadowPass.d.ts +31 -0
- package/dist/types/threemap/natural/clouds/ShadowResolveMaterial.d.ts +8 -0
- package/dist/types/threemap/natural/clouds/Turbulence.d.ts +4 -0
- package/dist/types/threemap/natural/clouds/bayer.d.ts +2 -0
- package/dist/types/threemap/natural/clouds/constants.d.ts +6 -0
- package/dist/types/threemap/natural/clouds/helpers/FrustumCorners.d.ts +10 -0
- package/dist/types/threemap/natural/clouds/helpers/setArrayRenderTargetLayers.d.ts +1 -0
- package/dist/types/threemap/natural/clouds/helpers/splitFrustum.d.ts +6 -0
- package/dist/types/threemap/natural/clouds/qualityPresets.d.ts +130 -0
- package/dist/types/threemap/natural/clouds/uniforms.d.ts +44 -0
- package/dist/types/threemap/natural/core/ArrayBufferLoader.d.ts +3 -0
- package/dist/types/threemap/natural/core/DataTextureLoader.d.ts +11 -0
- package/dist/types/threemap/natural/core/Ellipsoid.d.ts +17 -0
- package/dist/types/threemap/natural/core/Geodetic.d.ts +23 -0
- package/dist/types/threemap/natural/core/TypedArrayLoader.d.ts +5 -0
- package/dist/types/threemap/natural/core/capabilities.d.ts +1 -0
- package/dist/types/threemap/natural/core/celestialDirections.d.ts +5 -0
- package/dist/types/threemap/natural/core/decorators.d.ts +61 -0
- package/dist/types/threemap/natural/core/defineShorthand.d.ts +2 -0
- package/dist/types/threemap/natural/core/helpers/projectOnEllipsoidSurface.d.ts +1 -0
- package/dist/types/threemap/natural/core/math.d.ts +15 -0
- package/dist/types/threemap/natural/core/requestIdleCallback.d.ts +2 -0
- package/dist/types/threemap/natural/core/resolveIncludes.d.ts +1 -0
- package/dist/types/threemap/natural/core/shaders/index.d.ts +10 -0
- package/dist/types/threemap/natural/core/unrollLoops.d.ts +1 -0
- package/dist/types/threemap/natural/effects/DepthEffect.d.ts +15 -0
- package/dist/types/threemap/natural/effects/DitheringEffect.d.ts +6 -0
- package/dist/types/threemap/natural/effects/DownsampleThresholdMaterial.d.ts +14 -0
- package/dist/types/threemap/natural/effects/GeometryEffect.d.ts +11 -0
- package/dist/types/threemap/natural/effects/GeometryPass.d.ts +6 -0
- package/dist/types/threemap/natural/effects/LensFlareEffect.d.ts +31 -0
- package/dist/types/threemap/natural/effects/LensFlareFeaturesMaterial.d.ts +17 -0
- package/dist/types/threemap/natural/effects/NormalEffect.d.ts +16 -0
- package/dist/types/threemap/natural/effects/createHaldLookupTexture.d.ts +1 -0
- package/dist/types/threemap/natural/effects/index.d.ts +7 -0
- package/dist/types/threemap/natural/effects/setupMaterialsForGeometryPass.d.ts +1 -0
- package/dist/types/threemap/natural/sky/AerialPerspectiveEffect.d.ts +95 -0
- package/dist/types/threemap/natural/sky/AtmosphereMaterialBase.d.ts +40 -0
- package/dist/types/threemap/natural/sky/AtmosphereParameters.d.ts +32 -0
- package/dist/types/threemap/natural/sky/AtmospherePostPass.d.ts +10 -0
- package/dist/types/threemap/natural/sky/PrecomputedTexturesGenerator.d.ts +66 -0
- package/dist/types/threemap/natural/sky/SkyMaterial.d.ts +26 -0
- package/dist/types/threemap/natural/sky/constants.d.ts +14 -0
- package/dist/types/threemap/natural/sky/getAltitudeCorrectionOffset.d.ts +1 -0
- package/dist/types/threemap/overlay/Marker.d.ts +3 -0
- package/dist/types/threemap/services/autoComplete/AutoComplete.d.ts +1 -1
- package/dist/types/threemap/services/boundary/Boundary.d.ts +3 -3
- package/dist/types/threemap/services/common/baiduRequest.d.ts +1 -1
- package/dist/types/threemap/services/configs.d.ts +2 -2
- package/dist/types/threemap/services/district/DistrictLayer.d.ts +3 -3
- package/dist/types/threemap/services/geocoder/Geocoder.d.ts +5 -5
- package/dist/types/threemap/services/localSearch/LocalSearch.d.ts +5 -5
- package/dist/types/threemap/services/routeSearch/DrivingRoute.d.ts +2 -2
- package/dist/types/threemap/services/routeSearch/TransitRoute.d.ts +3 -3
- package/dist/types/threemap/video/VideoConfig.d.ts +2 -2
- package/dist/types/util/graphics/line.d.ts +2 -2
- package/dist/types/util/request.d.ts +1 -1
- package/package.json +6 -3
- /package/dist/types/{threejs → threemap/engine/map}/controls/MapControl.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/color.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/background.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/fill-extrusion.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/fill.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/index.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/line.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/executer/symbol.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/compound_expression.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/assertion.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/at.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/case.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/coalesce.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/coercion.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/collator.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/comparison.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/format.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/image.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/in.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/index.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/index_of.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/interpolate.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/length.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/let.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/literal.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/match.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/number_format.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/slice.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/step.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/var.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/definitions/within.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/evaluation_context.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/expression.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/index.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/is_constant.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/parsing_context.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/parsing_error.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/scope.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/stops.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/types/collator.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/types/formatted.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/types/resolved_image.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/types.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/expression/values.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/feature_filter/index.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/function/convert.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/function/index.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/sourceLayer.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/sprite.d.ts +0 -0
- /package/dist/types/threemap/mapView/{mapbox → parser/mapbox}/style.d.ts +0 -0
|
@@ -39,6 +39,7 @@ export class MapView {
|
|
|
39
39
|
*/
|
|
40
40
|
isRenderAsyncObject: boolean;
|
|
41
41
|
isQuadMap: boolean;
|
|
42
|
+
supportRenderPassCallbacks: boolean;
|
|
42
43
|
/**
|
|
43
44
|
* @internal
|
|
44
45
|
* 是否禁止瓦片更新
|
|
@@ -151,6 +152,8 @@ export class MapView {
|
|
|
151
152
|
protected onBeforeScenePrepareRender(engine: Engine, scene: Object3D, camera: Camera, renderState: object): void;
|
|
152
153
|
onBeforeSceneRender(engine: any, scene: any, camera: any, renderState: any): void;
|
|
153
154
|
_updateSurfaces(engine: any, scene: any, camera: any, renderState: any): void;
|
|
155
|
+
onAfterColorPass: (engine: any) => void;
|
|
156
|
+
onAfterMainPass: (engine: any) => void;
|
|
154
157
|
/**
|
|
155
158
|
* 刷新瓦片数据,用于更新一些瓦片状态,如路况图层
|
|
156
159
|
*/
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 元素解析器类
|
|
3
|
+
* 负责解析瓦片数据并生成渲染对象
|
|
4
|
+
*/
|
|
5
|
+
export class ElementParser {
|
|
6
|
+
constructor(styleManager: any);
|
|
7
|
+
geoLayers: any;
|
|
8
|
+
layerManager: LayerManager;
|
|
9
|
+
styleManager: any;
|
|
10
|
+
styleParser: StyleParser;
|
|
11
|
+
generators: object;
|
|
12
|
+
processors: Map<any, any>;
|
|
13
|
+
showDebugElements: boolean;
|
|
14
|
+
showNoStyleElements: boolean;
|
|
15
|
+
catalogs: any[];
|
|
16
|
+
/**
|
|
17
|
+
* 注册所有 Generator
|
|
18
|
+
* @returns {object} Generator 实例映射
|
|
19
|
+
*/
|
|
20
|
+
registerGenerators(): object;
|
|
21
|
+
/**
|
|
22
|
+
* 注册所有 Processor
|
|
23
|
+
* @returns {Map} Processor 实例映射
|
|
24
|
+
*/
|
|
25
|
+
registerProcessors(): Map<any, any>;
|
|
26
|
+
/**
|
|
27
|
+
* 解析图像瓦片
|
|
28
|
+
* @param {Uint8Array} data - 瓦片数据
|
|
29
|
+
* @param {object} result - 结果对象
|
|
30
|
+
* @param {object} config - 配置对象
|
|
31
|
+
*/
|
|
32
|
+
parseImageTile(data: Uint8Array, result: object, config: object): void;
|
|
33
|
+
/**
|
|
34
|
+
* 解析地理图层
|
|
35
|
+
* @param {object} imageTile - 图像瓦片对象
|
|
36
|
+
* @param {object} result - 结果对象
|
|
37
|
+
* @param {object} config - 配置对象
|
|
38
|
+
*/
|
|
39
|
+
parseGeoLayers(imageTile: object, result: object, config: object): void;
|
|
40
|
+
_currentProcessor: any;
|
|
41
|
+
/**
|
|
42
|
+
* 解析元素集
|
|
43
|
+
* @param {object} geoLayer - 地理图层对象
|
|
44
|
+
* @param {number} catalogType - 目录类型
|
|
45
|
+
* @param {object} result - 结果对象
|
|
46
|
+
* @param {object} config - 配置对象
|
|
47
|
+
*/
|
|
48
|
+
parseElementSets(geoLayer: object, catalogType: number, result: object, config: object): void;
|
|
49
|
+
_getDebugStyleConfig(catalogType: any): {
|
|
50
|
+
color: number[];
|
|
51
|
+
fillColor: number[];
|
|
52
|
+
fillRgba: number[];
|
|
53
|
+
fillWidth: number;
|
|
54
|
+
borderRgba: number[];
|
|
55
|
+
borderWidth: number;
|
|
56
|
+
borderTexture: number;
|
|
57
|
+
thickRgba: number[];
|
|
58
|
+
};
|
|
59
|
+
_getNoStyleConfig(catalogType: any): {
|
|
60
|
+
color: number[];
|
|
61
|
+
fillColor: number[];
|
|
62
|
+
fillRgba: number[];
|
|
63
|
+
fillWidth: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 解析元素
|
|
67
|
+
* @param {object} elementSet - 元素集
|
|
68
|
+
* @param {number} catalogType - 目录类型
|
|
69
|
+
* @param {number} styleId - 样式ID
|
|
70
|
+
* @param {object} styleConfig - 样式配置
|
|
71
|
+
* @param {object} result - 结果对象
|
|
72
|
+
* @param {object} config - 配置对象
|
|
73
|
+
*/
|
|
74
|
+
parseElements(elementSet: object, catalogType: number, styleId: number, styleConfig: object, result: object, config: object): void;
|
|
75
|
+
_getDebugProcessor(catalogType: any): any;
|
|
76
|
+
getTracer(catalogType: any, element: any): any;
|
|
77
|
+
/**
|
|
78
|
+
* 将渲染对象添加到结果中
|
|
79
|
+
* @param {Array<object>} renderObjects - 渲染对象数组
|
|
80
|
+
* @param {object} result - 结果对象
|
|
81
|
+
*/
|
|
82
|
+
addRenderObjectsToResult(renderObjects: Array<object>, result: object): void;
|
|
83
|
+
createBackground(result: any, config: any): void;
|
|
84
|
+
}
|
|
85
|
+
import { LayerManager } from './core/LayerManager';
|
|
86
|
+
import { StyleParser } from './StyleParser';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 样式解析器类
|
|
3
|
+
* 负责解析和获取样式配置
|
|
4
|
+
*/
|
|
5
|
+
export class StyleParser {
|
|
6
|
+
constructor(styleManager: any);
|
|
7
|
+
styleManager: any;
|
|
8
|
+
/**
|
|
9
|
+
* 从元素集解析样式配置
|
|
10
|
+
* @param {object} elementSet - 元素集对象
|
|
11
|
+
* @param {number} catalogType - 目录类型
|
|
12
|
+
* @param {number} styleId - 样式ID
|
|
13
|
+
* @param {number} zoom - 缩放级别
|
|
14
|
+
* @param {object} config - 配置对象
|
|
15
|
+
* @returns {object|null} 样式配置
|
|
16
|
+
*/
|
|
17
|
+
parseStyleConfig(elementSet: object, catalogType: number, styleId: number, zoom: number, config: object): object | null;
|
|
18
|
+
/**
|
|
19
|
+
* 获取样式配置
|
|
20
|
+
* @param {number} catalogType - 目录类型
|
|
21
|
+
* @param {number} styleId - 样式ID
|
|
22
|
+
* @param {number} zoom - 缩放级别
|
|
23
|
+
* @param {number} styleType - 样式类型
|
|
24
|
+
* @param {object} config - 配置对象
|
|
25
|
+
* @returns {object|null} 样式配置
|
|
26
|
+
*/
|
|
27
|
+
getStyleConfig(catalogType: number, styleId: number, zoom: number, styleType: number | undefined, config: object): object | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const bdLaneTileValue: {
|
|
2
|
+
3: number;
|
|
3
|
+
4: number;
|
|
4
|
+
6: number;
|
|
5
|
+
8: number;
|
|
6
|
+
10: number;
|
|
7
|
+
11: number;
|
|
8
|
+
13: number;
|
|
9
|
+
15: number;
|
|
10
|
+
17: number;
|
|
11
|
+
};
|
|
12
|
+
export const BG_OFFSETZ: -0.01;
|
|
13
|
+
export const LAND_OFFSETZ: -0.001;
|
|
14
|
+
export const LAYER_INDEX_DELTA: 0.0001;
|
|
15
|
+
export const POLYGON3D_OFFSETZ: 0.3;
|
|
16
|
+
export const BRIDGE_PIER_OFFSETZ: 0;
|
|
17
|
+
export const DELTA: 0.00001;
|
|
18
|
+
export namespace POI_ICON_DIR {
|
|
19
|
+
let UNDEFINED: number;
|
|
20
|
+
let CENTER: number;
|
|
21
|
+
let LEFT: number;
|
|
22
|
+
let TOP: number;
|
|
23
|
+
let RIGHT: number;
|
|
24
|
+
let BOTTOM: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 图层类型定义
|
|
3
|
+
* 用于标识不同类型的地图元素
|
|
4
|
+
*/
|
|
5
|
+
export const POI_TYPE: 3;
|
|
6
|
+
export const LINK_TYPE: 4;
|
|
7
|
+
export const LINE_NAME_TYPE: 5;
|
|
8
|
+
export const SUB_LINE_TYPE: 6;
|
|
9
|
+
export const POLY_TYPE: 7;
|
|
10
|
+
export const HREGION_TYPE: 8;
|
|
11
|
+
export const IMAGE_TYPE: 9;
|
|
12
|
+
export const ZLINE_TYPE: 12;
|
|
13
|
+
export const ZLINE_NAME_TYPE: 13;
|
|
14
|
+
export const GAOQING_ROAD_TYPE: 15;
|
|
15
|
+
export const GAOQING_LINE_TYPE: 16;
|
|
16
|
+
export const GAOQING_GUIDE_TYPE: 17;
|
|
17
|
+
export const GAOQING_ARROW_TYPE: 18;
|
|
18
|
+
export const GAOQING_GRADIENT_TYPE: 20;
|
|
19
|
+
export const GAOQING_POLY_TYPE: 42;
|
|
20
|
+
export const GAOQING_ISO_TYPE: 44;
|
|
21
|
+
export const TEXTURE_TYPE: 19;
|
|
22
|
+
export const TEXTURELAYER_TYPE: 29;
|
|
23
|
+
export const INDOOR_REG_TYPE: 7;
|
|
24
|
+
export const INDOOR_LINE_TYPE: 4;
|
|
25
|
+
export const INDOOR_HREG_TYPE: 8;
|
|
26
|
+
export const INDOOR_POI_TYPE: 3;
|
|
27
|
+
export const INDOOR_FLOOR_TYPE: 23;
|
|
28
|
+
export const PILLAR_TYPE: 24;
|
|
29
|
+
export const BUILDING_MESH_TYPE: 25;
|
|
30
|
+
export const TUNNEL_TYPE: 26;
|
|
31
|
+
export const TUNNEL_MODEL_TYPE: 46;
|
|
32
|
+
export const BILLBOARD_TYPE: 27;
|
|
33
|
+
export const ROUTEANIMATION_TYPE: 28;
|
|
34
|
+
export const ISOLATION_TYPE: 30;
|
|
35
|
+
export const TRAFFIC_SIGN_TYPE: 35;
|
|
36
|
+
export const BASIC_LINE3D_TYPE: 36;
|
|
37
|
+
export const STEREO_MODEL_TYPE: 37;
|
|
38
|
+
export const REFINED_MODEL_TYPE: 43;
|
|
39
|
+
export const MODEL_POI_TYPE: 47;
|
|
40
|
+
export const POINT_STYLE: 0;
|
|
41
|
+
export const POINT_TEXT_STYLE: 1;
|
|
42
|
+
export const LINE_TEXT_STYLE: 2;
|
|
43
|
+
export const LINE_LABEL_STYLE: 3;
|
|
44
|
+
export const LINE_STYLE: 3;
|
|
45
|
+
export const POLYGON_STYLE: 4;
|
|
46
|
+
export const POLYGON3D_STYLE: 5;
|
|
47
|
+
export const ARROW_STYLE: 7;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 几何体构建器
|
|
3
|
+
* 根据属性布局配置动态创建 BufferGeometry
|
|
4
|
+
*/
|
|
5
|
+
export class GeometryBuilder {
|
|
6
|
+
/**
|
|
7
|
+
* 根据 primitive 数据创建 BufferGeometry
|
|
8
|
+
* @param {object} primitiveData - primitive 数据
|
|
9
|
+
* @param {Float32Array} primitiveData.attributes - 交错的顶点属性数据
|
|
10
|
+
* @param {Uint32Array} primitiveData.indices - 索引数据
|
|
11
|
+
* @param {Array<{name: string, size: number}>} primitiveData.attributeLayout - 属性布局配置
|
|
12
|
+
* @returns {BufferGeometry} Three.js BufferGeometry 对象
|
|
13
|
+
*/
|
|
14
|
+
static createGeometry(primitiveData: {
|
|
15
|
+
attributes: Float32Array;
|
|
16
|
+
indices: Uint32Array;
|
|
17
|
+
attributeLayout: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
size: number;
|
|
20
|
+
}>;
|
|
21
|
+
}): BufferGeometry;
|
|
22
|
+
/**
|
|
23
|
+
* 计算属性布局的总步长
|
|
24
|
+
* @param {Array<{name: string, size: number}>} attributeLayout - 属性布局配置
|
|
25
|
+
* @returns {number} 总步长
|
|
26
|
+
*/
|
|
27
|
+
static calculateStride(attributeLayout: Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
size: number;
|
|
30
|
+
}>): number;
|
|
31
|
+
/**
|
|
32
|
+
* 验证属性布局配置的有效性
|
|
33
|
+
* @param {Array<{name: string, size: number}>} attributeLayout - 属性布局配置
|
|
34
|
+
* @returns {boolean} 是否有效
|
|
35
|
+
*/
|
|
36
|
+
static validateAttributeLayout(attributeLayout: Array<{
|
|
37
|
+
name: string;
|
|
38
|
+
size: number;
|
|
39
|
+
}>): boolean;
|
|
40
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export namespace GROUP_NAMES {
|
|
2
|
+
let BACKGROUND: string;
|
|
3
|
+
let BORDER: string;
|
|
4
|
+
let FILL: string;
|
|
5
|
+
let MARKING: string;
|
|
6
|
+
let VIRTUAL: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 图层索引管理器类
|
|
10
|
+
* 管理对象索引和分组映射
|
|
11
|
+
*/
|
|
12
|
+
export class LayerManager {
|
|
13
|
+
objectIndex: number;
|
|
14
|
+
groupMap: {
|
|
15
|
+
[GROUP_NAMES.BACKGROUND]: number;
|
|
16
|
+
[GROUP_NAMES.BORDER]: number;
|
|
17
|
+
[GROUP_NAMES.FILL]: number;
|
|
18
|
+
[GROUP_NAMES.MARKING]: number;
|
|
19
|
+
[GROUP_NAMES.VIRTUAL]: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 获取分组索引
|
|
23
|
+
* @param {string} groupName - 分组名称
|
|
24
|
+
* @returns {number} 分组索引 (0-3)
|
|
25
|
+
*/
|
|
26
|
+
getGroupIndex(groupName: string): number;
|
|
27
|
+
/**
|
|
28
|
+
* 递增并获取对象索引
|
|
29
|
+
* @returns {number} 新的对象索引
|
|
30
|
+
*/
|
|
31
|
+
incrementObjectIndex(): number;
|
|
32
|
+
/**
|
|
33
|
+
* 获取当前对象索引(不递增)
|
|
34
|
+
* @returns {number} 当前对象索引
|
|
35
|
+
*/
|
|
36
|
+
getCurrentObjectIndex(): number;
|
|
37
|
+
/**
|
|
38
|
+
* 重置对象索引
|
|
39
|
+
*/
|
|
40
|
+
reset(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 材质工厂类
|
|
3
|
+
* 根据配置创建不同类型的 Three.js 材质
|
|
4
|
+
*/
|
|
5
|
+
export class MaterialFactory {
|
|
6
|
+
constructor(engine: any, textureManager: any);
|
|
7
|
+
engine: any;
|
|
8
|
+
textureManager: any;
|
|
9
|
+
materialCache: Map<any, any>;
|
|
10
|
+
/**
|
|
11
|
+
* 创建材质
|
|
12
|
+
* @param {object} config - 材质配置(同时作为缓存键)
|
|
13
|
+
* @param {string} config.ctorName - 材质构造函数
|
|
14
|
+
* @param {object} config.parameters - 材质构造函数参数
|
|
15
|
+
* @param {object} config.properties - 材质属性
|
|
16
|
+
* @param {object} [config.texture] - 纹理配置
|
|
17
|
+
* @param {object} [config.dynamic] - 动态属性配置
|
|
18
|
+
* @returns {Promise<Material>} Three.js材质对象
|
|
19
|
+
*/
|
|
20
|
+
create(config: {
|
|
21
|
+
ctorName: string;
|
|
22
|
+
parameters: object;
|
|
23
|
+
properties: object;
|
|
24
|
+
texture?: object | undefined;
|
|
25
|
+
dynamic?: object | undefined;
|
|
26
|
+
}): Promise<Material>;
|
|
27
|
+
/**
|
|
28
|
+
* 创建百度矢量材质
|
|
29
|
+
* @param {object} parameters - 材质构造函数参数
|
|
30
|
+
* @param {object} properties - 材质属性
|
|
31
|
+
* @returns {BaiduVectorMaterial} 材质对象
|
|
32
|
+
*/
|
|
33
|
+
createBaiduVectorMaterial(parameters: object, properties: object): BaiduVectorMaterial;
|
|
34
|
+
createSimplePointMaterial(parameters: any, properties: any): SimplePointMaterial;
|
|
35
|
+
/**
|
|
36
|
+
* 创建粗线材质
|
|
37
|
+
* @param {object} parameters - 材质构造函数参数
|
|
38
|
+
* @param {object} properties - 材质属性
|
|
39
|
+
* @param {object} textureConfig - 纹理配置
|
|
40
|
+
* @param {object} dynamicConfig - 动态属性配置
|
|
41
|
+
* @returns {Promise<FatLineMaterial>} 材质对象
|
|
42
|
+
*/
|
|
43
|
+
createFatLineMaterial(parameters: object, properties: object, textureConfig: object, dynamicConfig: object): Promise<FatLineMaterial>;
|
|
44
|
+
createPolygonMaterial(parameters: any, properties: any, textureConfig: any): Promise<PolygonMaterial>;
|
|
45
|
+
/**
|
|
46
|
+
* 创建箭头材质
|
|
47
|
+
* @param {object} parameters - 材质构造函数参数
|
|
48
|
+
* @param {object} properties - 材质属性
|
|
49
|
+
* @returns {ArrowMaterial} 材质对象
|
|
50
|
+
*/
|
|
51
|
+
createArrowMaterial(parameters: object, properties: object): ArrowMaterial;
|
|
52
|
+
/**
|
|
53
|
+
* 为材质添加动态 zoomUnits 计算
|
|
54
|
+
* @param {FatLineMaterial} material - 材质对象
|
|
55
|
+
* @param {object} tile - 瓦片对象
|
|
56
|
+
*/
|
|
57
|
+
addZoomUnitsDynamic(material: FatLineMaterial, tileCenter: any): void;
|
|
58
|
+
/**
|
|
59
|
+
* 计算像素大小
|
|
60
|
+
* @param {number} distance - 距离
|
|
61
|
+
* @param {number} fov - 视场角(弧度)
|
|
62
|
+
* @param {number} screenHeight - 屏幕高度
|
|
63
|
+
* @returns {number} 像素大小
|
|
64
|
+
*/
|
|
65
|
+
getPixelSize(distance: number, fov: number, screenHeight: number): number;
|
|
66
|
+
}
|
|
67
|
+
import { BaiduVectorMaterial } from '../../../../../threejs/materials/map/BaiduVectorMaterial';
|
|
68
|
+
import { SimplePointMaterial } from '../../../../../threejs/materials/point/Simple';
|
|
69
|
+
import { FatLineMaterial } from '../../../../../threejs/materials/line/FatLineMaterial';
|
|
70
|
+
import { PolygonMaterial } from '../../../../../threejs/materials/polygon/PolygonMaterial';
|
|
71
|
+
import { ArrowMaterial } from '../../../../../threejs/materials/point/Arrow';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 样式管理器类
|
|
3
|
+
* 用于管理地图样式配置、图标集信息和样式缓存
|
|
4
|
+
*/
|
|
5
|
+
export class StyleManager {
|
|
6
|
+
iconSetInfo: object | null;
|
|
7
|
+
featureStyles: object | null;
|
|
8
|
+
cachedStyles: {};
|
|
9
|
+
/**
|
|
10
|
+
* 更新样式配置
|
|
11
|
+
* @param {object} featureStyles - 特性样式配置
|
|
12
|
+
*/
|
|
13
|
+
updateStyles(featureStyles: object): void;
|
|
14
|
+
/**
|
|
15
|
+
* 更新图标集信息
|
|
16
|
+
* @param {object} iconSetInfo - 图标集信息
|
|
17
|
+
*/
|
|
18
|
+
updateIconSetInfo(iconSetInfo: object): void;
|
|
19
|
+
/**
|
|
20
|
+
* 获取图标集信息
|
|
21
|
+
* @returns {object|null} 图标集信息
|
|
22
|
+
*/
|
|
23
|
+
getIconSetInfo(): object | null;
|
|
24
|
+
/**
|
|
25
|
+
* 获取特性样式
|
|
26
|
+
* @returns {object|null} 特性样式配置
|
|
27
|
+
*/
|
|
28
|
+
getFeatureStyles(): object | null;
|
|
29
|
+
/**
|
|
30
|
+
* 获取所有缓存的样式
|
|
31
|
+
* @returns {object} 缓存的样式对象
|
|
32
|
+
*/
|
|
33
|
+
getCachedStyles(): object;
|
|
34
|
+
/**
|
|
35
|
+
* 设置缓存的样式
|
|
36
|
+
* @param {string} key - 样式缓存键
|
|
37
|
+
* @param {object} value - 样式值
|
|
38
|
+
*/
|
|
39
|
+
setCachedStyle(key: string, value: object): void;
|
|
40
|
+
/**
|
|
41
|
+
* 获取缓存的样式
|
|
42
|
+
* @param {string} key - 样式缓存键
|
|
43
|
+
* @returns {object|undefined} 样式值
|
|
44
|
+
*/
|
|
45
|
+
getCachedStyle(key: string): object | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 清空所有缓存
|
|
48
|
+
*/
|
|
49
|
+
clearCache(): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 纹理管理器类
|
|
3
|
+
* 用于统一管理纹理的加载、缓存和配置
|
|
4
|
+
*/
|
|
5
|
+
export class TextureManager {
|
|
6
|
+
textureLoader: any;
|
|
7
|
+
textureSingleton: PromisedSingleton;
|
|
8
|
+
textureOptions: Map<any, any>;
|
|
9
|
+
/**
|
|
10
|
+
* 加载纹理
|
|
11
|
+
* @param {string} url - 纹理URL
|
|
12
|
+
* @param {object} options - 纹理配置选项
|
|
13
|
+
* @param {string} [options.wrapS=RepeatWrapping] - S方向包裹模式
|
|
14
|
+
* @param {string} [options.wrapT=RepeatWrapping] - T方向包裹模式
|
|
15
|
+
* @param {string} [options.colorSpace=SRGBColorSpace] - 颜色空间
|
|
16
|
+
* @param {boolean} [options.generateMipmaps=false] - 是否生成Mipmaps
|
|
17
|
+
* @returns {Promise<Texture>} 纹理对象
|
|
18
|
+
*/
|
|
19
|
+
loadTexture(url: string, options?: {
|
|
20
|
+
wrapS?: string | undefined;
|
|
21
|
+
wrapT?: string | undefined;
|
|
22
|
+
colorSpace?: string | undefined;
|
|
23
|
+
generateMipmaps?: boolean | undefined;
|
|
24
|
+
}): Promise<Texture>;
|
|
25
|
+
/**
|
|
26
|
+
* 配置纹理参数
|
|
27
|
+
* @param {Texture} texture - 纹理对象
|
|
28
|
+
* @param {object} options - 配置选项
|
|
29
|
+
*/
|
|
30
|
+
configureTexture(texture: Texture, options?: object): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取已缓存的纹理
|
|
33
|
+
* @param {string} url - 纹理URL
|
|
34
|
+
* @returns {Texture|undefined} 纹理对象
|
|
35
|
+
*/
|
|
36
|
+
getTexture(url: string): Texture | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* 检查纹理是否已缓存
|
|
39
|
+
* @param {string} url - 纹理URL
|
|
40
|
+
* @returns {boolean} 是否已缓存
|
|
41
|
+
*/
|
|
42
|
+
hasTexture(url: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 清除特定纹理缓存
|
|
45
|
+
* @param {string} url - 纹理URL
|
|
46
|
+
*/
|
|
47
|
+
clearTexture(url: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* 清除所有纹理缓存
|
|
50
|
+
*/
|
|
51
|
+
clearAllTextures(): void;
|
|
52
|
+
/**
|
|
53
|
+
* 预加载多个纹理
|
|
54
|
+
* @param {Array<string>} urls - 纹理URL数组
|
|
55
|
+
* @param {object} options - 纹理配置选项
|
|
56
|
+
* @returns {Promise<Array<Texture>>} 纹理对象数组
|
|
57
|
+
*/
|
|
58
|
+
preloadTextures(urls: Array<string>, options?: object): Promise<Array<Texture>>;
|
|
59
|
+
/**
|
|
60
|
+
* 获取所有已缓存的纹理URL列表
|
|
61
|
+
* @returns {Array<string>} URL数组
|
|
62
|
+
*/
|
|
63
|
+
get cachedUrls(): Array<string>;
|
|
64
|
+
}
|
|
65
|
+
import { PromisedSingleton } from '../../../../../util/PromisedSingleton';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取已初始化的 WASM 模块
|
|
3
|
+
* @returns {Object|null} WASM 模块实例,未初始化时返回 null
|
|
4
|
+
*/
|
|
5
|
+
export function getWasmModule(): Object | null;
|
|
6
|
+
/**
|
|
7
|
+
* 确保 WASM 模块已加载
|
|
8
|
+
* 如果未加载则自动加载,如果已加载则直接返回
|
|
9
|
+
* @returns {Promise<Object>} WASM 模块实例
|
|
10
|
+
*/
|
|
11
|
+
export function ensureWasmLoaded(): Promise<Object>;
|
|
12
|
+
/**
|
|
13
|
+
* 自动释放wasm对象的包裹函数
|
|
14
|
+
* @param {*} resource wasm对象
|
|
15
|
+
* @param {*} fn 使用wasm对象的函数
|
|
16
|
+
* @returns 使用wasm对象后的结果
|
|
17
|
+
*/
|
|
18
|
+
export function usingResource(resource: any, fn: any): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generator 基类
|
|
3
|
+
* 所有具体 Generator 的抽象基类,定义通用接口
|
|
4
|
+
* Generator 只负责生成几何体和材质配置,不涉及图层分组和对象索引
|
|
5
|
+
*/
|
|
6
|
+
export class BaseGenerator {
|
|
7
|
+
/**
|
|
8
|
+
* 生成渲染对象
|
|
9
|
+
* @param {object} element - 元素对象
|
|
10
|
+
* @param {object} styleConfig - 样式配置
|
|
11
|
+
* @param {object} context - 上下文信息
|
|
12
|
+
* @returns {object|null} 渲染对象配置 {type, geometry, material}
|
|
13
|
+
*/
|
|
14
|
+
generate(element: object, styleConfig: object, context: object): object | null;
|
|
15
|
+
/**
|
|
16
|
+
* 获取材质配置
|
|
17
|
+
* @param {object} styleConfig - 样式配置
|
|
18
|
+
* @param {object} context - 上下文信息
|
|
19
|
+
* @returns {object} 材质配置
|
|
20
|
+
*/
|
|
21
|
+
getMaterialConfig(styleConfig: object, context: object): object;
|
|
22
|
+
/**
|
|
23
|
+
* 获取顶点属性布局配置
|
|
24
|
+
* 定义该几何体类型的顶点属性结构,用于动态构建交错缓冲区
|
|
25
|
+
* @returns {Array<{name: string, size: number}>} 属性布局配置数组
|
|
26
|
+
* @example
|
|
27
|
+
* [
|
|
28
|
+
* { name: 'position', size: 3 }, // vec3
|
|
29
|
+
* { name: 'normal', size: 3 }, // vec3
|
|
30
|
+
* { name: 'color', size: 3 }, // vec3
|
|
31
|
+
* { name: 'layerIndex', size: 1 }, // float
|
|
32
|
+
* ]
|
|
33
|
+
*/
|
|
34
|
+
getAttributeLayout(): Array<{
|
|
35
|
+
name: string;
|
|
36
|
+
size: number;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* 创建几何体数据
|
|
40
|
+
* @param {object} element - 元素对象
|
|
41
|
+
* @param {object} styleConfig - 样式配置
|
|
42
|
+
* @param {object} context - 上下文信息
|
|
43
|
+
* @returns {object} 几何体数据
|
|
44
|
+
*/
|
|
45
|
+
createGeometry(element: object, styleConfig: object, context: object): object;
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 3D建筑 Generator
|
|
3
|
+
* 生成3D建筑渲染对象
|
|
4
|
+
*/
|
|
5
|
+
export class Building3dGenerator extends BaseGenerator {
|
|
6
|
+
/**
|
|
7
|
+
* 生成渲染对象
|
|
8
|
+
* @param {object} geoData - 图元信息。要求包含 points、indices
|
|
9
|
+
* @param {object} styleConfig - 样式配置
|
|
10
|
+
* @param {object} context - 上下文信息
|
|
11
|
+
* @returns {object} 渲染对象配置
|
|
12
|
+
*/
|
|
13
|
+
generate(geoData: object, styleConfig: object, context: object): object;
|
|
14
|
+
}
|
|
15
|
+
import { BaseGenerator } from './Base';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平面符号 Generator
|
|
3
|
+
* 生成平面符号渲染对象
|
|
4
|
+
*/
|
|
5
|
+
export class FlatSymbolGenerator extends BaseGenerator {
|
|
6
|
+
/**
|
|
7
|
+
* 生成渲染对象
|
|
8
|
+
* @param {object} geoData - 图元数据
|
|
9
|
+
* @param {object} styleConfig - 样式配置
|
|
10
|
+
* @param {object} context - 上下文信息
|
|
11
|
+
* @returns {object} 渲染对象配置
|
|
12
|
+
*/
|
|
13
|
+
generate(geoData: object, styleConfig: object, context: object): object;
|
|
14
|
+
}
|
|
15
|
+
import { BaseGenerator } from './Base';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label Line Generator
|
|
3
|
+
* 生成路名标签渲染对象
|
|
4
|
+
*/
|
|
5
|
+
export class LabelLineGenerator extends BaseGenerator {
|
|
6
|
+
getMaterialConfig(): null;
|
|
7
|
+
generate(element: any, roadElement: any, styleConfig: any, context: any, linePoints: any, index: any): {
|
|
8
|
+
type: string;
|
|
9
|
+
geometry: null;
|
|
10
|
+
material: null;
|
|
11
|
+
properties: {
|
|
12
|
+
poiData: {
|
|
13
|
+
linePoints: any;
|
|
14
|
+
anchorIndex: any;
|
|
15
|
+
anchor: any;
|
|
16
|
+
text: any;
|
|
17
|
+
styleId: any;
|
|
18
|
+
styleConfig: any;
|
|
19
|
+
hasText: boolean;
|
|
20
|
+
rank: any;
|
|
21
|
+
};
|
|
22
|
+
linePoints: any;
|
|
23
|
+
};
|
|
24
|
+
} | null;
|
|
25
|
+
createGeometry(element: any, roadElement: any, styleConfig: any, context: any, linePoints: any, index: any): {
|
|
26
|
+
linePoints: any;
|
|
27
|
+
anchorIndex: any;
|
|
28
|
+
anchor: any;
|
|
29
|
+
text: any;
|
|
30
|
+
styleId: any;
|
|
31
|
+
styleConfig: any;
|
|
32
|
+
hasText: boolean;
|
|
33
|
+
rank: any;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
import { BaseGenerator } from './Base';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 普通像素线 Generator
|
|
3
|
+
* 生成普通线条渲染对象
|
|
4
|
+
*/
|
|
5
|
+
export class LineGenerator extends BaseGenerator {
|
|
6
|
+
/**
|
|
7
|
+
* 生成渲染对象
|
|
8
|
+
* @param {object} geoData - 图元信息。要求包含 vertices
|
|
9
|
+
* @param {object} styleConfig - 样式配置
|
|
10
|
+
* @param {object} context - 上下文信息
|
|
11
|
+
* @returns {object} 渲染对象配置
|
|
12
|
+
*/
|
|
13
|
+
generate(geoData: object, styleConfig: object, context: object): object;
|
|
14
|
+
}
|
|
15
|
+
import { BaseGenerator } from './Base';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 高清线 Generator
|
|
3
|
+
* 生成高清线条渲染对象(不 keepSize,可能带高度)
|
|
4
|
+
*/
|
|
5
|
+
export class Line3dGenerator extends BaseGenerator {
|
|
6
|
+
/**
|
|
7
|
+
* 生成渲染对象
|
|
8
|
+
* @param {object} geoData - 图元信息。要求包含 vertices
|
|
9
|
+
* @param {object} styleConfig - 样式配置
|
|
10
|
+
* @param {object} context - 上下文信息
|
|
11
|
+
* @returns {object} 渲染对象配置
|
|
12
|
+
*/
|
|
13
|
+
generate(geoData: object, styleConfig: object, context: object): object;
|
|
14
|
+
}
|
|
15
|
+
import { BaseGenerator } from './Base';
|