@realsee/five 5.0.0-alpha.176 → 5.0.0-alpha.178

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.
Files changed (160) hide show
  1. package/docs/assets/search.js +1 -1
  2. package/docs/classes/five.AnimationFrameLoop.html +1 -1
  3. package/docs/classes/five.BVH.html +1 -1
  4. package/docs/classes/five.BVHIntersect.html +1 -1
  5. package/docs/classes/five.BVHNode.html +1 -1
  6. package/docs/classes/five.BVHVector3.html +1 -1
  7. package/docs/classes/five.Camera.html +5 -5
  8. package/docs/classes/five.Clipper.html +1 -1
  9. package/docs/classes/five.Five.html +54 -64
  10. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  11. package/docs/classes/five.IntersectMesh.html +1 -1
  12. package/docs/classes/five.Model.html +1 -1
  13. package/docs/classes/five.NetworkSubscribe.html +1 -1
  14. package/docs/classes/five.PBMContainer.html +1 -1
  15. package/docs/classes/five.PBMGroup.html +1 -1
  16. package/docs/classes/five.PBMMaterial.html +1 -1
  17. package/docs/classes/five.PBMMesh.html +1 -1
  18. package/docs/classes/five.PanoCircleMesh.html +1 -1
  19. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  20. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  21. package/docs/classes/five.Scene.html +1 -1
  22. package/docs/classes/five.Subscribe.html +1 -1
  23. package/docs/classes/five.TextureLoader.html +1 -1
  24. package/docs/classes/five.Tile3D.html +1 -1
  25. package/docs/classes/five.Tile3DModel.html +1 -1
  26. package/docs/classes/five.TileBoundingSphere.html +1 -1
  27. package/docs/classes/five.TileCacheNode.html +1 -1
  28. package/docs/classes/five.TileCubeTextureTarget.html +1 -1
  29. package/docs/classes/five.TileCullingVolume.html +1 -1
  30. package/docs/classes/five.TileOrientedBoundingBox.html +1 -1
  31. package/docs/classes/five.TileRequestScheduler.html +1 -1
  32. package/docs/classes/five.Tileset3D.html +1 -1
  33. package/docs/classes/five.Tileset3DTraverser.html +1 -1
  34. package/docs/classes/five.TilesetCache.html +1 -1
  35. package/docs/classes/five.Work.html +1 -1
  36. package/docs/classes/five.XRButton.html +1 -1
  37. package/docs/classes/gltf_loader.DDSLoader.html +1 -1
  38. package/docs/classes/gltf_loader.DRACOLoader.html +1 -1
  39. package/docs/classes/gltf_loader.GLTFLoader.html +1 -1
  40. package/docs/classes/gltf_loader.GLTFObject.html +1 -1
  41. package/docs/classes/gltf_loader.GLTFParser.html +1 -1
  42. package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -1
  43. package/docs/classes/line.Line.html +1 -1
  44. package/docs/classes/line.LineGeometry.html +1 -1
  45. package/docs/classes/line.LineMaterial.html +1 -1
  46. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  47. package/docs/classes/line.THREE_Line2.html +1 -1
  48. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  49. package/docs/classes/react.Store.html +1 -1
  50. package/docs/classes/server.BVH.html +1 -1
  51. package/docs/classes/server.BVHIntersect.html +1 -1
  52. package/docs/classes/server.BVHNode.html +1 -1
  53. package/docs/classes/server.BVHVector3.html +1 -1
  54. package/docs/classes/server.Model.html +1 -1
  55. package/docs/classes/server.PBMContainer.html +1 -1
  56. package/docs/classes/server.PBMGroup.html +1 -1
  57. package/docs/classes/server.PBMMesh.html +1 -1
  58. package/docs/classes/sticker.Sticker.html +1 -1
  59. package/docs/classes/vfx.Airflow.html +1 -1
  60. package/docs/classes/vfx.Flame.html +1 -1
  61. package/docs/classes/vfx.Particle.html +1 -1
  62. package/docs/classes/vfx.SpotLight.html +1 -1
  63. package/docs/index.html +1 -1
  64. package/docs/interfaces/five.AddableObject.html +1 -1
  65. package/docs/interfaces/five.AnimationFrame.html +1 -1
  66. package/docs/interfaces/five.CameraPose.html +1 -1
  67. package/docs/interfaces/five.ClipperParameter.html +1 -1
  68. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +4 -4
  69. package/docs/interfaces/five.EventCallback.html +1 -1
  70. package/docs/interfaces/five.FiveInitArgs.html +1 -1
  71. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +8 -8
  72. package/docs/interfaces/five.ImageOptions.html +1 -1
  73. package/docs/interfaces/five.ImageURLMappings.html +1 -1
  74. package/docs/interfaces/five.ImageURLOptions.html +7 -9
  75. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  76. package/docs/interfaces/five.Intersection.html +1 -1
  77. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +1 -1
  78. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  79. package/docs/interfaces/five.ModelEventCallback.html +1 -1
  80. package/docs/interfaces/five.MotionKeyframe.html +1 -1
  81. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  82. package/docs/interfaces/five.NetworkOptions.html +1 -1
  83. package/docs/interfaces/five.PBMPanoPicture.html +1 -1
  84. package/docs/interfaces/five.PBMParameters.html +1 -1
  85. package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -1
  86. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  87. package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -1
  88. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -1
  89. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +6 -6
  90. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  91. package/docs/interfaces/five.Pose.html +1 -1
  92. package/docs/interfaces/five.Scissor.html +1 -1
  93. package/docs/interfaces/five.State.html +1 -1
  94. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
  95. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
  96. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
  97. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
  98. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
  99. package/docs/interfaces/five.TextureOptions.html +1 -1
  100. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +1 -1
  101. package/docs/interfaces/five.TileBoundingVolume.html +1 -1
  102. package/docs/interfaces/five.TileContent.html +1 -1
  103. package/docs/interfaces/five.TileCubeNode.html +1 -1
  104. package/docs/interfaces/five.TileCubeTree.html +1 -1
  105. package/docs/interfaces/five.Tileset3dOptions.html +1 -1
  106. package/docs/interfaces/five.TilesetJSON.html +1 -1
  107. package/docs/interfaces/five.TilesetJSONNode.html +1 -1
  108. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +4 -4
  109. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +6 -6
  110. package/docs/interfaces/five.WebXRSelectParams.html +1 -1
  111. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  112. package/docs/interfaces/five.WorkImage.html +1 -1
  113. package/docs/interfaces/five.WorkInitial.html +1 -1
  114. package/docs/interfaces/five.WorkModel.html +1 -1
  115. package/docs/interfaces/five.WorkModelTiles.html +1 -1
  116. package/docs/interfaces/five.WorkObserver.html +1 -1
  117. package/docs/interfaces/five.WorkTile.html +1 -1
  118. package/docs/interfaces/five.WorkVideo.html +1 -1
  119. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +6 -6
  120. package/docs/interfaces/gltf_loader.DDS.html +1 -1
  121. package/docs/interfaces/gltf_loader.GLTF.html +1 -1
  122. package/docs/interfaces/gltf_loader.GLTFReference.html +1 -1
  123. package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -1
  124. package/docs/interfaces/react.FiveActionReactCallbacks.html +6 -16
  125. package/docs/interfaces/react.FiveInjectionTypes.html +19 -29
  126. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
  127. package/docs/interfaces/server.Intersection.html +1 -1
  128. package/docs/interfaces/server.ModelEventCallback.html +1 -1
  129. package/docs/interfaces/sticker.IntersectionLike.html +1 -1
  130. package/docs/interfaces/vfx.ParticleArgs.html +1 -1
  131. package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -1
  132. package/docs/interfaces/vue.FiveActionVueCallbacks.html +7 -17
  133. package/docs/modules/five.SubscribeMixinType.html +1 -1
  134. package/docs/modules/five.html +3 -3
  135. package/docs/modules/gltf_loader.html +1 -1
  136. package/docs/modules/line.html +1 -1
  137. package/docs/modules/react.html +4 -7
  138. package/docs/modules/server.html +1 -1
  139. package/docs/modules/sticker.html +1 -1
  140. package/docs/modules/vfx.html +1 -1
  141. package/docs/modules/vue.html +2 -2
  142. package/docs/modules.html +1 -1
  143. package/five/index.d.ts +0 -24
  144. package/five/index.js +5 -5
  145. package/gltf-loader/index.js +3 -3
  146. package/line/index.js +3 -3
  147. package/package.json +1 -1
  148. package/react/index.d.ts +0 -52
  149. package/react/index.js +3 -3
  150. package/server/index.js +4 -4
  151. package/sticker/index.js +3 -3
  152. package/umd/five-gltf-loader.js +1 -1
  153. package/umd/five-line.js +1 -1
  154. package/umd/five-react.js +1 -1
  155. package/umd/five-sticker.js +1 -1
  156. package/umd/five-vue.js +1 -1
  157. package/umd/five.js +1 -1
  158. package/vfx/index.js +2 -2
  159. package/vue/index.d.ts +0 -20
  160. package/vue/index.js +3 -3
