@realsee/five 6.0.0-alpha.63 → 6.0.0-alpha.65
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/docs/assets/highlight.css +20 -20
- package/docs/assets/main.js +59 -52
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +805 -825
- package/docs/classes/five.AnimationFrameLoop.html +16 -15
- package/docs/classes/five.BoxBoundingVolume.html +18 -1
- package/docs/classes/five.Camera.html +37 -11
- package/docs/classes/five.CullingVolume.html +10 -1
- package/docs/classes/five.Fetcher.html +5 -1
- package/docs/classes/five.Five.html +237 -288
- package/docs/classes/five.InternalWebGLRenderer.html +2 -1
- package/docs/classes/five.IntersectMesh.html +4 -1
- package/docs/classes/five.Model.html +62 -65
- package/docs/classes/five.NetworkAbortError.html +2 -1
- package/docs/classes/five.NetworkFirbiddenError.html +2 -1
- package/docs/classes/five.NetworkResponseError.html +3 -1
- package/docs/classes/five.NetworkSubscribe.html +42 -56
- package/docs/classes/five.NetworkTimeoutError.html +2 -1
- package/docs/classes/five.PBMContainer.html +12 -11
- package/docs/classes/five.PBMGroup.html +3 -3
- package/docs/classes/five.PBMMesh.html +4 -3
- package/docs/classes/five.PBMMeshMaterial.html +50 -47
- package/docs/classes/five.PanoCircleMesh.html +30 -7
- package/docs/classes/five.PanoCircleMeshCustom.html +30 -7
- package/docs/classes/five.PanoCircleMeshSolid.html +30 -7
- package/docs/classes/five.RegionBoundingVolume.html +21 -1
- package/docs/classes/five.RequestScheduler.html +13 -12
- package/docs/classes/five.Scene.html +5 -3
- package/docs/classes/five.SphereBoundingVolume.html +17 -1
- package/docs/classes/five.Subscribe.html +43 -62
- package/docs/classes/five.TextureLoader.html +5 -1
- package/docs/classes/five.Tile.html +30 -1
- package/docs/classes/five.Tile3DModel.html +28 -1
- package/docs/classes/five.TileCubeTextureTarget.html +9 -1
- package/docs/classes/five.TileNode.html +4 -1
- package/docs/classes/five.Tileset.html +31 -5
- package/docs/classes/five.TilesetCache.html +8 -1
- package/docs/classes/five.TilesetTraverser.html +19 -1
- package/docs/classes/five.Work.html +28 -28
- package/docs/classes/five.XRButton.html +3 -1
- package/docs/classes/gltf_loader.DDSLoader.html +3 -1
- package/docs/classes/gltf_loader.DRACOLoader.html +8 -1
- package/docs/classes/gltf_loader.GLTFLoader.html +18 -17
- package/docs/classes/gltf_loader.GLTFObject.html +8 -6
- package/docs/classes/gltf_loader.GLTFParser.html +6 -1
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +8 -1
- package/docs/classes/line.Line.html +10 -1
- package/docs/classes/line.LineGeometry.html +14 -1
- package/docs/classes/line.LineMaterial.html +8 -1
- package/docs/classes/line.LineSegmentsGeometry.html +12 -1
- package/docs/classes/line.THREE_Line2.html +4 -1
- package/docs/classes/line.THREE_LineSegments2.html +4 -1
- package/docs/classes/react.Store.html +23 -29
- package/docs/classes/sticker.Sticker.html +25 -32
- package/docs/classes/vfx.Airflow.html +8 -1
- package/docs/classes/vfx.Flame.html +10 -1
- package/docs/classes/vfx.Particle.html +79 -82
- package/docs/classes/vfx.SpotLight.html +7 -1
- package/docs/enums/five.VolumePlaneIntersect.html +4 -1
- package/docs/functions/five.defaultImageURLTransform.html +5 -0
- package/docs/functions/five.getViewportScale.html +1 -0
- package/docs/functions/five.imageSupport.html +1 -0
- package/docs/functions/five.isPanoId.html +1 -0
- package/docs/functions/five.loadAt3d.html +1 -0
- package/docs/functions/five.loadB3dm.html +1 -0
- package/docs/functions/five.loadDome.html +1 -0
- package/docs/functions/five.loadDomez.html +1 -0
- package/docs/functions/five.loadPbm.html +1 -0
- package/docs/functions/five.loadPnts.html +1 -0
- package/docs/functions/five.panoEqual.html +1 -0
- package/docs/functions/five.panoParse.html +1 -0
- package/docs/functions/five.panoStringify.html +1 -0
- package/docs/functions/five.parseWork.html +7 -0
- package/docs/functions/react.FiveCanvas-1.html +6 -0
- package/docs/functions/react.createFiveFeature.html +1 -0
- package/docs/functions/react.createFiveProvider.html +9 -0
- package/docs/functions/react.createStore.html +15 -0
- package/docs/functions/react.unsafe__useFiveInstance.html +5 -0
- package/docs/functions/react.useFiveAction.html +19 -0
- package/docs/functions/react.useFiveCameraDirection.html +3 -0
- package/docs/functions/react.useFiveCameraRaycaster.html +3 -0
- package/docs/functions/react.useFiveCurrentObserver.html +5 -0
- package/docs/functions/react.useFiveCurrentState.html +5 -0
- package/docs/functions/react.useFiveEventCallback.html +5 -0
- package/docs/functions/react.useFiveFloor.html +5 -0
- package/docs/functions/react.useFiveHelper.html +5 -0
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +7 -0
- package/docs/functions/react.useFiveModelReadyState.html +4 -0
- package/docs/functions/react.useFiveProject2d.html +7 -0
- package/docs/functions/react.useFiveScene.html +2 -0
- package/docs/functions/react.useFiveSceneEffect.html +5 -0
- package/docs/functions/react.useFiveState.html +1 -0
- package/docs/functions/react.useFiveWork.html +8 -0
- package/docs/functions/react.withFive.html +1 -0
- package/docs/functions/vue.unsafe__useFiveInject.html +5 -0
- package/docs/functions/vue.useFiveAction.html +25 -0
- package/docs/functions/vue.useFiveCameraDirection.html +3 -0
- package/docs/functions/vue.useFiveCameraRaycaster.html +3 -0
- package/docs/functions/vue.useFiveCurrentObserver.html +5 -0
- package/docs/functions/vue.useFiveCurrentState.html +5 -0
- package/docs/functions/vue.useFiveEventCallback.html +5 -0
- package/docs/functions/vue.useFiveFloor.html +5 -0
- package/docs/functions/vue.useFiveHelper.html +5 -0
- package/docs/functions/vue.useFiveModel.html +2 -0
- package/docs/functions/vue.useFiveModelBounding.html +2 -0
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +7 -0
- package/docs/functions/vue.useFiveModelReadyState.html +4 -0
- package/docs/functions/vue.useFiveProject2d.html +7 -0
- package/docs/functions/vue.useFiveScene.html +2 -0
- package/docs/functions/vue.useFiveState.html +5 -0
- package/docs/functions/vue.useFiveWorks.html +8 -0
- package/docs/index.html +35 -79
- package/docs/interfaces/five.AddableObject.html +9 -9
- package/docs/interfaces/five.AjaxOptions.html +11 -11
- package/docs/interfaces/five.AnimationFrame.html +5 -1
- package/docs/interfaces/five.BaseEvent.html +5 -1
- package/docs/interfaces/five.BoundingVolume.html +14 -1
- package/docs/interfaces/five.CameraPose.html +6 -1
- package/docs/interfaces/five.ClipperParameter.html +3 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +25 -25
- package/docs/interfaces/five.EventCallback.html +355 -466
- package/docs/interfaces/five.FiveInitArgs.html +84 -86
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
- package/docs/interfaces/five.GestureEvent.html +19 -1
- package/docs/interfaces/five.ImageOptions.html +16 -18
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +15 -15
- package/docs/interfaces/five.IntersectEvent.html +8 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
- package/docs/interfaces/five.Intersection.html +3 -3
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +13 -13
- package/docs/interfaces/five.ModeChangeEvent.html +9 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ModelEvent.html +8 -1
- package/docs/interfaces/five.ModelLodOptions.html +2 -1
- package/docs/interfaces/five.ModelsEvent.html +6 -1
- package/docs/interfaces/five.MotionKeyframe.html +4 -1
- package/docs/interfaces/five.MovePanoOptions.html +29 -30
- package/docs/interfaces/five.NetworkOptions.html +9 -9
- package/docs/interfaces/five.NetworkResourceEvent.html +9 -1
- package/docs/interfaces/five.ObjectEvent.html +6 -1
- package/docs/interfaces/five.PBMPanoPicture.html +7 -7
- package/docs/interfaces/five.PBMParameters.html +42 -43
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +21 -10
- package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -1
- package/docs/interfaces/five.PanoEvent.html +11 -1
- package/docs/interfaces/five.PanoTextureEvent.html +9 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +32 -32
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.Pose.html +15 -32
- package/docs/interfaces/five.RenderEvent.html +7 -1
- package/docs/interfaces/five.Scissor.html +11 -12
- package/docs/interfaces/five.State.html +20 -21
- package/docs/interfaces/five.StateEvent.html +7 -1
- package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
- package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +18 -20
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +6 -3
- package/docs/interfaces/five.TileCubeNode.html +7 -1
- package/docs/interfaces/five.TileCubeTree.html +2 -1
- package/docs/interfaces/five.TileHeader.html +9 -1
- package/docs/interfaces/five.TilesetHeader.html +5 -1
- package/docs/interfaces/five.TilesetOptions.html +5 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +28 -28
- package/docs/interfaces/five.WebXRAxesParams.html +4 -1
- package/docs/interfaces/five.WebXRControllerParams.html +2 -1
- package/docs/interfaces/five.WorkCubeImage.html +13 -13
- package/docs/interfaces/five.WorkImage.html +20 -21
- package/docs/interfaces/five.WorkInitial.html +17 -17
- package/docs/interfaces/five.WorkModel.html +12 -13
- package/docs/interfaces/five.WorkObserver.html +40 -41
- package/docs/interfaces/five.WorkOptions.html +17 -17
- package/docs/interfaces/five.WorkResolvedObserver.html +41 -39
- package/docs/interfaces/five.WorkTile.html +9 -1
- package/docs/interfaces/five.WorkVideo.html +8 -9
- package/docs/interfaces/five.WorksEvent.html +9 -1
- package/docs/interfaces/five.XRControllerEvent.html +8 -1
- package/docs/interfaces/five.XRGestureEvent.html +11 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +29 -28
- package/docs/interfaces/five.XRSessionEvent.html +7 -1
- package/docs/interfaces/gltf_loader.DDS.html +7 -1
- package/docs/interfaces/gltf_loader.GLTF.html +10 -4
- package/docs/interfaces/gltf_loader.GLTFReference.html +3 -1
- package/docs/interfaces/gltf_loader.THREEGLTF.html +8 -1
- package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -37
- package/docs/interfaces/react.FiveInjectionTypes.html +113 -138
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -1
- package/docs/interfaces/sticker.IntersectionLike.html +7 -8
- package/docs/interfaces/vfx.ParticleArgs.html +67 -68
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +31 -42
- package/docs/modules/five.SubscribeMixinType.html +7 -1
- package/docs/modules/five.html +171 -647
- package/docs/modules/gltf_loader.html +11 -1
- package/docs/modules/line.html +8 -1
- package/docs/modules/react.FiveCanvas.html +8 -0
- package/docs/modules/react.html +37 -130
- package/docs/modules/sticker.html +3 -1
- package/docs/modules/vfx.html +8 -1
- package/docs/modules/vue.html +24 -115
- package/docs/types/five.AjaxResponseType.html +1 -0
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -0
- package/docs/types/five.BoundingVolumeJson.html +1 -0
- package/docs/types/five.BoxBoundingVolumeJson.html +1 -0
- package/docs/types/five.ControllerCustomInitTypes.html +1 -0
- package/docs/types/five.ControllerEventTypes.html +32 -0
- package/docs/types/five.CoordinatesSystemTransformer.html +1 -0
- package/docs/types/five.EventTypes.html +26 -0
- package/docs/types/five.FivePlugin.html +71 -0
- package/docs/types/five.FivePluginInit.html +3 -0
- package/docs/types/five.FivePluginInstance.html +3 -0
- package/docs/types/five.GestureTypes.html +1 -0
- package/docs/types/five.LegacyEventType.html +203 -0
- package/docs/types/five.LooseWork.html +1 -0
- package/docs/types/five.LooseWorkInitial.html +1 -0
- package/docs/types/five.LooseWorkModel.html +1 -0
- package/docs/types/five.LooseWorkObserver.html +1 -0
- package/docs/types/five.LooseWorkPanorama.html +1 -0
- package/docs/types/five.LooseWorkVideo.html +1 -0
- package/docs/types/five.LooseWorkWithExtrinsics.html +8 -0
- package/docs/types/five.Mirror.html +1 -0
- package/docs/types/five.Mode.html +11 -0
- package/docs/types/five.ModelMaterialValues.html +1 -0
- package/docs/types/five.Models.html +12 -0
- package/docs/types/five.MotionValue.html +1 -0
- package/docs/types/five.NetWorkMeta.html +1 -0
- package/docs/types/five.NetworkError.html +1 -0
- package/docs/types/five.NetworkErrorCallback.html +1 -0
- package/docs/types/five.NetworkProgressCallback.html +1 -0
- package/docs/types/five.NetworkResponse.html +1 -0
- package/docs/types/five.NetworkState.html +1 -0
- package/docs/types/five.NetworkSuccessCallback.html +1 -0
- package/docs/types/five.NetworkType.html +1 -0
- package/docs/types/five.Pano.html +1 -0
- package/docs/types/five.PanoId.html +1 -0
- package/docs/types/five.ParseWorkOptions.html +13 -0
- package/docs/types/five.ParsedResultType.html +1 -0
- package/docs/types/five.PostProcessingType.html +1 -0
- package/docs/types/five.RegionBoundingVolumeJson.html +1 -0
- package/docs/types/five.RequestResult.html +1 -0
- package/docs/types/five.SphereBoundingVolumeJson.html +1 -0
- package/docs/types/five.SubscribeEventMap.html +1 -0
- package/docs/types/five.TileContentData.html +1 -0
- package/docs/types/five.TilesetFrameState.html +1 -0
- package/docs/types/five.WebXRControllerKey.html +1 -0
- package/docs/types/five.WebXRControllerType.html +1 -0
- package/docs/types/five.Works.html +1 -0
- package/docs/types/line.LineMaterialParameters.html +1 -0
- package/docs/types/react.FiveInjectionActionFeature.html +1 -0
- package/docs/types/react.FiveInjectionDataFeature.html +1 -0
- package/docs/types/react.FiveInjectionFeature.html +1 -0
- package/docs/types/react.FiveProviderPropTypes.html +1 -0
- package/docs/types/react.FiveProviderType.html +1 -0
- package/docs/types/react.StoreActionMapHanlder.html +1 -0
- package/docs/types/react.StoreActionMapType.html +1 -0
- package/docs/types/react.StoreProviderType.html +1 -0
- package/docs/types/react.StoreValueMapType.html +1 -0
- package/docs/types/vfx.ParticleType.html +1 -0
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -0
- package/docs/types/vue.FiveProviderComponent.html +1 -0
- package/docs/types/vue.Project2d.html +1 -0
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
- package/docs/variables/five.defaultPbmParameters.html +1 -0
- package/docs/variables/react.INJECTION_PROPNAME.html +1 -0
- package/docs/variables/vue.FiveCanvas.html +8 -0
- package/docs/variables/vue.FiveProvider.html +8 -0
- package/five/index.d.ts +15 -1
- package/five/index.js +85 -85
- package/five/index.mjs +3515 -3525
- package/gltf-loader/index.js +5 -5
- package/gltf-loader/index.mjs +70 -70
- package/line/index.js +3 -3
- package/line/index.mjs +66 -65
- package/package.json +3 -3
- package/react/index.js +3 -3
- package/react/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +49 -49
- package/umd/five-gltf-loader.js +4 -4
- package/umd/five-line.js +4 -4
- package/umd/five-react.js +3 -3
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +8 -8
- package/umd/five-vue.js +3 -3
- package/umd/five.js +40 -40
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.d.ts +1 -1
- package/vue/index.js +3 -3
- package/vue/index.mjs +93 -92
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/modules.html +0 -1
- package/umd/five.js.LICENSE.txt +0 -100
package/umd/five-vfx.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 12/
|
|
5
|
-
* Version: 6.0.0-alpha.
|
|
4
|
+
* Generated: 12/14/2023
|
|
5
|
+
* Version: 6.0.0-alpha.65
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
|
-
*/(function(h,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],x):(h=typeof globalThis<"u"?globalThis:h||self,x(h.FiveSDK_VFX={},h.THREE))})(this,function(h,x){"use strict";function se(r){const
|
|
255
|
+
*/(function(h,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],x):(h=typeof globalThis<"u"?globalThis:h||self,x(h.FiveSDK_VFX={},h.THREE))})(this,function(h,x){"use strict";function se(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:()=>r[e]})}}return n.default=r,Object.freeze(n)}const i=se(x);var T=function(r,n){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},T(r,n)};function w(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");T(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;for(var ne=`
|
|
256
256
|
uniform vec3 uColor1;
|
|
257
257
|
uniform vec3 uColor2;
|
|
258
258
|
uniform float uOpacity;
|
|
@@ -412,7 +412,7 @@ void main() {
|
|
|
412
412
|
|
|
413
413
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(vPosition, 1.0);
|
|
414
414
|
}
|
|
415
|
-
`),le=new
|
|
415
|
+
`),le=new i.SphereBufferGeometry(1,300,300),re=[],A=0;A<2;A++)re.push(new i.Vector2(Math.sin(A)/2+1,A*2-.8));var ue=new i.LatheBufferGeometry(re,300),ce=function(r){w(n,r);function n(e){var t=r.call(this)||this;t.needsRender=!0;var o;if(e instanceof i.BufferGeometry)o=e;else switch(e){case"ring":o=ue;break;case"circle":default:o=le;break}t.uniforms={uTime:{value:0},uColor1:{value:new i.Color("rgb(255, 177, 20)")},uColor2:{value:new i.Color("rgb(255, 0, 0)")},uNoise:{value:1.2},uSpeed:{value:1},uOpacity:{value:1}},t.defines={FRAGMENTATION_DEGREE:2};var s=new i.Mesh(o,new i.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:i.BackSide})),a=new i.Mesh(o,new i.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:i.FrontSide}));return s.scale.setScalar(.1),a.scale.setScalar(.1),t.add(s),t.add(a),t}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(n.prototype,"color1",{get:function(){return this.uniforms.uColor1.value},set:function(e){this.uniforms.uColor1.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color2",{get:function(){return this.uniforms.uColor2.value},set:function(e){this.uniforms.uColor2.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"speed",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"noise",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"opacity",{get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.uOpacity.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fragmentationDegree",{get:function(){return this.defines.FRAGMENTATION_DEGREE},set:function(e){this.defines.FRAGMENTATION_DEGREE=e,this.traverse(function(t){t instanceof i.Mesh&&t.material instanceof i.ShaderMaterial&&(t.material.needsUpdate=!0)}),this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group),de=`
|
|
416
416
|
uniform vec3 uLightColor;
|
|
417
417
|
uniform vec3 uSpotPosition;
|
|
418
418
|
uniform float uAttenuation;
|
|
@@ -432,7 +432,7 @@ void main() {
|
|
|
432
432
|
intensity = intensity * angleIntensity * vNoise;
|
|
433
433
|
gl_FragColor = vec4( uLightColor, intensity );
|
|
434
434
|
}
|
|
435
|
-
`,
|
|
435
|
+
`,ve=`
|
|
436
436
|
|
|
437
437
|
uniform float uTime;
|
|
438
438
|
|
|
@@ -453,7 +453,7 @@ void main(){
|
|
|
453
453
|
|
|
454
454
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
455
455
|
}
|
|
456
|
-
`),
|
|
456
|
+
`),pe=function(r){w(n,r);function n(e,t,o){e===void 0&&(e=1),t===void 0&&(t=.1),o===void 0&&(o=.2);var s=r.call(this)||this;s.needsRender=!0,s.uniforms={uTime:{value:0},uAttenuation:{value:e*.9},uAnglePower:{value:2},uSpotPosition:{value:s.position},uLightColor:{value:new i.Color(16777215)}};var a=new i.CylinderBufferGeometry(t,o,e,64,20,!0);a.applyMatrix4(new i.Matrix4().makeTranslation(0,-e/2,0)),a.applyMatrix4(new i.Matrix4().makeRotationX(-Math.PI/2));var l=new i.Mesh(a,new i.ShaderMaterial({uniforms:s.uniforms,vertexShader:ve,fragmentShader:de,transparent:!0,side:i.FrontSide,depthWrite:!1}));return s.add(l),s}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(n.prototype,"attenuation",{get:function(){return this.uniforms.uAttenuation.value},set:function(e){this.uniforms.uAttenuation.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"anglePower",{get:function(){return this.uniforms.uAnglePower.value},set:function(e){this.uniforms.uAnglePower.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.uniforms.uLightColor.value},set:function(e){this.uniforms.uLightColor.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group),oe=`
|
|
457
457
|
uniform vec3 uColor;
|
|
458
458
|
uniform float uOpacity;
|
|
459
459
|
varying vec3 vPosition;
|
|
@@ -486,7 +486,7 @@ void main(){
|
|
|
486
486
|
|
|
487
487
|
gl_Position = projectionMatrix * modelViewMatrix * transformed;
|
|
488
488
|
}
|
|
489
|
-
`),C=new
|
|
489
|
+
`),C=new i.PlaneBufferGeometry(1,1,200,200);C.translate(0,-.5,0);var fe=function(r){w(n,r);function n(){var e=r.call(this)||this;e.needsRender=!0;var t=e.outer=new i.Mesh(C,new i.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:.75},uScale:{value:2},uExpand:{value:1.2},uColor:{value:new i.Color(.5,.5,.9)},uOpacity:{value:1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:i.DoubleSide,depthWrite:!1})),o=e.inner=new i.Mesh(C,new i.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:2},uScale:{value:20},uExpand:{value:1.2},uColor:{value:new i.Color(1,1,1)},uOpacity:{value:.1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:i.DoubleSide,depthWrite:!1}));return t.rotateX(-Math.PI/2),o.rotateX(-Math.PI/2),e.add(t),e.add(o),e}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e);var t=(e-this.startTime)/1e3;this.inner.material.uniforms.uTime.value=t,this.outer.material.uniforms.uTime.value=t,this.needsRender=!0},Object.defineProperty(n.prototype,"expand",{get:function(){return this.outer.material.uniforms.uExpand.value},set:function(e){this.outer.material.uniforms.uExpand.value=e,this.inner.material.uniforms.uExpand.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"speed",{get:function(){return this.inner.material.uniforms.speed.value},set:function(e){this.inner.material.uniforms.speed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.outer.material.uniforms.color.value},set:function(e){this.outer.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"flowColor",{get:function(){return this.inner.material.uniforms.color.value},set:function(e){this.inner.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group);function b(r,n){return r+n*(Math.random()-.5)}function _(r,n){var e=new i.Vector3(Math.random()-.5,Math.random()-.5,Math.random()-.5);return new i.Vector3().addVectors(r,new i.Vector3().multiplyVectors(n,e))}function P(r,n,e){return r*e+n*e*e/2}function he(r,n,e){return new i.Vector3(P(r.x,n.x,e),P(r.y,n.y,e),P(r.z,n.z,e))}function z(r,n){for(var e=r.times.length,t=0;t<e&&n>r.times[t];)t++;if(t==0)return r.values[0];if(t==e)return r.values[e-1];var o=(n-r.times[t-1])/(r.times[t]-r.times[t-1]),s=r.values[t-1],a=r.values[t];return typeof r.values[0]=="number"?s+o*(a-s):s.clone().lerp(a,o)}var me=function(){function r(n,e,t,o,s,a,l,u,d,v,p,c,f,y){this.birthTime=n,this.deathAge=e,this.position=t.clone(),this.velocity=o.clone(),this.acceleration=s.clone(),this.angle=a,this.angleVelocity=l,this.angleAcceleration=u,this.color=d,this.colorTween=v,this.size=p,this.sizeTween=c,this.opacity=f,this.opacityTween=y}return r.prototype.getAlive=function(n){return this.deathAge>n-this.birthTime},r.prototype.getState=function(n){var e=this.getAlive(n),t=Math.min(this.deathAge,n-this.birthTime),o=he(this.velocity,this.acceleration,t).add(this.position),s=P(this.angleVelocity,this.angleAcceleration,t)+this.angle,a=(this.sizeTween?z(this.sizeTween,t):0)+this.size,l=(this.colorTween?z(this.colorTween,t):new i.Vector3).add(this.color),u=new i.Color().setHSL(l.x,l.y,l.z),d=(this.opacityTween?z(this.opacityTween,t):0)+this.opacity;return{alive:e,age:t,position:o,angle:s,size:a,color:u,opacity:d}},r}(),ye=`
|
|
490
490
|
attribute vec3 color;
|
|
491
491
|
attribute float opacity;
|
|
492
492
|
attribute float size;
|
|
@@ -536,4 +536,4 @@ void main() {
|
|
|
536
536
|
gl_FragColor = vColor * rotatedTexture;
|
|
537
537
|
#endif
|
|
538
538
|
}
|
|
539
|
-
`,be=function(r){w(
|
|
539
|
+
`,be=function(r){w(n,r);function n(e){var t=this,o,s,a,l,u,d,v,p,c,f,y,S,m,B,R,N,V,O,j,F,D,U,G,I,X,H,k,L,q,W,Y,Z,$,J,Q,K,ee,te,g=new i.BufferGeometry;g.setAttribute("position",new i.BufferAttribute(new Float32Array,3)),g.setAttribute("alive",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("color",new i.BufferAttribute(new Float32Array,3)),g.setAttribute("opacity",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("size",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("angle",new i.BufferAttribute(new Float32Array,1));var xe=new i.ShaderMaterial({uniforms:{map:{value:(o=e.texture)!==null&&o!==void 0?o:null}},defines:{USE_MAP:!!e.texture},vertexShader:ye,fragmentShader:ge,transparent:!0,blending:(s=e.blending)!==null&&s!==void 0?s:i.NormalBlending,depthWrite:!1});return t=r.call(this,g,xe)||this,t.instances=[],t.needsRender=!0,t.birthTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.positionBase=(l=(a=e.positionBase)===null||a===void 0?void 0:a.clone())!==null&&l!==void 0?l:new i.Vector3,t.positionStyle=(u=e.positionStyle)!==null&&u!==void 0?u:"CUBE",t.positionCubeSpread=(v=(d=e.positionCubeSpread)===null||d===void 0?void 0:d.clone())!==null&&v!==void 0?v:new i.Vector3,t.positionSphereSpread=(p=e.positionSphereSpread)!==null&&p!==void 0?p:0,t.velocityStyle=(c=e.velocityStyle)!==null&&c!==void 0?c:"CUBE",t.velocityCubeBase=(y=(f=e.velocityCubeBase)===null||f===void 0?void 0:f.clone())!==null&&y!==void 0?y:new i.Vector3,t.velocityCubeSpread=(m=(S=e.velocityCubeSpread)===null||S===void 0?void 0:S.clone())!==null&&m!==void 0?m:new i.Vector3,t.velocitySphereBase=(B=e.velocitySphereBase)!==null&&B!==void 0?B:0,t.velocitySphereSpread=(R=e.velocitySphereSpread)!==null&&R!==void 0?R:0,t.accelerationBase=(V=(N=e.accelerationBase)===null||N===void 0?void 0:N.clone())!==null&&V!==void 0?V:new i.Vector3,t.accelerationSpread=(j=(O=e.accelerationSpread)===null||O===void 0?void 0:O.clone())!==null&&j!==void 0?j:new i.Vector3,t.angleBase=(F=e.angleBase)!==null&&F!==void 0?F:0,t.angleSpread=(D=e.angleSpread)!==null&&D!==void 0?D:0,t.angleVelocityBase=(U=e.angleVelocityBase)!==null&&U!==void 0?U:0,t.angleVelocitySpread=(G=e.angleVelocitySpread)!==null&&G!==void 0?G:0,t.angleAccelerationBase=(I=e.angleAccelerationBase)!==null&&I!==void 0?I:0,t.angleAccelerationSpread=(X=e.angleAccelerationSpread)!==null&&X!==void 0?X:0,t.sizeBase=(H=e.sizeBase)!==null&&H!==void 0?H:.1,t.sizeSpread=(k=e.sizeSpread)!==null&&k!==void 0?k:0,t.sizeTween=(L=e.sizeTween)!==null&&L!==void 0?L:null,t.colorBase=(W=(q=e.colorBase)===null||q===void 0?void 0:q.clone())!==null&&W!==void 0?W:new i.Vector3,t.colorSpread=(Z=(Y=e.colorSpread)===null||Y===void 0?void 0:Y.clone())!==null&&Z!==void 0?Z:new i.Vector3,t.colorTween=($=e.colorTween)!==null&&$!==void 0?$:null,t.opacityBase=((J=e.opacityBase)!==null&&J!==void 0?J:e.opacityTween)?0:1,t.opacitySpread=(Q=e.opacitySpread)!==null&&Q!==void 0?Q:0,t.opacityTween=(K=e.opacityTween)!==null&&K!==void 0?K:null,t.particlesPerSecond=(ee=e.particlesPerSecond)!==null&&ee!==void 0?ee:60,t.particleDeathAge=(te=e.particleDeathAge)!==null&&te!==void 0?te:1,t}return Object.defineProperty(n.prototype,"texture",{get:function(){return this.material.uniforms.map.value},set:function(e){this.material.uniforms.map.value=e,e===null?this.material.defines.USE_MAP!==!1&&(this.material.defines.USE_MAP=!1,this.material.needsUpdate=!0):this.material.defines.USE_MAP!==!0&&(this.material.defines.USE_MAP=!0,this.material.needsUpdate=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"blending",{get:function(){return this.material.blending},set:function(e){this.material.blending=e},enumerable:!1,configurable:!0}),n.prototype.createInstance=function(e){var t=this.positionBase.clone();switch(this.positionStyle){case"CUBE":{t=_(this.positionBase,this.positionCubeSpread);break}case"SPHERE":{var o=2*Math.random()-1,s=Math.PI*2*Math.random(),a=Math.sqrt(1-o*o),l=new i.Vector3(a*Math.cos(s),a*Math.sin(s),o);t=new i.Vector3().addVectors(this.positionBase,l.multiplyScalar(this.positionSphereSpread));break}}var u=new i.Vector3;switch(this.velocityStyle){case"CUBE":{u=_(this.velocityCubeBase,this.velocityCubeSpread);break}case"SPHERE":{var d=new i.Vector3().subVectors(t,this.positionBase),v=b(this.velocitySphereBase,this.velocitySphereSpread);u=d.normalize().multiplyScalar(v);break}}var p=new me(e,this.particleDeathAge,t,u,_(this.accelerationBase,this.accelerationSpread),b(this.angleBase,this.angleSpread),b(this.angleVelocityBase,this.angleVelocitySpread),b(this.angleAccelerationBase,this.angleAccelerationSpread),_(this.colorBase,this.colorSpread),this.colorTween,b(this.sizeBase,this.sizeSpread),this.sizeTween,b(this.opacityBase,this.opacitySpread),this.opacityTween);return p},n.prototype.pause=function(){this.paused!==!0&&(this.paused=!0,this.birthTime=Date.now()/1e3)},n.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.birthTime=Date.now()/1e3)},n.prototype.setTime=function(e){if(!this.disposed){e/=1e3;var t=e-this.birthTime,o=Math.ceil(this.particlesPerSecond*this.particleDeathAge);if(this.geometry.attributes.position.count<o){var s=new Float32Array(o*3);s.set(this.geometry.attributes.position.array,0);var a=new i.BufferAttribute(s,3);a.needsUpdate=!0,this.geometry.setAttribute("position",a)}if(this.geometry.attributes.alive.count<o){var l=new Float32Array(o);l.set(this.geometry.attributes.alive.array,0);var a=new i.BufferAttribute(l,1);a.needsUpdate=!0,this.geometry.setAttribute("alive",a)}if(this.geometry.attributes.color.count<o){var u=new Float32Array(o*3);u.set(this.geometry.attributes.color.array,0);var a=new i.BufferAttribute(u,3);a.needsUpdate=!0,this.geometry.setAttribute("color",a)}if(this.geometry.attributes.opacity.count<o){var d=new Float32Array(o);d.set(this.geometry.attributes.opacity.array,0);var a=new i.BufferAttribute(d,1);a.needsUpdate=!0,this.geometry.setAttribute("opacity",a)}if(this.geometry.attributes.size.count<o){var v=new Float32Array(o);v.set(this.geometry.attributes.size.array,0);var a=new i.BufferAttribute(v,1);a.needsUpdate=!0,this.geometry.setAttribute("size",a)}if(this.geometry.attributes.angle.count<o){var p=new Float32Array(o);p.set(this.geometry.attributes.angle.array,0);var a=new i.BufferAttribute(p,1);a.needsUpdate=!0,this.geometry.setAttribute("angle",a)}this.instances.length<o&&(this.instances.length=o);for(var c=0;c<this.instances.length;c++){var f=this.instances[c];if(c<o&&this.paused===!1&&(f===void 0||f.getAlive(e)===!1)){var y=this.particleDeathAge/o*c;if(t>y){var S=e-(t-y)%this.particleDeathAge;this.instances[c]=f=this.createInstance(S)}}if(f){var m=f.getState(e),s=m.position,l=m.alive,u=m.color,d=m.opacity,v=m.size,p=m.angle;this.geometry.attributes.position.setXYZ(c,s.x,s.y,s.z),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.alive.setX(c,l?1:0),this.geometry.attributes.alive.needsUpdate=!0,this.geometry.attributes.color.setXYZ(c,u.r,u.g,u.b),this.geometry.attributes.color.needsUpdate=!0,this.geometry.attributes.opacity.setX(c,d),this.geometry.attributes.opacity.needsUpdate=!0,this.geometry.attributes.size.setX(c,v),this.geometry.attributes.size.needsUpdate=!0,this.geometry.attributes.angle.setX(c,p),this.geometry.attributes.angle.needsUpdate=!0}}this.geometry.computeBoundingBox(),this.geometry.boundingSphere||(this.geometry.boundingSphere=new i.Sphere),this.geometry.boundingBox.getBoundingSphere(this.geometry.boundingSphere),this.needsRender=!0}},n.prototype.dispose=function(){var e;this.disposed=!0,this.geometry.dispose(),(e=this.texture)===null||e===void 0||e.dispose(),this.material.dispose()},n}(i.Points);h.Airflow=fe,h.Flame=ce,h.Particle=be,h.SpotLight=pe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
package/umd/five-vue.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 12/
|
|
5
|
-
* Version: 6.0.0-alpha.
|
|
4
|
+
* Generated: 12/14/2023
|
|
5
|
+
* Version: 6.0.0-alpha.65
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,4 +252,4 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
|
-
*/(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.FiveSDK_Vue={},f.Vue,f.FiveSDK,f.THREE))})(this,function(f,t,m,
|
|
255
|
+
*/(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.FiveSDK_Vue={},f.Vue,f.FiveSDK,f.THREE))})(this,function(f,t,m,b){"use strict";function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const h=R(b);var d=function(){return d=Object.assign||function(n){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}return n},d.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var w=!1;function k(e){w=e}var F=Symbol();function s(){var e=t.inject(F);if(!e)throw new Error("Inject five error!");return e}var j={display:"inline-block",overflow:"hidden"},E=t.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(e){var n=t.toRef(e,"width"),r=t.toRef(e,"height"),o=s(),a=t.ref(null);return t.watch([n,r,a],function(){if(o.renderer&&a.value){if(o.renderer.domElement.parentNode!==null&&o.renderer.domElement.parentNode!==a.value)throw new Error("There are more than 2 fiveCanvas in this context.");o.renderer.domElement.parentNode!==a.value&&a.value.appendChild(o.renderer.domElement),o.camera.aspect=n.value/r.value,o.camera.updateProjectionMatrix(),o.renderer.setSize(n.value,r.value),o.needsRender=!0}}),function(){return t.h("div",{id:"five",style:d({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},j),ref:a})}}}),g=[];function O(e){var n=e===void 0?{}:e,r=n.backgroundColor,o=r===void 0?1579548:r,a=n.backgroundAlpha,l=a===void 0?1:a,u=n.pixelRatio,c=u===void 0?1:u;if(!(typeof window>"u")){var i=g.shift();return i||(i=new h.WebGLRenderer({antialias:!1,alpha:!0}),i.outputEncoding=h.sRGBEncoding),i.setPixelRatio(c),i.setClearColor(o,l),i.autoClear=!0,i}}function P(e){e&&g.indexOf(e)===-1&&g.push(e)}function B(e,n){var r=Array.isArray(e)?e:[e],o=Array.isArray(n)?n:[n];if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==o[a])return!1;return!0}var U=t.defineComponent({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(e){var n,r=t.toRefs(e).works,o=m.getViewportScale(),a=o===1?window.devicePixelRatio:1,l=O({pixelRatio:a}),u=new m.Five(d({renderer:l},e.fiveInitArgs)),c=e.works||e.initialWorks;return c&&u.load(c,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),k(!!e.works),r&&t.watch(r,function(i,v){i&&!B(i,u.works)&&u.load(i,e.initialState)}),t.onBeforeUnmount(function(){u&&(u.dispose(),P(u.renderer))}),u.on("load",function(){e.onWorksChange&&u.works&&e.onWorksChange(u==null?void 0:u.works)}),u.on("stateChange",function(i,v){e.onStateChange&&e.onStateChange(i,v)}),u.on("currentStateChange",function(i,v){e.onCurrentStateChange&&e.onCurrentStateChange(i,v)}),u.on("error",function(i){e.onError?e.onError(i):console.warn(i.message)}),t.provide(F,u),{five:t.shallowReadonly(u)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function W(){var e=s(),n=t.ref(e.works),r=t.readonly(n),o=function(l,u,c,i){if(w)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(l,u,c,i)},a=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){a()}),[r,o]}function _(){var e=s(),n=t.ref(d({},e.state)),r=e.on("stateChange",function(a){Object.assign(n.value,d({},a))});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){l===void 0&&(l=!1),u===void 0&&(u=!0);var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function A(){var e=s(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function I(){var e=s(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),o=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){o()}),r}function V(e,n){var r=s(),o=r.on(e,n);t.onBeforeUnmount(function(){o()})}function D(){var e=s(),n=function(c,i){return e.updateCamera(c,i)},r=function(c,i,v,X,Y){return e.getPixels(c,i,v,X,Y)},o=function(c){return e.render(c)},a=function(){return e.needsRender=!0},l=function(c,i){return e.preloadPano(c,i)},u=function(c,i){return i===void 0&&(i=!1),e.project2d(c,i)};return{updateCamera:n,getPixels:r,render:o,needsRender:a,preloadPano:l,project2d:u}}function L(e,n){n===void 0&&(n=!1);var r=s(),o=t.ref(Symbol()),a=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),l=r.on("cameraUpdate",function(){o.value=Symbol()});return t.onBeforeUnmount(function(){l()}),t.watch([o,e],function(){a.value=r.project2d(t.isRef(e)?e.value:e,n)}),a}function H(){return L}function p(e){var n=e.camera.getWorldDirection(new h.Vector3),r=new h.Raycaster(e.camera.position,n);return r}function M(){var e=s(),n=t.shallowRef(p(e)),r=e.on("cameraUpdate",function(){n.value=p(e)});return t.onBeforeUnmount(function(){r()}),n}function C(e){return e.camera.getWorldDirection(new h.Vector3)}function T(){var e=s(),n=t.shallowRef(C(e)),r=e.on("cameraUpdate",function(){n.value=C(e)});return t.onBeforeUnmount(function(){r()}),n}function q(e){var n=s(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function N(){return q}function y(e){return e.model.empty?"Empty":"Loaded"}function K(){var e=s(),n=t.ref(y(e)),r=e.on("modelLoaded",function(){n.value=y(e)});return t.onBeforeUnmount(function(){r()}),n}function $(){var e=s(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),o=function(l){typeof l=="number"?e.model.show(l):e.model.show()},a=[];return a.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),a.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var l;l=a.shift();)l()}),[n,r,o]}function x(){var e=s(),n=t.ref(e.helperVisible),r=function(a){e.helperVisible=a},o=e.on("helpersVisibleChange",function(a){n.value=a});return t.onBeforeUnmount(function(){o()}),[n,r]}function z(){return s()}function S(e){return e.model.bounding.clone()}function G(){var e=s(),n=t.shallowRef(S(e)),r=e.on("modelLoaded",function(){n.value=S(e)});return t.onBeforeUnmount(function(){r()}),n}function J(){var e=s();return e.scene}function Q(){var e=s(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}f.FiveCanvas=E,f.FiveProvider=U,f.unsafe__useFiveInject=z,f.useFiveAction=D,f.useFiveCameraDirection=T,f.useFiveCameraRaycaster=M,f.useFiveCurrentObserver=I,f.useFiveCurrentState=A,f.useFiveEventCallback=V,f.useFiveFloor=$,f.useFiveHelper=x,f.useFiveModel=Q,f.useFiveModelBounding=G,f.useFiveModelIntersectRaycaster=N,f.useFiveModelReadyState=K,f.useFiveProject2d=H,f.useFiveScene=J,f.useFiveState=_,f.useFiveWorks=W,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|