@glowjs/core 2024.8.10 → 2024.9.14
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 +90 -4
- package/dist/glow.core.js +1 -1
- package/dist/typings/entity/DecorateGrid.d.ts +2 -0
- package/dist/typings/entity/Entity.d.ts +2 -2
- package/dist/typings/entity/EntityType.d.ts +5 -1
- package/dist/typings/entity/Floor.d.ts +4 -0
- package/dist/typings/entity/OtherEntity.d.ts +2 -1
- package/dist/typings/entity/POI.d.ts +70 -0
- package/dist/typings/event/EventMgr.d.ts +8 -0
- package/dist/typings/index.d.ts +1 -0
- package/dist/typings/runtime/babylonjs/babylonjs-core.d.ts +1 -0
- package/package.json +6 -6
|
@@ -6,12 +6,14 @@ import { Entity } from './Entity';
|
|
|
6
6
|
export declare class DecorateGrid extends Entity {
|
|
7
7
|
private _mesh;
|
|
8
8
|
private _mat;
|
|
9
|
+
private _onAfterFrameObserver;
|
|
9
10
|
/**
|
|
10
11
|
* 实例化一个装饰网格对象
|
|
11
12
|
* @param app 应用
|
|
12
13
|
*/
|
|
13
14
|
constructor(app: App);
|
|
14
15
|
build(): Promise<void>;
|
|
16
|
+
private _onAfterFrame;
|
|
15
17
|
/**
|
|
16
18
|
* 拆毁(删掉网格,仅保留层级树)
|
|
17
19
|
*/
|
|
@@ -71,8 +71,8 @@ export declare class Entity extends Base {
|
|
|
71
71
|
* 实体注册的应用事件ID列表,当实体销毁时自动移除集合中的事件
|
|
72
72
|
*/
|
|
73
73
|
appEventIds: string[];
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
protected _enablePointerMoveEvents: boolean;
|
|
75
|
+
protected _pickable: boolean;
|
|
76
76
|
private _castShadow;
|
|
77
77
|
/**
|
|
78
78
|
* 是否投射阴影
|
|
@@ -2,10 +2,11 @@ import { App } from '../core/App';
|
|
|
2
2
|
import { Entity } from './Entity';
|
|
3
3
|
import { LeakLine } from './LeakLine';
|
|
4
4
|
import { Text3D } from './Text3D';
|
|
5
|
+
import { POI } from './POI';
|
|
5
6
|
/**
|
|
6
7
|
* 其它实体
|
|
7
8
|
*/
|
|
8
|
-
export type OtherEntity = Text3D | LeakLine;
|
|
9
|
+
export type OtherEntity = Text3D | LeakLine | POI;
|
|
9
10
|
/**
|
|
10
11
|
* 判断实体是否为其它实体
|
|
11
12
|
* @param entity 实体
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { App } from "../core/App";
|
|
2
|
+
import { Entity } from "./Entity";
|
|
3
|
+
/**
|
|
4
|
+
* POI标记
|
|
5
|
+
*/
|
|
6
|
+
export declare class POI extends Entity {
|
|
7
|
+
/**
|
|
8
|
+
* 父物体计算包围盒时是否排除此物体,默认排除
|
|
9
|
+
*/
|
|
10
|
+
excludeBoundingBox: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 模式
|
|
13
|
+
*/
|
|
14
|
+
mode: '2D' | '3D';
|
|
15
|
+
/**
|
|
16
|
+
* 贴图编号
|
|
17
|
+
*/
|
|
18
|
+
textureId: string;
|
|
19
|
+
/**
|
|
20
|
+
* 宽度
|
|
21
|
+
*/
|
|
22
|
+
width: number;
|
|
23
|
+
/**
|
|
24
|
+
* 高度
|
|
25
|
+
*/
|
|
26
|
+
height: number;
|
|
27
|
+
/**
|
|
28
|
+
* 像素宽度
|
|
29
|
+
*/
|
|
30
|
+
pixWidth: number;
|
|
31
|
+
/**
|
|
32
|
+
* 像素高度
|
|
33
|
+
*/
|
|
34
|
+
pixHeight: number;
|
|
35
|
+
private _img2D;
|
|
36
|
+
private _canvas;
|
|
37
|
+
private _pointerClickObserver;
|
|
38
|
+
private _pointerEnterObserver;
|
|
39
|
+
private _pointerLeaveObserver;
|
|
40
|
+
private _pointerDownObserver;
|
|
41
|
+
private _pointerUpObserver;
|
|
42
|
+
private _mesh;
|
|
43
|
+
private _showBoundingBox;
|
|
44
|
+
/**
|
|
45
|
+
* 上一次点击的时间点,用于计算双击事件
|
|
46
|
+
*/
|
|
47
|
+
private _lastClickTime;
|
|
48
|
+
/**
|
|
49
|
+
* 构造函数
|
|
50
|
+
* @param app 应用
|
|
51
|
+
*/
|
|
52
|
+
constructor(app: App);
|
|
53
|
+
private _visable;
|
|
54
|
+
get visable(): boolean;
|
|
55
|
+
set visable(value: boolean);
|
|
56
|
+
get pickable(): boolean;
|
|
57
|
+
set pickable(value: boolean);
|
|
58
|
+
get cursor(): string;
|
|
59
|
+
set cursor(value: string);
|
|
60
|
+
get showBoundingBox(): boolean;
|
|
61
|
+
set showBoundingBox(value: boolean);
|
|
62
|
+
build(force?: boolean): Promise<void>;
|
|
63
|
+
unbuild(): void;
|
|
64
|
+
toJson(): any;
|
|
65
|
+
fromJson(json: any): void;
|
|
66
|
+
private _build2D;
|
|
67
|
+
private _onResize;
|
|
68
|
+
private _build3D;
|
|
69
|
+
dispose(): void;
|
|
70
|
+
}
|
|
@@ -20,6 +20,14 @@ export declare class EventMgr extends Base {
|
|
|
20
20
|
*/
|
|
21
21
|
private _longDownId;
|
|
22
22
|
private _pointerCanvas;
|
|
23
|
+
/**
|
|
24
|
+
* 鼠标X轴坐标
|
|
25
|
+
*/
|
|
26
|
+
mouseX: number;
|
|
27
|
+
/**
|
|
28
|
+
* 鼠标Y轴坐标
|
|
29
|
+
*/
|
|
30
|
+
mouseY: number;
|
|
23
31
|
private _onPointerEnterCanvas;
|
|
24
32
|
private _onPointerLeaveCanvas;
|
|
25
33
|
/**
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export { Path } from './entity/Path';
|
|
|
54
54
|
export { Group } from './entity/Group';
|
|
55
55
|
export { Thing } from './entity/Thing';
|
|
56
56
|
export { DecorateGrid } from './entity/DecorateGrid';
|
|
57
|
+
export { POI } from './entity/POI';
|
|
57
58
|
export { Component } from './entity/component/Component';
|
|
58
59
|
export { Style } from './entity/component/Style';
|
|
59
60
|
export { Animator } from './entity/component/Animator';
|
|
@@ -62,6 +62,7 @@ export { GlowLayer } from '@babylonjs/core/Layers/glowLayer';
|
|
|
62
62
|
export { HighlightLayer } from '@babylonjs/core/Layers/highlightLayer';
|
|
63
63
|
export { HemisphericLight } from '@babylonjs/core/Lights/hemisphericLight';
|
|
64
64
|
import '@babylonjs/core/Rendering/boundingBoxRenderer';
|
|
65
|
+
import '@babylonjs/core/Rendering/edgesRenderer';
|
|
65
66
|
export { AnimationGroup } from '@babylonjs/core/Animations/animationGroup';
|
|
66
67
|
export { ActionManager } from '@babylonjs/core/Actions/actionManager';
|
|
67
68
|
export { ExecuteCodeAction } from '@babylonjs/core/Actions/directActions';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glowjs/core",
|
|
3
|
-
"version": "2024.
|
|
3
|
+
"version": "2024.09.14",
|
|
4
4
|
"description": "GlowJS数字孪生引擎核心库。",
|
|
5
5
|
"main": "./dist/glow.core.js",
|
|
6
6
|
"types": "./dist/typings/index.d.ts",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"license": "ISC",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/plugin-transform-runtime": "7.18.10",
|
|
52
|
-
"@babylonjs/core": "7.
|
|
53
|
-
"@babylonjs/gui": "7.
|
|
54
|
-
"@babylonjs/inspector": "7.
|
|
55
|
-
"@babylonjs/loaders": "7.
|
|
56
|
-
"@babylonjs/materials": "7.
|
|
52
|
+
"@babylonjs/core": "7.18.0",
|
|
53
|
+
"@babylonjs/gui": "7.18.0",
|
|
54
|
+
"@babylonjs/inspector": "7.18.0",
|
|
55
|
+
"@babylonjs/loaders": "7.18.0",
|
|
56
|
+
"@babylonjs/materials": "7.18.0",
|
|
57
57
|
"@tweenjs/tween.js": "18.6.4",
|
|
58
58
|
"earcut": "2.2.2",
|
|
59
59
|
"heatmap.js": "2.0.5",
|