@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
|
@@ -168,7 +168,8 @@ export class Label extends GeoMesh {
|
|
|
168
168
|
* @param {String} [parameters.textAnchor='center'] 文字锚点, 支持'left'|'right'|'top'|'bottom'|'top-left'|'top-right'|'bottom-left'|'bottom-right', 默认'center'
|
|
169
169
|
* @param {Array} [parameters.textOffset=[0,0]] 文字偏移, 默认[0,0]
|
|
170
170
|
* @param {String} [parameters.textWeight='400'] 文字粗细, 默认'400'
|
|
171
|
-
* @param {Array} [parameters.textPadding=[0,
|
|
171
|
+
* @param {Array} [parameters.textPadding=[0,2]] 文字内边距, 默认[0,0]
|
|
172
|
+
* @param {Array} [parameters.padding=[2, 2]] 文字与图标间距, 默认[2, 2]
|
|
172
173
|
* @param {Number} [parameters.iconWidth=40] 图标宽度, 默认40
|
|
173
174
|
* @param {Number} [parameters.iconHeight=40] 图标高度, 默认40
|
|
174
175
|
* @param {Number} [parameters.rotateZ=0] 旋转角度, 默认0
|
|
@@ -193,6 +194,7 @@ export class Label extends GeoMesh {
|
|
|
193
194
|
textOffset?: any[] | undefined;
|
|
194
195
|
textWeight?: string | undefined;
|
|
195
196
|
textPadding?: any[] | undefined;
|
|
197
|
+
padding?: any[] | undefined;
|
|
196
198
|
iconWidth?: number | undefined;
|
|
197
199
|
iconHeight?: number | undefined;
|
|
198
200
|
rotateZ?: number | undefined;
|
|
@@ -225,6 +227,7 @@ export class Label extends GeoMesh {
|
|
|
225
227
|
/** @protected */ protected iconUrlHash: LRUCache;
|
|
226
228
|
/** @protected */ protected boxHash: Map<any, any>;
|
|
227
229
|
/** @protected */ protected gap: number[];
|
|
230
|
+
/** @protected */ protected _labelQuadStarts: any[];
|
|
228
231
|
/** @protected */ protected geometry: any;
|
|
229
232
|
/** @protected */ protected material: any;
|
|
230
233
|
/** @protected */ protected canvas: HTMLCanvasElement;
|
|
@@ -247,6 +250,7 @@ export class Label extends GeoMesh {
|
|
|
247
250
|
_textWeight: any;
|
|
248
251
|
_rotateZ: any;
|
|
249
252
|
_textPadding: any;
|
|
253
|
+
_padding: any;
|
|
250
254
|
textAlign: any;
|
|
251
255
|
_iconWidth: any;
|
|
252
256
|
_iconHeight: any;
|
|
@@ -445,9 +449,10 @@ export class Label extends GeoMesh {
|
|
|
445
449
|
radius: number;
|
|
446
450
|
fontFamily: any;
|
|
447
451
|
fontWeight: string;
|
|
448
|
-
characterSet: any;
|
|
452
|
+
characterSet: any[];
|
|
449
453
|
sdf: boolean;
|
|
450
454
|
} | undefined;
|
|
455
|
+
updateTextSpriteTexture(): void;
|
|
451
456
|
packTextBuffer(textData: any, indexOffset?: number): number | undefined;
|
|
452
457
|
updateTextDataItem(data: any, indexOffset: any): any;
|
|
453
458
|
packRotateZ(rotateZ: any): void;
|
|
@@ -456,6 +461,7 @@ export class Label extends GeoMesh {
|
|
|
456
461
|
packFade(data: any): void;
|
|
457
462
|
packOffset(offsetX: any, offsetY: any): void;
|
|
458
463
|
packWH(frameWidth: any, frameHeight: any, iconSize: any): void;
|
|
464
|
+
packStretch(offsetX1: any, offsetX2: any, stretchRatio: any, stretchGap: any): void;
|
|
459
465
|
packTypeAndPIndex(type: any): void;
|
|
460
466
|
packIconStyle(opacity?: number): void;
|
|
461
467
|
packIconUV(iconUV: any): void;
|
|
@@ -467,6 +473,13 @@ export class Label extends GeoMesh {
|
|
|
467
473
|
_calculateTransform(position: any, outputMatrix: any): any;
|
|
468
474
|
onBeforeScenePrepareRenderHook(engine: any, scene: any, camera: any): void;
|
|
469
475
|
getPixelSize(position: any): any;
|
|
476
|
+
/**
|
|
477
|
+
* 根据quad索引找到对应的label索引
|
|
478
|
+
* @param {number} quadIndex - 当前quad的索引
|
|
479
|
+
* @returns {number} 对应的label索引
|
|
480
|
+
* @private
|
|
481
|
+
*/
|
|
482
|
+
private _findLabelIndexByQuad;
|
|
470
483
|
getVertexPosition(index: any, target: any): any;
|
|
471
484
|
set enableFade(value: any);
|
|
472
485
|
get enableFade(): any;
|
|
@@ -10,6 +10,7 @@ export class GeometryBufferBuilder {
|
|
|
10
10
|
offsets: Float32Array<ArrayBuffer>;
|
|
11
11
|
instanceRotationMatrices: Float32Array<ArrayBuffer>;
|
|
12
12
|
whs: Float32Array<ArrayBuffer>;
|
|
13
|
+
stretch: Float32Array<ArrayBuffer>;
|
|
13
14
|
styles: Float32Array<ArrayBuffer>;
|
|
14
15
|
fadeOpacityAndSince: Float32Array<ArrayBuffer>;
|
|
15
16
|
indices: never[];
|
|
@@ -24,6 +25,7 @@ export class GeometryBufferBuilder {
|
|
|
24
25
|
whsOffset: number;
|
|
25
26
|
stylesOffset: number;
|
|
26
27
|
fadeOpacityAndSinceOffset: number;
|
|
28
|
+
stretchOffset: number;
|
|
27
29
|
} | undefined;
|
|
28
30
|
_cachePositions: any[] | undefined;
|
|
29
31
|
clear(): void;
|
|
@@ -34,6 +36,7 @@ export class GeometryBufferBuilder {
|
|
|
34
36
|
packRotateZ(theta: any): void;
|
|
35
37
|
packStyle(fill: any, stroke: any, strokeWidth: any): void;
|
|
36
38
|
packWH(width: any, height: any, iconSize?: number): void;
|
|
39
|
+
packStretch(start?: number, end?: number, stretchRatio?: number, stretchGap?: number): void;
|
|
37
40
|
packRotationMatrix(mat3: any): void;
|
|
38
41
|
packFade(fadeOpacity: any, fadeSince: any): void;
|
|
39
42
|
packQuadIndices(indexOffset: any): void;
|
|
@@ -4,9 +4,11 @@ export class TextBoxCalculator {
|
|
|
4
4
|
engine: any;
|
|
5
5
|
dpr: any;
|
|
6
6
|
padding: any;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
_textPadding: any;
|
|
8
|
+
_textSize: any;
|
|
9
|
+
_textWeight: any;
|
|
10
|
+
_textStrokeWidth: any;
|
|
11
|
+
_textFamily: any;
|
|
10
12
|
getTextBox(data: any, isFlat: any): {
|
|
11
13
|
width: number;
|
|
12
14
|
height: number;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 屏幕文字对象, 支持沿线绘制文字
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* @category Objects
|
|
6
|
+
*/
|
|
7
|
+
export class ScreenText extends GeoMesh {
|
|
8
|
+
/**
|
|
9
|
+
* 构造函数
|
|
10
|
+
* @param {Object} parameters 配置参数
|
|
11
|
+
* @param {number} [parameters.fontSize=26] 字体大小
|
|
12
|
+
* @param {string} [parameters.fontFamily='Arial'] 字体族
|
|
13
|
+
* @param {string} [parameters.color='#ffffff'] 文字颜色
|
|
14
|
+
* @param {number} [parameters.opacity=1] 不透明度
|
|
15
|
+
* @param {number} [parameters.strokeWidth=0] 描边宽度
|
|
16
|
+
* @param {string} [parameters.strokeColor='#000000'] 描边颜色
|
|
17
|
+
*/
|
|
18
|
+
constructor(parameters?: {
|
|
19
|
+
fontSize?: number | undefined;
|
|
20
|
+
fontFamily?: string | undefined;
|
|
21
|
+
color?: string | undefined;
|
|
22
|
+
opacity?: number | undefined;
|
|
23
|
+
strokeWidth?: number | undefined;
|
|
24
|
+
strokeColor?: string | undefined;
|
|
25
|
+
});
|
|
26
|
+
/** @protected */ protected parameters: {
|
|
27
|
+
fontSize: number;
|
|
28
|
+
fontFamily: string;
|
|
29
|
+
color: string;
|
|
30
|
+
opacity: number;
|
|
31
|
+
strokeWidth: number;
|
|
32
|
+
strokeColor: string;
|
|
33
|
+
fontWeight: string;
|
|
34
|
+
keepUpright: boolean;
|
|
35
|
+
textMaxAngle: number;
|
|
36
|
+
clippingBuffer: number;
|
|
37
|
+
debug: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** @protected */ protected fontAtlasManager: any;
|
|
40
|
+
/** @protected */ protected atlasTexture: any;
|
|
41
|
+
frustumCulled: boolean;
|
|
42
|
+
matrixAutoUpdate: boolean;
|
|
43
|
+
renderOrder: number;
|
|
44
|
+
FlipState: {
|
|
45
|
+
unknown: number;
|
|
46
|
+
flipRequired: number;
|
|
47
|
+
flipNotRequired: number;
|
|
48
|
+
};
|
|
49
|
+
_flipStates: Map<any, any>;
|
|
50
|
+
_textsAlongLinesData: any[];
|
|
51
|
+
_tempMatrix4: any;
|
|
52
|
+
_tempVector2: any;
|
|
53
|
+
_tempVector4: any;
|
|
54
|
+
_tempVector4_2: any;
|
|
55
|
+
_measureCanvas: HTMLCanvasElement;
|
|
56
|
+
_measureCtx: CanvasRenderingContext2D | null;
|
|
57
|
+
_emptyFrameCount: number;
|
|
58
|
+
_emptyFrameThreshold: number;
|
|
59
|
+
_placeTextCache: Map<any, any>;
|
|
60
|
+
_shapeCache: LRUCache;
|
|
61
|
+
_debugPolyline: Polyline | null;
|
|
62
|
+
_debugNormalPoints: SimplePoint | null;
|
|
63
|
+
_debugAnchorPoints: SimplePoint | null;
|
|
64
|
+
geometry: ScreenTextGeometry | undefined;
|
|
65
|
+
material: ScreenTextMaterial | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* 初始化调试对象
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
private _initDebugObjects;
|
|
71
|
+
/**
|
|
72
|
+
* 碰撞检测(返回屏幕坐标的字符包围盒)
|
|
73
|
+
* @param {Object} data 数据项(来自 dataSource.userData)
|
|
74
|
+
* @returns {Object|null} 包围盒信息 {chars, isProjected, tolerance}
|
|
75
|
+
*/
|
|
76
|
+
collisionTest(data: Object): Object | null;
|
|
77
|
+
/**
|
|
78
|
+
* 更新分辨率
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private _updateResolution;
|
|
82
|
+
/**
|
|
83
|
+
* 初始化字体图集管理器
|
|
84
|
+
* @private
|
|
85
|
+
*/
|
|
86
|
+
private _initFontAtlas;
|
|
87
|
+
/**
|
|
88
|
+
* 定义代理属性
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
private _defineProxyProperties;
|
|
92
|
+
/**
|
|
93
|
+
* 设置文字数据(核心API)
|
|
94
|
+
* @param {Array<Object>} chars 字符数据数组(注意:每个是单个字符!)
|
|
95
|
+
* @param {number} chars[].x 屏幕X坐标(像素)
|
|
96
|
+
* @param {number} chars[].y 屏幕Y坐标(像素)
|
|
97
|
+
* @param {string} chars[].char 单个字符
|
|
98
|
+
* @param {number} [chars[].rotation=0] 旋转角度(弧度)
|
|
99
|
+
* @param {number} [chars[].size] 字符大小(可选,默认使用fontSize)
|
|
100
|
+
* @example
|
|
101
|
+
* ```javascript
|
|
102
|
+
* screenText.setTexts([
|
|
103
|
+
* { x: 100, y: 100, char: '建', rotation: 0, size: 26 },
|
|
104
|
+
* { x: 126, y: 100, char: '国', rotation: 0, size: 26 },
|
|
105
|
+
* { x: 152, y: 100, char: '门', rotation: 0, size: 26 }
|
|
106
|
+
* ]);
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
setTexts(chars: Array<Object>): void;
|
|
110
|
+
_lastCharCount: number | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* 更新字体图集
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
private _updateFontAtlas;
|
|
116
|
+
/**
|
|
117
|
+
* 沿线绘制单组文字(向后兼容)
|
|
118
|
+
* @param {string} text 要显示的文字
|
|
119
|
+
* @param {Array<Array<number>>} line 世界坐标线段数组 [[x,y,z], [x,y,z], ...]
|
|
120
|
+
* @param {Array<number>} anchor 锚点世界坐标 [x,y,z]
|
|
121
|
+
* @example
|
|
122
|
+
* ```javascript
|
|
123
|
+
* screenText.setTextAlongLine('建国门南大街', line, [x, y, z]);
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
setTextAlongLine(text: string, line: Array<Array<number>>, anchor: Array<number>): void;
|
|
127
|
+
/**
|
|
128
|
+
* 沿线绘制多组文字
|
|
129
|
+
* @param {Array<Object>} textsData 多组文字数据
|
|
130
|
+
* @param {string} textsData[].text 要显示的文字
|
|
131
|
+
* @param {Array<Array<number>>} textsData[].line 世界坐标线段数组
|
|
132
|
+
* @param {Array<number>} textsData[].anchor 锚点世界坐标
|
|
133
|
+
* @example
|
|
134
|
+
* ```javascript
|
|
135
|
+
* screenText.setTextsAlongLines([
|
|
136
|
+
* { text: '建国门南大街', line: line1, anchor: anchor1 },
|
|
137
|
+
* { text: '西便门大街', line: line2, anchor: anchor2 }
|
|
138
|
+
* ]);
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
setTextsAlongLines(textsData: Array<Object>): void;
|
|
142
|
+
/**
|
|
143
|
+
* 渲染前更新
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
onBeforeScenePrepareRenderHook(renderer: any, scene: any, camera: any): void;
|
|
147
|
+
/**
|
|
148
|
+
* 更新多组沿线文字(新方法)
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
private _updateTextsAlongLines;
|
|
152
|
+
/**
|
|
153
|
+
* 放置单组沿线文字(重构后的核心方法)
|
|
154
|
+
* @private
|
|
155
|
+
* @returns {Array} 字符数组,如果过滤则返回空数组
|
|
156
|
+
*/
|
|
157
|
+
private _placeTextAlongLine;
|
|
158
|
+
_initializedGroups: Set<any> | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* 解析颜色为RGBA数组(归一化到0-1)
|
|
161
|
+
* @private
|
|
162
|
+
* @param {string|Array} color - 颜色值(支持多种格式)
|
|
163
|
+
* @param {string} defaultColor - 默认颜色(十六进制)
|
|
164
|
+
* @returns {Array} RGBA数组 [r, g, b, a](0-1范围)
|
|
165
|
+
*/
|
|
166
|
+
private _parseColorToRgba;
|
|
167
|
+
/**
|
|
168
|
+
* 文字形状化(计算每个字符的位置和宽度)
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
private _shapeText;
|
|
172
|
+
/**
|
|
173
|
+
* 计算两点距离
|
|
174
|
+
* @private
|
|
175
|
+
*/
|
|
176
|
+
private _distance;
|
|
177
|
+
/**
|
|
178
|
+
* 将世界坐标线段转换为屏幕坐标
|
|
179
|
+
* 包含近平面裁剪处理(处理 w < 0 的情况)
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
private _lineToScreenCoords;
|
|
183
|
+
/**
|
|
184
|
+
* 世界坐标转屏幕坐标
|
|
185
|
+
* @private
|
|
186
|
+
*/
|
|
187
|
+
private _worldToScreen;
|
|
188
|
+
/**
|
|
189
|
+
* 查找锚点所在的线段
|
|
190
|
+
* @private
|
|
191
|
+
*/
|
|
192
|
+
private _findSegmentForAnchor;
|
|
193
|
+
/**
|
|
194
|
+
* 计算点到线段的最短距离
|
|
195
|
+
* @private
|
|
196
|
+
*/
|
|
197
|
+
private _pointToSegmentDistance;
|
|
198
|
+
/**
|
|
199
|
+
* 判断锚点是否在屏幕可见区域内
|
|
200
|
+
* @private
|
|
201
|
+
*/
|
|
202
|
+
private _isAnchorVisible;
|
|
203
|
+
/**
|
|
204
|
+
* 判断点是否在相机后面(w <= 0)
|
|
205
|
+
* @private
|
|
206
|
+
*/
|
|
207
|
+
private _isPointBehindCamera;
|
|
208
|
+
/**
|
|
209
|
+
* 判断是否在翻转保持范围内
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
private _isInFlipRetainRange;
|
|
213
|
+
/**
|
|
214
|
+
* 判断是否需要改变朝向(Mapbox 完整算法)
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
private _requiresOrientationChange;
|
|
218
|
+
/**
|
|
219
|
+
* 沿线放置字符
|
|
220
|
+
* @private
|
|
221
|
+
*/
|
|
222
|
+
private _placeGlyphAlongLine;
|
|
223
|
+
_placeGlyphDebugDone: boolean | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* 更新调试对象的数据
|
|
226
|
+
* @private
|
|
227
|
+
*/
|
|
228
|
+
private _updateDebugObjects;
|
|
229
|
+
/**
|
|
230
|
+
* 显示 Atlas 纹理调试面板
|
|
231
|
+
* @param {Object} options 配置选项
|
|
232
|
+
* @param {number} [options.size=300] 显示尺寸(像素)
|
|
233
|
+
* @param {string} [options.position='top-right'] 位置:'top-left', 'top-right', 'bottom-left', 'bottom-right'
|
|
234
|
+
* @param {boolean} [options.autoUpdate=true] 是否自动更新
|
|
235
|
+
* @example
|
|
236
|
+
* ```javascript
|
|
237
|
+
* screenText.showAtlasDebug({ size: 400, position: 'bottom-right' });
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
showAtlasDebug(options?: {
|
|
241
|
+
size?: number | undefined;
|
|
242
|
+
position?: string | undefined;
|
|
243
|
+
autoUpdate?: boolean | undefined;
|
|
244
|
+
}): this;
|
|
245
|
+
_debugPanel: HTMLDivElement | null | undefined;
|
|
246
|
+
_debugUpdateInterval: number | null | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* 隐藏 Atlas 纹理调试面板
|
|
249
|
+
*/
|
|
250
|
+
hideAtlasDebug(): this;
|
|
251
|
+
/**
|
|
252
|
+
* 获取 Atlas 纹理(用于自定义调试)
|
|
253
|
+
* @returns {DataTexture} Atlas texture
|
|
254
|
+
*/
|
|
255
|
+
getAtlasTexture(): DataTexture;
|
|
256
|
+
/**
|
|
257
|
+
* 获取字体图集管理器
|
|
258
|
+
* @returns {FontAtlasManager} Font atlas manager
|
|
259
|
+
*/
|
|
260
|
+
getFontAtlasManager(): FontAtlasManager;
|
|
261
|
+
/**
|
|
262
|
+
* 获取字符集合(从实际的atlas mapping中提取)
|
|
263
|
+
* @returns {Set} 字符集合
|
|
264
|
+
*/
|
|
265
|
+
getCharacterSet(): Set<any>;
|
|
266
|
+
}
|
|
267
|
+
import { GeoMesh } from '../GeoMesh';
|
|
268
|
+
import { LRUCache } from '../../../util/LRUCache';
|
|
269
|
+
import { Polyline } from '../line/Polyline';
|
|
270
|
+
import { SimplePoint } from '../point/SimplePoint';
|
|
271
|
+
import { ScreenTextGeometry } from '../../geometries/text/ScreenTextGeometry';
|
|
272
|
+
import { ScreenTextMaterial } from '../../materials/text/ScreenTextMaterial';
|
|
273
|
+
import { FontAtlasManager } from './font-atlas-manager';
|
|
@@ -2,20 +2,28 @@ export class FontAtlasManager {
|
|
|
2
2
|
props: {};
|
|
3
3
|
_entry: {};
|
|
4
4
|
_textureData: Uint8Array<ArrayBuffer>;
|
|
5
|
+
_currentWidth: number;
|
|
6
|
+
_currentHeight: number;
|
|
5
7
|
_xOffset: number;
|
|
6
8
|
_yOffset: number;
|
|
7
9
|
_mapping: {};
|
|
8
10
|
_canvasHeight: number;
|
|
9
|
-
_oldMapping: {};
|
|
10
11
|
/** @private */ private _atlas;
|
|
11
12
|
_ctx: any;
|
|
13
|
+
_version: number;
|
|
12
14
|
get atlas(): any;
|
|
13
15
|
get mapping(): any;
|
|
14
16
|
setProps(props?: {}): void;
|
|
15
17
|
setPropsAsync(scheduler: any, props?: {}, batchSize?: number): Promise<any>;
|
|
16
18
|
_prepareFontAtlas(): void;
|
|
17
19
|
_generateFontAtlas(characterSet: any): void;
|
|
18
|
-
_processCharBatch(batch: any):
|
|
20
|
+
_processCharBatch(batch: any): void;
|
|
19
21
|
_finalizeTextureData(): void;
|
|
22
|
+
/**
|
|
23
|
+
* 渲染 textureData
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private _debugRenderTexture;
|
|
20
27
|
_createTextureData(characterSet: any): any;
|
|
28
|
+
_reset(): void;
|
|
21
29
|
}
|
|
@@ -34,7 +34,7 @@ export function buildMapping({ characterSet, getFontWidth, fontHeight, buffer, m
|
|
|
34
34
|
canvasHeight: number;
|
|
35
35
|
};
|
|
36
36
|
export function autoWrapping(text: any, wordBreak: any, maxWidth: any, iconMapping: any, startIndex: number | undefined, endIndex: any): any[];
|
|
37
|
-
export function transformParagraph(text: any, paragraph: any, lineHeight: any, wordBreak: any, maxWidth: any, iconMapping: any, gapSpace?: number): {
|
|
37
|
+
export function transformParagraph(text: any, paragraph: any, lineHeight: any, wordBreak: any, maxWidth: any, iconMapping: any, gapSpace?: number, padding?: number[]): {
|
|
38
38
|
x: any[];
|
|
39
39
|
y: any[];
|
|
40
40
|
rowWidth: any[];
|
|
@@ -15,6 +15,10 @@ export class HDMap3DTiles extends Default3DTiles {
|
|
|
15
15
|
private _visibility;
|
|
16
16
|
/** @private */
|
|
17
17
|
private _grid;
|
|
18
|
+
/** @private */
|
|
19
|
+
private _tunnelTransparent;
|
|
20
|
+
/** @private */
|
|
21
|
+
private _tunnelOpacity;
|
|
18
22
|
_setDefaultInstanceConfig(): void;
|
|
19
23
|
_setDefaultInstanceConfigV2(): void;
|
|
20
24
|
_setDefaultStyle(): void;
|
|
@@ -22,5 +26,27 @@ export class HDMap3DTiles extends Default3DTiles {
|
|
|
22
26
|
get turn(): any;
|
|
23
27
|
get visibility(): any;
|
|
24
28
|
get grid(): any;
|
|
29
|
+
/**
|
|
30
|
+
* 设置材质分组的效果
|
|
31
|
+
* @param {string} groupName 材质分组名称 (如: 'tunnel', 'road', 'building', 'green', 'wall', 'water')
|
|
32
|
+
* @param {Object} properties 材质属性
|
|
33
|
+
* @returns {this}
|
|
34
|
+
* @example
|
|
35
|
+
* ```javascript
|
|
36
|
+
* // 设置隧道透明
|
|
37
|
+
* hdmap.setMaterialGroupEffect('tunnel', {
|
|
38
|
+
* opacity: 0.5,
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
setGroupMaterial(groupName: string, properties: Object): this;
|
|
43
|
+
/**
|
|
44
|
+
* 重置材质分组效果
|
|
45
|
+
*/
|
|
46
|
+
resetGroupMaterial(groupName: any): this;
|
|
47
|
+
/**
|
|
48
|
+
* 获取所有可用的材质分组名称
|
|
49
|
+
*/
|
|
50
|
+
getMaterialGroups(): any;
|
|
25
51
|
}
|
|
26
52
|
import { Default3DTiles } from './Default3DTiles';
|
|
@@ -7,6 +7,11 @@ export class Default3DTilesMaterialManager {
|
|
|
7
7
|
* @private
|
|
8
8
|
*/
|
|
9
9
|
private _materrialMap;
|
|
10
|
+
/**
|
|
11
|
+
* 材质分组映射 key: 组名, value: Set<materialKey>
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
private _materialGroups;
|
|
10
15
|
/**
|
|
11
16
|
* 初始化标识
|
|
12
17
|
* @private
|
|
@@ -23,15 +28,58 @@ export class Default3DTilesMaterialManager {
|
|
|
23
28
|
getMaterialByKey(key: any): any;
|
|
24
29
|
/**
|
|
25
30
|
* 根据key添加材质
|
|
26
|
-
* @param key 材质key
|
|
27
|
-
* @param material 材质对象
|
|
31
|
+
* @param {string} key 材质key
|
|
32
|
+
* @param {Material} material 材质对象
|
|
33
|
+
* @param {string|string[]} [group] 材质分组名称,可以是单个分组或多个分组数组
|
|
28
34
|
*/
|
|
29
|
-
addMaterialByKey(key:
|
|
35
|
+
addMaterialByKey(key: string, material: Material, group?: string | string[]): void;
|
|
30
36
|
/**
|
|
31
37
|
* 删除替换材质
|
|
32
38
|
* @param key 材质key
|
|
33
39
|
*/
|
|
34
40
|
removeMaterialByKey(key: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* 获取材质分组中的所有材质key
|
|
43
|
+
* @param {string} groupName 分组名称
|
|
44
|
+
* @returns {string[]} 材质key数组
|
|
45
|
+
*/
|
|
46
|
+
getMaterialKeysByGroup(groupName: string): string[];
|
|
47
|
+
/**
|
|
48
|
+
* 获取材质分组中的所有材质对象
|
|
49
|
+
* @param {string} groupName 分组名称
|
|
50
|
+
* @returns {Material[]} 材质对象数组
|
|
51
|
+
*/
|
|
52
|
+
getMaterialsByGroup(groupName: string): Material[];
|
|
53
|
+
/**
|
|
54
|
+
* 获取所有的分组名称
|
|
55
|
+
* @returns {string[]} 分组名称数组
|
|
56
|
+
*/
|
|
57
|
+
getGroupNames(): string[];
|
|
58
|
+
/**
|
|
59
|
+
* 对材质分组应用效果
|
|
60
|
+
* @param {string} groupName 分组名称
|
|
61
|
+
* @param {Object} properties 要设置的材质属性
|
|
62
|
+
* @param {boolean} [properties.transparent] 是否透明
|
|
63
|
+
* @param {number} [properties.opacity] 透明度 0-1
|
|
64
|
+
* @param {boolean} [properties.visible] 是否可见
|
|
65
|
+
* @param {Color} [properties.color] 颜色
|
|
66
|
+
* @param {boolean} [properties.depthWrite] 深度写入
|
|
67
|
+
* @param {number} [properties.side] 渲染面
|
|
68
|
+
*/
|
|
69
|
+
applyGroupMaterial(groupName: string, properties: {
|
|
70
|
+
transparent?: boolean | undefined;
|
|
71
|
+
opacity?: number | undefined;
|
|
72
|
+
visible?: boolean | undefined;
|
|
73
|
+
color?: any;
|
|
74
|
+
depthWrite?: boolean | undefined;
|
|
75
|
+
side?: number | undefined;
|
|
76
|
+
}): this;
|
|
77
|
+
/**
|
|
78
|
+
* 重置分组效果到默认状态
|
|
79
|
+
* @param {string} groupName 分组名称
|
|
80
|
+
* @returns {this}
|
|
81
|
+
*/
|
|
82
|
+
resetGroupMaterial(groupName: string): this;
|
|
35
83
|
dispose(): void;
|
|
36
84
|
_getPresetTexture: (key: any, type: any, repeat: any, extraParameters: any, callback: any) => any;
|
|
37
85
|
createPbrMaterial: (textureName: any, textureChannels: any, repeat: any, initParameters?: {}, extraParameters?: {}) => any;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 引擎核心入口,用来初始化渲染引擎。
|
|
3
3
|
* 内部核心系统包括:
|
|
4
|
-
* - {@link EngineMap}
|
|
4
|
+
* - {@link EngineMap} 地图视野系统
|
|
5
5
|
* - {@link EngineRendering} 渲染系统
|
|
6
6
|
* - {@link EngineEvent} 事件系统
|
|
7
7
|
* - {@link EngineWidgets} UI控件系统
|
|
8
8
|
* - {@link EngineSelection} 选择器系统
|
|
9
|
+
* - {@link EngineController} 键鼠交互控制器系统
|
|
10
|
+
* - {@link EngineClock} 时钟系统
|
|
9
11
|
*
|
|
10
12
|
* @category Core
|
|
11
13
|
* @example
|
|
@@ -31,13 +33,16 @@ export class Engine {
|
|
|
31
33
|
selection: object;
|
|
32
34
|
widgets: object;
|
|
33
35
|
});
|
|
34
|
-
/** @internal */ _container: HTMLElement;
|
|
36
|
+
/** @internal */ _container: HTMLElement | null;
|
|
35
37
|
/** @internal */ _event: EngineEvent;
|
|
36
38
|
/** @internal */ _map: EngineMap;
|
|
37
39
|
/** @internal */ _rendering: EngineRendering;
|
|
38
40
|
/** @internal */ _selection: EngineSelection;
|
|
39
41
|
/** @internal */ _widgets: EngineWidgets;
|
|
42
|
+
/** @internal */ _clock: EngineClock;
|
|
43
|
+
/** @internal */ _controller: EngineController;
|
|
40
44
|
isEngine: boolean;
|
|
45
|
+
_id: number;
|
|
41
46
|
/**
|
|
42
47
|
* 将object放到渲染场景中
|
|
43
48
|
* @param {Object3D} object threejs或者mapvthree的object对象
|
|
@@ -133,9 +138,9 @@ export class Engine {
|
|
|
133
138
|
private unlockCamera;
|
|
134
139
|
/**
|
|
135
140
|
* 渲染电影
|
|
136
|
-
* @param {
|
|
141
|
+
* @param {VideoConfig} videoConfig 影片配置对象
|
|
137
142
|
*/
|
|
138
|
-
renderVideo(videoConfig:
|
|
143
|
+
renderVideo(videoConfig: VideoConfig): Promise<void>;
|
|
139
144
|
/**
|
|
140
145
|
* 容器对象
|
|
141
146
|
* @type {HTMLElement}
|
|
@@ -176,6 +181,18 @@ export class Engine {
|
|
|
176
181
|
* 物体选择器
|
|
177
182
|
*/
|
|
178
183
|
get selection(): EngineSelection;
|
|
184
|
+
/**
|
|
185
|
+
* 时钟对象,用于模拟时间
|
|
186
|
+
*/
|
|
187
|
+
get clock(): EngineClock;
|
|
188
|
+
/**
|
|
189
|
+
* 键鼠交互控制器对象
|
|
190
|
+
*/
|
|
191
|
+
get controller(): EngineController;
|
|
192
|
+
/**
|
|
193
|
+
* 引擎实例唯一ID
|
|
194
|
+
*/
|
|
195
|
+
get id(): number;
|
|
179
196
|
/**
|
|
180
197
|
* 释放全部资源,之后引擎实例不再可用
|
|
181
198
|
*/
|
|
@@ -191,3 +208,5 @@ import { EngineMap } from './engine/Map';
|
|
|
191
208
|
import { EngineRendering } from './engine/Rendering';
|
|
192
209
|
import { EngineSelection } from './engine/Selection';
|
|
193
210
|
import { EngineWidgets } from './engine/Widgets';
|
|
211
|
+
import { EngineClock } from './engine/Clock';
|
|
212
|
+
import { EngineController } from './engine/Controller';
|