gltf-parser-plugin 1.1.3 → 1.1.4
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/build/gltf-parser-plugin.module.js +441 -288
- package/build/gltf-parser-plugin.module.js.map +1 -1
- package/build/index.d.ts +23 -45
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Box3 } from 'three';
|
|
2
|
+
import { Color } from 'three';
|
|
2
3
|
import { EventDispatcher } from 'three';
|
|
3
4
|
import { Intersection } from 'three';
|
|
4
5
|
import { Material } from 'three';
|
|
@@ -8,6 +9,8 @@ import { TilesRenderer } from '3d-tiles-renderer';
|
|
|
8
9
|
import { Vector3 } from 'three';
|
|
9
10
|
import { WebGLRenderer } from 'three';
|
|
10
11
|
|
|
12
|
+
export declare type ColorInput = number | string | Color;
|
|
13
|
+
|
|
11
14
|
/**
|
|
12
15
|
* Hit object feature information interface
|
|
13
16
|
*/
|
|
@@ -31,11 +34,8 @@ export declare class GLTFParserPlugin implements MeshHelperHost {
|
|
|
31
34
|
private _structurePromise;
|
|
32
35
|
private _modelInfo;
|
|
33
36
|
private _modelInfoPromise;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private _trackedMeshes;
|
|
37
|
-
private _meshListeners;
|
|
38
|
-
private _isPluginRemoving;
|
|
37
|
+
private _interactionFilter;
|
|
38
|
+
private _componentColorModifier;
|
|
39
39
|
oids: number[];
|
|
40
40
|
private renderer;
|
|
41
41
|
private splitMeshCache;
|
|
@@ -80,9 +80,6 @@ export declare class GLTFParserPlugin implements MeshHelperHost {
|
|
|
80
80
|
* 首次调用时会自动请求
|
|
81
81
|
*/
|
|
82
82
|
getStructureData(): Promise<StructureData | null>;
|
|
83
|
-
private _pointInPolygon;
|
|
84
|
-
private _segmentsIntersect;
|
|
85
|
-
private _polygonIntersectsRect;
|
|
86
83
|
/**
|
|
87
84
|
* 选择包围盒范围内的构件(包含相交和包含两种情况)
|
|
88
85
|
* @param box 查询用的 Box3 范围,坐标系与 structure.json 中 bbox 一致
|
|
@@ -134,59 +131,40 @@ export declare class GLTFParserPlugin implements MeshHelperHost {
|
|
|
134
131
|
* Respects freeze and isolate filters
|
|
135
132
|
*/
|
|
136
133
|
queryFeatureFromIntersection(hit: Intersection): FeatureInfo;
|
|
137
|
-
private _isOidBlocked;
|
|
138
|
-
private _trackMesh;
|
|
139
|
-
private _untrackMesh;
|
|
140
|
-
private _onCollectorMeshChange;
|
|
141
|
-
private _syncCollectorMeshes;
|
|
142
|
-
/**
|
|
143
|
-
* 冻结指定构件,被冻结的构件不再响应任何交互和事件
|
|
144
|
-
*/
|
|
145
134
|
freezeByOids(oids: number[]): void;
|
|
146
|
-
/**
|
|
147
|
-
* 冻结单个构件
|
|
148
|
-
*/
|
|
149
135
|
freezeByOid(oid: number): void;
|
|
150
|
-
/**
|
|
151
|
-
* 解冻指定构件
|
|
152
|
-
*/
|
|
153
136
|
unfreezeByOids(oids: number[]): void;
|
|
154
|
-
/**
|
|
155
|
-
* 解冻单个构件
|
|
156
|
-
*/
|
|
157
137
|
unfreezeByOid(oid: number): void;
|
|
158
|
-
/**
|
|
159
|
-
* 解冻全部构件
|
|
160
|
-
*/
|
|
161
138
|
unfreeze(): void;
|
|
162
|
-
/**
|
|
163
|
-
* 获取当前被冻结的 OID 数组
|
|
164
|
-
*/
|
|
165
139
|
getFrozenOids(): number[];
|
|
166
|
-
/**
|
|
167
|
-
* 隔离指定构件,隔离模式下只有被隔离的构件才能响应交互和事件
|
|
168
|
-
*/
|
|
169
140
|
isolateByOids(oids: number[]): void;
|
|
170
|
-
/**
|
|
171
|
-
* 往隔离集合中添加单个构件
|
|
172
|
-
*/
|
|
173
141
|
isolateByOid(oid: number): void;
|
|
142
|
+
unisolateByOids(oids: number[]): void;
|
|
143
|
+
unisolateByOid(oid: number): void;
|
|
144
|
+
unisolate(): void;
|
|
145
|
+
getIsolatedOids(): number[];
|
|
174
146
|
/**
|
|
175
|
-
*
|
|
147
|
+
* 根据 oid 数组修改构件颜色
|
|
148
|
+
* @param oids 构件 OID 数组
|
|
149
|
+
* @param color 颜色值,支持 hex 数字(如 0xff0000)、颜色字符串(如 "#ff0000")、THREE.Color 对象
|
|
176
150
|
*/
|
|
177
|
-
|
|
151
|
+
setColorByOids(oids: number[], color: ColorInput): void;
|
|
178
152
|
/**
|
|
179
|
-
*
|
|
153
|
+
* 根据 oid 数组修改构件颜色透明度
|
|
154
|
+
* @param oids 构件 OID 数组
|
|
155
|
+
* @param opacity 透明度,0-1,0 完全透明,1 完全不透明
|
|
180
156
|
*/
|
|
181
|
-
|
|
157
|
+
setOpacityByOids(oids: number[], opacity: number): void;
|
|
182
158
|
/**
|
|
183
|
-
*
|
|
159
|
+
* 恢复指定构件的颜色为修改前的状态
|
|
160
|
+
* @param oids 构件 OID 数组
|
|
184
161
|
*/
|
|
185
|
-
|
|
162
|
+
restoreColorByOids(oids: number[]): void;
|
|
186
163
|
/**
|
|
187
|
-
*
|
|
164
|
+
* 恢复指定构件的透明度为修改前的状态
|
|
165
|
+
* @param oids 构件 OID 数组
|
|
188
166
|
*/
|
|
189
|
-
|
|
167
|
+
restoreOpacityByOids(oids: number[]): void;
|
|
190
168
|
/**
|
|
191
169
|
* 内部方法:根据 oid 获取 mesh 数组
|
|
192
170
|
*/
|