@realsee/five 6.8.0-alpha.17 → 6.8.0-alpha.19
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/documents/api.html +15 -15
- package/docs/documents/features_flowing-light-2d-pass.html +6 -6
- package/docs/documents/features_flowing-light-3d-pass.html +6 -6
- package/docs/documents/features_gaussian-blur-pass.html +5 -5
- package/five/index.js +144 -665
- package/five/index.mjs +26204 -32253
- package/five/thirdparty/hammer.d.ts +371 -255
- package/five/thirdparty/jsrsasign.d.ts +5 -20
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/package.json +2 -2
- package/plugins/index.js +17 -21
- package/plugins/index.mjs +3342 -4245
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +17 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +139 -660
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +317 -556
- /package/five/assets/{realsee-pmg-data-url.d.ts → realsee-png-data-url.d.ts} +0 -0
package/vue/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 3/
|
|
5
|
-
* Version: 6.8.0-alpha.
|
|
4
|
+
* Generated: 3/18/2026
|
|
5
|
+
* Version: 6.8.0-alpha.19
|
|
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
|
-
*/
|
|
255
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`vue`),l=require(`@realsee/five`),u=require(`three`);u=s(u);var d=!1;function f(e){d=e}var p=Symbol();function m(){let e=(0,c.inject)(p);if(!e)throw Error(`Inject five error!`);return e}var h={display:`inline-block`,overflow:`hidden`},g=(0,c.defineComponent)({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){let t=(0,c.toRef)(e,`width`),n=(0,c.toRef)(e,`height`),r=m(),i=(0,c.ref)(null);return(0,c.watch)([t,n,i],()=>{if(r.renderer&&i.value){if(r.renderer.domElement.parentNode!==null&&r.renderer.domElement.parentNode!==i.value)throw Error(`There are more than 2 fiveCanvas in this context.`);r.renderer.domElement.parentNode!==i.value&&i.value.appendChild(r.renderer.domElement),r.camera.aspect=t.value/n.value,r.camera.updateProjectionMatrix(),r.renderer.setSize(t.value,n.value),r.refresh({width:t.value,height:n.value}),r.needsRender=!0}}),()=>(0,c.h)(`div`,{id:`five`,style:Object.assign({width:`${t.value}px`,height:`${n.value}px`},h),ref:i})}}),_=[],v=[];function y({backgroundColor:e=1579548,backgroundAlpha:t=1,preserveDrawingBuffer:n=!0,pixelRatio:r=1,webgl2:i=!1}={}){if(typeof window>`u`)return;let a=null;if(a=i?_.shift():v.shift(),!a){if(i){let e=document.createElement(`canvas`),t=e.getContext(`webgl2`);t?a=new u.WebGLRenderer({preserveDrawingBuffer:n,antialias:!0,alpha:!0,stencil:!0,canvas:e,context:t}):(console.error(`error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl.`),a=new u.WebGLRenderer({preserveDrawingBuffer:n,antialias:!1,alpha:!0,stencil:!0}))}else a=new u.WebGLRenderer({preserveDrawingBuffer:n,antialias:!1,alpha:!0,stencil:!0});a.outputEncoding=u.sRGBEncoding}return a.setPixelRatio(r),a.setClearColor(e,t),a.autoClear=!0,a}function b(e){e&&(e.capabilities.isWebGL2?v.indexOf(e)===-1&&v.push(e):_.indexOf(e)===-1&&_.push(e))}function x(e,t){let n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t];if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}var S=(0,c.defineComponent)({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:()=>({})},style:Object},setup(e){var t;let{works:n}=(0,c.toRefs)(e),r=y({pixelRatio:(0,l.getViewportScale)()===1?window.devicePixelRatio:1}),i=new l.Five(Object.assign({renderer:r},e.fiveInitArgs)),a=e.works||e.initialWorks;return a&&i.load(a,e.initialState,void 0,(t=e.initialUserAction)==null?!0:t),f(!!e.works),n&&(0,c.watch)(n,(t,n)=>{t&&!x(t,i.works)&&i.load(t,e.initialState)}),(0,c.onBeforeUnmount)(()=>{i&&(i.dispose(),b(i.renderer))}),i.on(`load`,()=>{e.onWorksChange&&i.works&&e.onWorksChange(i==null?void 0:i.works)}),i.on(`stateChange`,(t,n)=>{e.onStateChange&&e.onStateChange(t,n)}),i.on(`currentStateChange`,(t,n)=>{e.onCurrentStateChange&&e.onCurrentStateChange(t,n)}),i.on(`error`,t=>{e.onError?e.onError(t):console.warn(t.message)}),(0,c.provide)(p,i),{five:(0,c.shallowReadonly)(i)}},render(){return(0,c.h)(`div`,{style:this.$props.style},this.$slots)}});function C(){let e=m(),t=(0,c.ref)(e.works),n=(0,c.readonly)(t),r=(t,n,r,i)=>{if(d)throw Error(`props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.`);return e.load(t,n,r,i)},i=e.on(`load`,()=>{t.value=e.works});return(0,c.onBeforeUnmount)(()=>{i()}),[n,r]}function w(){let e=m(),t=(0,c.ref)(Object.assign({},e.state)),n=e.on(`stateChange`,e=>{Object.assign(t.value,Object.assign({},e))});return(0,c.onBeforeUnmount)(()=>{n()}),[t,(t,n=!1,r=!0)=>{let i=typeof t==`function`?t(e.getCurrentState()):t;e.setState(i,n,r)}]}function T(){let e=m(),t=(0,c.ref)(e.getCurrentState()),n=e.on(`currentStateChange`,()=>{Object.assign(t.value,e.getCurrentState())});return(0,c.onBeforeUnmount)(()=>{n()}),[t,(t,n,r)=>{let i=typeof t==`function`?t(e.getCurrentState()):t;e.setState(i,n,r)}]}function E(){let e=m(),t=(0,c.reactive)(e.getCurrentState()),n=(0,c.ref)(e.works.getObserver(e.pano)),r=e.on(`currentStateChange`,()=>{Object.assign(t,e.getCurrentState()),n.value=e.works.getObserver({workCode:t.workCode,panoIndex:t.panoIndex})});return(0,c.onBeforeUnmount)(()=>{r()}),n}function D(e,t){let n=m().on(e,t);(0,c.onBeforeUnmount)(()=>{n()})}function O(){let e=m();return{updateCamera:(t,n)=>e.updateCamera(t,n),getPixels:e.getPixels.bind(e),render:t=>e.render(t),needsRender:()=>e.needsRender=!0,preloadPano:(t,n)=>e.preloadPano(t,n),project2d:(t,n=!1)=>e.project2d(t,n)}}function k(e,t=!1){let n=m(),r=(0,c.ref)(Symbol()),i=(0,c.shallowRef)(e?n.project2d((0,c.isRef)(e)?e.value:e,t):null),a=n.on(`cameraUpdate`,()=>{r.value=Symbol()});return(0,c.onBeforeUnmount)(()=>{a()}),(0,c.watch)([r,e],()=>{i.value=n.project2d((0,c.isRef)(e)?e.value:e,t)}),i}function A(){return k}function j(e){let t=e.camera.getWorldDirection(new u.Vector3);return new u.Raycaster(e.camera.position,t)}function M(){let e=m(),t=(0,c.shallowRef)(j(e)),n=e.on(`cameraUpdate`,()=>{t.value=j(e)});return(0,c.onBeforeUnmount)(()=>{n()}),t}function N(e){return e.camera.getWorldDirection(new u.Vector3)}function P(){let e=m(),t=(0,c.shallowRef)(N(e)),n=e.on(`cameraUpdate`,()=>{t.value=N(e)});return(0,c.onBeforeUnmount)(()=>{n()}),t}function F(e){let t=m(),n=(0,c.shallowRef)([]);return(0,c.watch)(e,()=>{n.value=t.model.intersectRaycaster((0,c.isRef)(e)?e.value:e)}),n}function I(){return F}function L(e){return e.model.empty?`Empty`:`Loaded`}function R(){let e=m(),t=(0,c.ref)(L(e)),n=e.on(`modelLoaded`,()=>{t.value=L(e)});return(0,c.onBeforeUnmount)(()=>{n()}),t}function z(){let e=m(),t=(0,c.ref)(e.model.shownFloor),n=(0,c.ref)(e.model.floorLength),r=t=>{typeof t==`number`?e.model.show(t):e.model.show()},i=[];return i.push(e.on(`modelShownFloorChange`,()=>{t.value=e.model.shownFloor})),i.push(e.on(`modelLoaded`,()=>{n.value=e.model.floorLength})),(0,c.onBeforeUnmount)(()=>{let e;for(;e=i.shift();)e()}),[t,n,r]}function B(){let e=m(),t=(0,c.ref)(e.helperVisible),n=t=>{e.helperVisible=t},r=e.on(`helpersVisibleChange`,e=>{t.value=e});return(0,c.onBeforeUnmount)(()=>{r()}),[t,n]}function V(){return m()}function H(e){return e.model.bounding.clone()}function U(){let e=m(),t=(0,c.shallowRef)(H(e)),n=e.on(`modelLoaded`,()=>{t.value=H(e)});return(0,c.onBeforeUnmount)(()=>{n()}),t}function W(){return m().scene}function G(){let e=m(),t=(0,c.shallowRef)(e.model),n=e.on(`modelLoaded`,()=>{t.value=e.model});return(0,c.onBeforeUnmount)(()=>{n()}),t}exports.FiveCanvas=g,exports.FiveProvider=S,exports.unsafe__useFiveInject=V,exports.useFiveAction=O,exports.useFiveCameraDirection=P,exports.useFiveCameraRaycaster=M,exports.useFiveCurrentObserver=E,exports.useFiveCurrentState=T,exports.useFiveEventCallback=D,exports.useFiveFloor=z,exports.useFiveHelper=B,exports.useFiveModel=G,exports.useFiveModelBounding=U,exports.useFiveModelIntersectRaycaster=I,exports.useFiveModelReadyState=R,exports.useFiveProject2d=A,exports.useFiveScene=W,exports.useFiveState=w,exports.useFiveWorks=C;
|