@glowjs/core 2025.3.28 → 2025.4.21
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/glow.core.d.ts +221 -2
- package/dist/glow.core.js +1 -1
- package/dist/typings/camera/CameraMgr.d.ts +4 -0
- package/dist/typings/entity/Building.d.ts +8 -0
- package/dist/typings/entity/Entity.d.ts +4 -0
- package/dist/typings/entity/EntityType.d.ts +5 -1
- package/dist/typings/entity/OtherEntity.d.ts +2 -1
- package/dist/typings/entity/init/setTransition.d.ts +6 -0
- package/dist/typings/entity/poi_plus/Container.d.ts +14 -0
- package/dist/typings/entity/poi_plus/Img.d.ts +21 -0
- package/dist/typings/entity/poi_plus/Line.d.ts +15 -0
- package/dist/typings/entity/poi_plus/POIPlus.d.ts +138 -0
- package/dist/typings/entity/poi_plus/Txt.d.ts +20 -0
- package/dist/typings/entity/poi_plus/TxtAlign.d.ts +9 -0
- package/dist/typings/entity/poi_plus/render.d.ts +7 -0
- package/dist/typings/index.d.ts +2 -0
- package/dist/typings/res/ResPool.d.ts +1 -0
- package/package.json +1 -1
|
@@ -265,6 +265,10 @@ export declare class CameraMgr extends Base {
|
|
|
265
265
|
* 从给定位置和目标重建角度(alpha, beta)和半径
|
|
266
266
|
*/
|
|
267
267
|
rebuildAnglesAndRadius(): void;
|
|
268
|
+
/**
|
|
269
|
+
* 从给定位置和目标重置相机
|
|
270
|
+
*/
|
|
271
|
+
reset(target: Point3D, position: Point3D): void;
|
|
268
272
|
/**
|
|
269
273
|
* 使用一个位置来定义当前相机的相关信息,如alpha, beta和半径
|
|
270
274
|
* @param position 定义要设置摄像机的位置
|
|
@@ -5,10 +5,11 @@ import { Text3D } from './Text3D';
|
|
|
5
5
|
import { POI } from './POI';
|
|
6
6
|
import { Pipe } from './Pipe';
|
|
7
7
|
import { VideoFusion } from './VideoFusion';
|
|
8
|
+
import { POIPlus } from './poi_plus/POIPlus';
|
|
8
9
|
/**
|
|
9
10
|
* 其它实体
|
|
10
11
|
*/
|
|
11
|
-
export type OtherEntity = Text3D | LeakLine | POI | Pipe | VideoFusion;
|
|
12
|
+
export type OtherEntity = Text3D | LeakLine | POI | POIPlus | Pipe | VideoFusion;
|
|
12
13
|
/**
|
|
13
14
|
* 判断实体是否为其它实体
|
|
14
15
|
* @param entity 实体
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Img } from "./Img";
|
|
2
|
+
import { Line } from "./Line";
|
|
3
|
+
import { Txt } from "./Txt";
|
|
4
|
+
/** 容器 */
|
|
5
|
+
export declare class Container {
|
|
6
|
+
/** 图片 */
|
|
7
|
+
img: Img;
|
|
8
|
+
/** 线 */
|
|
9
|
+
line: Line;
|
|
10
|
+
/** 文本列表 */
|
|
11
|
+
txts: Txt[];
|
|
12
|
+
/** 构造函数 */
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 图片
|
|
3
|
+
*/
|
|
4
|
+
export declare class Img {
|
|
5
|
+
/** 资源ID */
|
|
6
|
+
resId: string;
|
|
7
|
+
/** 原始宽度 */
|
|
8
|
+
srcWidth: number;
|
|
9
|
+
/** 原始高度 */
|
|
10
|
+
srcHeight: number;
|
|
11
|
+
/** 实际宽度 */
|
|
12
|
+
width: number;
|
|
13
|
+
/** 实际高度 */
|
|
14
|
+
height: number;
|
|
15
|
+
/** X 坐标 */
|
|
16
|
+
x: number;
|
|
17
|
+
/** Y 坐标 */
|
|
18
|
+
y: number;
|
|
19
|
+
/** 构造函数 */
|
|
20
|
+
constructor();
|
|
21
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { App } from "../../core/App";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
3
|
+
import { Container } from "./Container";
|
|
4
|
+
import { Point2D } from "../../misc";
|
|
5
|
+
/**
|
|
6
|
+
* POI加强版
|
|
7
|
+
*/
|
|
8
|
+
export declare class POIPlus extends Entity {
|
|
9
|
+
/** 容器 */
|
|
10
|
+
container: Container;
|
|
11
|
+
/**
|
|
12
|
+
* 父物体计算包围盒时是否排除此物体,默认排除
|
|
13
|
+
*/
|
|
14
|
+
excludeBoundingBox: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 模式
|
|
17
|
+
*/
|
|
18
|
+
mode: '2D' | '3D';
|
|
19
|
+
/**
|
|
20
|
+
* 宽度
|
|
21
|
+
*/
|
|
22
|
+
width: number;
|
|
23
|
+
/**
|
|
24
|
+
* 高度
|
|
25
|
+
*/
|
|
26
|
+
height: number;
|
|
27
|
+
/**
|
|
28
|
+
* 像素宽度
|
|
29
|
+
*/
|
|
30
|
+
pixWidth: number;
|
|
31
|
+
/**
|
|
32
|
+
* 是否默认隐藏
|
|
33
|
+
*/
|
|
34
|
+
defaultHidden: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 链接ID
|
|
37
|
+
*/
|
|
38
|
+
linkId: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Base64图片
|
|
41
|
+
*/
|
|
42
|
+
base64: string;
|
|
43
|
+
/**
|
|
44
|
+
* Base64图片原始宽度
|
|
45
|
+
*/
|
|
46
|
+
srcWidth: number;
|
|
47
|
+
/**
|
|
48
|
+
* Base64图片原始高度
|
|
49
|
+
*/
|
|
50
|
+
srcHeight: number;
|
|
51
|
+
/**
|
|
52
|
+
* 像素高度
|
|
53
|
+
*/
|
|
54
|
+
pixHeight: number;
|
|
55
|
+
private _img2D;
|
|
56
|
+
private _canvas;
|
|
57
|
+
private _pointerClickObserver;
|
|
58
|
+
private _pointerEnterObserver;
|
|
59
|
+
private _pointerLeaveObserver;
|
|
60
|
+
private _pointerDownObserver;
|
|
61
|
+
private _pointerUpObserver;
|
|
62
|
+
private _mesh;
|
|
63
|
+
private _showBoundingBox;
|
|
64
|
+
private _visable;
|
|
65
|
+
private _pivot;
|
|
66
|
+
/**
|
|
67
|
+
* 上一次点击的时间点,用于计算双击事件
|
|
68
|
+
*/
|
|
69
|
+
private _lastClickTime;
|
|
70
|
+
/**
|
|
71
|
+
* 构造函数
|
|
72
|
+
* @param app 应用
|
|
73
|
+
*/
|
|
74
|
+
constructor(app: App);
|
|
75
|
+
get visable(): boolean;
|
|
76
|
+
set visable(value: boolean);
|
|
77
|
+
/**
|
|
78
|
+
* 获取或设置轴心点
|
|
79
|
+
*/
|
|
80
|
+
get pivot(): Point2D;
|
|
81
|
+
set pivot(value: Point2D);
|
|
82
|
+
get pickable(): boolean;
|
|
83
|
+
set pickable(value: boolean);
|
|
84
|
+
get cursor(): string;
|
|
85
|
+
set cursor(value: string);
|
|
86
|
+
get showBoundingBox(): boolean;
|
|
87
|
+
set showBoundingBox(value: boolean);
|
|
88
|
+
/**
|
|
89
|
+
* 获取或设置贴图ID
|
|
90
|
+
*/
|
|
91
|
+
get textureId(): string;
|
|
92
|
+
build(force?: boolean): Promise<void>;
|
|
93
|
+
unbuild(): void;
|
|
94
|
+
toJson(): any;
|
|
95
|
+
fromJson(json: any): void;
|
|
96
|
+
private _build2D;
|
|
97
|
+
private _onResize;
|
|
98
|
+
private _build3D;
|
|
99
|
+
private _updatePovit;
|
|
100
|
+
dispose(): void;
|
|
101
|
+
/**
|
|
102
|
+
* 获取原始贴图的像素大小,编辑器中用来实现等比缩放
|
|
103
|
+
*/
|
|
104
|
+
get _ssize(): Point2D;
|
|
105
|
+
/**
|
|
106
|
+
* 计算内容大小(编辑器用)
|
|
107
|
+
*/
|
|
108
|
+
_calaculateContentSize(): Point2D;
|
|
109
|
+
/**
|
|
110
|
+
* 获取或设置所有文本
|
|
111
|
+
*/
|
|
112
|
+
get txts(): string[];
|
|
113
|
+
set txts(value: string[]);
|
|
114
|
+
/**
|
|
115
|
+
* 获取或设置所有文本的颜色
|
|
116
|
+
*/
|
|
117
|
+
get txtColors(): string[];
|
|
118
|
+
set txtColors(value: string[]);
|
|
119
|
+
/**
|
|
120
|
+
* 设置单个文本内容
|
|
121
|
+
* @param index 索引
|
|
122
|
+
* @param value 文本内容
|
|
123
|
+
*/
|
|
124
|
+
setTxtValue(index: number, value: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* 设置单个文本颜色
|
|
127
|
+
* @param index 索引
|
|
128
|
+
* @param color 颜色
|
|
129
|
+
*/
|
|
130
|
+
setTxtColor(index: number, color: string): void;
|
|
131
|
+
/**
|
|
132
|
+
* 设置单个文本
|
|
133
|
+
* @param index 索引
|
|
134
|
+
* @param value 文本内容
|
|
135
|
+
* @param color 颜色
|
|
136
|
+
*/
|
|
137
|
+
setTxt(index: number, value: string, color: string): void;
|
|
138
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TxtAlign } from "./TxtAlign";
|
|
2
|
+
/**
|
|
3
|
+
* 文本
|
|
4
|
+
*/
|
|
5
|
+
export declare class Txt {
|
|
6
|
+
/** 文本内容 */
|
|
7
|
+
value: string;
|
|
8
|
+
/** 对齐方式 */
|
|
9
|
+
align: TxtAlign;
|
|
10
|
+
/** 字体大小 */
|
|
11
|
+
fontSize: number;
|
|
12
|
+
/** 字体颜色 */
|
|
13
|
+
color: string;
|
|
14
|
+
/** X 坐标 */
|
|
15
|
+
x: number;
|
|
16
|
+
/** Y 坐标 */
|
|
17
|
+
y: number;
|
|
18
|
+
/** 构造函数 */
|
|
19
|
+
constructor();
|
|
20
|
+
}
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export { DecorateGrid } from './entity/DecorateGrid';
|
|
|
58
58
|
export { POI } from './entity/POI';
|
|
59
59
|
export { Pipe } from './entity/Pipe';
|
|
60
60
|
export { VideoFusion } from './entity/VideoFusion';
|
|
61
|
+
export { POIPlus } from './entity/poi_plus/POIPlus';
|
|
62
|
+
export { TxtAlign } from './entity/poi_plus/TxtAlign';
|
|
61
63
|
export { Component } from './entity/component/Component';
|
|
62
64
|
export { Style } from './entity/component/Style';
|
|
63
65
|
export { Animator } from './entity/component/Animator';
|