@realsee/five 6.0.0-alpha.70 → 6.0.0-alpha.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Model.html +22 -22
- package/docs/classes/five.ModelViewLayer.html +13 -0
- package/docs/classes/five.TextureLoader.html +2 -2
- package/docs/classes/five.Tile3DModel.html +1 -2
- package/docs/classes/five.TileCubeTextureTarget.html +1 -1
- package/docs/classes/five.TileNode.html +2 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/index.html +2 -2
- package/docs/modules/five.html +1 -0
- package/docs/types/five.Models.html +2 -1
- package/five/index.d.ts +27 -20
- package/five/index.js +91 -109
- package/five/index.mjs +5997 -5944
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +3 -2
- package/react/index.js +3 -3
- package/react/index.mjs +3 -3
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +4 -4
- 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 +3 -3
- package/umd/five-vue.js +3 -3
- package/umd/five.js +68 -86
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +3 -3
- package/vue/index.mjs +3 -3
package/vfx/index.js
CHANGED
package/vfx/index.mjs
CHANGED
package/vue/index.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/25/2023
|
|
5
|
+
* Version: 6.0.0-alpha.72
|
|
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
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("@realsee/five"),R=require("three");function k(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const d=k(R);var s=function(){return s=Object.assign||function(n){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var f in r)Object.prototype.hasOwnProperty.call(r,f)&&(n[f]=r[f])}return n},s.apply(this,arguments)};var C=!1;function j(e){C=e}var y=Symbol();function l(){var e=t.inject(y);if(!e)throw new Error("Inject five error!");return e}var E={display:"inline-block",overflow:"hidden"},O=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"),a=l(),o=t.ref(null);return t.watch([n,r,o],function(){if(a.renderer&&o.value){if(a.renderer.domElement.parentNode!==null&&a.renderer.domElement.parentNode!==o.value)throw new Error("There are more than 2 fiveCanvas in this context.");a.renderer.domElement.parentNode!==o.value&&o.value.appendChild(a.renderer.domElement),a.camera.aspect=n.value/r.value,a.camera.updateProjectionMatrix(),a.renderer.setSize(n.value,r.value),a.needsRender=!0}}),function(){return t.h("div",{id:"five",style:s({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},E),ref:o})}}}),h=[];function P(e){var n=e===void 0?{}:e,r=n.backgroundColor,a=r===void 0?1579548:r,o=n.backgroundAlpha,f=o===void 0?1:o,u=n.pixelRatio,v=u===void 0?1:u;if(
|
|
255
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("@realsee/five"),R=require("three");function k(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const d=k(R);var s=function(){return s=Object.assign||function(n){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var f in r)Object.prototype.hasOwnProperty.call(r,f)&&(n[f]=r[f])}return n},s.apply(this,arguments)};var C=!1;function j(e){C=e}var y=Symbol();function l(){var e=t.inject(y);if(!e)throw new Error("Inject five error!");return e}var E={display:"inline-block",overflow:"hidden"},O=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"),a=l(),o=t.ref(null);return t.watch([n,r,o],function(){if(a.renderer&&o.value){if(a.renderer.domElement.parentNode!==null&&a.renderer.domElement.parentNode!==o.value)throw new Error("There are more than 2 fiveCanvas in this context.");a.renderer.domElement.parentNode!==o.value&&o.value.appendChild(a.renderer.domElement),a.camera.aspect=n.value/r.value,a.camera.updateProjectionMatrix(),a.renderer.setSize(n.value,r.value),a.needsRender=!0}}),function(){return t.h("div",{id:"five",style:s({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},E),ref:o})}}}),h=[];function P(e){var n=e===void 0?{}:e,r=n.backgroundColor,a=r===void 0?1579548:r,o=n.backgroundAlpha,f=o===void 0?1:o,u=n.pixelRatio,v=u===void 0?1:u;if(typeof window!="undefined"){var i=h.shift();return i||(i=new d.WebGLRenderer({antialias:!1,alpha:!0}),i.outputEncoding=d.sRGBEncoding),i.setPixelRatio(v),i.setClearColor(a,f),i.autoClear=!0,i}}function B(e){e&&h.indexOf(e)===-1&&h.push(e)}function U(e,n){var r=Array.isArray(e)?e:[e],a=Array.isArray(n)?n:[n];if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==a[o])return!1;return!0}var x=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,a=g.getViewportScale(),o=a===1?window.devicePixelRatio:1,f=P({pixelRatio:o}),u=new g.Five(s({renderer:f},e.fiveInitArgs)),v=e.works||e.initialWorks;return v&&u.load(v,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),j(!!e.works),r&&t.watch(r,function(i,c){i&&!U(i,u.works)&&u.load(i,e.initialState)}),t.onBeforeUnmount(function(){u&&(u.dispose(),B(u.renderer))}),u.on("load",function(){e.onWorksChange&&u.works&&e.onWorksChange(u==null?void 0:u.works)}),u.on("stateChange",function(i,c){e.onStateChange&&e.onStateChange(i,c)}),u.on("currentStateChange",function(i,c){e.onCurrentStateChange&&e.onCurrentStateChange(i,c)}),u.on("error",function(i){e.onError?e.onError(i):console.warn(i.message)}),t.provide(y,u),{five:t.shallowReadonly(u)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function W(){var e=l(),n=t.ref(e.works),r=t.readonly(n),a=function(f,u,v,i){if(C)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(f,u,v,i)},o=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){o()}),[r,a]}function _(){var e=l(),n=t.ref(s({},e.state)),r=e.on("stateChange",function(o){Object.assign(n.value,s({},o))});t.onBeforeUnmount(function(){r()});var a=function(o,f,u){f===void 0&&(f=!1),u===void 0&&(u=!0);var v=typeof o=="function"?o(e.getCurrentState()):o;e.setState(v,f,u)};return[n,a]}function A(){var e=l(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var a=function(o,f,u){var v=typeof o=="function"?o(e.getCurrentState()):o;e.setState(v,f,u)};return[n,a]}function I(){var e=l(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),a=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){a()}),r}function L(e,n){var r=l(),a=r.on(e,n);t.onBeforeUnmount(function(){a()})}function V(){var e=l(),n=function(v,i){return e.updateCamera(v,i)},r=function(v,i,c,S,b){return e.getPixels(v,i,c,S,b)},a=function(v){return e.render(v)},o=function(){return e.needsRender=!0},f=function(v,i){return e.preloadPano(v,i)},u=function(v,i){return i===void 0&&(i=!1),e.project2d(v,i)};return{updateCamera:n,getPixels:r,render:a,needsRender:o,preloadPano:f,project2d:u}}function D(e,n){n===void 0&&(n=!1);var r=l(),a=t.ref(Symbol()),o=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),f=r.on("cameraUpdate",function(){a.value=Symbol()});return t.onBeforeUnmount(function(){f()}),t.watch([a,e],function(){o.value=r.project2d(t.isRef(e)?e.value:e,n)}),o}function H(){return D}function m(e){var n=e.camera.getWorldDirection(new d.Vector3),r=new d.Raycaster(e.camera.position,n);return r}function M(){var e=l(),n=t.shallowRef(m(e)),r=e.on("cameraUpdate",function(){n.value=m(e)});return t.onBeforeUnmount(function(){r()}),n}function p(e){return e.camera.getWorldDirection(new d.Vector3)}function q(){var e=l(),n=t.shallowRef(p(e)),r=e.on("cameraUpdate",function(){n.value=p(e)});return t.onBeforeUnmount(function(){r()}),n}function N(e){var n=l(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function T(){return N}function w(e){return e.model.empty?"Empty":"Loaded"}function $(){var e=l(),n=t.ref(w(e)),r=e.on("modelLoaded",function(){n.value=w(e)});return t.onBeforeUnmount(function(){r()}),n}function z(){var e=l(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),a=function(f){typeof f=="number"?e.model.show(f):e.model.show()},o=[];return o.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),o.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var f;f=o.shift();)f()}),[n,r,a]}function G(){var e=l(),n=t.ref(e.helperVisible),r=function(o){e.helperVisible=o},a=e.on("helpersVisibleChange",function(o){n.value=o});return t.onBeforeUnmount(function(){a()}),[n,r]}function K(){return l()}function F(e){return e.model.bounding.clone()}function J(){var e=l(),n=t.shallowRef(F(e)),r=e.on("modelLoaded",function(){n.value=F(e)});return t.onBeforeUnmount(function(){r()}),n}function Q(){var e=l();return e.scene}function X(){var e=l(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}exports.FiveCanvas=O;exports.FiveProvider=x;exports.unsafe__useFiveInject=K;exports.useFiveAction=V;exports.useFiveCameraDirection=q;exports.useFiveCameraRaycaster=M;exports.useFiveCurrentObserver=I;exports.useFiveCurrentState=A;exports.useFiveEventCallback=L;exports.useFiveFloor=z;exports.useFiveHelper=G;exports.useFiveModel=X;exports.useFiveModelBounding=J;exports.useFiveModelIntersectRaycaster=T;exports.useFiveModelReadyState=$;exports.useFiveProject2d=H;exports.useFiveScene=Q;exports.useFiveState=_;exports.useFiveWorks=W;
|
package/vue/index.mjs
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/25/2023
|
|
5
|
+
* Version: 6.0.0-alpha.72
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -309,7 +309,7 @@ var H = {
|
|
|
309
309
|
}), w = [];
|
|
310
310
|
function N(e) {
|
|
311
311
|
var r = e === void 0 ? {} : e, n = r.backgroundColor, o = n === void 0 ? 1579548 : n, t = r.backgroundAlpha, u = t === void 0 ? 1 : t, i = r.pixelRatio, f = i === void 0 ? 1 : i;
|
|
312
|
-
if (
|
|
312
|
+
if (typeof window != "undefined") {
|
|
313
313
|
var a = w.shift();
|
|
314
314
|
return a || (a = new g.WebGLRenderer({ antialias: !1, alpha: !0 }), a.outputEncoding = g.sRGBEncoding), a.setPixelRatio(f), a.setClearColor(o, u), a.autoClear = !0, a;
|
|
315
315
|
}
|