@realsee/five 5.0.0-alpha.16 → 5.0.0-alpha.161
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 +21 -11
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +134 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/{images/icons.png → icons.png} +0 -0
- package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/assets/{images/widgets.png → widgets.png} +0 -0
- package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- package/docs/classes/five.AnimationFrameLoop.html +15 -0
- package/docs/classes/five.BVH.html +10 -0
- package/docs/classes/five.BVHIntersect.html +1 -0
- package/docs/classes/five.BVHNode.html +7 -0
- package/docs/classes/five.BVHVector3.html +1 -0
- package/docs/classes/five.Camera.html +11 -0
- package/docs/classes/five.Clipper.html +1 -0
- package/docs/classes/five.Five.html +338 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -0
- package/docs/classes/five.IntersectMesh.html +1 -0
- package/docs/classes/five.LegacyPanoCircleMesh.html +5 -0
- package/docs/classes/five.Model.html +87 -0
- package/docs/classes/five.NetworkSubscribe.html +50 -0
- package/docs/classes/five.PBMContainer.html +17 -0
- package/docs/classes/five.PBMGroup.html +19 -0
- package/docs/classes/five.PBMMaterial.html +27 -0
- package/docs/classes/five.PBMMesh.html +7 -0
- package/docs/classes/five.PanoCircleMesh.html +7 -0
- package/docs/classes/five.PanoCircleMeshDark.html +8 -0
- package/docs/classes/five.PanoCircleMeshSolid.html +7 -0
- package/docs/classes/five.Scene.html +3 -0
- package/docs/classes/five.Subscribe.html +56 -0
- package/docs/classes/five.TextureLoader.html +1 -0
- package/docs/classes/five.Tile3D.html +34 -0
- package/docs/classes/five.Tile3DModel.html +15 -0
- package/docs/classes/five.TileBoundingSphere.html +1 -0
- package/docs/classes/five.TileCacheNode.html +1 -0
- package/docs/classes/five.TileCubeTextureTarget.html +1 -0
- package/docs/classes/five.TileCullingVolume.html +1 -0
- package/docs/classes/five.TileOrientedBoundingBox.html +1 -0
- package/docs/classes/five.TilePlane.html +1 -0
- package/docs/classes/five.TileRequestScheduler.html +16 -0
- package/docs/classes/five.Tileset3D.html +11 -0
- package/docs/classes/five.Tileset3DTraverser.html +1 -0
- package/docs/classes/five.TilesetCache.html +1 -0
- package/docs/classes/five.Work.html +30 -0
- package/docs/classes/five.XRButton.html +1 -0
- package/docs/classes/gltf_loader.DDSLoader.html +1 -0
- package/docs/classes/gltf_loader.DRACOLoader.html +1 -0
- package/docs/classes/gltf_loader.GLTFLoader.html +17 -0
- package/docs/classes/gltf_loader.GLTFObject.html +7 -0
- package/docs/classes/gltf_loader.GLTFParser.html +1 -0
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -0
- package/docs/classes/line.Line.html +1 -0
- package/docs/classes/line.LineGeometry.html +1 -0
- package/docs/classes/line.LineMaterial.html +1 -0
- package/docs/classes/line.LineSegmentsGeometry.html +1 -0
- package/docs/classes/line.THREE_Line2.html +1 -0
- package/docs/classes/line.THREE_LineSegments2.html +1 -0
- package/docs/classes/react.Store.html +29 -0
- package/docs/classes/server.BVH.html +10 -0
- package/docs/classes/server.BVHIntersect.html +1 -0
- package/docs/classes/server.BVHNode.html +7 -0
- package/docs/classes/server.BVHVector3.html +1 -0
- package/docs/classes/server.Model.html +63 -0
- package/docs/classes/server.PBMGroup.html +9 -0
- package/docs/classes/server.PBMMesh.html +7 -0
- package/docs/classes/sticker.Sticker.html +32 -0
- package/docs/classes/vfx.Airflow.html +1 -0
- package/docs/classes/vfx.Flame.html +1 -0
- package/docs/classes/vfx.Particle.html +89 -0
- package/docs/classes/vfx.SpotLight.html +1 -0
- package/docs/index.html +166 -434
- package/docs/interfaces/five.AddableObject.html +1 -0
- package/docs/interfaces/five.AnimationFrame.html +1 -0
- package/docs/interfaces/five.CameraPose.html +1 -0
- package/docs/interfaces/five.ClipperParameter.html +1 -0
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +28 -0
- package/docs/interfaces/five.EventCallback.html +400 -0
- package/docs/interfaces/five.FiveInitArgs.html +109 -0
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -0
- package/docs/interfaces/five.ImageOptions.html +18 -0
- package/docs/interfaces/five.ImageURLMappings.html +1 -0
- package/docs/interfaces/five.ImageURLOptions.html +17 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -0
- package/docs/interfaces/five.Intersection.html +7 -0
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/five.ModelEventCallback.html +22 -0
- package/docs/interfaces/five.MotionKeyframe.html +1 -0
- package/docs/interfaces/five.MovePanoOptions.html +42 -0
- package/docs/interfaces/five.NetworkOptions.html +9 -0
- package/docs/interfaces/five.PBMPanoPicture.html +7 -0
- package/docs/interfaces/five.PBMParameters.html +27 -0
- package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +35 -0
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/five.Pose.html +37 -0
- package/docs/interfaces/five.Scissor.html +14 -0
- package/docs/interfaces/five.State.html +21 -0
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -0
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -0
- package/docs/interfaces/five.TextureOptions.html +20 -0
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +3 -0
- package/docs/interfaces/five.TileBoundingVolume.html +19 -0
- package/docs/interfaces/five.TileContent.html +1 -0
- package/docs/interfaces/five.TileCubeNode.html +1 -0
- package/docs/interfaces/five.TileCubeTree.html +1 -0
- package/docs/interfaces/five.Tileset3dOptions.html +1 -0
- package/docs/interfaces/five.TilesetJSON.html +1 -0
- package/docs/interfaces/five.TilesetJSONNode.html +1 -0
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -0
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +31 -0
- package/docs/interfaces/five.WebXRSelectParams.html +1 -0
- package/docs/interfaces/five.WorkCubeImage.html +13 -0
- package/docs/interfaces/five.WorkImage.html +21 -0
- package/docs/interfaces/five.WorkInitial.html +13 -0
- package/docs/interfaces/five.WorkModel.html +11 -0
- package/docs/interfaces/five.WorkModelTiles.html +3 -0
- package/docs/interfaces/five.WorkObserver.html +25 -0
- package/docs/interfaces/five.WorkTile.html +1 -0
- package/docs/interfaces/five.WorkVideo.html +9 -0
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +31 -0
- package/docs/interfaces/gltf_loader.DDS.html +1 -0
- package/docs/interfaces/gltf_loader.GLTF.html +7 -0
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -0
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -0
- package/docs/interfaces/react.FiveActionReactCallbacks.html +62 -0
- package/docs/interfaces/react.FiveInjectionTypes.html +191 -0
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -0
- package/docs/interfaces/server.Intersection.html +7 -0
- package/docs/interfaces/server.ModelEventCallback.html +18 -0
- package/docs/interfaces/sticker.IntersectionLike.html +8 -0
- package/docs/interfaces/vfx.ParticleArgs.html +75 -0
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -0
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +62 -0
- package/docs/modules/five.SubscribeMixinType.html +1 -0
- package/docs/modules/five.html +479 -3002
- package/docs/modules/gltf_loader.html +1 -155
- package/docs/modules/line.html +1 -202
- package/docs/modules/react.html +133 -1507
- package/docs/modules/server.html +18 -526
- package/docs/modules/sticker.html +1 -151
- package/docs/modules/vfx.html +1 -0
- package/docs/modules/vue.html +112 -0
- package/docs/modules.html +1 -136
- package/exporters/staticify.js +210 -0
- package/five/index.d.ts +1445 -264
- package/five/index.js +372 -1
- package/gltf-loader/index.d.ts +90 -5
- package/gltf-loader/index.js +260 -1
- package/line/index.d.ts +15 -2
- package/line/index.js +260 -1
- package/package.json +13 -13
- package/react/index.d.ts +75 -22
- package/react/index.js +260 -1
- package/resource/{basis_transcoder.js → basis/basis_transcoder.js} +0 -0
- package/resource/{basis_transcoder.wasm → basis/basis_transcoder.wasm} +0 -0
- package/resource/{draco_decoder.js → gltf/draco_decoder.js} +0 -0
- package/resource/{draco_decoder.wasm → gltf/draco_decoder.wasm} +0 -0
- package/resource/{draco_wasm_wrapper.js → gltf/draco_wasm_wrapper.js} +0 -0
- package/scripts/five-staticify.js +26 -0
- package/server/index.d.ts +197 -26
- package/server/index.js +367 -1
- package/sticker/index.d.ts +2 -1
- package/sticker/index.js +260 -1
- package/templates/quick-start/README.md +1 -1
- package/templates/quick-start/package.json +1 -1
- package/umd/five-gltf-loader.js +1 -0
- package/umd/five-gltf-loader.js.LICENSE.txt +14 -0
- package/umd/five-line.js +1 -0
- package/umd/five-line.js.LICENSE.txt +14 -0
- package/umd/five-react.js +1 -0
- package/umd/five-react.js.LICENSE.txt +14 -0
- package/umd/five-sticker.js +1 -0
- package/umd/five-sticker.js.LICENSE.txt +14 -0
- package/umd/five-vfx.js +1 -0
- package/umd/five-vue.js +1 -0
- package/umd/five.js +2 -0
- package/umd/five.js.LICENSE.txt +107 -0
- package/vfx/index.d.ts +264 -0
- package/vfx/index.js +260 -0
- package/vue/index.d.ts +440 -0
- package/vue/index.js +260 -0
- package/bundles/five.js +0 -2
- package/bundles/five.js.LICENSE.txt +0 -160
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/five.camera.html +0 -323
- package/docs/classes/five.five-1.html +0 -2670
- package/docs/classes/five.hashcubetexture.html +0 -252
- package/docs/classes/five.internalwebglrenderer.html +0 -212
- package/docs/classes/five.model.html +0 -982
- package/docs/classes/five.pbmgroup.html +0 -427
- package/docs/classes/five.pbmmaterial.html +0 -533
- package/docs/classes/five.pbmmesh.html +0 -254
- package/docs/classes/five.scene.html +0 -263
- package/docs/classes/five.subscribe.html +0 -569
- package/docs/classes/gltf_loader.gltfloader.html +0 -412
- package/docs/classes/gltf_loader.gltfobject.html +0 -287
- package/docs/classes/line.line-1.html +0 -381
- package/docs/classes/line.linegeometry.html +0 -524
- package/docs/classes/line.linematerial.html +0 -300
- package/docs/classes/line.linesegmentsgeometry.html +0 -471
- package/docs/classes/react.store.html +0 -605
- package/docs/classes/server.model.html +0 -823
- package/docs/classes/server.pbmgroup.html +0 -366
- package/docs/classes/server.pbmmesh.html +0 -335
- package/docs/classes/sticker.sticker-1.html +0 -465
- package/docs/interfaces/five.addableobject.html +0 -234
- package/docs/interfaces/five.depthpanoramacontrollercustominitargs.html +0 -420
- package/docs/interfaces/five.eventcallback.html +0 -2548
- package/docs/interfaces/five.fiveinitargs.html +0 -707
- package/docs/interfaces/five.floorplancontrollercustominitargs.html +0 -295
- package/docs/interfaces/five.imageoptions.html +0 -332
- package/docs/interfaces/five.intersection.html +0 -227
- package/docs/interfaces/five.intersectmeshinterface.html +0 -188
- package/docs/interfaces/five.modelcontrollercustominitargs.html +0 -366
- package/docs/interfaces/five.modeleventcallback.html +0 -367
- package/docs/interfaces/five.movepanooptions.html +0 -469
- package/docs/interfaces/five.panocirclemeshinterface.html +0 -361
- package/docs/interfaces/five.panoramacontrollercustominitargs.html +0 -464
- package/docs/interfaces/five.panoramalikecontrollercustominitargs.html +0 -364
- package/docs/interfaces/five.pbmparameters.html +0 -474
- package/docs/interfaces/five.pose.html +0 -270
- package/docs/interfaces/five.scissor.html +0 -252
- package/docs/interfaces/five.state.html +0 -300
- package/docs/interfaces/five.subscribemixintype.emit.html +0 -180
- package/docs/interfaces/five.subscribemixintype.haslistener.html +0 -171
- package/docs/interfaces/five.subscribemixintype.off.html +0 -198
- package/docs/interfaces/five.subscribemixintype.on.html +0 -213
- package/docs/interfaces/five.subscribemixintype.once.html +0 -210
- package/docs/interfaces/five.topviewcontrollercustominitargs.html +0 -226
- package/docs/interfaces/five.vrpanoramacontrollercustominitargs.html +0 -452
- package/docs/interfaces/gltf_loader.gltf.html +0 -304
- package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -580
- package/docs/interfaces/react.fiveinjectiontypes.html +0 -1625
- package/docs/interfaces/react.injectfivetoprops.html +0 -280
- package/docs/interfaces/server.intersection.html +0 -308
- package/docs/interfaces/server.modeleventcallback.html +0 -409
- package/docs/interfaces/sticker.intersectionlike.html +0 -223
- package/docs/modules/five.subscribemixintype.html +0 -143
- package/five.js.LICENSE.txt +0 -160
- package/scripts/export-five-resource/chfs.exe +0 -0
- package/scripts/export-five-resource/fileify.js +0 -192
- package/scripts/export-five-resource/format-work.js +0 -71
- package/scripts/export-five-resource/staticify.js +0 -327
- package/scripts/transcode-model/BufferGeometryUtils.js +0 -832
- package/scripts/transcode-model/LoaderSupport.js +0 -1545
- package/scripts/transcode-model/MTLLoader.js +0 -602
- package/scripts/transcode-model/OBJLoader2.js +0 -1470
- package/scripts/transcode-model/obj2pbm.js +0 -65
package/server/index.d.ts
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
import * as THREE_2 from 'three';
|
|
2
2
|
|
|
3
|
+
export declare class BVH {
|
|
4
|
+
private trianglesArray;
|
|
5
|
+
private offsetArray;
|
|
6
|
+
private maxTrianglesPerNode;
|
|
7
|
+
private bboxArray;
|
|
8
|
+
private rootNode;
|
|
9
|
+
private nodesToSplit;
|
|
10
|
+
constructor(trianglesArray: Float32Array, maxTrianglesPerNode: number);
|
|
11
|
+
private splitNode;
|
|
12
|
+
/**
|
|
13
|
+
* 计算射线与三角形的碰撞
|
|
14
|
+
* @param rayOrigin - 射线的原点坐标
|
|
15
|
+
* @param rayDirection - 设想的方向向量
|
|
16
|
+
* @param backfaceCulling - 是否背面剔除
|
|
17
|
+
* @return 碰撞焦点数组
|
|
18
|
+
*/
|
|
19
|
+
intersectRay(rayOrigin: BVHVector3, rayDirection: BVHVector3, backfaceCulling: boolean): BVHIntersect[];
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare class BVHIntersect {
|
|
24
|
+
triangle: [BVHVector3, BVHVector3, BVHVector3];
|
|
25
|
+
triangleIndex: number;
|
|
26
|
+
intersectionPoint: BVHVector3;
|
|
27
|
+
constructor(triangle: [BVHVector3, BVHVector3, BVHVector3], triangleIndex: number, intersectionPoint: BVHVector3);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A node in the BVH structure
|
|
32
|
+
* @param extents - the min coords of this node's bounding box
|
|
33
|
+
* @param startIndex - an index in the bbox array, where the first element of this node is located
|
|
34
|
+
* @param endIndex - an index in the bbox array, where the last of this node is located, plus 1 (meaning that its non-inclusive).
|
|
35
|
+
* @param level - distance of this node from the root for the bvh tree. root node has level=0, its children have level=1 etc.
|
|
36
|
+
*/
|
|
37
|
+
export declare class BVHNode {
|
|
38
|
+
extents: ArrayLike<number>;
|
|
39
|
+
startIndex: number;
|
|
40
|
+
endIndex: number;
|
|
41
|
+
level: number;
|
|
42
|
+
node0: BVHNode | null;
|
|
43
|
+
node1: BVHNode | null;
|
|
44
|
+
constructor(extents: ArrayLike<number>, startIndex: number, endIndex: number, level: number);
|
|
45
|
+
clearShapes(): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export declare class BVHVector3 {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
z: number;
|
|
52
|
+
constructor(x: number, y: number, z: number);
|
|
53
|
+
copy(v: BVHVector3): this;
|
|
54
|
+
set(x: number, y: number, z: number): this;
|
|
55
|
+
fromArray(array: number[], firstElementPos?: number): this;
|
|
56
|
+
add(v: BVHVector3): this;
|
|
57
|
+
multiplyScalar(scalar: number): this;
|
|
58
|
+
subVectors(a: BVHVector3, b: BVHVector3): this;
|
|
59
|
+
dot(v: BVHVector3): number;
|
|
60
|
+
cross(v: BVHVector3): this;
|
|
61
|
+
crossVectors(a: BVHVector3, b: BVHVector3): this;
|
|
62
|
+
clone(): BVHVector3;
|
|
63
|
+
}
|
|
64
|
+
|
|
3
65
|
/**
|
|
4
66
|
* Five 模型事件列表
|
|
5
67
|
* @description
|
|
@@ -106,7 +168,15 @@ export declare type LooseWorkPanorama = {
|
|
|
106
168
|
front: string;
|
|
107
169
|
back: string;
|
|
108
170
|
video?: LooseWorkVideo;
|
|
109
|
-
|
|
171
|
+
luminance?: {
|
|
172
|
+
up: string;
|
|
173
|
+
down: string;
|
|
174
|
+
right: string;
|
|
175
|
+
left: string;
|
|
176
|
+
front: string;
|
|
177
|
+
back: string;
|
|
178
|
+
};
|
|
179
|
+
tiles?: number[];
|
|
110
180
|
};
|
|
111
181
|
|
|
112
182
|
export declare type LooseWorkVideo = {
|
|
@@ -121,6 +191,7 @@ export declare type LooseWorkVideo = {
|
|
|
121
191
|
* - **Model**: 模型游走模式
|
|
122
192
|
* - **Floorplan**: 模型查看模式
|
|
123
193
|
* - **Topview**: 户型图模式
|
|
194
|
+
* - **Mapview**: 地图模式
|
|
124
195
|
* - **DepthPanorama**: 深度图游走模式
|
|
125
196
|
* - **VRPanorama**: VR眼镜模式
|
|
126
197
|
*/
|
|
@@ -129,6 +200,8 @@ export declare type Mode =
|
|
|
129
200
|
"Floorplan" |
|
|
130
201
|
/** 户型图模式 */
|
|
131
202
|
"Topview" |
|
|
203
|
+
/** 地图模式 */
|
|
204
|
+
"Mapview" |
|
|
132
205
|
/** 全景图游走模式 */
|
|
133
206
|
"Panorama" |
|
|
134
207
|
/** VR眼镜模式 */
|
|
@@ -136,7 +209,9 @@ export declare type Mode =
|
|
|
136
209
|
/** 模型游走模式 */
|
|
137
210
|
"Model" |
|
|
138
211
|
/** 深度图游走模式 */
|
|
139
|
-
"DepthPanorama"
|
|
212
|
+
"DepthPanorama" |
|
|
213
|
+
/** XR眼镜模式*/
|
|
214
|
+
"XRPanorama";
|
|
140
215
|
|
|
141
216
|
/**
|
|
142
217
|
* Five 模型
|
|
@@ -181,7 +256,7 @@ export declare class Model extends PBMGroup implements Subscribe<EventType> {
|
|
|
181
256
|
*/
|
|
182
257
|
emit: SubscribeMixinType.emit<EventType>;
|
|
183
258
|
/** bvh 树的计算结果 */
|
|
184
|
-
bvhs:
|
|
259
|
+
bvhs: BVH[] & {
|
|
185
260
|
loaded?: boolean;
|
|
186
261
|
};
|
|
187
262
|
constructor();
|
|
@@ -211,13 +286,13 @@ export declare class Model extends PBMGroup implements Subscribe<EventType> {
|
|
|
211
286
|
* @returns 返回碰撞
|
|
212
287
|
*/
|
|
213
288
|
intersectRaycaster(raycaster: THREE_2.Raycaster, floors?: number | number[]): Intersection[];
|
|
214
|
-
buildBVH():
|
|
289
|
+
buildBVH(): void;
|
|
215
290
|
/**
|
|
216
291
|
* 加载模型
|
|
217
292
|
* @param workModel - work 的 model 内容
|
|
218
293
|
* @param imageOptions - 图片参数
|
|
219
294
|
*/
|
|
220
|
-
load(workModel: WorkModel): void
|
|
295
|
+
load(workModel: WorkModel): Promise<void>;
|
|
221
296
|
/**
|
|
222
297
|
* 析构函数
|
|
223
298
|
* @description
|
|
@@ -226,7 +301,25 @@ export declare class Model extends PBMGroup implements Subscribe<EventType> {
|
|
|
226
301
|
dispose(): void;
|
|
227
302
|
}
|
|
228
303
|
|
|
229
|
-
|
|
304
|
+
/**
|
|
305
|
+
* 解析 Work 数据
|
|
306
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
307
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
308
|
+
* @param urlTransform - 配置参数, URL 解析规则
|
|
309
|
+
* @returns - 签署过的 Work 数据结构
|
|
310
|
+
*/
|
|
311
|
+
export declare function parseWork(obj: Work | LooseWork | string | any, options?: ParseWorkOptions, urlTransform?: (origin: string, absolute: string, relative: string, type: "panorama" | "texture" | "model") => void): Work;
|
|
312
|
+
|
|
313
|
+
export declare type ParseWorkOptions = {
|
|
314
|
+
/** 重写 work 中的资源前缀 */
|
|
315
|
+
baseURL?: string;
|
|
316
|
+
/** work 中的资源地址使用短地址 */
|
|
317
|
+
shortPath?: boolean;
|
|
318
|
+
/** work 中的资源使用 jsonp 方式发布 */
|
|
319
|
+
jsonp?: boolean;
|
|
320
|
+
/** work 中模型是否计算bvh碰撞数,默认计算 true */
|
|
321
|
+
modelBvh?: boolean;
|
|
322
|
+
};
|
|
230
323
|
|
|
231
324
|
/** PBM 模型组 */
|
|
232
325
|
export declare class PBMGroup extends THREE_2.Group {
|
|
@@ -251,14 +344,16 @@ export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry> {
|
|
|
251
344
|
* [[include: coordinate.md]]
|
|
252
345
|
*/
|
|
253
346
|
export declare interface Pose {
|
|
254
|
-
/** 相机俯仰角 */
|
|
255
|
-
longitude: number;
|
|
256
347
|
/** 相机偏航角 */
|
|
348
|
+
longitude: number;
|
|
349
|
+
/** 相机俯仰角 */
|
|
257
350
|
latitude: number;
|
|
258
351
|
/** 相机可视角度(垂直)*/
|
|
259
352
|
fov: number;
|
|
260
353
|
/** 相机位置*/
|
|
261
354
|
offset: THREE_2.Vector3;
|
|
355
|
+
/** 相机距离 */
|
|
356
|
+
distance: number;
|
|
262
357
|
}
|
|
263
358
|
|
|
264
359
|
/**
|
|
@@ -277,8 +372,6 @@ export declare interface State extends Pose {
|
|
|
277
372
|
panoIndex: number;
|
|
278
373
|
}
|
|
279
374
|
|
|
280
|
-
export declare function stringifyWork(work: Work): LooseWork;
|
|
281
|
-
|
|
282
375
|
/**
|
|
283
376
|
* 监听者模式
|
|
284
377
|
* @template T - 预设的监听回调类型
|
|
@@ -357,57 +450,135 @@ export declare namespace SubscribeMixinType {
|
|
|
357
450
|
}
|
|
358
451
|
}
|
|
359
452
|
|
|
360
|
-
export declare
|
|
361
|
-
|
|
453
|
+
export declare class Work {
|
|
454
|
+
/** 名称 */
|
|
455
|
+
name: string;
|
|
456
|
+
/** 编号 */
|
|
457
|
+
workCode: string;
|
|
458
|
+
/** 允许访问的安全域名 */
|
|
459
|
+
allowHosts: string[];
|
|
460
|
+
/** 过期时间 */
|
|
461
|
+
expire: Date;
|
|
462
|
+
/** 初始化参数 */
|
|
362
463
|
initial: WorkInitial;
|
|
464
|
+
/** 模型参数 */
|
|
363
465
|
model?: WorkModel;
|
|
466
|
+
/** 全景点位信息 */
|
|
364
467
|
observers: WorkObserver[];
|
|
365
|
-
|
|
468
|
+
/** 数据签发人 */
|
|
469
|
+
issuer: string;
|
|
470
|
+
/** 原始数据 */
|
|
471
|
+
raw: {
|
|
472
|
+
works: string[];
|
|
473
|
+
options: string;
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* 解析 Work 数据
|
|
477
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
478
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
479
|
+
* @param urlTransform - 配置参数, URL 解析规则
|
|
480
|
+
* @returns - 签署过的 Work 数据结构
|
|
481
|
+
*/
|
|
482
|
+
static parse: typeof parseWork;
|
|
483
|
+
constructor();
|
|
484
|
+
toJSON(): any;
|
|
485
|
+
}
|
|
366
486
|
|
|
367
|
-
|
|
368
|
-
|
|
487
|
+
export declare interface WorkCubeImage {
|
|
488
|
+
/** 全景图 up */
|
|
369
489
|
up: string;
|
|
490
|
+
/** 全景图 down */
|
|
370
491
|
down: string;
|
|
492
|
+
/** 全景图 right */
|
|
371
493
|
right: string;
|
|
494
|
+
/** 全景图 left */
|
|
372
495
|
left: string;
|
|
496
|
+
/** 全景图 front */
|
|
373
497
|
front: string;
|
|
498
|
+
/** 全景图 back */
|
|
374
499
|
back: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** 全景图 */
|
|
503
|
+
export declare interface WorkImage extends WorkCubeImage {
|
|
504
|
+
/** 深度图 */
|
|
375
505
|
depth?: string;
|
|
376
|
-
|
|
377
|
-
|
|
506
|
+
/** 光照强度图 */
|
|
507
|
+
luminance?: WorkCubeImage;
|
|
508
|
+
/** 瓦片信息 */
|
|
509
|
+
tiles?: WorkTile[];
|
|
510
|
+
}
|
|
378
511
|
|
|
379
512
|
/** 初始化位姿参数 */
|
|
380
|
-
export declare
|
|
513
|
+
export declare interface WorkInitial extends Omit<State, "offset" | "distance"> {
|
|
514
|
+
}
|
|
381
515
|
|
|
382
516
|
/** 模型数据 */
|
|
383
|
-
export declare
|
|
517
|
+
export declare interface WorkModel {
|
|
518
|
+
/** 模型文件地址 at3d / domez */
|
|
384
519
|
file: string;
|
|
520
|
+
/** 模型贴图文件地址 */
|
|
385
521
|
textures: string[];
|
|
522
|
+
/** 模型贴图文件地址的父目录 */
|
|
386
523
|
textureBase: string;
|
|
524
|
+
/** 是否开启 bvh 碰撞树,开启会大大加快射线碰撞的执行效率 */
|
|
387
525
|
bvh: boolean;
|
|
388
|
-
|
|
389
|
-
}
|
|
526
|
+
tiles?: WorkModelTiles;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/** 模型瓦片 */
|
|
530
|
+
export declare interface WorkModelTiles {
|
|
531
|
+
tileset_url: string;
|
|
532
|
+
tileset_url_md5: string;
|
|
533
|
+
b3md_mappings_url: string;
|
|
534
|
+
b3md_mappings_url_md5: string;
|
|
535
|
+
}
|
|
390
536
|
|
|
391
537
|
/** 每个点位的数据 */
|
|
392
|
-
export declare
|
|
538
|
+
export declare interface WorkObserver {
|
|
539
|
+
/** 点位序号 */
|
|
393
540
|
panoIndex: number;
|
|
541
|
+
/** 点位是否激活可用 */
|
|
394
542
|
active: boolean;
|
|
543
|
+
/** 点位是否可加载 */
|
|
395
544
|
loadable: boolean;
|
|
396
|
-
|
|
545
|
+
/** 点位全景图 */
|
|
546
|
+
images: WorkImage;
|
|
547
|
+
/** 点位视频 */
|
|
397
548
|
video?: WorkVideo;
|
|
549
|
+
/** 可以看到的相关点位序号 */
|
|
398
550
|
visibleNodes: number[];
|
|
551
|
+
/** 可以连通的相关点位序号 */
|
|
399
552
|
accessibleNodes: number[];
|
|
553
|
+
/** 点位和模型的旋转对齐关系四元数 */
|
|
400
554
|
quaternion: THREE_2.Quaternion;
|
|
555
|
+
/** 点位和模型的地面位置坐标关系 */
|
|
401
556
|
standingPosition: THREE_2.Vector3;
|
|
557
|
+
/** 点位和模型的观察点坐标关系 */
|
|
402
558
|
position: THREE_2.Vector3;
|
|
559
|
+
/** 点位所在楼层 */
|
|
403
560
|
floorIndex: number;
|
|
404
|
-
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export declare interface WorkTile {
|
|
564
|
+
level: number;
|
|
565
|
+
size: number;
|
|
566
|
+
up: string;
|
|
567
|
+
down: string;
|
|
568
|
+
right: string;
|
|
569
|
+
left: string;
|
|
570
|
+
front: string;
|
|
571
|
+
back: string;
|
|
572
|
+
}
|
|
405
573
|
|
|
406
574
|
/** 全景视频贴片 */
|
|
407
|
-
export declare
|
|
575
|
+
export declare interface WorkVideo {
|
|
576
|
+
/** 视频源 url */
|
|
408
577
|
source: string;
|
|
578
|
+
/** 视频源变化矩阵 */
|
|
409
579
|
matrix: THREE_2.Matrix4;
|
|
580
|
+
/** 视频源长宽尺寸 */
|
|
410
581
|
size: THREE_2.Vector2;
|
|
411
|
-
}
|
|
582
|
+
}
|
|
412
583
|
|
|
413
584
|
export { }
|