package/vfx/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @realsee/five
3
3
  *
4
- * Generated: 2022-12-26
5
- * Version: 5.0.0-alpha.176
4
+ * Generated: 2022-12-28
5
+ * Version: 5.0.0-alpha.178
6
6
  *
7
7
  * Terms:
8
8
  * Realsee SDK License Agreement
package/vue/index.d.ts CHANGED
@@ -36,26 +36,6 @@ export declare interface FiveActionVueCallbacks {
36
36
  * @returns Promise 是否移动成功
37
37
  */
38
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
39
  /**
60
40
  * 获取画面中的像素颜色
61
41
  * @param x - 获取像素区域的起始坐标 x
package/vue/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @realsee/five
3
3
  *
4
- * Generated: 2022-12-26
5
- * Version: 5.0.0-alpha.176
4
+ * Generated: 2022-12-28
5
+ * Version: 5.0.0-alpha.178
6
6
  *
7
7
  * Terms:
8
8
  * Realsee SDK License Agreement
@@ -257,4 +257,4 @@
257
257
  * Agreement and all related documents shall be drafted in English.
258
258
  */
259
259
 
260
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),n=require("@realsee/five");function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var r=t(require("three")),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)},i=!1;var u=Symbol();function a(){var n=e.inject(u);if(!n)throw new Error("Inject five error!");return n}var c={display:"inline-block",overflow:"hidden"},f=e.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(n){var t=e.toRef(n,"width"),r=e.toRef(n,"height"),i=a(),u=e.ref(null);return e.watch([t,r,u],(function(){if(i.renderer&&u.value){if(null!==i.renderer.domElement.parentNode&&i.renderer.domElement.parentNode!==u.value)throw new Error("There are more than 2 fiveCanvas in this context.");i.renderer.domElement.parentNode!==u.value&&u.value.appendChild(i.renderer.domElement),i.camera.aspect=t.value/r.value,i.camera.updateProjectionMatrix(),i.renderer.setSize(t.value,r.value),i.needsRender=!0}})),function(){return e.h("div",{id:"five",style:o({width:"".concat(t.value,"px"),height:"".concat(r.value,"px")},c),ref:u})}}}),l=[];var s=e.defineComponent({props:{work:Object,initialWork:Object,initialState:Object,initialUserAction:Boolean,onWorkChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(t){var a,c,f=e.toRefs(t).work,s=function(e){var n=void 0===e?{}:e,t=n.backgroundColor,o=void 0===t?1579548:t,i=n.backgroundAlpha,u=void 0===i?1:i,a=n.pixelRatio,c=void 0===a?1:a;if("undefined"!=typeof window){var f=l.shift();return f||((f=new r.WebGLRenderer({antialias:!1,alpha:!0})).outputEncoding=r.sRGBEncoding),f.setPixelRatio(c),f.setClearColor(o,u),f.autoClear=!0,f}}({pixelRatio:1===n.getViewportScale()?window.devicePixelRatio:1}),d=new n.Five(o({renderer:s},t.fiveInitArgs));return(t.work||t.initialWork)&&d.load(t.work||t.initialWork,t.initialState,void 0,null===(a=t.initialUserAction)||void 0===a||a),c=!!t.work,i=c,f&&e.watch(f,(function(e,n){e&&e!==(null==d?void 0:d.work)&&(null==d||d.load(e,t.initialState))})),e.onBeforeUnmount((function(){d&&(d.dispose(),function(e){e&&-1===l.indexOf(e)&&l.push(e)}(d.renderer))})),d.on("load",(function(){t.onWorkChange&&d.work&&t.onWorkChange(null==d?void 0:d.work)})),d.on("stateChange",(function(e,n){t.onStateChange&&t.onStateChange(e,n)})),d.on("currentStateChange",(function(e,n){t.onCurrentStateChange&&t.onCurrentStateChange(e,n)})),d.on("error",(function(e){t.onError?t.onError(e):console.warn(e.message)})),e.provide(u,d),{five:e.shallowReadonly(d)}},render:function(){return e.h("div",{style:this.$props.style},this.$slots)}});function d(n,t){void 0===t&&(t=!1);var r=a(),o=e.ref(Symbol()),i=e.shallowRef(n?r.project2d(e.isRef(n)?n.value:n,t):null),u=r.on("cameraUpdate",(function(){o.value=Symbol()}));return e.onBeforeUnmount((function(){u()})),e.watch([o,n],(function(){i.value=r.project2d(e.isRef(n)?n.value:n,t)})),i}function v(e){var n=e.camera.getWorldDirection(new r.Vector3);return new r.Raycaster(e.camera.position,n)}function p(e){return e.camera.getWorldDirection(new r.Vector3)}function h(n){var t=a(),r=e.shallowRef([]);return e.watch(n,(function(){r.value=t.model.intersectRaycaster(e.isRef(n)?n.value:n)})),r}function m(e){return e.model.empty?"Empty":"Loaded"}function w(e){return e.model.bounding.clone()}exports.FiveCanvas=f,exports.FiveProvider=s,exports.unsafe__useFiveInject=function(){return a()},exports.useFiveAction=function(){var e=a();return{updateCamera:function(n,t){return e.updateCamera(n,t)},initBasisLoader:function(n){return e.initBasisLoader(n)},getPixels:function(n,t,r,o,i){return e.getPixels(n,t,r,o,i)},render:function(n){return e.render(n)},needsRender:function(){return e.needsRender=!0},preloadPano:function(n,t){return e.preloadPano(n,t)},project2d:function(n,t){return void 0===t&&(t=!1),e.project2d(n,t)}}},exports.useFiveCameraDirection=function(){var n=a(),t=e.shallowRef(p(n)),r=n.on("cameraUpdate",(function(){t.value=p(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveCameraRaycaster=function(){var n=a(),t=e.shallowRef(v(n)),r=n.on("cameraUpdate",(function(){t.value=v(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveCurrentObserver=function(){var n=a(),t=e.reactive(n.getCurrentState()),r=e.ref(n.work?n.work.observers[t.panoIndex]:null),o=n.on("currentStateChange",(function(){Object.assign(t,n.getCurrentState()),n.work&&(r.value=n.work.observers[t.panoIndex])}));return e.onBeforeUnmount((function(){o()})),r},exports.useFiveCurrentState=function(){var n=a(),t=e.ref(n.getCurrentState()),r=n.on("currentStateChange",(function(){Object.assign(t.value,n.getCurrentState())}));return e.onBeforeUnmount((function(){r()})),[t,function(e,t,r){var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,t,r)}]},exports.useFiveEventCallback=function(n,t){var r=a().on(n,t);e.onBeforeUnmount((function(){r()}))},exports.useFiveFloor=function(){var n=a(),t=e.ref(n.model.shownFloor),r=e.ref(n.model.floorLength),o=[];return o.push(n.on("modelShownFloorChange",(function(){t.value=n.model.shownFloor}))),o.push(n.on("modelLoaded",(function(){r.value=n.model.floorLength}))),e.onBeforeUnmount((function(){for(var e;e=o.shift();)e()})),[t,r,function(e){"number"==typeof e?n.model.show(e):n.model.show()}]},exports.useFiveHelper=function(){var n=a(),t=e.ref(n.helperVisible),r=n.on("helpersVisibleChange",(function(e){t.value=e}));return e.onBeforeUnmount((function(){r()})),[t,function(e){n.helperVisible=e}]},exports.useFiveModel=function(){var n=a(),t=e.shallowRef(n.model),r=n.on("modelLoaded",(function(){t.value=n.model}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveModelBounding=function(){var n=a(),t=e.shallowRef(w(n)),r=n.on("modelLoaded",(function(){t.value=w(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveModelIntersectRaycaster=function(){return h},exports.useFiveModelReadyState=function(){var n=a(),t=e.ref(m(n)),r=n.on("modelLoaded",(function(){t.value=m(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveProject2d=function(){return d},exports.useFiveScene=function(){return a().scene},exports.useFiveState=function(){var n=a(),t=e.ref(o({},n.state)),r=n.on("stateChange",(function(e){Object.assign(t.value,o({},e))}));return e.onBeforeUnmount((function(){r()})),[t,function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0);var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,t,r)}]},exports.useFiveWork=function(){var n=a(),t=e.ref(n.work),r=e.readonly(t),o=n.on("load",(function(){t.value=n.work}));return e.onBeforeUnmount((function(){o()})),[r,function(e,t,r,o){if(i)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return n.load(e,t,r,o)}]};
260
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),n=require("@realsee/five");function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var r=t(require("three")),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)},i=!1;var u=Symbol();function a(){var n=e.inject(u);if(!n)throw new Error("Inject five error!");return n}var c={display:"inline-block",overflow:"hidden"},f=e.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(n){var t=e.toRef(n,"width"),r=e.toRef(n,"height"),i=a(),u=e.ref(null);return e.watch([t,r,u],(function(){if(i.renderer&&u.value){if(null!==i.renderer.domElement.parentNode&&i.renderer.domElement.parentNode!==u.value)throw new Error("There are more than 2 fiveCanvas in this context.");i.renderer.domElement.parentNode!==u.value&&u.value.appendChild(i.renderer.domElement),i.camera.aspect=t.value/r.value,i.camera.updateProjectionMatrix(),i.renderer.setSize(t.value,r.value),i.needsRender=!0}})),function(){return e.h("div",{id:"five",style:o({width:"".concat(t.value,"px"),height:"".concat(r.value,"px")},c),ref:u})}}}),l=[];var s=e.defineComponent({props:{work:Object,initialWork:Object,initialState:Object,initialUserAction:Boolean,onWorkChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(t){var a,c,f=e.toRefs(t).work,s=function(e){var n=void 0===e?{}:e,t=n.backgroundColor,o=void 0===t?1579548:t,i=n.backgroundAlpha,u=void 0===i?1:i,a=n.pixelRatio,c=void 0===a?1:a;if("undefined"!=typeof window){var f=l.shift();return f||((f=new r.WebGLRenderer({antialias:!1,alpha:!0})).outputEncoding=r.sRGBEncoding),f.setPixelRatio(c),f.setClearColor(o,u),f.autoClear=!0,f}}({pixelRatio:1===n.getViewportScale()?window.devicePixelRatio:1}),d=new n.Five(o({renderer:s},t.fiveInitArgs));return(t.work||t.initialWork)&&d.load(t.work||t.initialWork,t.initialState,void 0,null===(a=t.initialUserAction)||void 0===a||a),c=!!t.work,i=c,f&&e.watch(f,(function(e,n){e&&e!==(null==d?void 0:d.work)&&(null==d||d.load(e,t.initialState))})),e.onBeforeUnmount((function(){d&&(d.dispose(),function(e){e&&-1===l.indexOf(e)&&l.push(e)}(d.renderer))})),d.on("load",(function(){t.onWorkChange&&d.work&&t.onWorkChange(null==d?void 0:d.work)})),d.on("stateChange",(function(e,n){t.onStateChange&&t.onStateChange(e,n)})),d.on("currentStateChange",(function(e,n){t.onCurrentStateChange&&t.onCurrentStateChange(e,n)})),d.on("error",(function(e){t.onError?t.onError(e):console.warn(e.message)})),e.provide(u,d),{five:e.shallowReadonly(d)}},render:function(){return e.h("div",{style:this.$props.style},this.$slots)}});function d(n,t){void 0===t&&(t=!1);var r=a(),o=e.ref(Symbol()),i=e.shallowRef(n?r.project2d(e.isRef(n)?n.value:n,t):null),u=r.on("cameraUpdate",(function(){o.value=Symbol()}));return e.onBeforeUnmount((function(){u()})),e.watch([o,n],(function(){i.value=r.project2d(e.isRef(n)?n.value:n,t)})),i}function v(e){var n=e.camera.getWorldDirection(new r.Vector3);return new r.Raycaster(e.camera.position,n)}function p(e){return e.camera.getWorldDirection(new r.Vector3)}function h(n){var t=a(),r=e.shallowRef([]);return e.watch(n,(function(){r.value=t.model.intersectRaycaster(e.isRef(n)?n.value:n)})),r}function m(e){return e.model.empty?"Empty":"Loaded"}function w(e){return e.model.bounding.clone()}exports.FiveCanvas=f,exports.FiveProvider=s,exports.unsafe__useFiveInject=function(){return a()},exports.useFiveAction=function(){var e=a();return{updateCamera:function(n,t){return e.updateCamera(n,t)},getPixels:function(n,t,r,o,i){return e.getPixels(n,t,r,o,i)},render:function(n){return e.render(n)},needsRender:function(){return e.needsRender=!0},preloadPano:function(n,t){return e.preloadPano(n,t)},project2d:function(n,t){return void 0===t&&(t=!1),e.project2d(n,t)}}},exports.useFiveCameraDirection=function(){var n=a(),t=e.shallowRef(p(n)),r=n.on("cameraUpdate",(function(){t.value=p(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveCameraRaycaster=function(){var n=a(),t=e.shallowRef(v(n)),r=n.on("cameraUpdate",(function(){t.value=v(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveCurrentObserver=function(){var n=a(),t=e.reactive(n.getCurrentState()),r=e.ref(n.work?n.work.observers[t.panoIndex]:null),o=n.on("currentStateChange",(function(){Object.assign(t,n.getCurrentState()),n.work&&(r.value=n.work.observers[t.panoIndex])}));return e.onBeforeUnmount((function(){o()})),r},exports.useFiveCurrentState=function(){var n=a(),t=e.ref(n.getCurrentState()),r=n.on("currentStateChange",(function(){Object.assign(t.value,n.getCurrentState())}));return e.onBeforeUnmount((function(){r()})),[t,function(e,t,r){var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,t,r)}]},exports.useFiveEventCallback=function(n,t){var r=a().on(n,t);e.onBeforeUnmount((function(){r()}))},exports.useFiveFloor=function(){var n=a(),t=e.ref(n.model.shownFloor),r=e.ref(n.model.floorLength),o=[];return o.push(n.on("modelShownFloorChange",(function(){t.value=n.model.shownFloor}))),o.push(n.on("modelLoaded",(function(){r.value=n.model.floorLength}))),e.onBeforeUnmount((function(){for(var e;e=o.shift();)e()})),[t,r,function(e){"number"==typeof e?n.model.show(e):n.model.show()}]},exports.useFiveHelper=function(){var n=a(),t=e.ref(n.helperVisible),r=n.on("helpersVisibleChange",(function(e){t.value=e}));return e.onBeforeUnmount((function(){r()})),[t,function(e){n.helperVisible=e}]},exports.useFiveModel=function(){var n=a(),t=e.shallowRef(n.model),r=n.on("modelLoaded",(function(){t.value=n.model}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveModelBounding=function(){var n=a(),t=e.shallowRef(w(n)),r=n.on("modelLoaded",(function(){t.value=w(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveModelIntersectRaycaster=function(){return h},exports.useFiveModelReadyState=function(){var n=a(),t=e.ref(m(n)),r=n.on("modelLoaded",(function(){t.value=m(n)}));return e.onBeforeUnmount((function(){r()})),t},exports.useFiveProject2d=function(){return d},exports.useFiveScene=function(){return a().scene},exports.useFiveState=function(){var n=a(),t=e.ref(o({},n.state)),r=n.on("stateChange",(function(e){Object.assign(t.value,o({},e))}));return e.onBeforeUnmount((function(){r()})),[t,function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0);var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,t,r)}]},exports.useFiveWork=function(){var n=a(),t=e.ref(n.work),r=e.readonly(t),o=n.on("load",(function(){t.value=n.work}));return e.onBeforeUnmount((function(){o()})),[r,function(e,t,r,o){if(i)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return n.load(e,t,r,o)}]};