@realsee/five 6.0.0-alpha.0 → 6.0.0-alpha.10
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/search.js +1 -1
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BVH.html +1 -1
- package/docs/classes/five.BVHIntersect.html +1 -1
- package/docs/classes/five.BVHNode.html +1 -1
- package/docs/classes/five.BVHVector3.html +1 -1
- package/docs/classes/five.BoxBoundingVolume.html +1 -1
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.Clipper.html +1 -1
- package/docs/classes/five.CullingVolume.html +1 -1
- package/docs/classes/five.Five.html +77 -69
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.IntersectMesh.html +1 -1
- package/docs/classes/five.Model.html +28 -47
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +7 -9
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMaterialReferenceCache.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +15 -11
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.RegionBoundingVolume.html +1 -1
- package/docs/classes/five.RequestScheduler.html +1 -1
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.SphereBoundingVolume.html +1 -1
- package/docs/classes/five.Subscribe.html +2 -2
- package/docs/classes/five.TextureLoader.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3DModel.html +1 -1
- package/docs/classes/five.TileCubeTextureTarget.html +1 -1
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +2 -2
- package/docs/classes/five.TilesetCache.html +1 -1
- package/docs/classes/five.TilesetTraverser.html +1 -1
- package/docs/classes/five.Work.html +12 -12
- package/docs/classes/five.XRButton.html +1 -1
- package/docs/classes/gltf_loader.DDSLoader.html +1 -1
- package/docs/classes/gltf_loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf_loader.GLTFLoader.html +1 -1
- package/docs/classes/gltf_loader.GLTFObject.html +1 -1
- package/docs/classes/gltf_loader.GLTFParser.html +1 -1
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/react.Store.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/enums/five.PBMPointColorType.html +1 -1
- package/docs/enums/five.PBMPointShapeType.html +1 -1
- package/docs/enums/five.PBMPointSizeType.html +1 -1
- package/docs/enums/five.VolumePlaneIntersect.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AnimationFrame.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +1 -0
- package/docs/interfaces/five.BoundingVolume.html +1 -1
- package/docs/interfaces/five.CameraPose.html +1 -1
- package/docs/interfaces/five.ClipperParameter.html +1 -1
- package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +12 -12
- package/docs/interfaces/five.EventCallback.html +198 -108
- package/docs/interfaces/five.FiveInitArgs.html +1 -1
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.GestureEvent.html +1 -0
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +1 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +5 -5
- package/docs/interfaces/five.ModeChangeEvent.html +1 -0
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.ModelEvent.html +1 -0
- package/docs/interfaces/five.ModelLodOptions.html +1 -1
- package/docs/interfaces/five.ModelsEvent.html +1 -0
- package/docs/interfaces/five.MotionKeyframe.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +9 -7
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +1 -0
- package/docs/interfaces/five.ObjectEvent.html +1 -0
- package/docs/interfaces/five.PBMPanoPicture.html +1 -1
- package/docs/interfaces/five.PBMParameters.html +15 -11
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshOptions.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +1 -1
- package/docs/interfaces/five.PanoEvent.html +1 -0
- package/docs/interfaces/five.PanoTextureEvent.html +1 -0
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +14 -14
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +1 -0
- package/docs/interfaces/five.Scissor.html +1 -1
- package/docs/interfaces/five.State.html +6 -6
- package/docs/interfaces/five.StateEvent.html +1 -0
- 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 +1 -1
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
- package/docs/interfaces/five.TileCubeNode.html +1 -1
- package/docs/interfaces/five.TileCubeTree.html +1 -1
- package/docs/interfaces/five.TileHeader.html +1 -1
- package/docs/interfaces/five.TilesetHeader.html +1 -1
- package/docs/interfaces/five.TilesetOptions.html +1 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +4 -4
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +12 -12
- package/docs/interfaces/five.WebXRAxesParams.html +1 -0
- package/docs/interfaces/five.WebXRControllerParams.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +6 -6
- package/docs/interfaces/five.WorkImage.html +10 -10
- package/docs/interfaces/five.WorkInitial.html +9 -9
- package/docs/interfaces/five.WorkModel.html +8 -6
- package/docs/interfaces/five.WorkObserver.html +24 -16
- package/docs/interfaces/five.WorkOptions.html +7 -7
- package/docs/interfaces/five.WorkResolvedObserver.html +37 -0
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +1 -0
- package/docs/interfaces/five.XRControllerEvent.html +1 -0
- package/docs/interfaces/five.XRGestureEvent.html +1 -0
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +12 -12
- package/docs/interfaces/five.XRSessionEvent.html +1 -0
- package/docs/interfaces/gltf_loader.DDS.html +1 -1
- package/docs/interfaces/gltf_loader.GLTF.html +1 -1
- package/docs/interfaces/gltf_loader.GLTFReference.html +1 -1
- package/docs/interfaces/gltf_loader.THREEGLTF.html +1 -1
- package/docs/interfaces/react.FiveActionReactCallbacks.html +3 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +11 -18
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -1
- package/docs/interfaces/sticker.IntersectionLike.html +1 -1
- package/docs/interfaces/vfx.ParticleArgs.html +1 -1
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +1 -1
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
- package/docs/modules/five.SubscribeMixinType.html +1 -1
- package/docs/modules/five.html +387 -240
- package/docs/modules/gltf_loader.html +1 -1
- package/docs/modules/line.html +1 -1
- package/docs/modules/react.html +1 -1
- package/docs/modules/sticker.html +1 -1
- package/docs/modules/vfx.html +1 -1
- package/docs/modules/vue.html +1 -1
- package/docs/modules.html +1 -1
- package/five/index.d.ts +946 -646
- package/five/index.js +6 -6
- package/gltf-loader/index.js +3 -3
- package/line/index.js +3 -3
- package/package.json +1 -1
- package/react/index.d.ts +3 -2
- package/react/index.js +3 -3
- package/sticker/index.js +3 -3
- package/umd/five-gltf-loader.js +1 -1
- package/umd/five-line.js +1 -1
- package/umd/five-react.js +1 -1
- package/umd/five-sticker.js +1 -1
- package/umd/five-vue.js +1 -1
- package/umd/five.js +1 -1
- package/vfx/index.js +2 -2
- package/vue/index.d.ts +4 -3
- package/vue/index.js +3 -3
- package/docs/interfaces/five.ModelEventCallback.html +0 -16
package/vfx/index.js
CHANGED
package/vue/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { Five } from '@realsee/five';
|
|
|
9
9
|
import { FiveInitArgs } from '@realsee/five';
|
|
10
10
|
import { Intersection } from '@realsee/five';
|
|
11
11
|
import { Model } from '@realsee/five';
|
|
12
|
+
import { Pano } from '@realsee/five';
|
|
13
|
+
import { PanoId } from '@realsee/five';
|
|
12
14
|
import { Pose } from '@realsee/five';
|
|
13
15
|
import { PropType } from 'vue';
|
|
14
16
|
import { Ref } from 'vue';
|
|
@@ -21,7 +23,6 @@ import { VNode } from 'vue';
|
|
|
21
23
|
import { VNodeProps } from 'vue';
|
|
22
24
|
import { Work } from '@realsee/five';
|
|
23
25
|
import { WorkObserver } from '@realsee/five';
|
|
24
|
-
import { WorkPanoId } from '@realsee/five';
|
|
25
26
|
import { Works } from '@realsee/five';
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -72,11 +73,11 @@ export declare interface FiveActionVueCallbacks {
|
|
|
72
73
|
needsRender(): void;
|
|
73
74
|
/**
|
|
74
75
|
* 预加载点位图片资源
|
|
75
|
-
* @param
|
|
76
|
+
* @param pano - 观察点
|
|
76
77
|
* @param callback - 加载完成回调, 并传递加载用时。
|
|
77
78
|
* @returns 加载完成的 Promise 参数同 callback
|
|
78
79
|
*/
|
|
79
|
-
preloadPano(
|
|
80
|
+
preloadPano(pano: Pano | PanoId | number, callback?: (costs: number) => void): Promise<number>;
|
|
80
81
|
/**
|
|
81
82
|
* 计算三维空间的点对应到屏幕的二维坐标
|
|
82
83
|
* @description
|
package/vue/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @realsee/five
|
|
3
3
|
*
|
|
4
|
-
* Generated: 2023-09-
|
|
5
|
-
* Version: 6.0.0-alpha.
|
|
4
|
+
* Generated: 2023-09-19
|
|
5
|
+
* Version: 6.0.0-alpha.10
|
|
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 r(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var t=r(require("three")),o=function(){return o=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])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 r=e.toRef(n,"width"),t=e.toRef(n,"height"),i=a(),u=e.ref(null);return e.watch([r,t,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=r.value/t.value,i.camera.updateProjectionMatrix(),i.renderer.setSize(r.value,t.value),i.needsRender=!0}})),function(){return e.h("div",{id:"five",style:o({width:"".concat(r.value,"px"),height:"".concat(t.value,"px")},c),ref:u})}}}),l=[];var s=e.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(r){var a,c,f=e.toRefs(r).works,s=function(e){var n=void 0===e?{}:e,r=n.backgroundColor,o=void 0===r?1579548:r,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 t.WebGLRenderer({antialias:!1,alpha:!0})).outputEncoding=t.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},r.fiveInitArgs)),v=r.works||r.initialWorks;return v&&d.load(v,r.initialState,void 0,null===(a=r.initialUserAction)||void 0===a||a),c=!!r.works,i=c,f&&e.watch(f,(function(e,n){e&&function(e,n){var r=Array.isArray(e)?e:[e],t=Array.isArray(n)?n:[n];if(r.length!==t.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==t[o])return!1;return!0}(e,d.works)&&d.load(e,r.initialState)})),e.onBeforeUnmount((function(){d&&(d.dispose(),function(e){e&&-1===l.indexOf(e)&&l.push(e)}(d.renderer))})),d.on("load",(function(){r.onWorksChange&&d.works&&r.onWorksChange(null==d?void 0:d.works)})),d.on("stateChange",(function(e,n){r.onStateChange&&r.onStateChange(e,n)})),d.on("currentStateChange",(function(e,n){r.onCurrentStateChange&&r.onCurrentStateChange(e,n)})),d.on("error",(function(e){r.onError?r.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,r){void 0===r&&(r=!1);var t=a(),o=e.ref(Symbol()),i=e.shallowRef(n?t.project2d(e.isRef(n)?n.value:n,r):null),u=t.on("cameraUpdate",(function(){o.value=Symbol()}));return e.onBeforeUnmount((function(){u()})),e.watch([o,n],(function(){i.value=t.project2d(e.isRef(n)?n.value:n,r)})),i}function v(e){var n=e.camera.getWorldDirection(new t.Vector3);return new t.Raycaster(e.camera.position,n)}function p(e){return e.camera.getWorldDirection(new t.Vector3)}function h(n){var r=a(),t=e.shallowRef([]);return e.watch(n,(function(){t.value=r.model.intersectRaycaster(e.isRef(n)?n.value:n)})),t}function m(e){return e.model.empty?"Empty":"Loaded"}function g(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,r){return e.updateCamera(n,r)},getPixels:function(n,r,t,o,i){return e.getPixels(n,r,t,o,i)},render:function(n){return e.render(n)},needsRender:function(){return e.needsRender=!0},preloadPano:function(n,r){return e.preloadPano(n,r)},project2d:function(n,r){return void 0===r&&(r=!1),e.project2d(n,r)}}},exports.useFiveCameraDirection=function(){var n=a(),r=e.shallowRef(p(n)),t=n.on("cameraUpdate",(function(){r.value=p(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveCameraRaycaster=function(){var n=a(),r=e.shallowRef(v(n)),t=n.on("cameraUpdate",(function(){r.value=v(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveCurrentObserver=function(){var n=a(),r=e.reactive(n.getCurrentState()),t=e.ref(n.works.getResolvedObserver(n.
|
|
260
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),n=require("@realsee/five");function r(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var t=r(require("three")),o=function(){return o=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])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 r=e.toRef(n,"width"),t=e.toRef(n,"height"),i=a(),u=e.ref(null);return e.watch([r,t,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=r.value/t.value,i.camera.updateProjectionMatrix(),i.renderer.setSize(r.value,t.value),i.needsRender=!0}})),function(){return e.h("div",{id:"five",style:o({width:"".concat(r.value,"px"),height:"".concat(t.value,"px")},c),ref:u})}}}),l=[];var s=e.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(r){var a,c,f=e.toRefs(r).works,s=function(e){var n=void 0===e?{}:e,r=n.backgroundColor,o=void 0===r?1579548:r,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 t.WebGLRenderer({antialias:!1,alpha:!0})).outputEncoding=t.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},r.fiveInitArgs)),v=r.works||r.initialWorks;return v&&d.load(v,r.initialState,void 0,null===(a=r.initialUserAction)||void 0===a||a),c=!!r.works,i=c,f&&e.watch(f,(function(e,n){e&&function(e,n){var r=Array.isArray(e)?e:[e],t=Array.isArray(n)?n:[n];if(r.length!==t.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==t[o])return!1;return!0}(e,d.works)&&d.load(e,r.initialState)})),e.onBeforeUnmount((function(){d&&(d.dispose(),function(e){e&&-1===l.indexOf(e)&&l.push(e)}(d.renderer))})),d.on("load",(function(){r.onWorksChange&&d.works&&r.onWorksChange(null==d?void 0:d.works)})),d.on("stateChange",(function(e,n){r.onStateChange&&r.onStateChange(e,n)})),d.on("currentStateChange",(function(e,n){r.onCurrentStateChange&&r.onCurrentStateChange(e,n)})),d.on("error",(function(e){r.onError?r.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,r){void 0===r&&(r=!1);var t=a(),o=e.ref(Symbol()),i=e.shallowRef(n?t.project2d(e.isRef(n)?n.value:n,r):null),u=t.on("cameraUpdate",(function(){o.value=Symbol()}));return e.onBeforeUnmount((function(){u()})),e.watch([o,n],(function(){i.value=t.project2d(e.isRef(n)?n.value:n,r)})),i}function v(e){var n=e.camera.getWorldDirection(new t.Vector3);return new t.Raycaster(e.camera.position,n)}function p(e){return e.camera.getWorldDirection(new t.Vector3)}function h(n){var r=a(),t=e.shallowRef([]);return e.watch(n,(function(){t.value=r.model.intersectRaycaster(e.isRef(n)?n.value:n)})),t}function m(e){return e.model.empty?"Empty":"Loaded"}function g(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,r){return e.updateCamera(n,r)},getPixels:function(n,r,t,o,i){return e.getPixels(n,r,t,o,i)},render:function(n){return e.render(n)},needsRender:function(){return e.needsRender=!0},preloadPano:function(n,r){return e.preloadPano(n,r)},project2d:function(n,r){return void 0===r&&(r=!1),e.project2d(n,r)}}},exports.useFiveCameraDirection=function(){var n=a(),r=e.shallowRef(p(n)),t=n.on("cameraUpdate",(function(){r.value=p(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveCameraRaycaster=function(){var n=a(),r=e.shallowRef(v(n)),t=n.on("cameraUpdate",(function(){r.value=v(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveCurrentObserver=function(){var n=a(),r=e.reactive(n.getCurrentState()),t=e.ref(n.works.getResolvedObserver(n.pano)),o=n.on("currentStateChange",(function(){Object.assign(r,n.getCurrentState()),t.value=n.works.getResolvedObserver({workCode:r.workCode,panoIndex:r.panoIndex})}));return e.onBeforeUnmount((function(){o()})),t},exports.useFiveCurrentState=function(){var n=a(),r=e.ref(n.getCurrentState()),t=n.on("currentStateChange",(function(){Object.assign(r.value,n.getCurrentState())}));return e.onBeforeUnmount((function(){t()})),[r,function(e,r,t){var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,r,t)}]},exports.useFiveEventCallback=function(n,r){var t=a().on(n,r);e.onBeforeUnmount((function(){t()}))},exports.useFiveFloor=function(){var n=a(),r=e.ref(n.model.shownFloor),t=e.ref(n.model.floorLength),o=[];return o.push(n.on("modelShownFloorChange",(function(){r.value=n.model.shownFloor}))),o.push(n.on("modelLoaded",(function(){t.value=n.model.floorLength}))),e.onBeforeUnmount((function(){for(var e;e=o.shift();)e()})),[r,t,function(e){"number"==typeof e?n.model.show(e):n.model.show()}]},exports.useFiveHelper=function(){var n=a(),r=e.ref(n.helperVisible),t=n.on("helpersVisibleChange",(function(e){r.value=e}));return e.onBeforeUnmount((function(){t()})),[r,function(e){n.helperVisible=e}]},exports.useFiveModel=function(){var n=a(),r=e.shallowRef(n.model),t=n.on("modelLoaded",(function(){r.value=n.model}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveModelBounding=function(){var n=a(),r=e.shallowRef(g(n)),t=n.on("modelLoaded",(function(){r.value=g(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveModelIntersectRaycaster=function(){return h},exports.useFiveModelReadyState=function(){var n=a(),r=e.ref(m(n)),t=n.on("modelLoaded",(function(){r.value=m(n)}));return e.onBeforeUnmount((function(){t()})),r},exports.useFiveProject2d=function(){return d},exports.useFiveScene=function(){return a().scene},exports.useFiveState=function(){var n=a(),r=e.ref(o({},n.state)),t=n.on("stateChange",(function(e){Object.assign(r.value,o({},e))}));return e.onBeforeUnmount((function(){t()})),[r,function(e,r,t){void 0===r&&(r=!1),void 0===t&&(t=!0);var o="function"==typeof e?e(n.getCurrentState()):e;n.setState(o,r,t)}]},exports.useFiveWorks=function(){var n=a(),r=e.ref(n.works),t=e.readonly(r),o=n.on("load",(function(){r.value=n.works}));return e.onBeforeUnmount((function(){o()})),[t,function(e,r,t,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,r,t,o)}]};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ModelEventCallback | 如视 Five SDK - v6.0.0-alpha.0</title><meta name="description" content="Documentation for 如视 Five SDK - v6.0.0-alpha.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Five SDK - v6.0.0-alpha.0</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Five SDK - v6.0.0-alpha.0</a></li><li><a href="../modules/five.html">five</a></li><li><a href="five.ModelEventCallback.html">ModelEventCallback</a></li></ul><h1>Interface ModelEventCallback </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
-
<p>Five 模型事件列表</p>
|
|
3
|
-
</div><dl class="tsd-comment-tags"><dt>description</dt><dd><p>可以通过 <code>five.model.on(METHOD_NAME, METHOD)</code> 调用</p>
|
|
4
|
-
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="../modules/five.html#ModelEventType" class="tsd-signature-type" data-tsd-kind="Type alias">ModelEventType</a><ul class="tsd-hierarchy"><li><span class="target">ModelEventCallback</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section tsd-is-inherited"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#loaded" class="tsd-kind-icon">loaded</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#refined" class="tsd-kind-icon">refined</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#shownFloorChange" class="tsd-kind-icon">shown<wbr/>Floor<wbr/>Change</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a id="error" class="tsd-anchor"></a><h3 class="tsd-anchor-link">error<a href="#error" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">error<span class="tsd-signature-symbol">(</span>error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from EventType.error</p><ul><li>Defined in lib/five/loaders/model/index.ts:69</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
5
|
-
<p>内部错误</p>
|
|
6
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>error: <span class="tsd-signature-type">Error</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
7
|
-
<p>错误对象</p>
|
|
8
|
-
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a id="loaded" class="tsd-anchor"></a><h3 class="tsd-anchor-link">loaded<a href="#loaded" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">loaded<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from EventType.loaded</p><ul><li>Defined in lib/five/loaders/model/index.ts:54</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
9
|
-
<p>模型加载完成</p>
|
|
10
|
-
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a id="refined" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refined<a href="#refined" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">refined<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from EventType.refined</p><ul><li>Defined in lib/five/loaders/model/index.ts:57</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
11
|
-
<p>模型细化</p>
|
|
12
|
-
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a id="shownFloorChange" class="tsd-anchor"></a><h3 class="tsd-anchor-link">shown<wbr/>Floor<wbr/>Change<a href="#shownFloorChange" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">shown<wbr/>Floor<wbr/>Change<span class="tsd-signature-symbol">(</span>shownFloor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, totalFloorLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from EventType.shownFloorChange</p><ul><li>Defined in lib/five/loaders/model/index.ts:63</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
13
|
-
<p>显示楼层改变</p>
|
|
14
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>shownFloor: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
15
|
-
<p>显示的楼层</p>
|
|
16
|
-
</div></div></li><li><h5>totalFloorLength: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class="current tsd-kind-module"><a href="../modules/five.html">five</a><ul><li class=" tsd-kind-namespace tsd-parent-kind-module"><a href="../modules/five.SubscribeMixinType.html">Subscribe<wbr/>Mixin<wbr/>Type</a></li></ul></li><li class=" tsd-kind-module"><a href="../modules/gltf_loader.html">gltf-<wbr/>loader</a></li><li class=" tsd-kind-module"><a href="../modules/line.html">line</a></li><li class=" tsd-kind-module"><a href="../modules/react.html">react</a></li><li class=" tsd-kind-module"><a href="../modules/sticker.html">sticker</a></li><li class=" tsd-kind-module"><a href="../modules/vfx.html">vfx</a></li><li class=" tsd-kind-module"><a href="../modules/vue.html">vue</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface tsd-parent-kind-module"><a href="five.ModelEventCallback.html" class="tsd-kind-icon">Model<wbr/>Event<wbr/>Callback</a><ul><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#loaded" class="tsd-kind-icon">loaded</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#refined" class="tsd-kind-icon">refined</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited"><a href="five.ModelEventCallback.html#shownFloorChange" class="tsd-kind-icon">shown<wbr/>Floor<wbr/>Change</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-namespace"><span class="tsd-kind-icon">Namespace</span></li><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li><li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li><li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|