@rtzh/gy-cesium 0.0.66 → 0.0.68
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/lib/types/Cesium.d.ts +3 -0
- package/lib/types/components/ClickDistance/index.d.ts +1 -0
- package/lib/types/components/GyCesium/index.d.ts +1 -0
- package/lib/types/components/GyCesiumHtml/index.d.ts +1 -0
- package/lib/types/components/GyCesiumLightLine/index.d.ts +1 -0
- package/lib/types/components/GyCesiumLine/index.d.ts +1 -0
- package/lib/types/components/GyCesiumModelSidebar/index.d.ts +1 -0
- package/lib/types/components/GyCesiumToolbar/index.d.ts +1 -0
- package/lib/types/components/GyCesiumWall/index.d.ts +1 -0
- package/lib/types/components/GyCesiumWater/index.d.ts +1 -0
- package/lib/types/components/ModelControls/index.d.ts +1 -0
- package/lib/types/components/RealTimePointClouds/index.d.ts +1 -0
- package/lib/types/components/SmallMap/index.d.ts +1 -0
- package/lib/types/components/TrackRoam/index.d.ts +1 -0
- package/lib/types/components/VideoShadow/index.d.ts +1 -0
- package/lib/types/components/demo/index.d.ts +1 -0
- package/lib/types/components/index.d.ts +14 -0
- package/lib/types/hooks/CesiumClass.d.ts +244 -0
- package/lib/types/hooks/CesiumFirstPerson.d.ts +95 -0
- package/lib/types/hooks/CesiumModel.d.ts +7 -0
- package/lib/types/hooks/CesiumSmallModel.d.ts +17 -0
- package/lib/types/hooks/CesiumUnit.d.ts +28 -0
- package/lib/types/hooks/Geometry/CT.d.ts +61 -0
- package/lib/types/hooks/Geometry/CesiumPrimitivePolyline.d.ts +50 -0
- package/lib/types/hooks/Geometry/CesiumWater.d.ts +37 -0
- package/lib/types/hooks/Geometry/HtmlOverlayManager.d.ts +11 -0
- package/lib/types/hooks/Geometry/LabelPanelManager.d.ts +137 -0
- package/lib/types/hooks/Geometry/ModelDragController.d.ts +43 -0
- package/lib/types/hooks/Geometry/TrackRoam.d.ts +28 -0
- package/lib/types/hooks/Geometry/VideoShed3d-old.d.ts +106 -0
- package/lib/types/hooks/Geometry/VideoShed3d.d.ts +107 -0
- package/lib/types/hooks/Geometry/WallEntityManager.d.ts +153 -0
- package/lib/types/hooks/Loader/CesiumLoader.d.ts +5 -0
- package/lib/types/hooks/Loader/GltfLoader.d.ts +169 -0
- package/lib/types/hooks/Loader/ModelMatrix.d.ts +71 -0
- package/lib/types/hooks/Loader/RealTimePointCloudsClass.d.ts +31 -0
- package/lib/types/hooks/Loader/RtzhTilesetLoader.d.ts +506 -0
- package/lib/types/hooks/Loader/TilesetLoader.d.ts +133 -0
- package/lib/types/hooks/Loader/createXrayOutline.d.ts +10 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter-a.d.ts +55 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter-ls.d.ts +57 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter.d.ts +57 -0
- package/lib/types/hooks/Loader/xrayOutlineMask.d.ts +5 -0
- package/lib/types/hooks/Material/GridFloorMaterial.d.ts +54 -0
- package/lib/types/hooks/Material/GyMaterialPolygon.d.ts +4 -0
- package/lib/types/hooks/Material/PolylineArrowMaterialProperty.d.ts +25 -0
- package/lib/types/hooks/Material/PolylineLightingMaterialProperty.d.ts +20 -0
- package/lib/types/hooks/Material/PolylineTrialFlowMaterialProperty.d.ts +20 -0
- package/lib/types/hooks/ModelSplit.d.ts +9 -0
- package/lib/types/hooks/baseUrl.d.ts +2 -0
- package/lib/types/hooks/gyCesium.d.ts +11 -0
- package/lib/types/hooks/postProcess/GyEdgeDetectionStage.d.ts +12 -0
- package/lib/types/hooks/postProcess/WindingPoint.d.ts +25 -0
- package/lib/types/hooks/transformlat.d.ts +37 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/v2/gy-cesium.cjs.js +2 -2
- package/lib/v2/gy-cesium.es.js +8950 -8304
- package/lib/v2/style.css +1 -1
- package/lib/v2.7/gy-cesium.cjs.js +2 -2
- package/lib/v2.7/gy-cesium.es.js +8621 -7964
- package/lib/v2.7/style.css +1 -1
- package/lib/v3/gy-cesium.cjs.js +5 -5
- package/lib/v3/gy-cesium.es.js +7726 -7059
- package/lib/v3/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import Cesium from "../../Cesium";
|
|
2
|
+
declare type LOOPTYPE = '' | 'NONE' | 'REPEAT' | 'MIRRORED_REPEAT' | 'REVERSE';
|
|
3
|
+
declare type SPLITDIRECTION = 'NONE' | 'LEFT' | 'RIGHT';
|
|
4
|
+
interface GltfOpt {
|
|
5
|
+
lon?: number;
|
|
6
|
+
lat?: number;
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
id?: string;
|
|
10
|
+
rotateX?: number;
|
|
11
|
+
rotateY?: number;
|
|
12
|
+
rotateZ?: number;
|
|
13
|
+
scale?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
debugWireframe?: boolean;
|
|
16
|
+
debugWireframeColor?: string;
|
|
17
|
+
loopAllAnimations?: LOOPTYPE;
|
|
18
|
+
splitDirection?: SPLITDIRECTION;
|
|
19
|
+
loopAllAnimationsSpeed?: number;
|
|
20
|
+
opacity?: number;
|
|
21
|
+
resourceOpt?: any;
|
|
22
|
+
noControls?: boolean;
|
|
23
|
+
isFlyToObj?: boolean;
|
|
24
|
+
environmentMapURL?: string;
|
|
25
|
+
coefficients?: number[];
|
|
26
|
+
imageBasedLightingFactor?: {
|
|
27
|
+
factorX?: number;
|
|
28
|
+
factorY?: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare class GltfLoader {
|
|
32
|
+
TYPE: 'GltfLoader';
|
|
33
|
+
url: string;
|
|
34
|
+
cesiumObj: any;
|
|
35
|
+
id: string;
|
|
36
|
+
animationsLength: number;
|
|
37
|
+
rotateX: number;
|
|
38
|
+
rotateY: number;
|
|
39
|
+
rotateZ: number;
|
|
40
|
+
scale: number;
|
|
41
|
+
debugWireframe: boolean;
|
|
42
|
+
debugWireframeColor: string;
|
|
43
|
+
lon?: number;
|
|
44
|
+
lat?: number;
|
|
45
|
+
height: number;
|
|
46
|
+
loopAllAnimations: LOOPTYPE;
|
|
47
|
+
loopAllAnimationsSpeed: number;
|
|
48
|
+
gltfModel: any;
|
|
49
|
+
animationList: any;
|
|
50
|
+
animationList_linshi: any;
|
|
51
|
+
isLoadFinish: boolean;
|
|
52
|
+
loadFinFun: any;
|
|
53
|
+
isFlyToObj: any;
|
|
54
|
+
modelMatrix: any;
|
|
55
|
+
splitDirection: SPLITDIRECTION;
|
|
56
|
+
opacity: number;
|
|
57
|
+
resourceOpt: any;
|
|
58
|
+
options: GltfOpt;
|
|
59
|
+
tilesetModelMatrix: any;
|
|
60
|
+
environmentMapURL?: string;
|
|
61
|
+
coefficients?: number[];
|
|
62
|
+
imageBasedLightingFactor?: {
|
|
63
|
+
factorX?: number;
|
|
64
|
+
factorY?: number;
|
|
65
|
+
};
|
|
66
|
+
private _enableDebugWireframe;
|
|
67
|
+
private _selectedNodeName;
|
|
68
|
+
private _originalMaterials;
|
|
69
|
+
highlightColor: {
|
|
70
|
+
r: number;
|
|
71
|
+
g: number;
|
|
72
|
+
b: number;
|
|
73
|
+
};
|
|
74
|
+
private _blinkStates;
|
|
75
|
+
private _isBlinking;
|
|
76
|
+
private _lastBlinkTime;
|
|
77
|
+
private _animationFrameId;
|
|
78
|
+
blinkSpeed: number;
|
|
79
|
+
private _explodeIntensity;
|
|
80
|
+
private _explodeDistance;
|
|
81
|
+
private _isExplodeActive;
|
|
82
|
+
private _explodeAnimationId;
|
|
83
|
+
private _explosionShader;
|
|
84
|
+
private _explosionEnabled;
|
|
85
|
+
constructor(cesiumObj: any, url: string, opt: GltfOpt);
|
|
86
|
+
setLonLat(options: any): void;
|
|
87
|
+
getModelName(): string;
|
|
88
|
+
getControlValue(): {
|
|
89
|
+
x: number;
|
|
90
|
+
y: number;
|
|
91
|
+
lon: number;
|
|
92
|
+
lat: number;
|
|
93
|
+
height: number;
|
|
94
|
+
rotateX: number;
|
|
95
|
+
rotateY: number;
|
|
96
|
+
rotateZ: number;
|
|
97
|
+
scale: number;
|
|
98
|
+
opacity: number;
|
|
99
|
+
debugWireframe: boolean;
|
|
100
|
+
debugWireframeColor: string;
|
|
101
|
+
};
|
|
102
|
+
getControlOptions(): any;
|
|
103
|
+
updateStyle(controlValue: any): void;
|
|
104
|
+
private mergeWithCurrentValues;
|
|
105
|
+
setOpacity(opacity?: number): void;
|
|
106
|
+
setShow(show: boolean): void;
|
|
107
|
+
loadFinish(callback: any): void;
|
|
108
|
+
setModelMatrix(): void;
|
|
109
|
+
animPosition(lon: number, lat: number): void;
|
|
110
|
+
animHeight(hei: number): void;
|
|
111
|
+
animMartrix(): void;
|
|
112
|
+
calculateHeadingFromPositions(fromPosition: Cesium.Cartesian3, toPosition: Cesium.Cartesian3): number;
|
|
113
|
+
setPositionByCartesian(position: Cesium.Cartesian3, previousPosition?: Cesium.Cartesian3): void;
|
|
114
|
+
setPositionByCartesian2(position: Cesium.Cartesian3, previousPosition?: Cesium.Cartesian3): void;
|
|
115
|
+
setPositionByCartesianAndRadians(position: Cesium.Cartesian3, radians?: number): void;
|
|
116
|
+
setPositionByCartesianAndRadians2(position: Cesium.Cartesian3, radians?: number): void;
|
|
117
|
+
loadModel(): void;
|
|
118
|
+
setDebugWireframe(): void;
|
|
119
|
+
setImageBasedLighting(url: string, coefficients?: number[], factorX?: number, factorY?: number): Promise<void>;
|
|
120
|
+
addAnimation(opt: {
|
|
121
|
+
index: number;
|
|
122
|
+
loop?: LOOPTYPE;
|
|
123
|
+
speed?: number;
|
|
124
|
+
reverse?: boolean;
|
|
125
|
+
}): any;
|
|
126
|
+
addAllAnimations(): void;
|
|
127
|
+
stopAllAnimations(): void;
|
|
128
|
+
flyTo(): void;
|
|
129
|
+
getTilesetModelMatrix(offset?: any): any;
|
|
130
|
+
getTilesetModelMatrixZero(): any;
|
|
131
|
+
clearSelect(): void;
|
|
132
|
+
private highlightNode;
|
|
133
|
+
handlePick(pickResult: any): void;
|
|
134
|
+
private _hexToRgb;
|
|
135
|
+
setBlinkColors(data: Map<string, string>): void;
|
|
136
|
+
private _startBlinkLoop;
|
|
137
|
+
clearBlinkColors(): void;
|
|
138
|
+
/**
|
|
139
|
+
* 初始化爆炸着色器(你原来的 shader,完全不动)
|
|
140
|
+
*/
|
|
141
|
+
private initExplosionShader;
|
|
142
|
+
/**
|
|
143
|
+
* 开启动画爆炸(和 RtzhTilesetLoader 完全一致)
|
|
144
|
+
*/
|
|
145
|
+
startExplodeAnimation(targetIntensity?: number, distance?: number, duration?: number): void;
|
|
146
|
+
/**
|
|
147
|
+
* 关闭爆炸(带动画,和 RtzhTilesetLoader 完全一致)
|
|
148
|
+
*/
|
|
149
|
+
closeExplodeAnimation(): void;
|
|
150
|
+
/**
|
|
151
|
+
* 直接设置爆炸(无动画,和 RtzhTilesetLoader 完全一致)
|
|
152
|
+
*/
|
|
153
|
+
setGlobalExplode(intensity: number, distance?: number): void;
|
|
154
|
+
/**
|
|
155
|
+
* 停止爆炸 + 恢复模型(统一停止方法 ✅)
|
|
156
|
+
*/
|
|
157
|
+
stopGlobalExplode(): void;
|
|
158
|
+
setExplodeDistance(distance: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* 内部平滑动画(缓动效果)
|
|
161
|
+
*/
|
|
162
|
+
private _animateExplode;
|
|
163
|
+
/**
|
|
164
|
+
* 构建爆炸着色器(保留你原来的 Shader 逻辑,只改 Uniform 对齐)
|
|
165
|
+
*/
|
|
166
|
+
private _buildExplodeShader;
|
|
167
|
+
remove(): void;
|
|
168
|
+
}
|
|
169
|
+
export default GltfLoader;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
interface ModelMatrixConfig {
|
|
2
|
+
height: number;
|
|
3
|
+
offsetX: number;
|
|
4
|
+
offsetY: number;
|
|
5
|
+
rotateX: number;
|
|
6
|
+
reverseRotateX?: boolean;
|
|
7
|
+
rotateY: number;
|
|
8
|
+
reverseRotateY?: boolean;
|
|
9
|
+
rotateZ: number;
|
|
10
|
+
reverseRotateZ?: boolean;
|
|
11
|
+
scale: number;
|
|
12
|
+
lon?: number;
|
|
13
|
+
lat?: number;
|
|
14
|
+
x?: number;
|
|
15
|
+
y?: number;
|
|
16
|
+
}
|
|
17
|
+
declare class ModelMatrix {
|
|
18
|
+
TYPE: 'ModelMatrix';
|
|
19
|
+
height: number;
|
|
20
|
+
offsetX: number;
|
|
21
|
+
offsetY: number;
|
|
22
|
+
rotateX: number;
|
|
23
|
+
rotateY: number;
|
|
24
|
+
rotateZ: number;
|
|
25
|
+
scale: number;
|
|
26
|
+
lon: number;
|
|
27
|
+
lat: number;
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
cesiumObj: any;
|
|
31
|
+
modelMatrixInit: any;
|
|
32
|
+
modelMatrix: any;
|
|
33
|
+
modelMatrixConfig: ModelMatrixConfig;
|
|
34
|
+
constructor(config: ModelMatrixConfig, cesiumObj: any, options?: any);
|
|
35
|
+
update(config: ModelMatrixConfig): void;
|
|
36
|
+
setLonLat(config: ModelMatrixConfig): number[];
|
|
37
|
+
getTilesetModelMatrix(): any;
|
|
38
|
+
getTilesetModelMatrixZero(): any;
|
|
39
|
+
getControlValue(): {
|
|
40
|
+
offsetX: number;
|
|
41
|
+
offsetY: number;
|
|
42
|
+
height: number;
|
|
43
|
+
rotateX: number;
|
|
44
|
+
rotateY: number;
|
|
45
|
+
rotateZ: number;
|
|
46
|
+
scale: number;
|
|
47
|
+
};
|
|
48
|
+
getControlOptions(): ({
|
|
49
|
+
name: string;
|
|
50
|
+
value: string;
|
|
51
|
+
type: string;
|
|
52
|
+
step?: undefined;
|
|
53
|
+
min?: undefined;
|
|
54
|
+
max?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
name: string;
|
|
57
|
+
value: string;
|
|
58
|
+
type: string;
|
|
59
|
+
step: number;
|
|
60
|
+
min?: undefined;
|
|
61
|
+
max?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
name: string;
|
|
64
|
+
value: string;
|
|
65
|
+
type: string;
|
|
66
|
+
min: number;
|
|
67
|
+
max: number;
|
|
68
|
+
step?: undefined;
|
|
69
|
+
})[];
|
|
70
|
+
}
|
|
71
|
+
export default ModelMatrix;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface RealTimePointCloudsClassOpt {
|
|
2
|
+
isFocus: boolean;
|
|
3
|
+
hasControls: boolean;
|
|
4
|
+
cloudId: string;
|
|
5
|
+
}
|
|
6
|
+
declare class RealTimePointCloudsClass {
|
|
7
|
+
TYPE: 'RealTimePointCloudsClass';
|
|
8
|
+
foundationModelObj: any;
|
|
9
|
+
foundationModelOpt: any;
|
|
10
|
+
cesiumObj: any;
|
|
11
|
+
foundationModelType: string;
|
|
12
|
+
modelMatrixPartObj: any;
|
|
13
|
+
modelMatrixPartObjZero: any;
|
|
14
|
+
options: RealTimePointCloudsClassOpt;
|
|
15
|
+
modelMatrix: any;
|
|
16
|
+
modelMatrixZero: any;
|
|
17
|
+
constructor(foundationModelOpt: any, cesiumObj: any, opt: RealTimePointCloudsClassOpt);
|
|
18
|
+
getModelName(): string;
|
|
19
|
+
getModelMatrix(): Promise<unknown>;
|
|
20
|
+
getModelMatrixZero(): Promise<unknown>;
|
|
21
|
+
getModelMatrixPartObj(): Promise<unknown>;
|
|
22
|
+
getFoundationModelObj(): Promise<unknown>;
|
|
23
|
+
getUrlModelObj(): Promise<unknown>;
|
|
24
|
+
setLonLat(config: any): any[];
|
|
25
|
+
updateStyle(controlValue: any): void;
|
|
26
|
+
getControlValue(): any;
|
|
27
|
+
getControlOptions(): any;
|
|
28
|
+
flyTo(): void;
|
|
29
|
+
remove(): void;
|
|
30
|
+
}
|
|
31
|
+
export default RealTimePointCloudsClass;
|