cesium-to-three 0.1.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/README.md +226 -0
- package/dist/arrow.js +523 -0
- package/dist/arrow.js.map +1 -0
- package/dist/ground.js +34 -0
- package/dist/ground.js.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/text-primitive-Ci0sbuh1.js +60066 -0
- package/dist/text-primitive-Ci0sbuh1.js.map +1 -0
- package/dist/types/cesium-three-ground.d.ts +2 -0
- package/dist/types/cesium-three-ground.d.ts.map +1 -0
- package/dist/types/lib/arrow/arrow-curves.d.ts +73 -0
- package/dist/types/lib/arrow/arrow-curves.d.ts.map +1 -0
- package/dist/types/lib/arrow/arrow-geometry.d.ts +140 -0
- package/dist/types/lib/arrow/arrow-geometry.d.ts.map +1 -0
- package/dist/types/lib/arrow/arrow-polygon.d.ts +87 -0
- package/dist/types/lib/arrow/arrow-polygon.d.ts.map +1 -0
- package/dist/types/lib/arrow/arrow-types.d.ts +152 -0
- package/dist/types/lib/arrow/arrow-types.d.ts.map +1 -0
- package/dist/types/lib/arrow/index.d.ts +8 -0
- package/dist/types/lib/arrow/index.d.ts.map +1 -0
- package/dist/types/lib/arrow/shapes/assault-direction-arrow.d.ts +20 -0
- package/dist/types/lib/arrow/shapes/assault-direction-arrow.d.ts.map +1 -0
- package/dist/types/lib/arrow/shapes/attack-arrow.d.ts +56 -0
- package/dist/types/lib/arrow/shapes/attack-arrow.d.ts.map +1 -0
- package/dist/types/lib/arrow/shapes/curved-arrow.d.ts +10 -0
- package/dist/types/lib/arrow/shapes/curved-arrow.d.ts.map +1 -0
- package/dist/types/lib/arrow/shapes/fine-arrow.d.ts +23 -0
- package/dist/types/lib/arrow/shapes/fine-arrow.d.ts.map +1 -0
- package/dist/types/lib/arrow/shapes/swallowtail-attack-arrow.d.ts +12 -0
- package/dist/types/lib/arrow/shapes/swallowtail-attack-arrow.d.ts.map +1 -0
- package/dist/types/lib/ground/cesium-ground-adapter.d.ts +9 -0
- package/dist/types/lib/ground/cesium-ground-adapter.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-construct-extruded.d.ts +62 -0
- package/dist/types/lib/ground/circle/circle-construct-extruded.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-extents.d.ts +23 -0
- package/dist/types/lib/ground/circle/circle-extents.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-options.d.ts +59 -0
- package/dist/types/lib/ground/circle/circle-options.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-positions.d.ts +56 -0
- package/dist/types/lib/ground/circle/circle-positions.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-shadow-volume.d.ts +24 -0
- package/dist/types/lib/ground/circle/circle-shadow-volume.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-top-bottom.d.ts +70 -0
- package/dist/types/lib/ground/circle/circle-top-bottom.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-top-indices.d.ts +28 -0
- package/dist/types/lib/ground/circle/circle-top-indices.d.ts.map +1 -0
- package/dist/types/lib/ground/circle/circle-wall-construction.d.ts +75 -0
- package/dist/types/lib/ground/circle/circle-wall-construction.d.ts.map +1 -0
- package/dist/types/lib/ground/classification.d.ts +124 -0
- package/dist/types/lib/ground/classification.d.ts.map +1 -0
- package/dist/types/lib/ground/constants.d.ts +26 -0
- package/dist/types/lib/ground/constants.d.ts.map +1 -0
- package/dist/types/lib/ground/depth.d.ts +63 -0
- package/dist/types/lib/ground/depth.d.ts.map +1 -0
- package/dist/types/lib/ground/geometry.d.ts +12 -0
- package/dist/types/lib/ground/geometry.d.ts.map +1 -0
- package/dist/types/lib/ground/index.d.ts +6 -0
- package/dist/types/lib/ground/index.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-arrowhead.d.ts +67 -0
- package/dist/types/lib/ground/line/line-arrowhead.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-densify.d.ts +35 -0
- package/dist/types/lib/ground/line/line-densify.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-geometry-normals.d.ts +49 -0
- package/dist/types/lib/ground/line/line-geometry-normals.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-options.d.ts +54 -0
- package/dist/types/lib/ground/line/line-options.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-preprocess.d.ts +12 -0
- package/dist/types/lib/ground/line/line-preprocess.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-segment-attributes.d.ts +24 -0
- package/dist/types/lib/ground/line/line-segment-attributes.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-shadow-volume.d.ts +25 -0
- package/dist/types/lib/ground/line/line-shadow-volume.d.ts.map +1 -0
- package/dist/types/lib/ground/line/line-types.d.ts +74 -0
- package/dist/types/lib/ground/line/line-types.d.ts.map +1 -0
- package/dist/types/lib/ground/materials.d.ts +69 -0
- package/dist/types/lib/ground/materials.d.ts.map +1 -0
- package/dist/types/lib/ground/math/cartographic.d.ts +27 -0
- package/dist/types/lib/ground/math/cartographic.d.ts.map +1 -0
- package/dist/types/lib/ground/math/constants.d.ts +20 -0
- package/dist/types/lib/ground/math/constants.d.ts.map +1 -0
- package/dist/types/lib/ground/math/ellipsoid-geodesic.d.ts +93 -0
- package/dist/types/lib/ground/math/ellipsoid-geodesic.d.ts.map +1 -0
- package/dist/types/lib/ground/math/ellipsoid-rhumb-line.d.ts +45 -0
- package/dist/types/lib/ground/math/ellipsoid-rhumb-line.d.ts.map +1 -0
- package/dist/types/lib/ground/math/ellipsoid.d.ts +94 -0
- package/dist/types/lib/ground/math/ellipsoid.d.ts.map +1 -0
- package/dist/types/lib/ground/math/enu-frame.d.ts +27 -0
- package/dist/types/lib/ground/math/enu-frame.d.ts.map +1 -0
- package/dist/types/lib/ground/math/matrix4-helpers.d.ts +20 -0
- package/dist/types/lib/ground/math/matrix4-helpers.d.ts.map +1 -0
- package/dist/types/lib/ground/math/rte-encoding.d.ts +51 -0
- package/dist/types/lib/ground/math/rte-encoding.d.ts.map +1 -0
- package/dist/types/lib/ground/math/vec3-helpers.d.ts +50 -0
- package/dist/types/lib/ground/math/vec3-helpers.d.ts.map +1 -0
- package/dist/types/lib/ground/math/wgs84-helpers.d.ts +22 -0
- package/dist/types/lib/ground/math/wgs84-helpers.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/ellipsoid-tangent-plane.d.ts +71 -0
- package/dist/types/lib/ground/polygon/ellipsoid-tangent-plane.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-cap-construction.d.ts +59 -0
- package/dist/types/lib/ground/polygon/polygon-cap-construction.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-construct-extruded.d.ts +44 -0
- package/dist/types/lib/ground/polygon/polygon-construct-extruded.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-extents.d.ts +24 -0
- package/dist/types/lib/ground/polygon/polygon-extents.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-helpers.d.ts +76 -0
- package/dist/types/lib/ground/polygon/polygon-helpers.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-hierarchy.d.ts +60 -0
- package/dist/types/lib/ground/polygon/polygon-hierarchy.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-offset.d.ts +15 -0
- package/dist/types/lib/ground/polygon/polygon-offset.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-options.d.ts +41 -0
- package/dist/types/lib/ground/polygon/polygon-options.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-rectangle.d.ts +30 -0
- package/dist/types/lib/ground/polygon/polygon-rectangle.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-rings.d.ts +64 -0
- package/dist/types/lib/ground/polygon/polygon-rings.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-shadow-volume.d.ts +39 -0
- package/dist/types/lib/ground/polygon/polygon-shadow-volume.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-style-points.d.ts +29 -0
- package/dist/types/lib/ground/polygon/polygon-style-points.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-subdivide-line.d.ts +93 -0
- package/dist/types/lib/ground/polygon/polygon-subdivide-line.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-subdivide-triangle.d.ts +53 -0
- package/dist/types/lib/ground/polygon/polygon-subdivide-triangle.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/polygon-wall-construction.d.ts +77 -0
- package/dist/types/lib/ground/polygon/polygon-wall-construction.d.ts.map +1 -0
- package/dist/types/lib/ground/polygon/triangulation.d.ts +40 -0
- package/dist/types/lib/ground/polygon/triangulation.d.ts.map +1 -0
- package/dist/types/lib/ground/primitives.d.ts +262 -0
- package/dist/types/lib/ground/primitives.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-attributes.d.ts +29 -0
- package/dist/types/lib/ground/rectangle/rectangle-attributes.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-construct-cap.d.ts +53 -0
- package/dist/types/lib/ground/rectangle/rectangle-construct-cap.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-construct-extruded.d.ts +35 -0
- package/dist/types/lib/ground/rectangle/rectangle-construct-extruded.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-debug.d.ts +22 -0
- package/dist/types/lib/ground/rectangle/rectangle-debug.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-extents.d.ts +33 -0
- package/dist/types/lib/ground/rectangle/rectangle-extents.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-grid.d.ts +76 -0
- package/dist/types/lib/ground/rectangle/rectangle-grid.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-helpers.d.ts +103 -0
- package/dist/types/lib/ground/rectangle/rectangle-helpers.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-options.d.ts +21 -0
- package/dist/types/lib/ground/rectangle/rectangle-options.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-radians.d.ts +51 -0
- package/dist/types/lib/ground/rectangle/rectangle-radians.d.ts.map +1 -0
- package/dist/types/lib/ground/rectangle/rectangle-shadow-volume.d.ts +28 -0
- package/dist/types/lib/ground/rectangle/rectangle-shadow-volume.d.ts.map +1 -0
- package/dist/types/lib/ground/terrain-heights.d.ts +65 -0
- package/dist/types/lib/ground/terrain-heights.d.ts.map +1 -0
- package/dist/types/lib/ground/terrain-log-depth.d.ts +32 -0
- package/dist/types/lib/ground/terrain-log-depth.d.ts.map +1 -0
- package/dist/types/lib/ground/text/index.d.ts +7 -0
- package/dist/types/lib/ground/text/index.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-canvas.d.ts +22 -0
- package/dist/types/lib/ground/text/text-canvas.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-color.d.ts +28 -0
- package/dist/types/lib/ground/text/text-color.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-construct-extruded.d.ts +27 -0
- package/dist/types/lib/ground/text/text-construct-extruded.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-defaults.d.ts +12 -0
- package/dist/types/lib/ground/text/text-defaults.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-extents.d.ts +19 -0
- package/dist/types/lib/ground/text/text-extents.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-layout.d.ts +18 -0
- package/dist/types/lib/ground/text/text-layout.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-options.d.ts +26 -0
- package/dist/types/lib/ground/text/text-options.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-placement.d.ts +34 -0
- package/dist/types/lib/ground/text/text-placement.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-primitive.d.ts +74 -0
- package/dist/types/lib/ground/text/text-primitive.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-shadow-volume.d.ts +21 -0
- package/dist/types/lib/ground/text/text-shadow-volume.d.ts.map +1 -0
- package/dist/types/lib/ground/text/text-types.d.ts +156 -0
- package/dist/types/lib/ground/text/text-types.d.ts.map +1 -0
- package/dist/types/lib/ground/types.d.ts +484 -0
- package/dist/types/lib/ground/types.d.ts.map +1 -0
- package/dist/types/lib/ground/validation.d.ts +8 -0
- package/dist/types/lib/ground/validation.d.ts.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Mesh, Object3D, Scene, WebGLRenderTarget, WebGLRenderer, type PerspectiveCamera } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 渲染 Cesium 风格的 packed globe depth 纹理。
|
|
4
|
+
*/
|
|
5
|
+
export declare class CesiumGlobeDepth {
|
|
6
|
+
readonly scene: Scene;
|
|
7
|
+
readonly target: WebGLRenderTarget;
|
|
8
|
+
private readonly packDepthMaterial;
|
|
9
|
+
constructor(width: number, height: number);
|
|
10
|
+
/**
|
|
11
|
+
* 添加一个只写入 packed depth 纹理的网格。
|
|
12
|
+
*
|
|
13
|
+
* @param mesh 为 globe depth 提供几何深度的网格。
|
|
14
|
+
*/
|
|
15
|
+
addDepthMesh(mesh: Mesh): void;
|
|
16
|
+
/**
|
|
17
|
+
* 把任意对象树加入此深度通道的私有场景。
|
|
18
|
+
*
|
|
19
|
+
* @param object 为 globe depth 提供网格深度的对象树。
|
|
20
|
+
*/
|
|
21
|
+
addDepthObject(object: Object3D): void;
|
|
22
|
+
/**
|
|
23
|
+
* 将 packed depth 渲染到本通道的渲染目标。
|
|
24
|
+
*
|
|
25
|
+
* @param renderer 当前 Three 渲染器。
|
|
26
|
+
* @param camera 当前相机。pack-depth 材质需要它逐帧写入 Cesium 兼容的 LOG_DEPTH。
|
|
27
|
+
* @param sourceScene 可选外部场景,用于 3d-tiles-renderer 内容。
|
|
28
|
+
* @param depthRoot 渲染 sourceScene 时需要单独保留的可选根对象。
|
|
29
|
+
*/
|
|
30
|
+
render(renderer: WebGLRenderer, camera: PerspectiveCamera, sourceScene?: Scene, depthRoot?: Object3D): void;
|
|
31
|
+
/**
|
|
32
|
+
* 调整 packed depth 帧缓冲尺寸。
|
|
33
|
+
*
|
|
34
|
+
* @param width 绘制缓冲宽度。
|
|
35
|
+
* @param height 绘制缓冲高度。
|
|
36
|
+
*/
|
|
37
|
+
resize(width: number, height: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* 释放本通道持有的 GPU 资源。
|
|
40
|
+
*/
|
|
41
|
+
dispose(): void;
|
|
42
|
+
/**
|
|
43
|
+
* 刷新 pack-depth 着色器的 log-depth uniform,使其匹配当前相机 near/far。
|
|
44
|
+
* 等价于 Cesium UniformState.update 对 `czm_currentFrustum`、
|
|
45
|
+
* `czm_farDepthFromNearPlusOne` 和 `czm_oneOverLog2FarDepthFromNearPlusOne`
|
|
46
|
+
* 的更新。
|
|
47
|
+
*
|
|
48
|
+
* @param camera 当前透视相机。
|
|
49
|
+
*/
|
|
50
|
+
private updateLogDepthUniforms;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 创建 CesiumGlobeDepth 和主帧缓冲深度预通道使用的椭球深度网格。
|
|
54
|
+
*
|
|
55
|
+
* @param widthSegments 水平方向分段数。
|
|
56
|
+
* @param heightSegments 垂直方向分段数。
|
|
57
|
+
* @returns 主场景深度网格与 packed-depth 通道网格。
|
|
58
|
+
*/
|
|
59
|
+
export declare function createCesiumEllipsoidDepthMeshes(widthSegments?: number, heightSegments?: number): {
|
|
60
|
+
mainDepthMesh: Mesh;
|
|
61
|
+
packedDepthMesh: Mesh;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=depth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../src/lib/ground/depth.ts"],"names":[],"mappings":"AASA,OAAO,EAEN,IAAI,EAEJ,QAAQ,EAGR,KAAK,EAIL,iBAAiB,EACjB,aAAa,EAEb,KAAK,iBAAiB,EACtB,MAAM,OAAO,CAAC;AASf;;GAEG;AACH,qBAAa,gBAAgB;IAC5B,SAAgB,KAAK,EAAE,KAAK,CAAC;IAC7B,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAE1C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;gBAElC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAcjD;;;;OAIG;IACI,YAAY,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI;IAKvC;;;;OAIG;IACI,cAAc,CAAE,MAAM,EAAE,QAAQ,GAAI,IAAI;IAI/C;;;;;;;OAOG;IACI,MAAM,CACZ,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,iBAAiB,EACzB,WAAW,GAAE,KAAkB,EAC/B,SAAS,CAAC,EAAE,QAAQ,GAClB,IAAI;IA0CP;;;;;OAKG;IACI,MAAM,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,IAAI;IAIpD;;OAEG;IACI,OAAO,IAAI,IAAI;IAKtB;;;;;;;OAOG;IACH,OAAO,CAAC,sBAAsB;CAkB9B;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC/C,aAAa,SAAM,EACnB,cAAc,SAAK,GACjB;IAAE,aAAa,EAAE,IAAI,CAAC;IAAC,eAAe,EAAE,IAAI,CAAA;CAAE,CA0ChD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Vector3 } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 使用 Cesium 相同的定点拆分方式编码 Three 向量。
|
|
4
|
+
*
|
|
5
|
+
* 保留在本模块中,方便 classification.ts 沿用原导入路径。
|
|
6
|
+
*
|
|
7
|
+
* @param source ECEF / 模型坐标向量。
|
|
8
|
+
* @param high 输出 high 向量。
|
|
9
|
+
* @param low 输出 low 向量。
|
|
10
|
+
*/
|
|
11
|
+
export declare function encodeCesiumVector3(source: Vector3, high: Vector3, low: Vector3): void;
|
|
12
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../src/lib/ground/geometry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAsBrC;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAI,IAAI,CAOxF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './cesium-ground-adapter';
|
|
2
|
+
export { CesiumGroundTextPrimitive } from './text';
|
|
3
|
+
export type { PlotTextOptions, PlotTextAlign, PlotTextVerticalAlign, PlotTextAnchorX, PlotTextAnchorY, PlotTextLayoutDirection, PlotTextBoxOverflow, } from './text';
|
|
4
|
+
export { CESIUM_GLOBE_MINIMUM_ALTITUDE, CESIUM_GROUND_NON_PICKABLE_LAYER, LINE_DEFAULT_GRANULARITY, LINE_DEFAULT_RENDER_ORDER, LINE_DEFAULT_WIDTH_PIXELS, MAX_CIRCLE_GRANULARITY_RADIANS, MIN_CIRCLE_GRANULARITY_RADIANS, } from './constants';
|
|
5
|
+
export type { CartesianLike, CesiumClassificationCommandVisibility, CesiumGeometryAttribute, CesiumGeometryResult, CesiumGroundArcType, CesiumGroundArrowMode, CesiumGroundArrowStyle, CesiumGroundCircleOptions, CesiumGroundCirclePrimitiveOptions, CesiumGroundFrameState, CesiumGroundLineWidthMode, CesiumGroundPointOptions, CesiumGroundPointPrimitiveOptions, CesiumGroundPointShape, CesiumGroundPolygonOptions, CesiumGroundPolylineOptions, CesiumGroundRectangleOptions, CesiumGroundRectanglePrimitiveOptions, EastNorthOffsetMeters, EncodedScalar, LonLatPoint, LongitudeLatitude, PlanarBounds, PlanarExtents, PolygonHierarchyDegrees, RectangleDegrees, RectangleMeterSize, RectangleRadians, SharedUniforms, } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ground/index.ts"],"names":[],"mappings":"AAQA,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AACnD,YAAY,EACX,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACN,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,aAAa,EACb,qCAAqC,EACrC,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,kCAAkC,EAClC,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,iCAAiC,EACjC,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,qCAAqC,EACrC,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { BufferGeometry } from 'three';
|
|
2
|
+
import type { DensifiedLine } from './line-types';
|
|
3
|
+
/** 箭头放置模式枚举(内部使用,公开 API 用字符串)。 */
|
|
4
|
+
export declare const ARROW_MODE: {
|
|
5
|
+
/** 不画箭头(默认)。 */
|
|
6
|
+
readonly NONE: 0;
|
|
7
|
+
/** 仅起点端(折线 `points[0]`)画箭头。 */
|
|
8
|
+
readonly LEFT: 1;
|
|
9
|
+
/** 仅终点端(折线 `points[N-1]`)画箭头。 */
|
|
10
|
+
readonly RIGHT: 2;
|
|
11
|
+
/** 两端都画。 */
|
|
12
|
+
readonly BOTH: 3;
|
|
13
|
+
};
|
|
14
|
+
export type ArrowMode = typeof ARROW_MODE[keyof typeof ARROW_MODE];
|
|
15
|
+
/** 箭头样式:实心三角 / 开口雪佛龙。 */
|
|
16
|
+
export type ArrowStyle = 'solid' | 'open';
|
|
17
|
+
/**
|
|
18
|
+
* 端点局部标架(ECEF 三向单位向量 + 尖端 ECEF 位置 + 端点处地形高度窗口)。
|
|
19
|
+
*
|
|
20
|
+
* - `tip` 是端点在椭球面(h=0)的 ECEF 位置。FS 把地形点 `P` 投到这个标架。
|
|
21
|
+
* - `back` 指向线内部(首段正方向 / 末段反方向),构成「沿线长」轴。
|
|
22
|
+
* - `right` 端点处的右法线,构成「横向」轴。
|
|
23
|
+
* - `up` 椭球面法线,配合 VS 把盒子竖直挤成「穿过地表的薄墙」。
|
|
24
|
+
* - `terrainMinHeight` / `terrainMaxHeight` 端点附近的地形高度范围(米)。
|
|
25
|
+
* 箭头盒子在 VS 里 顶 / 底 沿 `up` 推到这两个高度——**必须覆盖实际地形高度**,
|
|
26
|
+
* 否则盒子在 alt=0 的投影与「FS 重建地形点」的屏幕位置错位,箭头表现为
|
|
27
|
+
* 「随缩放变形」「顶部冒出线段」等 alignment 伪影(尼泊尔 5 km 地形是典型场景)。
|
|
28
|
+
*
|
|
29
|
+
* 三个方向向量应正交(`back ⟂ right ⟂ up`),由调用方保证。
|
|
30
|
+
*/
|
|
31
|
+
export interface EndpointFrame {
|
|
32
|
+
tip: [number, number, number];
|
|
33
|
+
back: [number, number, number];
|
|
34
|
+
right: [number, number, number];
|
|
35
|
+
up: [number, number, number];
|
|
36
|
+
terrainMinHeight: number;
|
|
37
|
+
terrainMaxHeight: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 从密集线数据算出 start / end 两端的标架。每端:
|
|
41
|
+
*
|
|
42
|
+
* - `tip = cartographic(lon, lat, h=0)` 反投影到 ECEF(与线 ecStart 同源)。
|
|
43
|
+
* - `back` = 指向相邻内点的方向(首段正方向 / 末段反方向)。
|
|
44
|
+
* - `right` = 端点处密集线给出的几何法线(首末点的 `normals[]`)。
|
|
45
|
+
* - `up` = `geodeticSurfaceNormal(tip)`,与端点切平面正交。
|
|
46
|
+
* - `terrainMinHeight` / `terrainMaxHeight` 端点附近的地形高度窗口。
|
|
47
|
+
*
|
|
48
|
+
* @param wall 加密后的密集线数据(来自 buildWallArrays)。
|
|
49
|
+
* @returns 起 / 终两端的标架。
|
|
50
|
+
* @throws `wall.pointCount < 2` 时抛错(首尾两端没有意义)。
|
|
51
|
+
*/
|
|
52
|
+
export declare function computeEndpointFrames(wall: DensifiedLine): {
|
|
53
|
+
startFrame: EndpointFrame;
|
|
54
|
+
endFrame: EndpointFrame;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 构造箭头几何。每个启用的端 = 一个 8 顶点薄盒(盒尺寸在 VS 里按 metersPerPixel
|
|
58
|
+
* 动态挤出,CPU 端只存「单位标架 + 角点系数」)。
|
|
59
|
+
*
|
|
60
|
+
* @param startFrame 起点端标架(mode === LEFT 或 BOTH 时使用)。
|
|
61
|
+
* @param endFrame 终点端标架(mode === RIGHT 或 BOTH 时使用)。
|
|
62
|
+
* @param mode 箭头模式枚举。
|
|
63
|
+
* @returns 已装好属性 + 索引的 BufferGeometry。无 `position` 属性,
|
|
64
|
+
* 调用方应设 `mesh.frustumCulled = false`。NONE 模式返回空几何。
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildArrowHeadGeometry(startFrame: EndpointFrame, endFrame: EndpointFrame, mode: ArrowMode): BufferGeometry;
|
|
67
|
+
//# sourceMappingURL=line-arrowhead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-arrowhead.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-arrowhead.ts"],"names":[],"mappings":"AAeA,OAAO,EAAmB,cAAc,EAAW,MAAM,OAAO,CAAC;AAiBjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,kCAAkC;AAClC,eAAO,MAAM,UAAU;IACtB,gBAAgB;;IAEhB,+BAA+B;;IAE/B,iCAAiC;;IAEjC,YAAY;;CAEH,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAE,MAAM,OAAO,UAAU,CAAE,CAAC;AAErE,yBAAyB;AACzB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC;IAChC,IAAI,EAAE,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC;IACjC,KAAK,EAAE,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC;IAClC,EAAE,EAAE,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAsFD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,aAAa,GACjB;IAAE,UAAU,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,aAAa,CAAA;CAAE,CAoHxD;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACrC,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,SAAS,GACb,cAAc,CA6DhB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import type { Cartographic } from '../math/cartographic';
|
|
3
|
+
import { ArcType } from './line-types';
|
|
4
|
+
/**
|
|
5
|
+
* 单点 push(端点用,doc 02 §3.3):把一个 cartographic 端点的 bottom / top /
|
|
6
|
+
* 几何法线 / cartographic 追加到四个累加数组。
|
|
7
|
+
*
|
|
8
|
+
* @param carto 端点 cartographic(lon/lat 弧度)。
|
|
9
|
+
* @param normal 已算好的几何法线(vertex miter 或 right normal)。
|
|
10
|
+
* @param minHeight 标准墙下沿高度(构造期统一 0)。
|
|
11
|
+
* @param maxHeight 标准墙上沿高度(构造期统一 1000)。
|
|
12
|
+
* @param normalsArray 追加目标。
|
|
13
|
+
* @param bottomPositionsArray 追加目标。
|
|
14
|
+
* @param topPositionsArray 追加目标。
|
|
15
|
+
* @param cartographicsArray 追加目标(顺序:lat 先 lon 后)。
|
|
16
|
+
*/
|
|
17
|
+
export declare function pushVertex(carto: Cartographic, normal: Vector3, minHeight: number, maxHeight: number, normalsArray: number[], bottomPositionsArray: number[], topPositionsArray: number[], cartographicsArray: number[]): void;
|
|
18
|
+
/**
|
|
19
|
+
* 在 start → end 之间按 granularity 等弧长插入「中间点」(不含 start/end)。
|
|
20
|
+
* 每个中间点的几何法线复用该段端点 right normal(doc 02 §3.1)。
|
|
21
|
+
*
|
|
22
|
+
* @param start 段起点。
|
|
23
|
+
* @param end 段终点。
|
|
24
|
+
* @param minHeight 标准墙下沿高度。
|
|
25
|
+
* @param maxHeight 标准墙上沿高度。
|
|
26
|
+
* @param granularity 加密阈值(弧度),与 surfaceDistance(米)直接比较,
|
|
27
|
+
* 对应 Cesium 的实现细节(不做单位换算)。
|
|
28
|
+
* @param arcType 连线方式。
|
|
29
|
+
* @param normalsArray 追加目标。
|
|
30
|
+
* @param bottomPositionsArray 追加目标。
|
|
31
|
+
* @param topPositionsArray 追加目标。
|
|
32
|
+
* @param cartographicsArray 追加目标。
|
|
33
|
+
*/
|
|
34
|
+
export declare function interpolateSegment(start: Cartographic, end: Cartographic, minHeight: number, maxHeight: number, granularity: number, arcType: ArcType, normalsArray: number[], bottomPositionsArray: number[], topPositionsArray: number[], cartographicsArray: number[]): void;
|
|
35
|
+
//# sourceMappingURL=line-densify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-densify.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-densify.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAiCvC;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,iBAAiB,EAAE,MAAM,EAAE,EAC3B,kBAAkB,EAAE,MAAM,EAAE,GAC1B,IAAI,CAKN;AAyCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EAAE,EACtB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,iBAAiB,EAAE,MAAM,EAAE,EAC3B,kBAAkB,EAAE,MAAM,EAAE,GAC1B,IAAI,CAqCN"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import type { Cartographic } from '../math/cartographic';
|
|
3
|
+
import type { ArcType, DensifiedLine } from './line-types';
|
|
4
|
+
/**
|
|
5
|
+
* 端点(非 loop 首 / 末点)法线:沿该段方向、指向右侧、与 up 正交的单位向量。
|
|
6
|
+
*
|
|
7
|
+
* @param start 段起点 carto。
|
|
8
|
+
* @param end 段终点 carto。
|
|
9
|
+
* @param maxHeight 标准墙上沿高度(用于算 up)。
|
|
10
|
+
* @param out 接收单位法线。
|
|
11
|
+
* @returns out。
|
|
12
|
+
*/
|
|
13
|
+
export declare function computeRightNormal(start: Cartographic, end: Cartographic, maxHeight: number, out: Vector3): Vector3;
|
|
14
|
+
/**
|
|
15
|
+
* 内部顶点的 miter 法线:相邻两段方向的角平分线方向(切平面内)对应的
|
|
16
|
+
* 右法线。dot(toPrev, toNext) ≈ -1(直线穿过)时走特例分支。
|
|
17
|
+
*
|
|
18
|
+
* @param previousBottom 前点 @minHeight。
|
|
19
|
+
* @param vertexBottom 当前点 @minHeight。
|
|
20
|
+
* @param vertexTop 当前点 @maxHeight(用以定义 up)。
|
|
21
|
+
* @param nextBottom 后点 @minHeight。
|
|
22
|
+
* @param out 接收单位法线。
|
|
23
|
+
* @returns out。
|
|
24
|
+
*/
|
|
25
|
+
export declare function computeVertexMiterNormal(previousBottom: Vector3, vertexBottom: Vector3, vertexTop: Vector3, nextBottom: Vector3, out: Vector3): Vector3;
|
|
26
|
+
/**
|
|
27
|
+
* 若当前 endGeometryNormal 与本段方向夹角过小 / 过大(拐角过尖),把它绕
|
|
28
|
+
* vertexUp 旋 ±90° 打断斜接,防止 box 退化或暴长。
|
|
29
|
+
*
|
|
30
|
+
* @param endGeometryNormal 输入并被原地修改。
|
|
31
|
+
* @param startBottom 段起点 @minHeight。
|
|
32
|
+
* @param endBottom 段终点 @minHeight。
|
|
33
|
+
* @param endTop 段终点 @maxHeight。
|
|
34
|
+
* @returns 是否触发打断(供主循环的 miterBroken 状态机用)。
|
|
35
|
+
*/
|
|
36
|
+
export declare function breakMiter(endGeometryNormal: Vector3, startBottom: Vector3, endBottom: Vector3, endTop: Vector3): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 把一组 cartographic 折点构造成「加密 + 法线」后的墙数据。
|
|
39
|
+
*
|
|
40
|
+
* @param cartographics 预处理后的 cartographic 列表(≥ 2 点)。
|
|
41
|
+
* @param loop 是否闭合。
|
|
42
|
+
* @param arcType 连线方式。
|
|
43
|
+
* @param granularity 加密阈值。
|
|
44
|
+
* @param minHeight 标准墙下沿高度(默认 WALL_INITIAL_MIN_HEIGHT=0)。
|
|
45
|
+
* @param maxHeight 标准墙上沿高度(默认 WALL_INITIAL_MAX_HEIGHT=1000)。
|
|
46
|
+
* @returns 加密 + 法线后的密集线数据。
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildWallArrays(cartographics: Cartographic[], loop: boolean, arcType: ArcType, granularity: number, minHeight?: number, maxHeight?: number): DensifiedLine;
|
|
49
|
+
//# sourceMappingURL=line-geometry-normals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-geometry-normals.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-geometry-normals.ts"],"names":[],"mappings":"AAeA,OAAO,EAAc,OAAO,EAAE,MAAM,OAAO,CAAC;AAQ5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKzD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA2D3D;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,OAAO,GACV,OAAO,CAoBT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACvC,cAAc,EAAE,OAAO,EACvB,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,OAAO,EACnB,GAAG,EAAE,OAAO,GACV,OAAO,CAuBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACzB,iBAAiB,EAAE,OAAO,EAC1B,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,OAAO,GACb,OAAO,CAYT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC9B,aAAa,EAAE,YAAY,EAAE,EAC7B,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,MAAgC,EAC3C,SAAS,GAAE,MAAgC,GACzC,aAAa,CA0If"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CesiumGroundArcType, CesiumGroundArrowMode, CesiumGroundArrowStyle, CesiumGroundLineWidthMode, CesiumGroundPolylineOptions, LonLatPoint } from '../types';
|
|
2
|
+
import { type ArrowMode, type ArrowStyle } from './line-arrowhead';
|
|
3
|
+
import { ArcType, LineWidthMode, type LineShadowVolumeOptions } from './line-types';
|
|
4
|
+
/** 解析后的公开选项(含全部已填默认值与字符串→枚举映射)。 */
|
|
5
|
+
export interface ResolvedLineOptions {
|
|
6
|
+
points: LonLatPoint[];
|
|
7
|
+
loop: boolean;
|
|
8
|
+
arcType: ArcType;
|
|
9
|
+
granularityRadians: number;
|
|
10
|
+
minimumHeight: number;
|
|
11
|
+
maximumHeight: number;
|
|
12
|
+
widthMode: LineWidthMode;
|
|
13
|
+
widthPixels: number;
|
|
14
|
+
widthMeters: number;
|
|
15
|
+
renderOrder: number;
|
|
16
|
+
visible: boolean;
|
|
17
|
+
strokeColor: string;
|
|
18
|
+
strokeOpacity: number;
|
|
19
|
+
dashLengthMeters: number;
|
|
20
|
+
gapLengthMeters: number;
|
|
21
|
+
dashEnabled: boolean;
|
|
22
|
+
debugVolume: boolean;
|
|
23
|
+
arrowMode: ArrowMode;
|
|
24
|
+
arrowStyle: ArrowStyle;
|
|
25
|
+
arrowWidthMode: LineWidthMode;
|
|
26
|
+
arrowLengthPixels: number;
|
|
27
|
+
arrowWidthPixels: number;
|
|
28
|
+
arrowLengthMeters: number;
|
|
29
|
+
arrowWidthMeters: number;
|
|
30
|
+
arrowColor: string | undefined;
|
|
31
|
+
arrowOpacity: number | undefined;
|
|
32
|
+
arrowStrokeWidthPixels: number;
|
|
33
|
+
}
|
|
34
|
+
/** 字符串 arcType → 内部枚举。未识别值抛错(绝不静默回退到 geodesic)。 */
|
|
35
|
+
export declare function parseArcType(value: CesiumGroundArcType | undefined): ArcType;
|
|
36
|
+
/** 字符串 widthMode → 内部枚举。 */
|
|
37
|
+
export declare function parseWidthMode(value: CesiumGroundLineWidthMode | undefined): LineWidthMode;
|
|
38
|
+
/** 字符串 arrowMode → 内部枚举。 */
|
|
39
|
+
export declare function parseArrowMode(value: CesiumGroundArrowMode | undefined): ArrowMode;
|
|
40
|
+
/** 字符串 arrowStyle → 内部联合。 */
|
|
41
|
+
export declare function parseArrowStyle(value: CesiumGroundArrowStyle | undefined): ArrowStyle;
|
|
42
|
+
/**
|
|
43
|
+
* 校验 + 默认值。逐字对应 doc 09 §1.1 / §6 与 doc 10 §3。
|
|
44
|
+
*
|
|
45
|
+
* @param options 公开选项。
|
|
46
|
+
* @returns 已解析的内部选项(字段全部填齐,可直接给几何 facade)。
|
|
47
|
+
* @throws Error:违规字段会一次性抛出(详细原因)。
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolvePublicLineOptions(options: CesiumGroundPolylineOptions): ResolvedLineOptions;
|
|
50
|
+
/**
|
|
51
|
+
* 取出几何 facade 需要的 sub-set,避免传递与几何无关的颜色 / dash 字段。
|
|
52
|
+
*/
|
|
53
|
+
export declare function toLineShadowVolumeOptions(resolved: ResolvedLineOptions): LineShadowVolumeOptions;
|
|
54
|
+
//# sourceMappingURL=line-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-options.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-options.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACX,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,WAAW,EACX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEpF,mCAAmC;AACnC,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,aAAa,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,sBAAsB,EAAE,MAAM,CAAC;CAC/B;AAED,mDAAmD;AACnD,wBAAgB,YAAY,CAAE,KAAK,EAAE,mBAAmB,GAAG,SAAS,GAAI,OAAO,CAW9E;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,CAC7B,KAAK,EAAE,yBAAyB,GAAG,SAAS,GAC1C,aAAa,CAQf;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,CAC7B,KAAK,EAAE,qBAAqB,GAAG,SAAS,GACtC,SAAS,CAcX;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,CAC9B,KAAK,EAAE,sBAAsB,GAAG,SAAS,GACvC,UAAU,CAQZ;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,2BAA2B,GAClC,mBAAmB,CAmLrB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,mBAAmB,GAC3B,uBAAuB,CASzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Cartographic } from '../math/cartographic';
|
|
2
|
+
import type { LonLatPoint } from '../types';
|
|
3
|
+
import { ArcType } from './line-types';
|
|
4
|
+
/**
|
|
5
|
+
* 完整预处理流水线:归一 → 拆段 → cartographic 去重。
|
|
6
|
+
*
|
|
7
|
+
* @param points 公开 lon/lat 点(度)。
|
|
8
|
+
* @param arcType 连线类型(影响 §2 拆段的交点求解)。
|
|
9
|
+
* @returns 去重后的 Cartographic 序列,>= 2 个点。
|
|
10
|
+
*/
|
|
11
|
+
export declare function preprocessLine(points: LonLatPoint[], arcType: ArcType): Cartographic[];
|
|
12
|
+
//# sourceMappingURL=line-preprocess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-preprocess.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-preprocess.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAOzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAqMvC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,WAAW,EAAE,EACrB,OAAO,EAAE,OAAO,GACd,YAAY,EAAE,CAQhB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DensifiedLine, SegmentBoxAttributes } from './line-types';
|
|
2
|
+
/**
|
|
3
|
+
* 主装配函数:把密集线 + 法线打包成 8 顶点 box 几何属性。
|
|
4
|
+
*
|
|
5
|
+
* 高度窗口逐字对齐 Cesium `generateGeometryAttributes`:每段查
|
|
6
|
+
* `ApproximateTerrainHeights.getMinimumMaximumHeights( segment 的 lat/lon
|
|
7
|
+
* 外接矩形 )` 得 terrain-tight 的 minHeight / maxHeight,再传 `adjustHeights`。
|
|
8
|
+
*
|
|
9
|
+
* 这是替代 doc 04 §7 的固定 ±55km 方案的关键修复——固定 ±55km 会让 box 顶
|
|
10
|
+
* 远在相机之上(altitude > camera altitude),在透视投影下变成 w<0 顶点,
|
|
11
|
+
* 光栅器对 w<0 三角形按 near plane clipping,盒子的侧面被切碎,FS 不在
|
|
12
|
+
* 那些被切掉的像素跑——线就出现「随相机缩放而闪烁的断线」。terrain-tight
|
|
13
|
+
* 让 box 顶贴近实际地形(典型 100m~5km altitude),任何在地面之上的相机
|
|
14
|
+
* 视角下整盒子都在视锥内,FS 在每像素完整运行,断线消失。
|
|
15
|
+
*
|
|
16
|
+
* @param wall doc 03 buildWallArrays 的产出(含 cartographicsArray,
|
|
17
|
+
* 用于查 ApproximateTerrainHeights)。
|
|
18
|
+
* @param minHeightHint 调用方建议的下限(米)。用作 `min(terrainMin, hint)`
|
|
19
|
+
* 的兜底,防止 terrain table 未初始化时 box 退化。
|
|
20
|
+
* @param maxHeightHint 调用方建议的上限(米)。用作 `max(terrainMax, hint)`。
|
|
21
|
+
* @returns 9 个 Buffer 数据,可直接装入 Three BufferGeometry。
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildSegmentBoxAttributes(wall: DensifiedLine, minHeightHint: number, maxHeightHint: number): SegmentBoxAttributes;
|
|
24
|
+
//# sourceMappingURL=line-segment-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-segment-attributes.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-segment-attributes.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAyIxE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,aAAa,EACnB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACnB,oBAAoB,CAyNtB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BufferGeometry } from 'three';
|
|
2
|
+
import { type EndpointFrame } from './line-arrowhead';
|
|
3
|
+
import type { LineShadowVolumeOptions } from './line-types';
|
|
4
|
+
/**
|
|
5
|
+
* `geometry.userData` 上挂的扩展信息。CesiumGroundPolylinePrimitive 在构造
|
|
6
|
+
* 期读出 `length3D` 写到 `u_lineTotalMeters`(doc 06 §4 虚线相位用)。
|
|
7
|
+
* `startFrame` / `endFrame` 是端点标架,供线端箭头几何 `buildArrowHeadGeometry`
|
|
8
|
+
* 使用——挂在 wall facade 这里避免外部调用方再走一遍 cartographic / 法线
|
|
9
|
+
* 抽取逻辑。
|
|
10
|
+
*/
|
|
11
|
+
export interface LineGeometryUserData {
|
|
12
|
+
length3D: number;
|
|
13
|
+
pointCount: number;
|
|
14
|
+
segmentCount: number;
|
|
15
|
+
startFrame: EndpointFrame;
|
|
16
|
+
endFrame: EndpointFrame;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 构造贴地线 BufferGeometry。一次性、纯 CPU、零 GPU 调用。
|
|
20
|
+
*
|
|
21
|
+
* @param options 内部选项(已校验 + 填默认)。
|
|
22
|
+
* @returns 9-attribute BufferGeometry,`userData.length3D` 含全线长度。
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildLineShadowVolumeGeometry(options: LineShadowVolumeOptions): BufferGeometry;
|
|
25
|
+
//# sourceMappingURL=line-shadow-volume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-shadow-volume.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-shadow-volume.ts"],"names":[],"mappings":"AAcA,OAAO,EAAmB,cAAc,EAAE,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAI7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,uBAAuB,GAC9B,cAAc,CAkEhB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { LonLatPoint } from '../types';
|
|
2
|
+
/** 折线连线方式。对外字符串经 `resolvePublicLineOptions` 映射到枚举。 */
|
|
3
|
+
export declare const ArcType: {
|
|
4
|
+
/** 直连(ECEF 弦),仅当极短或调用方显式要求时用。 */
|
|
5
|
+
readonly NONE: 0;
|
|
6
|
+
/** 大地线(最短路径,Vincenty)。默认。 */
|
|
7
|
+
readonly GEODESIC: 1;
|
|
8
|
+
/** 恒向线(罗盘恒定方位角)。 */
|
|
9
|
+
readonly RHUMB: 2;
|
|
10
|
+
};
|
|
11
|
+
export type ArcType = typeof ArcType[keyof typeof ArcType];
|
|
12
|
+
/** 线宽语义:屏宽(像素恒定)或世界宽(米恒定)。 */
|
|
13
|
+
export declare const LineWidthMode: {
|
|
14
|
+
readonly SCREEN: 0;
|
|
15
|
+
readonly WORLD: 1;
|
|
16
|
+
};
|
|
17
|
+
export type LineWidthMode = typeof LineWidthMode[keyof typeof LineWidthMode];
|
|
18
|
+
/**
|
|
19
|
+
* `buildLineShadowVolumeGeometry` 入参(内部)。`resolvePublicLineOptions`
|
|
20
|
+
* 把公开 `CesiumGroundPolylineOptions` 转成这个形态后传给 facade。
|
|
21
|
+
*/
|
|
22
|
+
export interface LineShadowVolumeOptions {
|
|
23
|
+
/** lon/lat 折点(度),≥ 2 个。 */
|
|
24
|
+
points: LonLatPoint[];
|
|
25
|
+
/** 是否闭合成环。 */
|
|
26
|
+
loop: boolean;
|
|
27
|
+
/** 加密 arc 类型。 */
|
|
28
|
+
arcType: ArcType;
|
|
29
|
+
/** 加密角分辨率(弧度)。 */
|
|
30
|
+
granularity: number;
|
|
31
|
+
/** 高度窗口下限(米)。 */
|
|
32
|
+
minimumHeight: number;
|
|
33
|
+
/** 高度窗口上限(米)。 */
|
|
34
|
+
maximumHeight: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 加密 + 法线后的密集折线数据。每个数组都是「扁平 Float64 / number[]」,
|
|
38
|
+
* 长度对齐为 `pointCount * 3`(normals / bottom / top)或 `pointCount * 2`
|
|
39
|
+
* (cartographics,顺序是 [lat, lon, ...])。
|
|
40
|
+
*
|
|
41
|
+
* 注意:`cartographicsArray` 的「lat 在前 lon 在后」顺序逐字对齐 Cesium,
|
|
42
|
+
* 不能反——doc 04 计算段外接矩形时按这个顺序读取。
|
|
43
|
+
*/
|
|
44
|
+
export interface DensifiedLine {
|
|
45
|
+
/** 每点的几何法线 [nx, ny, nz, ...]。 */
|
|
46
|
+
normalsArray: number[];
|
|
47
|
+
/** 每点在 minHeight 处的 ECEF 位置 [x, y, z, ...]。 */
|
|
48
|
+
bottomPositionsArray: number[];
|
|
49
|
+
/** 每点在 maxHeight 处的 ECEF 位置 [x, y, z, ...]。 */
|
|
50
|
+
topPositionsArray: number[];
|
|
51
|
+
/** 每点 cartographic,顺序 [lat, lon, ...](弧度)。 */
|
|
52
|
+
cartographicsArray: number[];
|
|
53
|
+
/** 是否闭合(与入参 loop 相同;2 点强制 false 在更上层处理)。 */
|
|
54
|
+
loop: boolean;
|
|
55
|
+
/** 加密后的点数 = bottomPositionsArray.length / 3。 */
|
|
56
|
+
pointCount: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 每段 8 顶点 box 装配产出。`positions` 是 box 8 角的 Float64 ECEF,
|
|
60
|
+
* 五个 Float32 vec4 描述符与 batchId / 索引按 doc 04 §9 契约打包。
|
|
61
|
+
*/
|
|
62
|
+
export interface SegmentBoxAttributes {
|
|
63
|
+
vertexCount: number;
|
|
64
|
+
positions: Float64Array;
|
|
65
|
+
startHiFwdX: Float32Array;
|
|
66
|
+
startLoFwdY: Float32Array;
|
|
67
|
+
startNormFwdZ: Float32Array;
|
|
68
|
+
endNormTexX: Float32Array;
|
|
69
|
+
rightNormTexY: Float32Array;
|
|
70
|
+
indices: Uint16Array | Uint32Array;
|
|
71
|
+
/** 全线长度(米)。供 FS 虚线 / 渐变模式作为 `u_lineTotalMeters` 使用。 */
|
|
72
|
+
length3D: number;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=line-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/line/line-types.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,sDAAsD;AACtD,eAAO,MAAM,OAAO;IACnB,iCAAiC;;IAEjC,6BAA6B;;IAE7B,oBAAoB;;CAEX,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAE,MAAM,OAAO,OAAO,CAAE,CAAC;AAE7D,8BAA8B;AAC9B,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAE,MAAM,OAAO,aAAa,CAAE,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACvC,2BAA2B;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,cAAc;IACd,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB;IACjB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC7B,iCAAiC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,+CAA+C;IAC/C,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,YAAY,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;IAC1B,WAAW,EAAE,YAAY,CAAC;IAC1B,aAAa,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAE,YAAY,CAAC;IAC1B,aAAa,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,WAAW,GAAG,WAAW,CAAC;IACnC,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { RawShaderMaterial, type Side, type StencilOp } from 'three';
|
|
2
|
+
import type { SharedUniforms } from './types';
|
|
3
|
+
declare const ENABLE_LOG_DEPTH = true;
|
|
4
|
+
/**
|
|
5
|
+
* 创建深度打包 shader:非 log-depth 模式下用 Cesium czm_packDepth 打包
|
|
6
|
+
* gl_FragCoord.z;启用 LOG_DEPTH 时打包 Cesium 对数深度值。两种情况下结果都
|
|
7
|
+
* 对齐 ShadowVolumeAppearanceFS 中 czm_unpackDepth 的预期,让 color 命令的
|
|
8
|
+
* 片元着色器能通过 czm_screenToEyeCoordinates 正确重建 eye 坐标。
|
|
9
|
+
*
|
|
10
|
+
* @returns globe depth pass 使用的 RawShaderMaterial。
|
|
11
|
+
*/
|
|
12
|
+
export declare function createPackDepthMaterial(): RawShaderMaterial;
|
|
13
|
+
/**
|
|
14
|
+
* 为 Cesium stencil-depth 命令创建一个面向特定面的材质。
|
|
15
|
+
*
|
|
16
|
+
* @param uniforms 所有 classification 命令共享的 uniforms。
|
|
17
|
+
* @param side 与 Cesium front/back 命令匹配的 Three 面选择。
|
|
18
|
+
* @param stencilZFail 深度测试失败时执行的 stencil 操作。
|
|
19
|
+
* @param name 材质调试名称。
|
|
20
|
+
* @returns 匹配 Cesium z-fail 命令半边的 RawShaderMaterial。
|
|
21
|
+
*/
|
|
22
|
+
export declare function createStencilMaterial(uniforms: SharedUniforms, side: Side, stencilZFail: StencilOp, name: string): RawShaderMaterial;
|
|
23
|
+
/**
|
|
24
|
+
* 为 Cesium 最终 color classification 命令创建材质。
|
|
25
|
+
*
|
|
26
|
+
* @param uniforms 所有 classification 命令共享的 uniforms。
|
|
27
|
+
* @param fragmentCull Cesium fragment-culling shader define 是否启用。
|
|
28
|
+
* @returns 匹配 Cesium color pass 渲染状态的 RawShaderMaterial。
|
|
29
|
+
*/
|
|
30
|
+
export declare function createColorMaterial(uniforms: SharedUniforms, fragmentCull: boolean): RawShaderMaterial;
|
|
31
|
+
/**
|
|
32
|
+
* 创建贴地文字 color 材质。渲染状态逐字节匹配 `createColorMaterial`,让
|
|
33
|
+
* front-stencil / back-stencil / color 命令块保持同一 render-order 契约;
|
|
34
|
+
* 唯一差异是 `CESIUM_THREE_TEXT` define 与采样 `u_textTexture` 的片元分支。
|
|
35
|
+
* 调用方应通过共享 `extraUniforms` 路径注入纹理 uniform,从而保持
|
|
36
|
+
* LOG_DEPTH + CPU-plane + Float64-RTE 精度管线不变。
|
|
37
|
+
*
|
|
38
|
+
* @param uniforms 共享 uniforms(必须包含 `u_textTexture` 值)。
|
|
39
|
+
* @param fragmentCull Cesium `CULL_FRAGMENTS` define 是否启用。
|
|
40
|
+
* @returns 文字 color 命令使用的 RawShaderMaterial。
|
|
41
|
+
*/
|
|
42
|
+
export declare function createTextColorMaterial(uniforms: SharedUniforms, fragmentCull: boolean): RawShaderMaterial;
|
|
43
|
+
/**
|
|
44
|
+
* 创建贴地线材质:单 mesh、BackSide、无 stencil、depthTest 关闭、预乘混合。
|
|
45
|
+
* 通过 `CESIUM_THREE_POLYLINE` define 复用 createVertexPrefix /
|
|
46
|
+
* createFragmentPrefix,引入 metersPerPixel 与线 uniform,同时保持 stencil /
|
|
47
|
+
* color 材质输出逐字节一致。
|
|
48
|
+
*
|
|
49
|
+
* @param uniforms 共享 uniforms 映射(必须包含 `czm_projection`,
|
|
50
|
+
* `czm_pixelRatio`, `u_lineWidthPixels`, `u_lineWidthMode`,
|
|
51
|
+
* `u_lineWidthMeters`, dash uniforms, `u_lineTotalMeters`).
|
|
52
|
+
* @param debugVolume When true,FS 用半透红色直接绘制盒子的所有像素(不做
|
|
53
|
+
* terrain depth 重建 / 平面距离裁切),方便诊断「盒子有没有
|
|
54
|
+
* 盖到该屏幕区域」「FS 是不是被裁切掉」这类几何 / 着色器问题。
|
|
55
|
+
* @returns 驱动深度重建线 pass 的 RawShaderMaterial。
|
|
56
|
+
*/
|
|
57
|
+
export declare function createPolylineMaterial(uniforms: SharedUniforms, debugVolume?: boolean): RawShaderMaterial;
|
|
58
|
+
/**
|
|
59
|
+
* 创建线端箭头材质。与线材质字节级相同的渲染状态,只换 shader 主体 + 加
|
|
60
|
+
* `CESIUM_THREE_POLYLINE_ARROW` define 拉出 arrow uniform。
|
|
61
|
+
*
|
|
62
|
+
* @param uniforms 共享 uniforms(与同一 polyline 实例共用)。
|
|
63
|
+
* @param debugVolume 把盒子整体染绿调试用。
|
|
64
|
+
* @param open true → 走开口雪佛龙样式(`ARROW_OPEN`);默认实心三角。
|
|
65
|
+
* @returns RawShaderMaterial。
|
|
66
|
+
*/
|
|
67
|
+
export declare function createArrowHeadMaterial(uniforms: SharedUniforms, debugVolume?: boolean, open?: boolean): RawShaderMaterial;
|
|
68
|
+
export { ENABLE_LOG_DEPTH };
|
|
69
|
+
//# sourceMappingURL=materials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materials.d.ts","sourceRoot":"","sources":["../../../../src/lib/ground/materials.ts"],"names":[],"mappings":"AASA,OAAO,EAUN,iBAAiB,EAGjB,KAAK,IAAI,EACT,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkB9C,QAAA,MAAM,gBAAgB,OAAO,CAAC;AA4X9B;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,CAmF3D;AA6LD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,SAAS,EACvB,IAAI,EAAE,MAAM,GACV,iBAAiB,CA8BnB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,GAAI,iBAAiB,CA6CxG;AAyED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACtC,QAAQ,EAAE,cAAc,EACxB,YAAY,EAAE,OAAO,GACnB,iBAAiB,CA2CnB;AAsSD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,cAAc,EACxB,WAAW,UAAQ,GACjB,iBAAiB,CAmCnB;AA0MD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACtC,QAAQ,EAAE,cAAc,EACxB,WAAW,UAAQ,EACnB,IAAI,UAAQ,GACV,iBAAiB,CAgCnB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGS84 地理坐标三元组,经纬度以弧度表示,高度以米表示。
|
|
3
|
+
*
|
|
4
|
+
* 与 Cesium `Cartographic` 字段名 / 字段顺序完全一致,以便外部代码
|
|
5
|
+
* 1:1 迁移。本类型故意不带 prototype 方法,所有操作放在自由函数中,
|
|
6
|
+
* 便于 scratch 复用与 tree-shaking。
|
|
7
|
+
*/
|
|
8
|
+
export interface Cartographic {
|
|
9
|
+
/** 经度,弧度(范围 [-π, π],跨 IDL 时需调用方自行规整) */
|
|
10
|
+
longitude: number;
|
|
11
|
+
/** 纬度,弧度(范围 [-π/2, π/2]) */
|
|
12
|
+
latitude: number;
|
|
13
|
+
/** 椭球面以上高度,米(可以为负,表示椭球面以下) */
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 创建一个 Cartographic 实例(plain object)。
|
|
18
|
+
*
|
|
19
|
+
* 三个参数都有默认值 0,便于模块级 scratch 在顶部声明时初始化。
|
|
20
|
+
*
|
|
21
|
+
* @param longitude 经度,弧度。默认 0。
|
|
22
|
+
* @param latitude 纬度,弧度。默认 0。
|
|
23
|
+
* @param height 高度,米。默认 0(椭球表面)。
|
|
24
|
+
* @returns Cartographic 实例(独立对象,无共享引用)。
|
|
25
|
+
*/
|
|
26
|
+
export declare function createCartographic(longitude?: number, latitude?: number, height?: number): Cartographic;
|
|
27
|
+
//# sourceMappingURL=cartographic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartographic.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/math/cartographic.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAElB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,SAAS,SAAM,EACf,QAAQ,SAAM,EACd,MAAM,SAAM,GACV,YAAY,CAEd"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const WGS84_RADII_X = 6378137;
|
|
2
|
+
export declare const WGS84_RADII_Y = 6378137;
|
|
3
|
+
export declare const WGS84_RADII_Z = 6356752.314245179;
|
|
4
|
+
export declare const WGS84_RADII_X_SQ: number;
|
|
5
|
+
export declare const WGS84_RADII_Y_SQ: number;
|
|
6
|
+
export declare const WGS84_RADII_Z_SQ: number;
|
|
7
|
+
export declare const WGS84_ONE_OVER_RADII_X: number;
|
|
8
|
+
export declare const WGS84_ONE_OVER_RADII_Y: number;
|
|
9
|
+
export declare const WGS84_ONE_OVER_RADII_Z: number;
|
|
10
|
+
export declare const WGS84_ONE_OVER_RADII_X_SQ: number;
|
|
11
|
+
export declare const WGS84_ONE_OVER_RADII_Y_SQ: number;
|
|
12
|
+
export declare const WGS84_ONE_OVER_RADII_Z_SQ: number;
|
|
13
|
+
export declare const EPSILON1 = 0.1;
|
|
14
|
+
export declare const EPSILON10 = 1e-10;
|
|
15
|
+
export declare const EPSILON12 = 1e-12;
|
|
16
|
+
export declare const EPSILON14 = 1e-14;
|
|
17
|
+
export declare const CENTER_TOLERANCE_SQUARED = 0.1;
|
|
18
|
+
export declare const RECTANGLE_DEFAULT_GRANULARITY: number;
|
|
19
|
+
export declare const NEWTON_MAX_ITERATIONS = 100;
|
|
20
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ground/math/constants.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,UAAY,CAAC;AAGvC,eAAO,MAAM,aAAa,UAAY,CAAC;AAGvC,eAAO,MAAM,aAAa,oBAAqB,CAAC;AAGhD,eAAO,MAAM,gBAAgB,QAAgC,CAAC;AAC9D,eAAO,MAAM,gBAAgB,QAAgC,CAAC;AAC9D,eAAO,MAAM,gBAAgB,QAAgC,CAAC;AAG9D,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAG1D,eAAO,MAAM,yBAAyB,QAAyB,CAAC;AAChE,eAAO,MAAM,yBAAyB,QAAyB,CAAC;AAChE,eAAO,MAAM,yBAAyB,QAAyB,CAAC;AAOhE,eAAO,MAAM,QAAQ,MAAM,CAAC;AAC5B,eAAO,MAAM,SAAS,QAAU,CAAC;AACjC,eAAO,MAAM,SAAS,QAAU,CAAC;AACjC,eAAO,MAAM,SAAS,QAAU,CAAC;AAIjC,eAAO,MAAM,wBAAwB,MAAW,CAAC;AAIjD,eAAO,MAAM,6BAA6B,QAAyB,CAAC;AAIpE,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
|