@realsee/five 5.0.0-alpha.15 → 5.0.0-alpha.151
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 +323 -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 +7 -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/index.html +166 -422
- 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 +399 -0
- package/docs/interfaces/five.FiveInitArgs.html +109 -0
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +15 -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.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 +33 -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 +7 -0
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +29 -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 +29 -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/vue.FiveActionVueCallbacks.html +62 -0
- package/docs/modules/five.SubscribeMixinType.html +1 -0
- package/docs/modules/five.html +496 -0
- package/docs/modules/gltf_loader.html +1 -0
- package/docs/modules/line.html +1 -0
- package/docs/modules/react.html +133 -1374
- package/docs/modules/server.html +18 -0
- package/docs/modules/sticker.html +1 -0
- package/docs/modules/vue.html +112 -0
- package/docs/modules.html +1 -120
- package/exporters/staticify.js +210 -0
- package/five/index.d.ts +2922 -0
- package/five/index.js +372 -0
- package/gltf-loader/index.d.ts +160 -0
- package/gltf-loader/index.js +260 -0
- package/line/index.d.ts +69 -0
- package/line/index.js +260 -0
- package/package.json +25 -17
- package/react/index.d.ts +86 -24
- 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/gltf/draco_decoder.js +31 -0
- package/resource/gltf/draco_decoder.wasm +0 -0
- package/resource/gltf/draco_wasm_wrapper.js +119 -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 +71 -0
- package/sticker/index.js +260 -0
- package/templates/quick-start/README.md +1 -1
- package/templates/quick-start/package.json +1 -1
- package/templates/react-component/lib/index.tsx +3 -3
- 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-vue.js +1 -0
- package/umd/five.js +2 -0
- package/umd/five.js.LICENSE.txt +107 -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/index.five.html +0 -2498
- package/docs/classes/index.fivecamera.html +0 -311
- package/docs/classes/index.fivehashcubetexture.html +0 -240
- package/docs/classes/index.fiveline.html +0 -342
- package/docs/classes/index.fivelinegeometry.html +0 -500
- package/docs/classes/index.fivelinematerial.html +0 -276
- package/docs/classes/index.fivelinesegmentsgeometry.html +0 -447
- package/docs/classes/index.fivescene.html +0 -186
- package/docs/classes/index.internalwebglrenderer.html +0 -200
- package/docs/classes/index.model.html +0 -883
- package/docs/classes/index.pbmgroup.html +0 -415
- package/docs/classes/index.pbmmaterial.html +0 -521
- package/docs/classes/index.pbmmesh.html +0 -242
- package/docs/classes/index.subscribe.html +0 -556
- package/docs/classes/react.store.html +0 -584
- package/docs/interfaces/index.depthpanoramacontrollercustominitargs.html +0 -408
- package/docs/interfaces/index.eventcallback.html +0 -2452
- package/docs/interfaces/index.fiveinitargs.html +0 -695
- package/docs/interfaces/index.floorplancontrollercustominitargs.html +0 -283
- package/docs/interfaces/index.imageoptions.html +0 -320
- package/docs/interfaces/index.intersection.html +0 -215
- package/docs/interfaces/index.intersectmeshinterface.html +0 -176
- package/docs/interfaces/index.modelcontrollercustominitargs.html +0 -354
- package/docs/interfaces/index.modeleventcallback.html +0 -316
- package/docs/interfaces/index.movepanooptions.html +0 -457
- package/docs/interfaces/index.panocirclemeshinterface.html +0 -349
- package/docs/interfaces/index.panoramacontrollercustominitargs.html +0 -433
- package/docs/interfaces/index.panoramalikecontrollercustominitargs.html +0 -352
- package/docs/interfaces/index.pbmparameters.html +0 -462
- package/docs/interfaces/index.pose.html +0 -258
- package/docs/interfaces/index.scissor.html +0 -240
- package/docs/interfaces/index.state.html +0 -288
- package/docs/interfaces/index.subscribemixintype.emit.html +0 -180
- package/docs/interfaces/index.subscribemixintype.haslistener.html +0 -171
- package/docs/interfaces/index.subscribemixintype.off.html +0 -198
- package/docs/interfaces/index.subscribemixintype.on.html +0 -213
- package/docs/interfaces/index.subscribemixintype.once.html +0 -210
- package/docs/interfaces/index.topviewcontrollercustominitargs.html +0 -214
- package/docs/interfaces/index.vrpanoramacontrollercustominitargs.html +0 -420
- package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -559
- package/docs/interfaces/react.fiveinjectiontypes.html +0 -1473
- package/docs/interfaces/react.injectfivetoprops.html +0 -259
- package/docs/modules/index.html +0 -3027
- package/docs/modules/index.subscribemixintype.html +0 -143
- package/five.js.LICENSE.txt +0 -160
- package/index.d.ts +0 -1807
- package/index.js +0 -1
- 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
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
3
|
+
Code licensed under the BSD License:
|
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
|
5
|
+
version: 2.9.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */
|
|
9
|
+
|
|
10
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
11
|
+
* http://hammerjs.github.io/
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
14
|
+
* Licensed under the MIT license */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
* CryptoJS
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) 2009-2013 Jeff Mott
|
|
21
|
+
*
|
|
22
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
23
|
+
* a copy of this software and associated documentation files (the
|
|
24
|
+
* "Software"), to deal in the Software without restriction, including
|
|
25
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
26
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
27
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
28
|
+
* the following conditions:
|
|
29
|
+
*
|
|
30
|
+
* The above copyright notice and this permission notice shall be
|
|
31
|
+
* included in all copies or substantial portions of the Software.
|
|
32
|
+
*
|
|
33
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
34
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
35
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
36
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
37
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
38
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
39
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
40
|
+
*
|
|
41
|
+
* https://code.google.com/p/crypto-js/wiki/License
|
|
42
|
+
* PART: ext/cryptojs
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* RSA and ECC in JavaScript
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) 2003-2005 Tom Wu All Rights Reserved.
|
|
50
|
+
*
|
|
51
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
52
|
+
* a copy of this software and associated documentation files (the
|
|
53
|
+
* "Software"), to deal in the Software without restriction, including
|
|
54
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
55
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
56
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
57
|
+
* the following conditions:
|
|
58
|
+
*
|
|
59
|
+
* The above copyright notice and this permission notice shall be
|
|
60
|
+
* included in all copies or substantial portions of the Software.
|
|
61
|
+
*
|
|
62
|
+
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
63
|
+
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
64
|
+
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
65
|
+
*
|
|
66
|
+
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
67
|
+
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
68
|
+
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
69
|
+
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
70
|
+
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
71
|
+
*
|
|
72
|
+
* In addition, the following condition applies:
|
|
73
|
+
*
|
|
74
|
+
* All redistributions must retain an intact copy of this copyright notice
|
|
75
|
+
* and disclaimer.
|
|
76
|
+
*
|
|
77
|
+
* http://www-cs-students.stanford.edu/~tjw/jsbn/
|
|
78
|
+
* LICENSE: BSD License
|
|
79
|
+
* PART: ext/{base64,jsbn,jsbn2,prgn4,rng,rsa,rsa2}
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @license
|
|
84
|
+
* The 'jsrsasign'(RSA-Sign JavaScript Library) License
|
|
85
|
+
*
|
|
86
|
+
* Copyright (c) 2010-2021 Kenji Urushima
|
|
87
|
+
*
|
|
88
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
89
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
90
|
+
* in the Software without restriction, including without limitation the rights
|
|
91
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
92
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
93
|
+
* furnished to do so, subject to the following conditions:
|
|
94
|
+
*
|
|
95
|
+
* The above copyright notice and this permission notice shall be included in
|
|
96
|
+
* all copies or substantial portions of the Software.
|
|
97
|
+
*
|
|
98
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
99
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
100
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
101
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
102
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
103
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
104
|
+
* THE SOFTWARE.
|
|
105
|
+
*
|
|
106
|
+
* LICENSE: MIT License
|
|
107
|
+
*/
|
package/vue/index.d.ts
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { ComponentCustomProps } from 'vue';
|
|
3
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
4
|
+
import { DeepReadonly } from 'vue';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { EventCallback } from '@realsee/five';
|
|
7
|
+
import { ExtractPropTypes } from 'vue';
|
|
8
|
+
import { Five } from '@realsee/five';
|
|
9
|
+
import { FiveInitArgs } from '@realsee/five';
|
|
10
|
+
import { Intersection } from '@realsee/five';
|
|
11
|
+
import { Model } from '@realsee/five';
|
|
12
|
+
import { Pose } from '@realsee/five';
|
|
13
|
+
import { PropType } from 'vue';
|
|
14
|
+
import { Ref } from 'vue';
|
|
15
|
+
import { RendererElement } from 'vue';
|
|
16
|
+
import { RendererNode } from 'vue';
|
|
17
|
+
import { Scene } from '@realsee/five';
|
|
18
|
+
import { State } from '@realsee/five';
|
|
19
|
+
import * as THREE_2 from 'three';
|
|
20
|
+
import { VNode } from 'vue';
|
|
21
|
+
import { VNodeProps } from 'vue';
|
|
22
|
+
import { Work } from '@realsee/five';
|
|
23
|
+
import { WorkObserver } from '@realsee/five';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Five 命令集合
|
|
27
|
+
*/
|
|
28
|
+
export declare interface FiveActionVueCallbacks {
|
|
29
|
+
/**
|
|
30
|
+
* 移动相机。(不触发点位移动)
|
|
31
|
+
* @description
|
|
32
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
33
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
34
|
+
* @param pose - 相机目标位置
|
|
35
|
+
* @param duration - 动画触发的时常
|
|
36
|
+
* @returns Promise 是否移动成功
|
|
37
|
+
*/
|
|
38
|
+
updateCamera(pose: Pose, duration: number): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* 初始化 initBasisLoader
|
|
41
|
+
* @description
|
|
42
|
+
* 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
|
|
43
|
+
* basisLoader 只会初始化一次,一旦初始化则不会再修改。
|
|
44
|
+
*
|
|
45
|
+
* @param transcoderResourcePath - basis 解析器路径
|
|
46
|
+
* 如果不设置,使用默认解析器 basis 解析器。
|
|
47
|
+
* 可以传入解析器的 `resourcePath`, 则使用指定的解析器
|
|
48
|
+
* @example
|
|
49
|
+
* ```
|
|
50
|
+
* // 使用默认解析器
|
|
51
|
+
* initialBasisLoader();
|
|
52
|
+
*
|
|
53
|
+
* // 使用指定解析器
|
|
54
|
+
* // 会调用这个目录下的 basis_transcoder.js basis_transcoder.wasm 文件作为解析器
|
|
55
|
+
* initialBasisLoader("https://vr-public.realsee-cdn.cn/release/static/image/release/five/basis/");
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
initBasisLoader(transcoderResourcePath?: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* 获取画面中的像素颜色
|
|
61
|
+
* @param x - 获取像素区域的起始坐标 x
|
|
62
|
+
* @param y - 获取像素区域的起始坐标 y
|
|
63
|
+
* @param width - 获取像素区域的宽度
|
|
64
|
+
* @param height - 获取像素区域的高度
|
|
65
|
+
* @param pixelRatio - 获取区域的像素比
|
|
66
|
+
* @returns rgba颜色平铺的 Uint8Array
|
|
67
|
+
*/
|
|
68
|
+
getPixels(x: number, y: number, width: number, height: number, pixelRatio?: number): Uint8Array;
|
|
69
|
+
/**
|
|
70
|
+
* 强制渲染
|
|
71
|
+
* @description
|
|
72
|
+
* 调用 `render()` 和 `needsRender()` 均可在按需渲染时,使得画面渲染一次
|
|
73
|
+
* 区别在于:
|
|
74
|
+
* - `needsRender()` 为在下帧渲染画面
|
|
75
|
+
* - `render()` 在当前帧渲染画面
|
|
76
|
+
* 推荐使用 `needsRender()`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `render()`
|
|
77
|
+
*
|
|
78
|
+
* @param callback - 渲染完成回调
|
|
79
|
+
*/
|
|
80
|
+
render(callback?: () => void): void;
|
|
81
|
+
/**
|
|
82
|
+
* 下一帧渲染
|
|
83
|
+
* @description
|
|
84
|
+
* 调用 `render()` 和 `needsRender()` 均可在按需渲染时,使得画面渲染一次
|
|
85
|
+
* 区别在于:
|
|
86
|
+
* - `needsRender()` 为在下帧渲染画面
|
|
87
|
+
* - `render()` 在当前帧渲染画面
|
|
88
|
+
* 推荐使用 `needsRender()`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `render()`
|
|
89
|
+
*/
|
|
90
|
+
needsRender(): void;
|
|
91
|
+
/**
|
|
92
|
+
* 预加载点位图片资源
|
|
93
|
+
* @param panoIndex - 观察点序号
|
|
94
|
+
* @param callback - 加载完成回调, 并传递加载用时。
|
|
95
|
+
* @returns 加载完成的 Promise 参数同 callback
|
|
96
|
+
*/
|
|
97
|
+
preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Five 渲染区域组件
|
|
102
|
+
* @description Five 渲染区域组件,请在 FiveProvider 内使用
|
|
103
|
+
* @param width - 渲染区域的宽度
|
|
104
|
+
* @param height - 渲染区域的高度
|
|
105
|
+
* @returns Vue 元素
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* <FiveProvider :initialWork="work">
|
|
109
|
+
* <FiveCanvas width="512" height="512"/>
|
|
110
|
+
* </FiveProvider>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
export declare const FiveCanvas: DefineComponent< {
|
|
114
|
+
width: {
|
|
115
|
+
type: PropType<number>;
|
|
116
|
+
required: true;
|
|
117
|
+
};
|
|
118
|
+
height: {
|
|
119
|
+
type: PropType<number>;
|
|
120
|
+
required: true;
|
|
121
|
+
};
|
|
122
|
+
}, () => VNode<RendererNode, RendererElement, {
|
|
123
|
+
[key: string]: any;
|
|
124
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
125
|
+
width: {
|
|
126
|
+
type: PropType<number>;
|
|
127
|
+
required: true;
|
|
128
|
+
};
|
|
129
|
+
height: {
|
|
130
|
+
type: PropType<number>;
|
|
131
|
+
required: true;
|
|
132
|
+
};
|
|
133
|
+
}>>, {}>;
|
|
134
|
+
|
|
135
|
+
export declare type FiveModelIntersectRaycaster = (raycaster: Ref<THREE_2.Raycaster> | THREE_2.Raycaster) => Ref<Intersection[]>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Five 实例化Five 组件
|
|
139
|
+
*
|
|
140
|
+
* 在 FiveProvider 下,可以使用 FiveCanvas 来创建渲染画布。
|
|
141
|
+
* 以及使用 useFiveState useFiveEventCallback等 Five Vue Composition API 来对 FiveProvider 进行操作
|
|
142
|
+
* @description Five 创建Five实例的组件
|
|
143
|
+
* @param FiveProviderComponent - Five 参数
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* <FiveProvider :initialWork="work">
|
|
147
|
+
* <FiveCanvas width="512" height="512"/>
|
|
148
|
+
* </FiveProvider>
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
export declare const FiveProvider: FiveProviderComponent;
|
|
152
|
+
|
|
153
|
+
export declare type FiveProviderComponent = DefineComponent<{
|
|
154
|
+
work: PropType<Work>;
|
|
155
|
+
initialWork: PropType<Work | Promise<Work>>;
|
|
156
|
+
initialState: PropType<"inherit" | "initial" | Partial<Omit<State, "offset">>>;
|
|
157
|
+
initialUserAction: BooleanConstructor;
|
|
158
|
+
onWorkChange: PropType<(work: Work) => void>;
|
|
159
|
+
onStateChange: PropType<(state: State, userAction: boolean) => void>;
|
|
160
|
+
onCurrentStateChange: PropType<(state: State, userAction: boolean) => void>;
|
|
161
|
+
onError: PropType<(error: Error) => void>;
|
|
162
|
+
fiveInitArgs: {
|
|
163
|
+
type: PropType<Omit<FiveInitArgs, "renderer" | "scissor">>;
|
|
164
|
+
default: () => {};
|
|
165
|
+
};
|
|
166
|
+
style: ObjectConstructor;
|
|
167
|
+
}, {
|
|
168
|
+
five: Readonly<Five>;
|
|
169
|
+
}>;
|
|
170
|
+
|
|
171
|
+
export declare type Project2d = (vector3: THREE_2.Vector3 | Ref<THREE_2.Vector3>, testModel: boolean) => Ref<THREE_2.Vector2 | null>;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Five Vue Hooks: 获取 five 实例
|
|
175
|
+
* @description 不到万不得已,并不推荐直接使用。
|
|
176
|
+
* @deprecated 不到万不得已,并不推荐直接使用。
|
|
177
|
+
* @returns five 实例
|
|
178
|
+
*/
|
|
179
|
+
export declare function unsafe__useFiveInject(): Five;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Five Vue Hooks: 使用 Five 的命令
|
|
183
|
+
*
|
|
184
|
+
* @function updateCamera
|
|
185
|
+
* ```
|
|
186
|
+
* 移动相机。(不触发点位移动)
|
|
187
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
188
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
189
|
+
*
|
|
190
|
+
* // params pose - 相机目标位置
|
|
191
|
+
* // params duration - 动画触发的时常
|
|
192
|
+
* // params Promise - 是否移动成功
|
|
193
|
+
* updateCamera(pose: Pose, duration: number): Promise<void>
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @function initBasisLoader
|
|
197
|
+
* ```
|
|
198
|
+
* 初始化 initBasisLoader
|
|
199
|
+
* 同初始化的 initBasisLoader 参数。用于初始化 basisLoader。
|
|
200
|
+
* basisLoader 只会初始化一次,一旦初始化则不会再修改。
|
|
201
|
+
*
|
|
202
|
+
* // param transcoderResourcePath
|
|
203
|
+
* // 如果不设置,使用默认解析器 basis 解析器。
|
|
204
|
+
* // 可以传入解析器的 `resourcePath`, 则使用指定的解析器
|
|
205
|
+
* initBasisLoader(transcoderResourcePath?: string): void,
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @function getPixels
|
|
209
|
+
* ```
|
|
210
|
+
* 获取画面中的像素颜色
|
|
211
|
+
* // param x - 获取像素区域的起始坐标 x
|
|
212
|
+
* // param y - 获取像素区域的起始坐标 y
|
|
213
|
+
* // param width - 获取像素区域的宽度
|
|
214
|
+
* // param height - 获取像素区域的高度
|
|
215
|
+
* // param pixelRatio - 获取区域的像素比
|
|
216
|
+
* // returns rgba颜色平铺的 Uint8Array
|
|
217
|
+
* getPixels(x: number, y: number, width: number, height: number, pixelRatio?: number): Uint8Array,
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* @function render
|
|
221
|
+
* ```
|
|
222
|
+
* 强制渲染
|
|
223
|
+
* 调用 render() 和 needsRender() 均可在按需渲染时,使得画面渲染一次
|
|
224
|
+
* 区别在于:
|
|
225
|
+
* - needsRender() 为在下帧渲染画面
|
|
226
|
+
* - render() 在当前帧渲染画面
|
|
227
|
+
* 推荐使用 needsRender(), 可以更加流畅。但是如果需要截图等同步操作,可以使用 render()
|
|
228
|
+
*
|
|
229
|
+
* // param callback 渲染完成回调
|
|
230
|
+
* render(callback?: () => void): void,
|
|
231
|
+
* ```
|
|
232
|
+
*
|
|
233
|
+
* @function needsRender
|
|
234
|
+
* ```
|
|
235
|
+
* 下一帧渲染
|
|
236
|
+
* 调用 render() 和 needsRender() 均可在按需渲染时,使得画面渲染一次
|
|
237
|
+
* 区别在于:
|
|
238
|
+
* - needsRender() 为在下帧渲染画面
|
|
239
|
+
* - render() 在当前帧渲染画面
|
|
240
|
+
* 推荐使用 needsRender(), 可以更加流畅。但是如果需要截图等同步操作,可以使用 render()
|
|
241
|
+
* needsRender(): void,
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* @function preloadPano
|
|
245
|
+
* ```
|
|
246
|
+
* 预加载点位图片资源
|
|
247
|
+
* // param panoIndex - 观察点序号
|
|
248
|
+
* // param callback - 加载完成回调, 并传递加载用时。
|
|
249
|
+
* // returns 加载完成的 Promise 参数同 callback
|
|
250
|
+
* preloadPano(panoIndex: number, callback?: (costs: number) => void): Promise<number>
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```
|
|
255
|
+
* const { updateCamera, initBasisLoader, getPixels, render, needsRender, preloadPano } = useFiveAction();
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare function useFiveAction(): FiveActionVueCallbacks;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Five Vue Hooks: 得到当前相机的方向(单位向量)
|
|
262
|
+
* @returns 当前相机方向的单位向量
|
|
263
|
+
*/
|
|
264
|
+
export declare function useFiveCameraDirection(): Ref<THREE_2.Vector3>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Five Vue Hooks: 得到当前相机的方向(射线对象)
|
|
268
|
+
* @returns 当前相机方向的射线对象
|
|
269
|
+
*/
|
|
270
|
+
export declare function useFiveCameraRaycaster(): Ref<THREE_2.Raycaster>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Five Vue Hooks: Five 的当前观测点
|
|
274
|
+
* @returns 当前观测点, 如果 work 未加载则为 null
|
|
275
|
+
* @example
|
|
276
|
+
* ```
|
|
277
|
+
* const observer = useFiveCurrentObserver();
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
280
|
+
export declare function useFiveCurrentObserver(): Ref<WorkObserver | null>;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Five Vue Hooks: Five 的实时状态
|
|
284
|
+
* @returns
|
|
285
|
+
* [ currentState: Five 的实时状态, setState: 设置 Five 的状态 ]
|
|
286
|
+
* @example
|
|
287
|
+
* ```
|
|
288
|
+
* const [ currentState, setState ] = useFiveCurrentState;
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
export declare function useFiveCurrentState(): [
|
|
292
|
+
currentState: Ref<State>,
|
|
293
|
+
setState: (state: Partial<State> | ((prevState: State) => Partial<State>), immediately?: boolean, userAction?: boolean) => void
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Five Vue Hooks: Five 事件监听
|
|
298
|
+
* 具体事件列表 请查看 Five.EventCallback
|
|
299
|
+
* @example
|
|
300
|
+
* ```
|
|
301
|
+
* useFiveEventCallback("cameraUpdate", pose => {});
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
export declare function useFiveEventCallback<T extends keyof EventCallback>(name: T, callback: EventCallback[T]): void;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Five Vue Hooks: Five 楼层
|
|
308
|
+
* @returns
|
|
309
|
+
* [ shownFloor: Five 当前显示的楼层, null 为都显示, showFloor: 设置显示楼层,不传参数为都显示 ]
|
|
310
|
+
* @example
|
|
311
|
+
* ```
|
|
312
|
+
* const [ shownFloor, showFloor ] = useFiveHelper;
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
export declare function useFiveFloor(): [
|
|
316
|
+
shownFloor: Ref<number | null>,
|
|
317
|
+
totalFloorLength: Ref<number>,
|
|
318
|
+
showFloor: (floorIndex?: number) => void
|
|
319
|
+
];
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Five Vue Hooks: Five 帮助元素的隐藏/显示
|
|
323
|
+
* @returns
|
|
324
|
+
* [ helperVisible: Five 帮助元素是否显示, toggleHelperVisible: 设置 帮助元素的隐藏/显示 ]
|
|
325
|
+
* @example
|
|
326
|
+
* ```
|
|
327
|
+
* const [ helperVisible, toggleHelperVisible ] = useFiveHelper;
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
export declare function useFiveHelper(): [
|
|
331
|
+
helperVisible: Ref<boolean>,
|
|
332
|
+
toggleHelperVisible: (visible: boolean) => void
|
|
333
|
+
];
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Five Vue Hooks: 获取当前模型
|
|
337
|
+
*/
|
|
338
|
+
export declare function useFiveModel(): Ref<Model>;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Five Vue Hooks: 获取当前模型的包围盒
|
|
342
|
+
*/
|
|
343
|
+
export declare function useFiveModelBounding(): Ref<THREE_2.Box3>;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Five Vue Hooks: 获取当前模型碰撞检测方法
|
|
347
|
+
*
|
|
348
|
+
* @function fiveModelIntersectRaycaster
|
|
349
|
+
* ```
|
|
350
|
+
* 计算模型射线碰撞检测
|
|
351
|
+
* // param raycaster THREE 射线对象
|
|
352
|
+
* // param floors 和某一楼层做碰撞检测, 不传为和所有楼层做碰撞检测
|
|
353
|
+
* // returns 返回碰撞
|
|
354
|
+
* intersectRaycaster(raycaster: THREE.Raycaster, floors?: number | number[]): Intersection[]
|
|
355
|
+
* ```
|
|
356
|
+
* @example
|
|
357
|
+
* ```
|
|
358
|
+
* const fiveModelIntersectRaycaster = useFiveModelIntersectRaycaster();
|
|
359
|
+
* const intersects = fiveModelIntersectRaycaster(raycaster);
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
export declare function useFiveModelIntersectRaycaster(): FiveModelIntersectRaycaster;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Five Vue Hooks: 获取当前模型加载状态
|
|
366
|
+
* @returns
|
|
367
|
+
* "Loaded": 加载完成
|
|
368
|
+
* "Empty" 加载未完成
|
|
369
|
+
*/
|
|
370
|
+
export declare function useFiveModelReadyState(): Ref<"Loaded" | "Empty">;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Five Vue Hooks: 将三维的坐标对应到二维屏幕
|
|
374
|
+
*
|
|
375
|
+
* @function project2d
|
|
376
|
+
* ```
|
|
377
|
+
* 计算模型射线碰撞检测
|
|
378
|
+
* // param vector 三维的坐标
|
|
379
|
+
* // param testModel 是否和模型检测,如果检测,则被模型遮挡会返回 null
|
|
380
|
+
* // returns 三维的坐标 或者 null
|
|
381
|
+
* project2d(vector: THREE.Vector3 | Ref<THREE.Vector3>, testModel: boolean)
|
|
382
|
+
* v2: Ref<THREE.Vector2 | null>
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* ```
|
|
387
|
+
* const project2d = useFiveProject2d();
|
|
388
|
+
* project2d(new THREE.Vector3(0, 0, 0));
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
export declare function useFiveProject2d(): Project2d;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Five Vue Hooks: 获取scene
|
|
395
|
+
*/
|
|
396
|
+
export declare function useFiveScene(): Scene;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Five Vue Hooks: Five 的目标状态
|
|
400
|
+
* @returns
|
|
401
|
+
* [ currentState: Five 的目标状态, setState: 设置 Five 的状态 ]
|
|
402
|
+
* @example
|
|
403
|
+
* ```
|
|
404
|
+
* const [ state, setState ] = useFiveState;
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
export declare function useFiveState(): [
|
|
408
|
+
curState: Ref<State>,
|
|
409
|
+
setState: (state: Partial<State> | ((prevState: State) => Partial<State>), immediately?: boolean, userAction?: boolean) => void
|
|
410
|
+
];
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Five Vue Hooks: 获取/设置当前的 Work
|
|
414
|
+
*
|
|
415
|
+
* @returns
|
|
416
|
+
* [ work: 获取当前的 Work, loadWork: 设置 Work ]
|
|
417
|
+
|
|
418
|
+
* @function loadWork
|
|
419
|
+
* ```
|
|
420
|
+
* 加载 Work 数据
|
|
421
|
+
* // param work Work 数据
|
|
422
|
+
* // param state 初始化姿态
|
|
423
|
+
* // - "inherit" 使用当前姿态
|
|
424
|
+
* // - "initial" 使用 Work 数据中的 initial 姿态
|
|
425
|
+
* // - State 自定义姿态
|
|
426
|
+
* // param duration 切换时间
|
|
427
|
+
* (work: Work, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number) => void
|
|
428
|
+
* ```
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```
|
|
432
|
+
* const [ work, loadWork ] = useFiveWork;
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
export declare function useFiveWork(): [
|
|
436
|
+
work: DeepReadonly<Ref<Work | undefined>>,
|
|
437
|
+
loadWork: (work: Work, state?: "inherit" | "initial" | Partial<Omit<State, "offset">>, duration?: number, userAction?: boolean) => Promise<void>
|
|
438
|
+
];
|
|
439
|
+
|
|
440
|
+
export { }
|