@realsee/five 5.0.0-alpha.18 → 5.0.0-alpha.181
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 +328 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -0
- package/docs/classes/five.IntersectMesh.html +1 -0
- package/docs/classes/five.Model.html +89 -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.PanoCircleMeshCustom.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.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 +32 -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 +70 -0
- package/docs/classes/server.PBMContainer.html +7 -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 +9 -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 +15 -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.PanoCircleMeshCustomOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -0
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -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 +52 -0
- package/docs/interfaces/react.FiveInjectionTypes.html +181 -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 +60 -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 +130 -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 +115 -0
- package/docs/modules.html +1 -136
- package/exporters/staticify.js +210 -0
- package/five/index.d.ts +1416 -285
- package/five/index.js +362 -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 +12 -15
- package/react/index.d.ts +73 -72
- 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 +219 -27
- package/server/index.js +357 -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 -2
- package/umd/five-line.js +1 -2
- package/umd/five-react.js +1 -2
- package/umd/five-sticker.js +1 -2
- package/umd/five-vfx.js +1 -0
- package/umd/five-vue.js +1 -0
- package/umd/five.js +1 -1
- package/umd/five.js.LICENSE.txt +58 -118
- package/vfx/index.d.ts +264 -0
- package/vfx/index.js +260 -0
- package/vue/index.d.ts +441 -0
- package/vue/index.js +260 -0
- 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/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
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="default no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>SubscribeMixinType | 如视 Five SDK - v5.0.0-alpha.18</title>
|
|
7
|
-
<meta name="description" content="Documentation for 如视 Five SDK - v5.0.0-alpha.18">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
|
-
<script async src="../assets/js/search.js" id="search-script"></script>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<header>
|
|
14
|
-
<div class="tsd-page-toolbar">
|
|
15
|
-
<div class="container">
|
|
16
|
-
<div class="table-wrap">
|
|
17
|
-
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
18
|
-
<div class="field">
|
|
19
|
-
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
20
|
-
<input id="tsd-search-field" type="text" />
|
|
21
|
-
</div>
|
|
22
|
-
<ul class="results">
|
|
23
|
-
<li class="state loading">Preparing search index...</li>
|
|
24
|
-
<li class="state failure">The search index is not available</li>
|
|
25
|
-
</ul>
|
|
26
|
-
<a href="../index.html" class="title">如视 Five SDK - v5.0.0-alpha.18</a>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="table-cell" id="tsd-widgets">
|
|
29
|
-
<div id="tsd-filter">
|
|
30
|
-
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
31
|
-
<div class="tsd-filter-group">
|
|
32
|
-
<div class="tsd-select" id="tsd-filter-visibility">
|
|
33
|
-
<span class="tsd-select-label">All</span>
|
|
34
|
-
<ul class="tsd-select-list">
|
|
35
|
-
<li data-value="public">Public</li>
|
|
36
|
-
<li data-value="protected">Public/Protected</li>
|
|
37
|
-
<li data-value="private" class="selected">All</li>
|
|
38
|
-
</ul>
|
|
39
|
-
</div>
|
|
40
|
-
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
41
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="tsd-page-title">
|
|
50
|
-
<div class="container">
|
|
51
|
-
<ul class="tsd-breadcrumb">
|
|
52
|
-
<li>
|
|
53
|
-
<a href="../modules.html">如视 Five SDK - v5.0.0-alpha.18</a>
|
|
54
|
-
</li>
|
|
55
|
-
<li>
|
|
56
|
-
<a href="five.html">five</a>
|
|
57
|
-
</li>
|
|
58
|
-
<li>
|
|
59
|
-
<a href="five.subscribemixintype.html">SubscribeMixinType</a>
|
|
60
|
-
</li>
|
|
61
|
-
</ul>
|
|
62
|
-
<h1>Namespace SubscribeMixinType</h1>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</header>
|
|
66
|
-
<div class="container container-main">
|
|
67
|
-
<div class="row">
|
|
68
|
-
<div class="col-8 col-content">
|
|
69
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
70
|
-
<h2>Index</h2>
|
|
71
|
-
<section class="tsd-panel tsd-index-panel">
|
|
72
|
-
<div class="tsd-index-content">
|
|
73
|
-
<section class="tsd-index-section ">
|
|
74
|
-
<h3>Interfaces</h3>
|
|
75
|
-
<ul class="tsd-index-list">
|
|
76
|
-
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/five.subscribemixintype.emit.html" class="tsd-kind-icon">emit</a></li>
|
|
77
|
-
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/five.subscribemixintype.haslistener.html" class="tsd-kind-icon">has<wbr>Listener</a></li>
|
|
78
|
-
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/five.subscribemixintype.off.html" class="tsd-kind-icon">off</a></li>
|
|
79
|
-
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/five.subscribemixintype.on.html" class="tsd-kind-icon">on</a></li>
|
|
80
|
-
<li class="tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter"><a href="../interfaces/five.subscribemixintype.once.html" class="tsd-kind-icon">once</a></li>
|
|
81
|
-
</ul>
|
|
82
|
-
</section>
|
|
83
|
-
</div>
|
|
84
|
-
</section>
|
|
85
|
-
</section>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
88
|
-
<nav class="tsd-navigation primary">
|
|
89
|
-
<ul>
|
|
90
|
-
<li class=" ">
|
|
91
|
-
<a href="../modules.html">Modules</a>
|
|
92
|
-
</li>
|
|
93
|
-
</ul>
|
|
94
|
-
</nav>
|
|
95
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
96
|
-
<ul class="before-current">
|
|
97
|
-
<li class=" tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
98
|
-
<a href="../interfaces/five.subscribemixintype.emit.html" class="tsd-kind-icon">emit</a>
|
|
99
|
-
</li>
|
|
100
|
-
<li class=" tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
101
|
-
<a href="../interfaces/five.subscribemixintype.haslistener.html" class="tsd-kind-icon">has<wbr>Listener</a>
|
|
102
|
-
</li>
|
|
103
|
-
<li class=" tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
104
|
-
<a href="../interfaces/five.subscribemixintype.off.html" class="tsd-kind-icon">off</a>
|
|
105
|
-
</li>
|
|
106
|
-
<li class=" tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
107
|
-
<a href="../interfaces/five.subscribemixintype.on.html" class="tsd-kind-icon">on</a>
|
|
108
|
-
</li>
|
|
109
|
-
<li class=" tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter">
|
|
110
|
-
<a href="../interfaces/five.subscribemixintype.once.html" class="tsd-kind-icon">once</a>
|
|
111
|
-
</li>
|
|
112
|
-
</ul>
|
|
113
|
-
</nav>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
<footer>
|
|
118
|
-
<div class="container">
|
|
119
|
-
<h2>Legend</h2>
|
|
120
|
-
<div class="tsd-legend-group">
|
|
121
|
-
<ul class="tsd-legend">
|
|
122
|
-
<li class="tsd-kind-namespace"><span class="tsd-kind-icon">Namespace</span></li>
|
|
123
|
-
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
124
|
-
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
125
|
-
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
126
|
-
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
127
|
-
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
128
|
-
</ul>
|
|
129
|
-
<ul class="tsd-legend">
|
|
130
|
-
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
131
|
-
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
132
|
-
</ul>
|
|
133
|
-
<ul class="tsd-legend">
|
|
134
|
-
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
135
|
-
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
136
|
-
</ul>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</footer>
|
|
140
|
-
<div class="overlay"></div>
|
|
141
|
-
<script src="../assets/js/main.js"></script>
|
|
142
|
-
</body>
|
|
143
|
-
</html>
|
|
Binary file
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const http = require("http");
|
|
4
|
-
const mkdirp = require("mkdirp");
|
|
5
|
-
const crypto = require("crypto");
|
|
6
|
-
const formatWork = require("./format-work");
|
|
7
|
-
|
|
8
|
-
const [
|
|
9
|
-
__command__,
|
|
10
|
-
__scriptPath__,
|
|
11
|
-
workPath,
|
|
12
|
-
exportPath,
|
|
13
|
-
] = process.argv;
|
|
14
|
-
|
|
15
|
-
const work = JSON.parse(fs.readFileSync(workPath));
|
|
16
|
-
|
|
17
|
-
if (!fs.existsSync(exportPath)) fs.mkdirSync(exportPath);
|
|
18
|
-
|
|
19
|
-
function md5(contents) {
|
|
20
|
-
const md5 = crypto.createHash("md5");
|
|
21
|
-
md5.update(contents);
|
|
22
|
-
return md5.digest("hex");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function shortPath(path) {
|
|
26
|
-
const array = path.split("/");
|
|
27
|
-
if (array.length < 3) return path;
|
|
28
|
-
const start = array.shift();
|
|
29
|
-
const end = array.pop();
|
|
30
|
-
return [start, md5(array.join("/")), end].join("/");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function imageURL(url, options = {}) {
|
|
34
|
-
if (typeof options.transform === "function") {
|
|
35
|
-
return options.transform(url, options);
|
|
36
|
-
}
|
|
37
|
-
if (url.indexOf("//vrlab-public.ljcdn.com") >= 0) {
|
|
38
|
-
if (/\.basis(\?|$)/.test(url) && options.basisLoaderInitialized !== true) {
|
|
39
|
-
url = url.replace(/\.basis(\?|$)/, ".jpg$1");
|
|
40
|
-
}
|
|
41
|
-
if (/\.jpg$/.test(url)) {
|
|
42
|
-
const { size, quality, format } = options;
|
|
43
|
-
if (size || quality || format) {
|
|
44
|
-
let suffix = "?imageMogr2";
|
|
45
|
-
if (quality) suffix += "/quality/" + quality;
|
|
46
|
-
if (size) suffix += "/thumbnail/" + size + "x";
|
|
47
|
-
if (format) suffix += "/format/" + format;
|
|
48
|
-
url = url.replace("//vrlab-public.ljcdn.com", "//vrlab-image4.ljcdn.com") + suffix;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return url
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function downloadAsDataURL(url, filename, handleKey) {
|
|
56
|
-
filename = path.resolve(filename);
|
|
57
|
-
mkdirp.sync(path.dirname(filename));
|
|
58
|
-
return new Promise(resolve => {
|
|
59
|
-
http.get(url.replace(/^https\:/, "http:"), res => {
|
|
60
|
-
const mime = res.headers["content-type"];
|
|
61
|
-
const buffers = [];
|
|
62
|
-
|
|
63
|
-
res.on("data", chunk => buffers.push(chunk));
|
|
64
|
-
res.on("end", () => {
|
|
65
|
-
const dataURL = `data:${mime};base64,${Buffer.concat(buffers).toString("base64")}`;
|
|
66
|
-
const contents = `window[${JSON.stringify(handleKey)}] && window[${JSON.stringify(handleKey)}](${JSON.stringify(dataURL)})`;
|
|
67
|
-
fs.writeFileSync(filename, contents, "utf8");
|
|
68
|
-
resolve();
|
|
69
|
-
})
|
|
70
|
-
})
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function traverse(json, callback, keyPath = "") {
|
|
75
|
-
json = callback(json, keyPath);
|
|
76
|
-
if (json) {
|
|
77
|
-
if (typeof json === "array") {
|
|
78
|
-
for (let i = 0; i < json.length; i++) {
|
|
79
|
-
json[i] = traverse(json[i], callback, keyPath + "." + i);
|
|
80
|
-
}
|
|
81
|
-
} else if (typeof json === "object") {
|
|
82
|
-
for (let i = 0, keys = Object.keys(json); i < keys.length; i++) {
|
|
83
|
-
const key = keys[i];
|
|
84
|
-
json[key] = traverse(json[key], callback, keyPath + "." + key);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return json;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const urlRegExp = /^https?:\/\/(?:[\w-]+\.)*[\w-]{1,63}(?:\.(?:\w+))(?:$|\/)/i;
|
|
92
|
-
const fileRegExp = /\.[a-z0-9]{1,6}$/;
|
|
93
|
-
|
|
94
|
-
const htmlExample = (work) => `
|
|
95
|
-
<!DOCTYPE html>
|
|
96
|
-
<html lang="en">
|
|
97
|
-
<head>
|
|
98
|
-
<meta charset="UTF-8">
|
|
99
|
-
<title>如视 VR SDK 调用实例</title>
|
|
100
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
101
|
-
<style>
|
|
102
|
-
html, body { height: 100%; width: 100%; overflow: hidden; }
|
|
103
|
-
* { margin: 0; padding: 0 }
|
|
104
|
-
#app { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
|
|
105
|
-
.buttons { position: fixed; top: 10px; left: 10px; }
|
|
106
|
-
.buttons button { display: block; margin-top: 10px; }
|
|
107
|
-
</style>
|
|
108
|
-
</head>
|
|
109
|
-
<body>
|
|
110
|
-
<!-- 试图渲染容器 -->
|
|
111
|
-
<div id="app"></div>
|
|
112
|
-
|
|
113
|
-
<!-- 简易空间按钮 -->
|
|
114
|
-
<div class="buttons">
|
|
115
|
-
<!-- 点击进入相机全景模式 -->
|
|
116
|
-
<button onclick="five.changeMode(Five.Mode.Panorama)">全景模式(Panorama)</button>
|
|
117
|
-
<!-- 点击进入相机模型自由模式 -->
|
|
118
|
-
<button onclick="five.changeMode(Five.Mode.Floorplan, {latitude: Math.PI / 4, longitude: Math.PI / 4})">模型自由模式(Floorplan)</button>
|
|
119
|
-
<!-- 点击进入相机模型垂直模式 -->
|
|
120
|
-
<button onclick="five.changeMode(Five.Mode.Topview)">模型垂直模式(Topview)</button>
|
|
121
|
-
<!-- 点击进入相机VR眼睛模式 -->
|
|
122
|
-
<button onclick="five.changeMode(Five.Mode.VRPanorama)">眼睛模式(VRPanorama)</button>
|
|
123
|
-
<!-- 点击进入相机模型漫游模式 -->
|
|
124
|
-
<button onclick="five.changeMode(Five.Mode.Model)">模型漫游模式(Model)</button>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<script>${fs.readFileSync(path.join(__dirname, "../bundles/five.js"), "utf8")}</script>
|
|
128
|
-
<script>
|
|
129
|
-
// Five 是 如视 VR 视图渲染库的构造函数,通过 new 关键字产生实例。
|
|
130
|
-
// 构造函数的具体参数见文档,这边仅配置常用的几项
|
|
131
|
-
var five = new Five({
|
|
132
|
-
// 初始化为全景观测状态状态
|
|
133
|
-
mode: Five.Mode.Panorama,
|
|
134
|
-
// 初始化为摄像机位于第 0 个观测点的位置
|
|
135
|
-
panoIndex: 0,
|
|
136
|
-
// 初始化为摄像机水平角度为 0
|
|
137
|
-
longitude: 0,
|
|
138
|
-
// 初始化为摄像机俯仰角度为 0
|
|
139
|
-
latitude: 0,
|
|
140
|
-
// 取消初始化镜头过度动画
|
|
141
|
-
initWithTransition: false,
|
|
142
|
-
// 按需渲染
|
|
143
|
-
onlyRenderIfNeeds: true,
|
|
144
|
-
})
|
|
145
|
-
|
|
146
|
-
// 将渲染视图的 canvas 添加到 DOM 中
|
|
147
|
-
five.appendTo(document.getElementById("app"))
|
|
148
|
-
|
|
149
|
-
// 如果显示区域需要变动,在变动时请调用 refresh 重置显示参数
|
|
150
|
-
window.addEventListener("resize", function () {
|
|
151
|
-
five.refresh()
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
five.load(${JSON.stringify(work, "", " ")});
|
|
155
|
-
</script>
|
|
156
|
-
</body>
|
|
157
|
-
</html>
|
|
158
|
-
`;
|
|
159
|
-
|
|
160
|
-
let downloadQueue = Promise.resolve();
|
|
161
|
-
|
|
162
|
-
function main(work, exportPath) {
|
|
163
|
-
|
|
164
|
-
// 生成输出目录
|
|
165
|
-
mkdirp(path.resolve(exportPath));
|
|
166
|
-
|
|
167
|
-
// 修改work
|
|
168
|
-
traverse(work, (value, keyPath) => {
|
|
169
|
-
if (typeof value === "string" && urlRegExp.test(value) && fileRegExp.test(value)) {
|
|
170
|
-
const handleKey = "jsonp_" + md5(value);
|
|
171
|
-
const relativeValue = value.replace(urlRegExp, match => "downloads/" + md5(match) + "/") + "." + handleKey;
|
|
172
|
-
const filename = shortPath(path.resolve(exportPath, relativeValue));
|
|
173
|
-
downloadQueue = downloadQueue.then(() => {
|
|
174
|
-
if (keyPath.indexOf("model.material_textures") >= 0) {
|
|
175
|
-
value = imageURL(value, { size: 512 });
|
|
176
|
-
}
|
|
177
|
-
return downloadAsDataURL(value, filename, handleKey)
|
|
178
|
-
.then(() => console.log(`success ${value} => ${filename}`))
|
|
179
|
-
.catch(() => console.log(`error ${value} => ${filename}`));
|
|
180
|
-
})
|
|
181
|
-
return relativeValue;
|
|
182
|
-
}
|
|
183
|
-
return value;
|
|
184
|
-
})
|
|
185
|
-
|
|
186
|
-
work.base_url = "./";
|
|
187
|
-
|
|
188
|
-
// 输出 html
|
|
189
|
-
fs.writeFileSync(path.resolve(exportPath, "index.html"), htmlExample(work), "utf-8");
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
main(formatWork(work), exportPath);
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
function objectGet(obj, pathArray, defaultValue) {
|
|
2
|
-
try {
|
|
3
|
-
for (let i = 0; i < pathArray.length; i++) {
|
|
4
|
-
obj = obj[pathArray[i]];
|
|
5
|
-
}
|
|
6
|
-
return obj === undefined ? defaultValue : obj;
|
|
7
|
-
} catch (error) {
|
|
8
|
-
return defaultValue;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = function parse(input) {
|
|
13
|
-
|
|
14
|
-
const work = {};
|
|
15
|
-
|
|
16
|
-
const base_url = objectGet(input, "base_url", "");
|
|
17
|
-
|
|
18
|
-
work.project_id = objectGet(input, ["project_id"]);
|
|
19
|
-
work.work_code = objectGet(input, ["work_code"]);
|
|
20
|
-
|
|
21
|
-
work.initial = {
|
|
22
|
-
pano_index: objectGet(input, ["initial", "pano_index"], objectGet(input, ["initial", "pano"], 0)),
|
|
23
|
-
latitude: objectGet(input, ["initial", "latitude"], 0),
|
|
24
|
-
longitude: objectGet(input, ["initial", "longitude"], 0),
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
work.model = {
|
|
28
|
-
file_url: base_url + objectGet(input, ["model", "file_url"], ""),
|
|
29
|
-
material_textures: objectGet(input, ["model", "material_textures"], []).map(url => {
|
|
30
|
-
if (/^https?:/.test(url)) return url;
|
|
31
|
-
return base_url + url;
|
|
32
|
-
}),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
work.observers = objectGet(input, ["observers"], []).map(one => {
|
|
36
|
-
return {
|
|
37
|
-
visible_nodes: one.visible_nodes,
|
|
38
|
-
accessible_nodes: one.accessible_nodes,
|
|
39
|
-
index: one.index,
|
|
40
|
-
quaternion: one.quaternion,
|
|
41
|
-
standing_position: one.standing_position,
|
|
42
|
-
position: one.position,
|
|
43
|
-
floor_index: one.floor_index,
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
work.panorama = {
|
|
48
|
-
count: objectGet(input, ["panorama", "count"], 0),
|
|
49
|
-
list: objectGet(input, ["panorama", "list"], []).map((_, index) => {
|
|
50
|
-
const parseURL = (url) => {
|
|
51
|
-
const panoCubeBaseURL = objectGet(input, ["panorama", "base_url"], "");
|
|
52
|
-
const panoCubePath = objectGet(input, ["panorama", "pano_high_cube_base_url"], "");
|
|
53
|
-
if (panoCubePath || panoCubeBaseURL) {
|
|
54
|
-
return base_url + panoCubeBaseURL + panoCubePath + index + "/" + url;
|
|
55
|
-
} else {
|
|
56
|
-
return base_url + url;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
index: objectGet(input, ["panorama", "list", index, "index"], 0),
|
|
61
|
-
up: parseURL(objectGet(input, ["panorama", "list", index, "up"], objectGet(input, ["panorama", "info", index, "up"], ""))),
|
|
62
|
-
down: parseURL(objectGet(input, ["panorama", "list", index, "down"], objectGet(input, ["panorama", "info", index, "down"], ""))),
|
|
63
|
-
left: parseURL(objectGet(input, ["panorama", "list", index, "left"], objectGet(input, ["panorama", "info", index, "left"], ""))),
|
|
64
|
-
right: parseURL(objectGet(input, ["panorama", "list", index, "right"], objectGet(input, ["panorama", "info", index, "right"], ""))),
|
|
65
|
-
front: parseURL(objectGet(input, ["panorama", "list", index, "front"], objectGet(input, ["panorama", "info", index, "front"], ""))),
|
|
66
|
-
back: parseURL(objectGet(input, ["panorama", "list", index, "back"], objectGet(input, ["panorama", "info", index, "back"], ""))),
|
|
67
|
-
};
|
|
68
|
-
}),
|
|
69
|
-
}
|
|
70
|
-
return work;
|
|
71
|
-
};
|