@baidumap/mapv-three 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/textures/cloud/stbn.bin +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-f7fcc351.js} +915 -865
- package/dist/assets/workers/{CesiumTerrainParser.worker-20119751.js → CesiumTerrainParser.worker-fcae0cc9.js} +1081 -998
- package/dist/assets/workers/{MVTParser.worker-7dc8b0e4.js → MVTParser.worker-0dd27c39.js} +746 -685
- package/dist/devtool/panel.js +99 -29
- package/dist/mapvthree.module.js +26026 -44996
- package/dist/mapvthree.umd.js +13 -7
- package/dist/types/Internal.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.open.d.ts +4 -0
- package/dist/types/threejs/controls/PointerLockControls.d.ts +2 -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/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/objects/GeoInstancedMesh.d.ts +1 -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 +5 -1
- 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/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 +6 -0
- package/dist/types/threemap/animations/ObjectTracker.d.ts +82 -43
- package/dist/types/threemap/animations/ObjectTracker_deprecated.d.ts +56 -0
- package/dist/types/threemap/animations/PathTracker.d.ts +92 -29
- package/dist/types/threemap/animations/RotateTracker.d.ts +123 -0
- package/dist/types/threemap/animations/TrackerAbstract.d.ts +26 -8
- 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/Map.d.ts +20 -2
- package/dist/types/threemap/engine/Rendering.d.ts +15 -0
- package/dist/types/threemap/engine/rendering/Label.d.ts +2 -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 +29 -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/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/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 +15 -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 +31 -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/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/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
package/dist/devtool/panel.js
CHANGED
|
@@ -18,6 +18,71 @@ function updateUrlParam(paramName, paramValue) {
|
|
|
18
18
|
const newUrl = `${url.pathname}${newSearch ? '?' + newSearch : ''}${url.hash}`;
|
|
19
19
|
window.location.href = newUrl;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 给 dat.gui 的 controller 增加日期时间选择功能
|
|
24
|
+
* @param {dat.GUI} gui dat.gui 实例
|
|
25
|
+
* @param {object} obj 存放数据的对象
|
|
26
|
+
* @param {string} prop 对象的属性名(必须是 Date 类型)
|
|
27
|
+
* @returns {dat.controllers.Controller}
|
|
28
|
+
*/
|
|
29
|
+
function addDateTimeController(gui, obj, prop, listen = false) {
|
|
30
|
+
// 初始化时把 Date 转换成 HTML input 能识别的字符串
|
|
31
|
+
const toInputValue = date => {
|
|
32
|
+
if (!(date instanceof Date)) {
|
|
33
|
+
return '';
|
|
34
|
+
}
|
|
35
|
+
const pad = n => String(n).padStart(2, '0');
|
|
36
|
+
return (
|
|
37
|
+
date.getFullYear()
|
|
38
|
+
+ '-' + pad(date.getMonth() + 1)
|
|
39
|
+
+ '-' + pad(date.getDate())
|
|
40
|
+
+ 'T' + pad(date.getHours())
|
|
41
|
+
+ ':' + pad(date.getMinutes())
|
|
42
|
+
+ ':' + pad(date.getSeconds())
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const fromInputValue = value =>
|
|
47
|
+
new Date(value);
|
|
48
|
+
|
|
49
|
+
// 如果属性值不是 Date,先转成 Date
|
|
50
|
+
if (!(obj[prop] instanceof Date)) {
|
|
51
|
+
obj[prop] = new Date(obj[prop]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 临时存成字符串以便 dat.gui 渲染
|
|
55
|
+
const proxy = {value: toInputValue(obj[prop])};
|
|
56
|
+
|
|
57
|
+
const controller = gui.add(proxy, 'value').name(prop);
|
|
58
|
+
|
|
59
|
+
// 转换 input 类型
|
|
60
|
+
const input = controller.domElement.querySelector('input');
|
|
61
|
+
input.setAttribute('type', 'datetime-local');
|
|
62
|
+
|
|
63
|
+
// 当用户修改 input 时,更新原始对象为 Date
|
|
64
|
+
input.addEventListener('change', e => {
|
|
65
|
+
obj[prop] = fromInputValue(e.target.value);
|
|
66
|
+
console.log(`[dat.gui datetime] ${prop} =`, obj[prop]);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// 当外部代码修改 Date 时,刷新 dat.gui 控件
|
|
70
|
+
controller.onChange(val => {
|
|
71
|
+
obj[prop] = fromInputValue(val);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// 外部修改 obj[prop] → 反映到 dat.gui
|
|
75
|
+
if (listen) {
|
|
76
|
+
controller.listen();
|
|
77
|
+
}
|
|
78
|
+
controller.updateDisplay = function () {
|
|
79
|
+
proxy.value = toInputValue(obj[prop]);
|
|
80
|
+
input.value = proxy.value; // 更新 input 显示
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return controller;
|
|
84
|
+
}
|
|
85
|
+
|
|
21
86
|
export const createEngineConfigs = (gui, engine) => {
|
|
22
87
|
const requestRender = () => engine.requestRender();
|
|
23
88
|
const rendering = engine.rendering;
|
|
@@ -52,6 +117,8 @@ export const createEngineConfigs = (gui, engine) => {
|
|
|
52
117
|
THREE.ReinhardToneMapping,
|
|
53
118
|
THREE.CineonToneMapping,
|
|
54
119
|
THREE.ACESFilmicToneMapping,
|
|
120
|
+
THREE.AgXToneMapping,
|
|
121
|
+
THREE.NeutralToneMapping,
|
|
55
122
|
]).listen().onChange(v => {
|
|
56
123
|
rendering.renderer.toneMapping = parseInt(v, 10);
|
|
57
124
|
});
|
|
@@ -62,6 +129,18 @@ export const createEngineConfigs = (gui, engine) => {
|
|
|
62
129
|
folderAnimation.add(rendering, 'enableAnimationLoop').onChange(requestRender);
|
|
63
130
|
folderAnimation.add(rendering, 'animationLoopFrameTime', 16, 1000).onChange(requestRender);
|
|
64
131
|
|
|
132
|
+
const folderClock = folderRendering.addFolder('clock');
|
|
133
|
+
folderClock.add(engine.clock, 'tickMode', [0, 1, 2, 3]).onChange(v => {
|
|
134
|
+
engine.clock.tickMode = parseInt(v, 10);
|
|
135
|
+
requestRender();
|
|
136
|
+
});
|
|
137
|
+
addDateTimeController(folderClock, engine.clock, 'startTime');
|
|
138
|
+
addDateTimeController(folderClock, engine.clock, 'stopTime');
|
|
139
|
+
folderClock.add(engine.clock, 'speed').onChange(requestRender);
|
|
140
|
+
folderClock.add(engine.clock, 'timeZoneOffset', -12, 12).onChange(requestRender);
|
|
141
|
+
addDateTimeController(folderClock, engine.clock, 'currentTime');
|
|
142
|
+
addDateTimeController(folderClock, engine.clock, 'currentTime', true).name('displayTime');
|
|
143
|
+
|
|
65
144
|
const folderFeatures = folderRendering.addFolder('features');
|
|
66
145
|
|
|
67
146
|
const folderAntialias = folderFeatures.addFolder('antialias');
|
|
@@ -110,6 +189,7 @@ export const createEngineConfigs = (gui, engine) => {
|
|
|
110
189
|
|
|
111
190
|
const folderMap = folderRendering.addFolder('map');
|
|
112
191
|
const map = engine.map;
|
|
192
|
+
folderMap.add(map.map, 'fov', 0, 180).onChange(requestRender);
|
|
113
193
|
if (map.map.isBlankMap) {
|
|
114
194
|
folderMap.add(map.map, 'far').onChange(requestRender);
|
|
115
195
|
|
|
@@ -165,42 +245,31 @@ export const createSkyConfigs = (gui, engine) => {
|
|
|
165
245
|
}
|
|
166
246
|
const folderSky = gui.addFolder('sky');
|
|
167
247
|
folderSky.add(sky, 'time', 0, 86400).onChange(requestRender);
|
|
168
|
-
folderSky.add(sky, 'timeAnimation').onChange(requestRender);
|
|
169
|
-
folderSky.add(sky, 'timeAnimationSpeed', 0.1, 20).onChange(requestRender);
|
|
170
248
|
folderSky.add(sky, 'sunLightIntensity', 0.0, 10.0, 0.1).listen().onChange(requestRender);
|
|
171
249
|
folderSky.add(sky, 'skyLightIntensity', 0.0, 10.0).listen().onChange(requestRender);
|
|
172
250
|
folderSky.add(sky, 'envLightIntensity').onChange(requestRender);
|
|
173
251
|
folderSky.add(sky, 'affectWorld').onChange(requestRender);
|
|
174
252
|
|
|
253
|
+
if (sky instanceof mapvthree.PhysicalSky || sky instanceof mapvthree.DynamicSky) {
|
|
254
|
+
folderSky.add(sky, 'enableAtmospherePass').onChange(requestRender);
|
|
255
|
+
folderSky.add(sky, 'enableCloudsPass').onChange(requestRender);
|
|
256
|
+
folderSky.add(sky, 'cloudsCoverage', 0, 1, 0.01).onChange(requestRender);
|
|
257
|
+
folderSky.add(sky, 'cloudsSpeed', 0, 100., 0.1).onChange(requestRender);
|
|
258
|
+
folderSky.add(sky, 'cloudsBaseHeight', 0, 10000, 100).onChange(requestRender);
|
|
259
|
+
}
|
|
175
260
|
if (sky instanceof mapvthree.DynamicSky) {
|
|
176
261
|
// folderSky.add(sky, 'shaderIndex', [
|
|
177
262
|
// 0, 1, 2, 3,
|
|
178
263
|
// ]).onChange(requestRender);
|
|
179
264
|
folderSky.add(sky, 'clipUnderground').onChange(requestRender);
|
|
180
|
-
// folderSky.addColor(config, 'groundColor').onChange(value => {
|
|
181
|
-
// sky.groundColor = new THREE.Color(value);
|
|
182
|
-
// requestRender();
|
|
183
|
-
// });
|
|
184
|
-
// folderSky.add(sky, 'cloudIntensity', 0, 1.0).onChange(requestRender);
|
|
185
|
-
// folderSky.add(sky, 'rayleighFactor').onChange(requestRender);
|
|
186
|
-
// folderSky.add(sky, 'mieFactor').onChange(requestRender);
|
|
187
|
-
// folderSky.add(sky, 'miePhase').onChange(requestRender);
|
|
188
|
-
// folderSky.add(sky, 'dynamicCloud').onChange(requestRender);
|
|
189
|
-
folderSky.add(sky, 'enablePostPass').onChange(requestRender);
|
|
190
|
-
folderSky.add(sky, 'enableVolumetricClouds').onChange(requestRender);
|
|
191
|
-
folderSky.add(sky, 'useVolumetricClouds').onChange(requestRender);
|
|
192
|
-
folderSky.add(sky, 'cloudCoverage', 0, 1, 0.01).onChange(requestRender);
|
|
193
265
|
folderSky.add(sky, 'cloudDensity', 0, 1).onChange(requestRender);
|
|
194
|
-
folderSky.add(sky, 'cloudSpeed', 0, 100., 0.1).onChange(requestRender);
|
|
195
266
|
folderSky.add(sky, 'cloudShapeBaseScale').onChange(requestRender);
|
|
196
267
|
folderSky.add(sky, 'cloudShapeDetailScale').onChange(requestRender);
|
|
197
268
|
folderSky.add(sky, 'cloudMarchSteps').onChange(requestRender);
|
|
198
269
|
folderSky.add(sky, 'cloudSelfShadowSteps').onChange(requestRender);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
// ]).onChange(requestRender);
|
|
203
|
-
// folderSky.add(sky, 'updateStaticEnvMap').onChange(requestRender);
|
|
270
|
+
}
|
|
271
|
+
else if (sky instanceof mapvthree.PhysicalSky) {
|
|
272
|
+
folderSky.add(sky, 'enableCloudsShadow').onChange(requestRender);
|
|
204
273
|
}
|
|
205
274
|
};
|
|
206
275
|
|
|
@@ -219,16 +288,18 @@ export const createWeatherConfigs = (gui, engine) => {
|
|
|
219
288
|
'overcast',
|
|
220
289
|
'foggy',
|
|
221
290
|
'rainy',
|
|
291
|
+
'stormy',
|
|
222
292
|
'snowy',
|
|
293
|
+
'thunderstorm',
|
|
223
294
|
]).onChange(requestRender);
|
|
224
295
|
|
|
225
|
-
if (weather._sky.isDynamicSky || weather._sky.isDynamicSky) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
296
|
+
// if (weather._sky.isDynamicSky || weather._sky.isDynamicSky) {
|
|
297
|
+
// folderWeather.add(weather, 'cloudIntensity', 0.0, 3.0).listen().onChange(requestRender);
|
|
298
|
+
// folderWeather.add(weather, 'mixGrayFactor', 0.0, 1.0).listen().onChange(requestRender);
|
|
299
|
+
// // folderWeather.add(weather, 'sunIntensityScale', 0.0, 2.0).listen().onChange(requestRender);
|
|
300
|
+
// folderWeather.add(weather, 'skyLightIntensity', 0.0, 2.0).listen().onChange(requestRender);
|
|
301
|
+
// folderWeather.add(weather, 'coverageIntensity', 0.0, 2.0).listen().onChange(requestRender);
|
|
302
|
+
// }
|
|
232
303
|
};
|
|
233
304
|
|
|
234
305
|
export const createCesium3DTilesConfigs = (gui, engine, tiles, name) => {
|
|
@@ -519,7 +590,6 @@ export const createMapViewConfigs = (gui, engine, mapView) => {
|
|
|
519
590
|
if (surface.isMapVectorSurface) {
|
|
520
591
|
const vectorSurface = surface;
|
|
521
592
|
const vectorSurfaceFolder = surfaceFolder.addFolder('VectorSurface');
|
|
522
|
-
|
|
523
593
|
}
|
|
524
594
|
else if (surface.isMapRasterSurface) {
|
|
525
595
|
const rasterSurface = surface;
|