@epigraph/solutions 0.25.0 → 0.26.0
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.
|
@@ -4165,7 +4165,7 @@ ${l.join(`
|
|
|
4165
4165
|
${b.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * darkness );")}
|
|
4166
4166
|
`},this.__depthMaterial.depthTest=!1,this.__depthMaterial.depthWrite=!1,this.__horizontalBlurMaterial=new Ni(fC),this.__horizontalBlurMaterial.depthTest=!1,this.__verticalBlurMaterial=new Ni(pC),this.__verticalBlurMaterial.depthTest=!1}reCalculate(){const e=this.__scene.background;this.__scene.background=null,this.__scene.overrideMaterial=this.__depthMaterial;const t=this.__targetRenderer.getClearAlpha();this.__targetRenderer.setClearAlpha(0),this.__targetRenderer.setRenderTarget(this.__renderTarget),this.__targetRenderer.render(this.__scene,this.__shadowCamera),this.__scene.overrideMaterial=null,this.__blurShadow(this.__shadowState.shadow.blur),this.__blurShadow(this.__shadowState.shadow.blur*.4),this.__targetRenderer.setRenderTarget(null),this.__targetRenderer.setClearAlpha(t),this.__scene.background=e}}class Et{static isTouchDevice(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}static async wait(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}static generateStylesDomElem(e,t=""){const i=document.createElement("style");return i.setAttribute("id",e),i.innerHTML=t,i}static generateHtmlDivElem(e,t=""){const i=document.createElement("div");return i.setAttribute("id",e),i.innerHTML=t,i}static getRandomIntegerInRange(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}static getUrlParameterByName(e,t=window.location.search){const i=new URLSearchParams(t);return Object.fromEntries(i.entries())[e]}static getBaseUrl(){const e=Et.getUrlParameterByName("parentUrl");return e||window.location.href}static normalizeRadian(e){return Math.atan2(Math.sin(e),Math.cos(e))}static isBetweenOnCircle(e,t,i){return e=Et.normalizeRadian(e),t=Et.normalizeRadian(t),i=Et.normalizeRadian(i),t<=i?e>=t&&e<=i:e>=t||e<=i}static getPointInBetweenByPercentage(e,t,i){let a=t.clone().sub(e);const l=a.length();return a=a.normalize().multiplyScalar(l*i),e.clone().add(a)}static clampAzimuth(e,t,i){if(Math.abs(t)==1/0||i==1/0)return e;const a=Et.normalizeRadian(e),l=Et.normalizeRadian(t),h=Et.normalizeRadian(i);if(Et.isBetweenOnCircle(a,l,h))return a;const d=Math.abs(Et.normalizeRadian(a-l)),p=Math.abs(Et.normalizeRadian(a-h));return d<p?l:h}static resolveNexusEndpoint(e){let t=Cd.PRODUCTION;return e=="local"?t=Cd.LOCAL:e==="staging"&&(t=Cd.STAGING),t}static parseUrlForEpigraphParams(e){const t=new Map,i=new Xg(e);t.set(Ii.epigraphSessionId,i.getParameterInUrl(Ii.epigraphSessionId)),t.set(Ii.identifier,i.getParameterInUrl(Ii.identifier)),t.set(Ii.identifierType,i.getParameterInUrl(Ii.identifierType)),t.set(Ii.type,i.getParameterInUrl(Ii.type));const a=i.getParameterInUrl(Ii.action);return a&&t.set(lh.AR,JSON.parse(a)[lh.AR]),t}static generateShareableUrl({baseUrl:e,identifier:t,identifierType:i,sharedConfig:a,arCompatible:l=!1}){const h=new Map;return h.set(Ii.epigraphSessionId,window.epigraph.epigraphSessionId),h.set(Ii.identifier,t),h.set(Ii.identifierType,i),a&&h.set(Ii.sharedConfig,a),l&&h.set(Ii.action,`{"${lh.AR}":true}`),new Xg(e).generateQrCodeUrl(Object.fromEntries(h.entries()),!1)}static _dispose3(e){e instanceof ot&&e.geometry.dispose(),e instanceof ot&&(Array.isArray(e.material)?e.material.forEach(t=>t.dispose()):e.material.dispose(),e.material?.map?.dispose())}static dispose3(e){e.traverse(t=>{t instanceof ot&&Et._dispose3(t)}),(e instanceof ot||e instanceof Dn)&&Et._dispose3(e)}static animateValue(e,t,i,a){const l=performance.now();function h(d){const p=d-l,m=Math.min(p/i,1),A=e+(t-e)*m;a(A),m<1&&requestAnimationFrame(h)}requestAnimationFrame(h)}static getCustomStylesTemplate(){const t=document.querySelector("#epigraphCustomStyles")?.content?.cloneNode(!0);return t||$e}}class gC{constructor(e){this._success=e}get success(){return this._success}set success(e){this._success=e}get failed(){return!this._success}}class DU extends gC{constructor(e=!1,t=void 0){super(e),this.__payload=t}get payload(){return this.__payload}set payload(e){this.__payload=e}}var AC=(o=>(o.Empty="entity-empty",o.Gltf="entity-mesh",o.Render="entity-render",o.Proxy="entity-proxy",o.Collider="entity-collider",o.Asset="entity-asset",o))(AC||{});class NU extends li{constructor(){super(),this._entityType=AC.Empty}get entityType(){return this._entityType}destroy(){let e;const t=new DU(!1,e);return e=void 0,t.success=!0,t.payload=e,t}}class Tv{constructor(e){this.__name=e}getName(){return this.__name}}class Jr extends Lt{constructor(e){super(),this.epgType="PLUG",this.__connectionId="",this.__isPrimary=!1,this.__receiver=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId,this.__isPrimary=e.isPrimary;const t=e.position;this.position.set(t.x,t.y,t.z);const i=e.rotation;this.rotation.set(i.x,i.y,i.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isPrimary(){return this.__isPrimary}get isOpen(){return this.__receiver===null}get receiver(){return this.__receiver}connect(e){this.__receiver=e.receiver}disconnect(){this.__receiver=null}clone(e){return new Jr(this.__config).copy(this,e)}showDebug(){const e=new se().setFromEuler(this.rotation).normalize(),t=this.position,i=.2,a=16711680;this.__debugGeo=new t1(e,t,i,a,.06,.06);const l=document.createElement("div");l.textContent=this.name;const h=new x_(l);l.style.pointerEvents="none";const d=new se;this.getWorldDirection(d),d.normalize();const p=this.position.clone().addScaledVector(d,Math.random());h.position.set(p.x,p.y,p.z),this.__debugGeo.add(h),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Et.dispose3(this.__debugGeo))}}class ur extends Lt{constructor(e){super(),this.epgType="RECEIVER",this.__connectionId="",this.__plug=null,this.__debugGeo=null,this.__config=e,this.name=e.name,this.__connectionId=e.connectionId;const t=e.position;this.position.set(t.x,t.y,t.z);const i=e.rotation;this.rotation.set(i.x,i.y,i.z)}get config(){return this.__config}get connectionId(){return this.__connectionId}get isOpen(){return this.__plug===null}get plug(){return this.__plug}connect(e){this.__plug=e.plug}disconnect(){this.__plug=null}clone(e){return new ur(this.__config).copy(this,e)}showDebug(){const e=new se().setFromEuler(this.rotation.clone()).normalize(),t=this.position,i=.1,a=65280;this.__debugGeo=new t1(e,t,i,a,.01,.08);const l=document.createElement("div");l.textContent=this.name,l.style.color="green";const h=new x_(l);l.style.pointerEvents="none",this.__debugGeo.add(h),this.add(this.__debugGeo)}hideDebug(){this.__debugGeo&&(this.__debugGeo.clear(),this.__debugGeo?.removeFromParent(),Et.dispose3(this.__debugGeo))}}var S_=(o=>(o.Gltf="media-asset-gltf",o.Proxy="media-asset-proxy",o.Render="media-asset-render",o))(S_||{}),JA=(o=>(o.Plug="plug",o.Receiver="receiver",o))(JA||{});class _C{constructor({id:e,uri:t,appWcRef:i}){this._type="media-asset-gltf",this._id=crypto.randomUUID(),this._loadingProgress=0,this._state="declared",this._resource=null,e&&(this._id=e),this._appWcRef=i,this._uri=t}get id(){return this._id}get uri(){return this._uri}get loadingProgress(){return this._loadingProgress}get state(){return this._state}get isLoaded(){return this._state==="loaded"}get type(){return this._type}get resource(){return this._resource}highlight(){}updateLoadingProgress(e){this._loadingProgress=e,this._appWcRef.eventsManager.assetLoadProgress.fire({progress:e})}async load(){if(this._state==="loaded"||this._state==="loading")return Promise.resolve(!0);this._state="loading";const e=await this._appWcRef.loaders.gltfLoader.loadAsync(this._uri,t=>{this.updateLoadingProgress(t.loaded/t.total*100)}).catch(t=>(window.epigraph.logger.groupCollapsed({title:""}),window.epigraph.logger.error({title:"An error occurred while trying to load an asset!",details:t}),this._state="failed",Promise.reject()));return e===void 0?Promise.reject(!1):(this._resource=e,await this._parseLoadedGltf(),this._state="loaded",Promise.resolve(!0))}async _parseLoadedGltf(){window.epigraph.logger.info({title:"Parsing GLTF data",details:this._resource})}unload(){return this._resource={},Promise.resolve(!0)}}class OU extends _C{constructor({id:e,uri:t,appWcRef:i}){super({id:e,uri:t,appWcRef:i}),this._type=S_.Proxy,this.__plugs=[],this.__receivers=[]}get plugs(){return this.__plugs}get receivers(){return this.__receivers}async _parseLoadedGltf(){if(!this._resource?.scene)return;const e=[];this._resource.scene.traverse(t=>{if(t.userData.epgType===JA.Receiver){const i=new ur({name:t.name,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__receivers.push(i),e.push(t)}else if(t.userData.epgType===JA.Plug){const i=new Jr({name:t.name,isPrimary:t.userData.isPrimary,connectionId:t.userData.connectionId,position:t.position.clone(),rotation:t.rotation.clone()});this.__plugs.push(i),e.push(t)}});for(const t of this.__receivers)this._resource.scene.add(t);for(const t of this.__plugs)this._resource.scene.add(t);for(const t of e)t.removeFromParent(),Et.dispose3(t)}unload(){return this._resource={},this.__plugs=[],this.__receivers=[],Promise.resolve(!0)}}class kU extends _C{constructor({id:e,uri:t,appWcRef:i}){super({id:e,uri:t,appWcRef:i}),this._type=S_.Render,this.__variantsExtensionName="KHR_materials_variants",this.__finishNamesFromAsset=[]}get khrVariantsExtensionName(){return this.__variantsExtensionName}get khrVariantsExtension(){return this.__variantsExtension}get finishNamesFromAsset(){return this.__finishNamesFromAsset}async _parseLoadedGltf(){const e=this._resource?.userData?.gltfExtensions;if(!e){this.__variantsExtension=null,this.__finishNamesFromAsset=["default"];return}if(this.__variantsExtension=e[this.__variantsExtensionName],this.__variantsExtension?.variants)for(const t of this.__variantsExtension.variants)this.__finishNamesFromAsset.push(t.name);this._resource?.scene.traverse(t=>{t instanceof ot&&(t.castShadow=!0)})}unload(){return this._resource={},this.__variantsExtension={},this.__finishNamesFromAsset=[],Promise.resolve(!0)}}class yC{constructor(e,t){this._loggerContext="ASSET",this.__autoGenerateProxyEntity=!1,this.__finishes=new Map,this.__hotspots=[],this.__id=e.id,this.__name=e.name,this.__appWcRef=t,this.__proxyGltf=new OU({id:String(e.id),uri:e.proxyGeo,appWcRef:this.__appWcRef}),this.__autoGenerateProxyEntity=e.autoGenerateProxyEntity,this.__renderGltf=new kU({id:String(e.id),uri:e.renderGeo,appWcRef:this.__appWcRef});for(const i in e.finishes)this.__finishes.set(i,new Tv(i));e.hotspots&&(this.__hotspots=e.hotspots)}get id(){return this.__id}get name(){return this.__name}get proxyGltf(){return this.__proxyGltf}get autoGenerateProxyEntity(){return this.__autoGenerateProxyEntity}get renderGltf(){return this.__renderGltf}get finishes(){return this.__finishes}get hotspots(){return this.__hotspots}get allFinishIds(){const e=[];for(const t of this.__finishes.keys())e.push(t);return e}async loadProxyGltf(){return this.__proxyGltf?await this.__proxyGltf.load():Promise.resolve(!0)}pullFinishesFromRenderGltf(){this.__renderGltf.finishNamesFromAsset.forEach(e=>{this.__finishes.has(e)||this.__finishes.set(e,new Tv(e))})}async loadRenderGltf(e=!1){return await this.__renderGltf.load().catch(t=>(window.epigraph.logger.error({title:`Failed to load asset: ${this.__id}`,details:t,contextOverride:this._loggerContext}),Promise.reject(!1))),e&&this.pullFinishesFromRenderGltf(),Promise.resolve(!0)}async load(e=!1){return Promise.all([this.loadRenderGltf(e),this.loadProxyGltf()])}}var UU=Object.defineProperty,bC=(o,e,t,i)=>{for(var a=void 0,l=o.length-1,h;l>=0;l--)(h=o[l])&&(a=h(e,t,a)||a);return a&&UU(e,t,a),a};class vC{constructor({appWcRef:e}){this._loggerContext="SOLUTION MANAGER",this._appWcRef=e}initialize(){window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext})}}const C_=class Dd extends dl{constructor(){super(),this._loggerContext="SOLUTION MANAGER",this.enabled=!1}static{this.webComponentName="solution-manager"}connectedCallback(){super.connectedCallback(),window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext})}firstUpdated(e){super.firstUpdated(e)}static setupWebComponent(){window.customElements.get(Dd.webComponentName)||window.customElements.define(Dd.webComponentName,Dd)}render(){return Ee`
|
|
4167
4167
|
${Et.getCustomStylesTemplate()}
|
|
4168
|
-
`}};bC([ue({type:Boolean,attribute:"enabled"})],C_.prototype,"enabled");bC([ue({attribute:!1})],C_.prototype,"appWcRef");let Yf=C_;class FU{constructor({id:e,name:t,receiver:i,plug:a}){this.__name=t,this.__plug=a,this.__receiver=i,e?this.__id=e:this.__id=`${this.__receiver.uuid}-${this.__plug.uuid}`}get id(){return this.__id}get name(){return this.__name}get plug(){return this.__plug}isPrimary(){return this.__plug?.isPrimary}get receiver(){return this.__receiver}connect(){this.__receiver.connect(this),this.__plug.connect(this)}disconnect(){this.__plug&&this.__plug.disconnect(),this.__receiver&&this.__receiver.disconnect()}}class $U{constructor({id:e,receiver:t,plug:i}){this.__id=e,this.__plug=i,this.__receiver=t}get id(){return this.__id}get plug(){return this.__plug}set plug(e){this.__plug=e}get receiver(){return this.__receiver}set receiver(e){this.__receiver=e}disconnect(){this.__receiver.disconnect(),this.__plug.disconnect()}}class zU extends li{constructor(e){super(),this.name="ENTITIES",this._loggerContext="SCENE STRUCTURE",this.__appWcRef=e,this.__eventsManager=this.__appWcRef.eventsManager}async setupRootEntity(e,t){const i=await new yC({id:0,name:"Root",proxyGeo:e??"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/proxies/root-proxy.glb",autoGenerateProxyEntity:!1,renderGeo:t??"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/render/root-render.glb",finishes:{},hotspots:[]},this.__appWcRef);await i.load().catch(()=>Promise.reject(!1));const a=new Va(i);await a.initialize(),this.add(a),this.__rootEntity=a}get rootEntity(){return this.__rootEntity}isEmpty(){return this.__rootEntity===void 0||this.__rootEntity.children.length===0}isNotEmpty(){return!this.isEmpty()}addEntity(e){this.__rootEntity.add(e),this.__eventsManager.structureNodeAddedEvent.fire({node:e})}getFirstEntity(){return this.isEmpty()?null:this.getSceneEntities()[0]}getEntityForAssetId(e){const t=this.getSceneEntities();let i;for(const a of t)if(a.asset.id===e){i=a;break}return i}getSceneEntities(e=!1){const t=[];return this.__rootEntity.traverse(i=>{!e&&i.uuid===this.__rootEntity.uuid||i instanceof Va&&t.push(i)}),t}getPossibleConnectionsForAssetInScene(e){const t=[];window.epigraph.logger.info({title:"Getting connections for asset in scene:",details:e,contextOverride:this._loggerContext});for(const i of this.getSceneEntities(!0)){const a=i.findPossibleConnectionsForAsset(e);a.length>0&&t.push(...a)}return window.epigraph.logger.table({title:"Possible Connections",details:t}),t}getAllConnectionsInScene(){const e=new Map;return this.traverse(t=>{if(t instanceof ur||t instanceof Jr){if(t.connectionId===""||e.has(t.connectionId))return;let a=null,l=null;if(t instanceof ur?(a=t,l=t.plug):t instanceof Jr&&(a=t.receiver,l=t),a!==null&&l!==null){const h=new $U({id:t.connectionId,receiver:a,plug:l});e.set(t.connectionId,h)}}}),e}}class GU extends vC{constructor(e){super({appWcRef:e}),this._loggerContext="SCENE MANAGER",this.__currentSceneBounds=new vi,this.__sceneStructure=new zU(this._appWcRef)}get sceneStructure(){return this.__sceneStructure}get currentSceneBounds(){return this.__currentSceneBounds}recalculateSceneBounds(){this.currentSceneBounds.setFromPoints([new se]),this.__sceneStructure.isNotEmpty()&&this.__sceneStructure.rootEntity.traverse(e=>{e instanceof ot&&e.userData.isProxyMesh&&this.currentSceneBounds.expandByObject(e)}),this._appWcRef.eventsManager.sceneBoundsChanged.fire()}}class Va extends NU{constructor(e){super(),this.epgType="ENTITY_ASSET",this.__autoGeneratedProxy=new li,this.__proxyEntity=new li,this.__renderEntity=new li,this.__activeFinish="",this.__hotspots=new li,this.__renderEntityBoundsBox=new vi,this.__renderEntityBoundsSize=new se,this.__animationMixer=null,this.__animations=[],this.__animationNames=[],this.name=e.name,this.__proxyEntity.name="PROXY",this.add(this.__proxyEntity),this.__renderEntity.name="RENDER",this.add(this.__renderEntity),this.__hotspots.name="HOTSPOTS",this.add(this.__hotspots),this.__asset=e}get asset(){return this.__asset}get isRoot(){return this.name.toLowerCase()==="root"}get proxy(){return this.__proxyEntity}get render(){return this.__renderEntity}get activeAssetFinish(){return this.__activeFinish}get allAssetFinishes(){return this.__asset.finishes}get allFinishIds(){return this.__asset.allFinishIds}highlight(){this.__renderEntity.traverseVisible(e=>{const t=e;if(t.isMesh){const i=t.material;(i.emissive.r>0||i.emissive.g>0||i.emissive.b>0)&&(i.userData.epgData={orignalEmissive:i.emissive.clone()}),i.emissive.r=1,i.emissive.g=1,i.emissive.b=1}})}unhighlight(){this.__renderEntity.traverseVisible(e=>{const t=e;if(t.isMesh){const i=t.material,a=i?.userData?.epgData?.orignalEmissive;a?(i.emissive.r=a.r,i.emissive.g=a.g,i.emissive.b=a.b):(i.emissive.r=0,i.emissive.g=0,i.emissive.b=0)}})}addHotspot(e){e.entity.name=`HOTSPOT-${this.asset.name}-${crypto.randomUUID()}`,e.entity.userData.epgId=e.hotspotId,e.entity.position.set(e.config.position.x,e.config.position.y,e.config.position.z),this.__hotspots.add(e.entity)}removeHotspot(e){let t;this.__hotspots.traverse(i=>{i.userData.epgId===e&&(t=i)}),t&&(t.removeFromParent(),Et.dispose3(t))}async selectAssetFinish(e,t=this.__renderEntity){window.epigraph.logger.info({title:`Switching to asset finish: ${e}`});const i=new gC(!1),a=this.__asset.renderGltf;if(!a)return Promise.reject(i);const l=a.khrVariantsExtension,h=a.khrVariantsExtensionName;if(!l?.variants||h===void 0)return window.epigraph.logger.warn({title:"No Variants found in asset. Using default material."}),i.success=!0,Promise.resolve(i);const d=l.variants.findIndex(p=>p.name===e);return t.traverse(async p=>{if(!(p instanceof ot)||!p.isMesh||!p.userData.gltfExtensions)return;const m=p.userData.gltfExtensions[h];if(!m)return window.epigraph.logger.error({title:"No Variants found in asset. Using default material."}),Promise.reject(i);p.userData.originalMaterial||(p.userData.originalMaterial=p.material);const A=m.mappings.find(_=>_.variants.includes(d));if(A&&a.resource){const _=a.resource.parser;p.material=await _.getDependency("material",A.material),_.assignFinalMaterial(p)}else window.epigraph.logger.warn({title:`Variant not found. Missing Variant ID: ${e}`,details:{message:"Available Variants",variants:l.variants}}),p.material=p.userData.originalMaterial;i.success=!0}),Promise.resolve(i)}findPossibleConnectionsForAsset(e){const t=[];return window.epigraph.logger.info({title:"Getting connections for asset in scene:",details:e}),this.__proxyEntity.traverse(i=>{if(!(i instanceof ur))return;const a=i;for(const l of e.proxyGltf?.plugs??[])l.connectionId===a.connectionId&&t.push(new FU({name:l.connectionId,receiver:a,plug:l}))}),t}getAnimationMixer(){return this.__animationMixer}getAllAnimations(){return this.__animations}getAllAnimationNames(){return this.__animationNames}async initialize(){this.__asset.autoGenerateProxyEntity?(await this.__initializeRenderEntity(),await this.__initializeProxyEntity()):(await this.__initializeProxyEntity(),await this.__initializeRenderEntity())}async __initializeRenderEntity(){const e=this.__asset?.renderGltf?.resource?.scene?.clone(!0);if(!e)return Promise.reject();this.__renderEntity.add(e),this.__renderEntityBoundsBox.setFromObject(e,!0),this.__renderEntityBoundsBox.getSize(this.__renderEntityBoundsSize);const t=new se;if(this.__renderEntityBoundsBox.getCenter(t),!this.__asset.proxyGltf){window.epigraph.logger.warn({title:"Attempted to place render geo at the grid for AssetEntity...",details:this});const i=new li;i.name="rendergeopivot";const a=new Wn(.01,.01,.01),l=new wi({color:65280,depthTest:!1}),h=new ot(a,l);i.add(h),this.__renderEntity.add(i),i.position.set(t.x,this.__renderEntityBoundsBox.min.y,t.z),i.attach(e),i.position.set(0,0,0),this.__renderEntity.attach(e),i.removeFromParent(),Et.dispose3(i)}this.__updateAnimations()}async __initializeProxyEntity(){let e=this.__asset.proxyGltf.resource?.scene.clone();if((!e||this.__asset.autoGenerateProxyEntity)&&(this.__autoGenerateProxyScene(),e=this.__autoGeneratedProxy),!e)return window.epigraph.logger.error({title:"Failed to load OR auto generate proxy asset",details:this.__asset,contextOverride:"ASSET ENTITY"}),Promise.reject();this.__proxyEntity.add(e),this.__proxyEntity.traverse(t=>{t instanceof ot&&(t.userData.isProxyMesh=!0,t.visible=!1)})}__autoGenerateProxyScene(){window.epigraph.logger.info({title:"Attempting to auto generate proxy for asset...",details:this.__asset,contextOverride:"ASSET ENTITY"});const e=new Wn,t=new wi({color:65280,opacity:.5,transparent:!0}),i=new ot(e,t);i.name="AutoGeneratedProxyMesh",i.scale.set(this.__renderEntityBoundsSize.x,this.__renderEntityBoundsSize.y,this.__renderEntityBoundsSize.z);const a=new se;this.__renderEntityBoundsBox.getCenter(a);const l=new li;l.name="proxygeopivot";const h=new zf(.01,10,10),d=new wi({color:255,depthTest:!1}),p=new ot(h,d);l.add(p),this.__proxyEntity.add(l),l.translateY(-this.__renderEntityBoundsSize.y*.5),l.attach(i),l.position.set(0,0,0),this.__proxyEntity.add(i),l.removeFromParent(),Et.dispose3(l),this.__autoGeneratedProxy.add(i)}__updateAnimations(){if(this.__animationMixer=null,this.__animations=[],this.__renderEntity.animations&&this.__asset.renderGltf.resource&&this.__asset.renderGltf.resource.animations.length>0){this.__animationMixer=new ZS(this.__renderEntity.children[0]);for(const e of this.__asset.renderGltf.resource.animations)this.__animations.push(this.__animationMixer.clipAction(e)),this.__animationNames.push(e.name)}}}function wC(o,e,t,i){const a=Object.entries(o);class l extends Ni{static key=Is.generateUUID();constructor(d){super({uniforms:a.reduce((p,[m,A])=>{const _=Y0.clone({[m]:{value:A}});return{...p,..._}},{}),vertexShader:e,fragmentShader:t});for(const[p]of a)Object.defineProperty(this,p,{get:()=>this.uniforms[p].value,set:m=>this.uniforms[p].value=m});Object.assign(this,d)}}return l}const HU=wC({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");function VU(o){return o.isLight}function QU(o){return!!o.geometry}const qU=wC({color:new je(0),blend:2,alphaTest:.75,opacity:0,map:null},`varying vec2 vUv;
|
|
4168
|
+
`}};bC([ue({type:Boolean,attribute:"enabled"})],C_.prototype,"enabled");bC([ue({attribute:!1})],C_.prototype,"appWcRef");let Yf=C_;class FU{constructor({id:e,name:t,receiver:i,plug:a}){this.__name=t,this.__plug=a,this.__receiver=i,e?this.__id=e:this.__id=`${this.__receiver.uuid}-${this.__plug.uuid}`}get id(){return this.__id}get name(){return this.__name}get plug(){return this.__plug}isPrimary(){return this.__plug?.isPrimary}get receiver(){return this.__receiver}connect(){this.__receiver.connect(this),this.__plug.connect(this)}disconnect(){this.__plug&&this.__plug.disconnect(),this.__receiver&&this.__receiver.disconnect()}}class $U{constructor({id:e,receiver:t,plug:i}){this.__id=e,this.__plug=i,this.__receiver=t}get id(){return this.__id}get plug(){return this.__plug}set plug(e){this.__plug=e}get receiver(){return this.__receiver}set receiver(e){this.__receiver=e}disconnect(){this.__receiver.disconnect(),this.__plug.disconnect()}}class zU extends li{constructor(e){super(),this.name="ENTITIES",this._loggerContext="SCENE STRUCTURE",this.__appWcRef=e,this.__eventsManager=this.__appWcRef.eventsManager}async setupRootEntity(e,t){const i=await new yC({id:0,name:"Root",proxyGeo:e??"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/proxies/root-proxy.glb",autoGenerateProxyEntity:!1,renderGeo:t??"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/render/root-render.glb",finishes:{},hotspots:[]},this.__appWcRef);await i.load().catch(()=>Promise.reject(!1));const a=new Va(i);await a.initialize(),this.add(a),this.__rootEntity=a}get rootEntity(){return this.__rootEntity}isEmpty(){return this.__rootEntity===void 0||this.__rootEntity.children.length===0}isNotEmpty(){return!this.isEmpty()}addEntity(e){this.__rootEntity.add(e),this.__eventsManager.structureNodeAddedEvent.fire({node:e})}getFirstEntity(){return this.isEmpty()?null:this.getSceneEntities()[0]}getEntityForAssetId(e){const t=this.getSceneEntities();let i;for(const a of t)if(a.asset.id===e){i=a;break}return i}getSceneEntities(e=!1){const t=[];return this.__rootEntity.traverse(i=>{!e&&i.uuid===this.__rootEntity.uuid||i instanceof Va&&t.push(i)}),t}getPossibleConnectionsForAssetInScene(e){const t=[];window.epigraph.logger.info({title:"Getting connections for asset in scene:",details:e,contextOverride:this._loggerContext});for(const i of this.getSceneEntities(!0)){const a=i.findPossibleConnectionsForAsset(e);a.length>0&&t.push(...a)}return window.epigraph.logger.table({title:"Possible Connections",details:t}),t}getAllConnectionsInScene(){const e=new Map;return this.traverse(t=>{if(t instanceof ur||t instanceof Jr){if(t.connectionId===""||e.has(t.connectionId))return;let a=null,l=null;if(t instanceof ur?(a=t,l=t.plug):t instanceof Jr&&(a=t.receiver,l=t),a!==null&&l!==null){const h=new $U({id:t.connectionId,receiver:a,plug:l});e.set(t.connectionId,h)}}}),e}}class GU extends vC{constructor(e){super({appWcRef:e}),this._loggerContext="SCENE MANAGER",this.__currentSceneBounds=new vi,this.__sceneStructure=new zU(this._appWcRef)}get sceneStructure(){return this.__sceneStructure}get currentSceneBounds(){return this.__currentSceneBounds}recalculateSceneBounds(){this.currentSceneBounds.setFromPoints([new se]),this.__sceneStructure.isNotEmpty()&&this.__sceneStructure.rootEntity.traverse(e=>{e instanceof ot&&e.userData.isProxyMesh&&this.currentSceneBounds.expandByObject(e)}),this._appWcRef.eventsManager.sceneBoundsChanged.fire()}}class Va extends NU{constructor(e){super(),this.epgType="ENTITY_ASSET",this.__autoGeneratedProxy=new li,this.__proxyEntity=new li,this.__renderEntity=new li,this.__activeFinish="",this.__hotspots=new li,this.__renderEntityBoundsBox=new vi,this.__renderEntityBoundsSize=new se,this.__animationMixer=null,this.__animations=[],this.__animationNames=[],this.name=e.name,this.__proxyEntity.name="PROXY",this.add(this.__proxyEntity),this.__renderEntity.name="RENDER",this.add(this.__renderEntity),this.__hotspots.name="HOTSPOTS",this.add(this.__hotspots),this.__asset=e}get asset(){return this.__asset}get isRoot(){return this.name.toLowerCase()==="root"}get proxy(){return this.__proxyEntity}get render(){return this.__renderEntity}get activeFinish(){return this.__activeFinish}get allAssetFinishes(){return this.__asset.finishes}get allFinishIds(){return this.__asset.allFinishIds}highlight(){this.__renderEntity.traverseVisible(e=>{const t=e;if(t.isMesh){const i=t.material;(i.emissive.r>0||i.emissive.g>0||i.emissive.b>0)&&(i.userData.epgData={orignalEmissive:i.emissive.clone()}),i.emissive.r=1,i.emissive.g=1,i.emissive.b=1}})}unhighlight(){this.__renderEntity.traverseVisible(e=>{const t=e;if(t.isMesh){const i=t.material,a=i?.userData?.epgData?.orignalEmissive;a?(i.emissive.r=a.r,i.emissive.g=a.g,i.emissive.b=a.b):(i.emissive.r=0,i.emissive.g=0,i.emissive.b=0)}})}addHotspot(e){e.entity.name=`HOTSPOT-${this.asset.name}-${crypto.randomUUID()}`,e.entity.userData.epgId=e.hotspotId,e.entity.position.set(e.config.position.x,e.config.position.y,e.config.position.z),e.assetId=this.asset.id,this.__hotspots.add(e.entity)}removeHotspot(e){let t;this.__hotspots.traverse(i=>{i.userData.epgId===e&&(t=i)}),t&&(t.removeFromParent(),Et.dispose3(t))}async selectAssetFinish(e,t=this.__renderEntity){window.epigraph.logger.info({title:`Switching to asset finish: ${e}`});const i=new gC(!1),a=this.__asset.renderGltf;if(!a)return Promise.reject(i);const l=a.khrVariantsExtension,h=a.khrVariantsExtensionName;if(!l?.variants||h===void 0)return window.epigraph.logger.warn({title:"No Variants found in asset. Using default material."}),i.success=!0,Promise.resolve(i);const d=l.variants.findIndex(p=>p.name===e);return t.traverse(async p=>{if(!(p instanceof ot)||!p.isMesh||!p.userData.gltfExtensions)return;const m=p.userData.gltfExtensions[h];if(!m)return window.epigraph.logger.error({title:"No Variants found in asset. Using default material."}),Promise.reject(i);p.userData.originalMaterial||(p.userData.originalMaterial=p.material);const A=m.mappings.find(_=>_.variants.includes(d));if(A&&a.resource){const _=a.resource.parser;p.material=await _.getDependency("material",A.material),_.assignFinalMaterial(p)}else window.epigraph.logger.warn({title:`Variant not found. Missing Variant ID: ${e}`,details:{message:"Available Variants",variants:l.variants}}),p.material=p.userData.originalMaterial;i.success=!0}),this.__activeFinish=e,Promise.resolve(i)}findPossibleConnectionsForAsset(e){const t=[];return window.epigraph.logger.info({title:"Getting connections for asset in scene:",details:e}),this.__proxyEntity.traverse(i=>{if(!(i instanceof ur))return;const a=i;for(const l of e.proxyGltf?.plugs??[])l.connectionId===a.connectionId&&t.push(new FU({name:l.connectionId,receiver:a,plug:l}))}),t}getAnimationMixer(){return this.__animationMixer}getAllAnimations(){return this.__animations}getAllAnimationNames(){return this.__animationNames}async initialize(){this.__asset.autoGenerateProxyEntity?(await this.__initializeRenderEntity(),await this.__initializeProxyEntity()):(await this.__initializeProxyEntity(),await this.__initializeRenderEntity())}async __initializeRenderEntity(){const e=this.__asset?.renderGltf?.resource?.scene?.clone(!0);if(!e)return Promise.reject();this.__renderEntity.add(e),this.__renderEntityBoundsBox.setFromObject(e,!0),this.__renderEntityBoundsBox.getSize(this.__renderEntityBoundsSize);const t=new se;if(this.__renderEntityBoundsBox.getCenter(t),!this.__asset.proxyGltf){window.epigraph.logger.warn({title:"Attempted to place render geo at the grid for AssetEntity...",details:this});const i=new li;i.name="rendergeopivot";const a=new Wn(.01,.01,.01),l=new wi({color:65280,depthTest:!1}),h=new ot(a,l);i.add(h),this.__renderEntity.add(i),i.position.set(t.x,this.__renderEntityBoundsBox.min.y,t.z),i.attach(e),i.position.set(0,0,0),this.__renderEntity.attach(e),i.removeFromParent(),Et.dispose3(i)}this.__updateAnimations()}async __initializeProxyEntity(){let e=this.__asset.proxyGltf.resource?.scene.clone();if((!e||this.__asset.autoGenerateProxyEntity)&&(this.__autoGenerateProxyScene(),e=this.__autoGeneratedProxy),!e)return window.epigraph.logger.error({title:"Failed to load OR auto generate proxy asset",details:this.__asset,contextOverride:"ASSET ENTITY"}),Promise.reject();this.__proxyEntity.add(e),this.__proxyEntity.traverse(t=>{t instanceof ot&&(t.userData.isProxyMesh=!0,t.visible=!1)})}__autoGenerateProxyScene(){window.epigraph.logger.info({title:"Attempting to auto generate proxy for asset...",details:this.__asset,contextOverride:"ASSET ENTITY"});const e=new Wn,t=new wi({color:65280,opacity:.5,transparent:!0}),i=new ot(e,t);i.name="AutoGeneratedProxyMesh",i.scale.set(this.__renderEntityBoundsSize.x,this.__renderEntityBoundsSize.y,this.__renderEntityBoundsSize.z);const a=new se;this.__renderEntityBoundsBox.getCenter(a);const l=new li;l.name="proxygeopivot";const h=new zf(.01,10,10),d=new wi({color:255,depthTest:!1}),p=new ot(h,d);l.add(p),this.__proxyEntity.add(l),l.translateY(-this.__renderEntityBoundsSize.y*.5),l.attach(i),l.position.set(0,0,0),this.__proxyEntity.add(i),l.removeFromParent(),Et.dispose3(l),this.__autoGeneratedProxy.add(i)}__updateAnimations(){if(this.__animationMixer=null,this.__animations=[],this.__renderEntity.animations&&this.__asset.renderGltf.resource&&this.__asset.renderGltf.resource.animations.length>0){this.__animationMixer=new ZS(this.__renderEntity.children[0]);for(const e of this.__asset.renderGltf.resource.animations)this.__animations.push(this.__animationMixer.clipAction(e)),this.__animationNames.push(e.name)}}}function wC(o,e,t,i){const a=Object.entries(o);class l extends Ni{static key=Is.generateUUID();constructor(d){super({uniforms:a.reduce((p,[m,A])=>{const _=Y0.clone({[m]:{value:A}});return{...p,..._}},{}),vertexShader:e,fragmentShader:t});for(const[p]of a)Object.defineProperty(this,p,{get:()=>this.uniforms[p].value,set:m=>this.uniforms[p].value=m});Object.assign(this,d)}}return l}const HU=wC({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");function VU(o){return o.isLight}function QU(o){return!!o.geometry}const qU=wC({color:new je(0),blend:2,alphaTest:.75,opacity:0,map:null},`varying vec2 vUv;
|
|
4169
4169
|
void main() {
|
|
4170
4170
|
gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);
|
|
4171
4171
|
vUv = uv;
|
|
@@ -6807,7 +6807,7 @@ Arguments: [`+B+"]"}},s.fz.prototype={k(n){return"Unsupported operation: "+this.
|
|
|
6807
6807
|
></epg-tool-control>
|
|
6808
6808
|
</slot>
|
|
6809
6809
|
</div>
|
|
6810
|
-
`}}F_([ue({attribute:Dr.expandOrientation.name})],rp.prototype,"expandOrientation");F_([ue({type:Boolean,attribute:Dr.collapsible.name})],rp.prototype,"collapsible");F_([ue({type:Boolean,attribute:Dr.collapsed.name})],rp.prototype,"collapsed");window.customElements.get(kw)||window.customElements.define(kw,rp);var Wi=(o=>(o.expanded="expanded",o.collapsed="collapsed",o))(Wi||{});class Uw{constructor({config:e,appWcRef:t,hotspotManagerRef:i}){this.__cameraDirection=new se,this.header={preheadText:"",headerText:"",subheadText:"",media:{uri:"",type:Ol.IMAGE,mediaCaption:"",altText:""}},this.carousel={mediaItems:[],indicator:YC.DOTS},this.details="",this.__localPosition=new se,this.__worldPosition=new se,this.normals=new se,this.screenPosition=new He,this.camera={position:new se,target:new se,focalLength:35},this.entity=new Lt,this.animation=[],this.desktopPlacement=nl.LEFT,this.visited=!1,this.__config=e,this.appWcRef=t,this.hotspotsManager=i,this.assetId=e.assetId,this.hotspotId=e.hotspotId,this.name=e.name,this.updateHotspotConfig(e)}static{this.styles=ct`
|
|
6810
|
+
`}}F_([ue({attribute:Dr.expandOrientation.name})],rp.prototype,"expandOrientation");F_([ue({type:Boolean,attribute:Dr.collapsible.name})],rp.prototype,"collapsible");F_([ue({type:Boolean,attribute:Dr.collapsed.name})],rp.prototype,"collapsed");window.customElements.get(kw)||window.customElements.define(kw,rp);var Wi=(o=>(o.expanded="expanded",o.collapsed="collapsed",o))(Wi||{});class Uw{constructor({config:e,appWcRef:t,hotspotManagerRef:i}){this.__cameraDirection=new se,this.header={preheadText:"",headerText:"",subheadText:"",media:{uri:"",type:Ol.IMAGE,mediaCaption:"",altText:""}},this.carousel={mediaItems:[],indicator:YC.DOTS},this.finishes=[],this.details="",this.__localPosition=new se,this.__worldPosition=new se,this.normals=new se,this.screenPosition=new He,this.camera={position:new se,target:new se,focalLength:35},this.entity=new Lt,this.animation=[],this.desktopPlacement=nl.LEFT,this.visited=!1,this.__config=e,this.appWcRef=t,this.hotspotsManager=i,this.assetId=e.assetId,this.hotspotId=e.hotspotId,this.name=e.name,this.finishes=e.finishes,this.updateHotspotConfig(e)}static{this.styles=ct`
|
|
6811
6811
|
.hotspot-indicator {
|
|
6812
6812
|
position: absolute;
|
|
6813
6813
|
transform: translate(-50%, -50%);
|
|
@@ -6827,7 +6827,7 @@ Arguments: [`+B+"]"}},s.fz.prototype={k(n){return"Unsupported operation: "+this.
|
|
|
6827
6827
|
.hotspot-indicator.occluded {
|
|
6828
6828
|
opacity: 0.3;
|
|
6829
6829
|
}
|
|
6830
|
-
`}get config(){return this.__config}get position(){return this.entity.getWorldPosition(this.__worldPosition),this.__worldPosition}__updateHotspotNormals(){const e=new se;this.appWcRef.sceneManager.currentSceneBounds.getCenter(e),this.normals.subVectors(this.position,e)}updateHotspotConfig(e){this.header=e.header,this.carousel=e.carousel,this.details=e.details,this.name=e.name,this.__localPosition.set(e.position.x,e.position.y,e.position.z),this.entity.position.set(e.position.x,e.position.y,e.position.z),this.__updateHotspotNormals(),this.camera.position.set(e.camera.position.x,e.camera.position.y,e.camera.position.z),this.camera.target.set(e.camera.target.x,e.camera.target.y,e.camera.target.z),this.camera.focalLength=e.camera.focalLength,this.animation=e.animation,e.desktopPlacement&&(this.desktopPlacement=e.desktopPlacement)}_onHotspotClick(){this.hotspotsManager.activeHotspot||(this.visited=!0,this.appWcRef.eventsManager.hotspotClickedEvent.fire({hotspot:this}))}__isFacingCamera(){return this.appWcRef.cameraManager.getCameras().main.getWorldDirection(this.__cameraDirection),this.normals.angleTo(this.__cameraDirection)>Math.PI/2.2}renderAnnotationTemplate(e){const t=e!==void 0&&e===this.hotspotId;if(this.hotspotsManager.activeHotspot&&!t)return $e;this.screenPosition=this.appWcRef.getScreenPositionFromWorld(this.position);const i=e!==void 0&&e!==this.hotspotId;let a="top-left";return this.screenPosition.y>this.appWcRef.canvasSize.height*.12?a="top":a="bottom",this.screenPosition.x>this.appWcRef.canvasSize.width*.5?a+="-right":a+="-left",Ee`
|
|
6830
|
+
`}get hidden(){const e=this.appWcRef.sceneManager.sceneStructure.getEntityForAssetId(this.assetId);if(!e)return!1;const t=e.activeFinish;return!this.finishes.includes(t)}get config(){return this.__config}get position(){return this.entity.getWorldPosition(this.__worldPosition),this.__worldPosition}__updateHotspotNormals(){const e=new se;this.appWcRef.sceneManager.currentSceneBounds.getCenter(e),this.normals.subVectors(this.position,e)}updateHotspotConfig(e){this.header=e.header,this.carousel=e.carousel,this.details=e.details,this.name=e.name,this.finishes=e.finishes,this.__localPosition.set(e.position.x,e.position.y,e.position.z),this.entity.position.set(e.position.x,e.position.y,e.position.z),this.__updateHotspotNormals(),this.camera.position.set(e.camera.position.x,e.camera.position.y,e.camera.position.z),this.camera.target.set(e.camera.target.x,e.camera.target.y,e.camera.target.z),this.camera.focalLength=e.camera.focalLength,this.animation=e.animation,e.desktopPlacement&&(this.desktopPlacement=e.desktopPlacement)}_onHotspotClick(){this.hotspotsManager.activeHotspot||(this.visited=!0,this.appWcRef.eventsManager.hotspotClickedEvent.fire({hotspot:this}))}__isFacingCamera(){return this.appWcRef.cameraManager.getCameras().main.getWorldDirection(this.__cameraDirection),this.normals.angleTo(this.__cameraDirection)>Math.PI/2.2}renderAnnotationTemplate(e){const t=e!==void 0&&e===this.hotspotId;if(this.hotspotsManager.activeHotspot&&!t||this.hidden)return $e;this.screenPosition=this.appWcRef.getScreenPositionFromWorld(this.position);const i=e!==void 0&&e!==this.hotspotId;let a="top-left";return this.screenPosition.y>this.appWcRef.canvasSize.height*.12?a="top":a="bottom",this.screenPosition.x>this.appWcRef.canvasSize.width*.5?a+="-right":a+="-left",Ee`
|
|
6831
6831
|
<epg-tool-hotspot
|
|
6832
6832
|
class="hotspot-indicator ${i?"inactive":""} ${this.__isFacingCamera()?"":"occluded"}"
|
|
6833
6833
|
style="left: ${this.screenPosition.x}px; top: ${this.screenPosition.y}px"
|
|
@@ -8530,7 +8530,7 @@ void main() {
|
|
|
8530
8530
|
opacity: 0;
|
|
8531
8531
|
pointer-events: none;
|
|
8532
8532
|
}
|
|
8533
|
-
`]}get timeElapsedSinceLoadBegin(){return parseFloat((performance.now()-this._loadTimeBegin).toFixed(2))}get epigraphAnalytics(){return this._epigraphAnalytics}get identifier(){return this._identifier}get identifierType(){return this._identifierType}get eventsManager(){return this._eventsManager}get canvasSize(){return this.__canvasSize}get loaders(){return this._loaders}get experienceData(){return this._experienceData}get sceneManager(){return this._sceneManager}get cameraManager(){return this._cameraManager}get hasSceneChanged(){return this.__hasSceneChanged}set hasSceneChanged(e){this.__hasSceneChanged=e}get renderEngine(){return this._renderEngine}get isDevEnv(){return this._isDevEnv}enterPickerState(){this.sessionState="hotspotPlacer",this.style.cursor="crosshair",this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.renderEngine.scene.remove(this.__viewStateGrid),this.requestUpdate()}enterViewState(){this.sessionState="cameraUpdate",this.style.cursor="grab",this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hotspotsManager.style.opacity="0.25",this.renderEngine.scene.add(this.__viewStateGrid),this.requestUpdate()}enterDefaultState(){this.sessionState="default",this.style.cursor="grab",this.hotspotsManager.style.opacity="1",this.renderEngine.scene.remove(this.__viewStateGrid)}renderScreenshotCanvasFrame(){this.renderEngine.screenshotRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().screenshot)}onLoadFailed(e,t){this._eventsManager.appFailedEvent.fire(t);const i=this.timeElapsedSinceLoadBegin,a=new ty(!0,i,e);this._epigraphAnalytics.sendEvent(a),this.showSplashScreen()}getFirstNonProxyFromIntersections(e){let t=null;for(const i of e)if(!(!i?.object||i.object.userData.isProxyMesh===!0)){t=i;break}return t}__getIntersectionsWithScene(e,t){const i=new l_,a=new He;return a.x=e/this.canvasSize.width*2-1,a.y=-(t/this.canvasSize.height)*2+1,i.setFromCamera(a,this.cameraManager.getCameras().main),i.intersectObjects(this.renderEngine.sceneHierarchy.sceneStructure.rootEntity.children,!0)}getPositionOnMeshFromPoint(e,t){const i=this.__getIntersectionsWithScene(e,t);if(i.length>0){const a=this.getFirstNonProxyFromIntersections(i);return a===null?null:a.point}else return null}getIntersectionOnProductFromPoint(e,t){const i=this.__getIntersectionsWithScene(e,t);let a=null;if(i.length>0){const l=this.getFirstNonProxyFromIntersections(i);if(!l?.object)return null;l.object.traverseAncestors(h=>{if(h instanceof Va&&h.isRoot===!1){a={asset:{id:h.asset.id,name:h.asset.name},intersection:{point:l.point}};return}})}return a}getSceneSphericalBoundsForCameraFocus(){const e=this.sceneManager.currentSceneBounds;e.getCenter(this._boundingSphereCenter);const t=e.getBoundingSphere(new vn(this._boundingSphereCenter));if(this.dimensionsManager?.enabled){const i=this.canvasSize.height/this.canvasSize.width;t.radius+=i}return t}async getUsdzUrlForAr(){return this.__usdzBlobUrl=await this.renderEngine.getSceneAsUsdzUrl(),this.eventsManager.arModelReadyEvent.fire(this.__usdzBlobUrl),this.__usdzBlobUrl}async getGlbUrlForAr(){return this.__glbBlobUrl=await this.renderEngine.getSceneAsGlbUrl(),this.eventsManager.arModelReadyEvent.fire(this.__glbBlobUrl),this.__glbBlobUrl}async launchAR(){if(!this.isLoading)return await this.viewInYourSpaceManager.launchAR()}highlightEntityByAssetId(e){const t=this.sceneManager.sceneStructure.getEntityForAssetId(e);if(!t){window.epigraph.logger.error({title:`No asset found for ID: ${e}`});return}t.highlight()}unhighlightAllEntities(){for(const e of this.sceneManager.sceneStructure.getSceneEntities())e.unhighlight()}async spawnAssetInScene(e){const t=this.sceneManager.sceneStructure.getPossibleConnectionsForAssetInScene(e);if(t.length<=0)return Promise.resolve(void 0);const i=t[0];i.connect();const a=new Va(e);await a.initialize();const l=i.receiver,h=i.plug.clone();this.sceneManager.sceneStructure.add(h);const d=new se;l.getWorldPosition(d),h.position.set(d.x,d.y,d.z),h.attach(a);const p=new zi;return l.getWorldQuaternion(p),h.setRotationFromQuaternion(p),l.attach(a),h.removeFromParent(),Et.dispose3(h),this.eventsManager.structureChangedEvent.fire(),Promise.resolve(a)}showDimensions(){this.dimensionsManager.enabled=!0,this.areDimensionsActive=!0,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled),this.cameraManager.fitCameraToSceneBounds()}hideDimensions(e=!1){this.dimensionsManager.enabled=!1,this.areDimensionsActive=!1,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled),e||this.cameraManager.fitCameraToSceneBounds()}getDimensions(){const e=this.dimensionsManager.getCurrentDimensionsState(),t=this.dimensionsManager.dimensionsUnit;return{length:e.length.distance,width:e.width.distance,height:e.height.distance,unit:t}}printSceneHierarchy(){this.renderEngine.printSceneHierarchy()}showCameraAim(){this.cameraAimElemRef.classList.remove("hide")}hideCameraAim(){this.cameraAimElemRef.classList.add("hide")}showHelp(){this.isHelpVisible=!0}hideHelp(){this.isHelpVisible=!1}toggleHelp(){this.isHelpVisible=!this.isHelpVisible}showHotspots(){window.epigraph.logger.info({title:"Showing Hotspots"}),this.areHotspotsActive=!0,this.eventsManager.hotspotsVisibilityChanged.fire({visible:!0})}hideHotspots(){window.epigraph.logger.info({title:"Hiding Hotspots"}),this.areHotspotsActive=!1,this.eventsManager.hotspotsVisibilityChanged.fire({visible:!1})}toggleHotspots(){this.hotspotsManager.enabled?this.hideHotspots():this.showHotspots()}updateHotspotsOrder(e){this.hotspotsManager.updateHotspotsOrder(e)}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this.hotspotsManager.openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i})}closeActiveHotspot(){this.hotspotsManager.closeActiveHotspot()}setActiveHotspotState(e){this.hotspotsManager.setActiveHotspotState(e)}nextHotspot(){return this.hotspotsManager.nextHotspot()}previousHotspot(){return this.hotspotsManager.previousHotspot()}getActiveHotspot(){return this.hotspotsManager.activeHotspot}areHotspotsVisible(){return this.hotspotsManager.enabled}getAllHotspots(){return Array.from(this.hotspotsManager.hotspots.values())}getAllHotspotIds(){return Array.from(this.hotspotsManager.hotspots.keys())}getHotspotById(e){return this.hotspotsManager.hotspots.get(e)}async __onPlayInteractionPrompt(e=2){this.showCameraInteractionPromptIndicator(),await Et.wait(800);for(let t=0;t<e;t++)this.cameraInteractionPromptIndicatorElemRef.classList.add("play-wiggle-animation"),await this.cameraManager.wiggleCamera();this.cameraInteractionPromptIndicatorElemRef.classList.remove("play-wiggle-animation"),this.hideCameraInteractionPromptIndicator(),this._isSceneInteractedWith||setTimeout(()=>{this.__onPlayInteractionPrompt()},3e3)}getAllAnimations(){const e=this.sceneManager.sceneStructure.getFirstEntity();return e?e.getAllAnimations():[]}getAllAnimationNames(){const e=this.sceneManager.sceneStructure.getFirstEntity();return e?e.getAllAnimationNames():[]}playAnimationByName({animationName:e,clampWhenFinished:t=!1,loop:i=!1,repetitions:a=1/0,reverse:l=!1}){if(!e)return;const h=this.getAllAnimationNames();if(!h.includes(e)){window.epigraph.logger.warn({title:`Invalid animation name: ${e}. Expand for a list of valid names`,details:h});return}const d=h.indexOf(e),p=this.getAllAnimations()[d];return l?(p.timeScale=-1,p.fadeOut(this._animationFadeDurationInMiliseconds*.001)):(p.timeScale=1,p.fadeIn(this._animationFadeDurationInMiliseconds*.001)),p.setLoop(i?$a:xl,a),p.clampWhenFinished=t,p.enabled=!0,p.play(),this._activeAnimations.set(e,p),{animationName:e,targetAnimationAction:p}}stopAnimationByName(e){if(!e)return;const t=this.getAllAnimationNames();if(!t.includes(e)){window.epigraph.logger.warn({title:`Invalid animation name: ${e}. Expand for a list of valid names`,details:t});return}const i=t.indexOf(e),a=this.getAllAnimations()[i];a.fadeOut(this._animationFadeDurationInMiliseconds*.001),setTimeout(()=>{a.stop()},this._animationFadeDurationInMiliseconds),this._activeAnimations.delete(e)}pauseActiveAnimations(e){for(const t of this._activeAnimations.values())t.paused=!0,e!==void 0&&(t.weight=e)}resumeActiveAnimations(){for(const e of this._activeAnimations.values())e.paused=!1,e.weight=1}stopAllAnimations(){for(const[e,t]of this._activeAnimations.entries())t.fadeOut(this._animationFadeDurationInMiliseconds*.001),setTimeout(()=>{t.stop(),this._activeAnimations.delete(e)},this._animationFadeDurationInMiliseconds)}postRenderFrameUpdateInEngine(e){try{this.cameraManager.mainCameraControls.update(e),this.debugManager&&this.debugManager.stats.update(),this.renderEngine.mainRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().main),this.renderEngine.textRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().main)}catch(t){return t}}getScreenPositionFromWorld(e){const t=new He,i=this.cameraManager.getCameras().main,a=this.renderEngine.canvas.clientWidth*.5,l=this.renderEngine.canvas.clientHeight*.5,d=e.clone().project(i);return t.x=(d.x+1)*a,t.y=-(d.y-1)*l,t}_renderAppCanvasContainer(){return this.featuresToEnable.viewer?Ee`
|
|
8533
|
+
`]}get timeElapsedSinceLoadBegin(){return parseFloat((performance.now()-this._loadTimeBegin).toFixed(2))}get epigraphAnalytics(){return this._epigraphAnalytics}get identifier(){return this._identifier}get identifierType(){return this._identifierType}get eventsManager(){return this._eventsManager}get canvasSize(){return this.__canvasSize}get loaders(){return this._loaders}get experienceData(){return this._experienceData}get sceneManager(){return this._sceneManager}get cameraManager(){return this._cameraManager}get hasSceneChanged(){return this.__hasSceneChanged}set hasSceneChanged(e){this.__hasSceneChanged=e}get renderEngine(){return this._renderEngine}get isDevEnv(){return this._isDevEnv}enterPickerState(){this.sessionState="hotspotPlacer",this.style.cursor="crosshair",this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.renderEngine.scene.remove(this.__viewStateGrid),this.cameraManager.disableCameraZoomLimits(),this.requestUpdate()}enterViewState(){this.sessionState="cameraUpdate",this.style.cursor="grab",this._isSceneInteractedWith=!0,this.playInteractionPrompt=!1,this.hotspotsManager.style.opacity="0.25",this.renderEngine.scene.add(this.__viewStateGrid),this.cameraManager.resetCameraToDefault(this.productSettings.camera),this.requestUpdate()}enterDefaultState(){this.sessionState="default",this.style.cursor="grab",this.hotspotsManager.style.opacity="1",this.renderEngine.scene.remove(this.__viewStateGrid),this.cameraManager.resetCameraToDefault(this.productSettings.camera)}renderScreenshotCanvasFrame(){this.renderEngine.screenshotRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().screenshot)}onLoadFailed(e,t){this._eventsManager.appFailedEvent.fire(t);const i=this.timeElapsedSinceLoadBegin,a=new ty(!0,i,e);this._epigraphAnalytics.sendEvent(a),this.showSplashScreen()}getFirstNonProxyFromIntersections(e){let t=null;for(const i of e)if(!(!i?.object||i.object.userData.isProxyMesh===!0)){t=i;break}return t}__getIntersectionsWithScene(e,t){const i=new l_,a=new He;return a.x=e/this.canvasSize.width*2-1,a.y=-(t/this.canvasSize.height)*2+1,i.setFromCamera(a,this.cameraManager.getCameras().main),i.intersectObjects(this.renderEngine.sceneHierarchy.sceneStructure.rootEntity.children,!0)}getPositionOnMeshFromPoint(e,t){const i=this.__getIntersectionsWithScene(e,t);if(i.length>0){const a=this.getFirstNonProxyFromIntersections(i);return a===null?null:a.point}else return null}getIntersectionOnProductFromPoint(e,t){const i=this.__getIntersectionsWithScene(e,t);let a=null;if(i.length>0){const l=this.getFirstNonProxyFromIntersections(i);if(!l?.object)return null;l.object.traverseAncestors(h=>{if(h instanceof Va&&h.isRoot===!1){a={asset:{id:h.asset.id,name:h.asset.name},intersection:{point:l.point}};return}})}return a}getSceneSphericalBoundsForCameraFocus(){const e=this.sceneManager.currentSceneBounds;e.getCenter(this._boundingSphereCenter);const t=e.getBoundingSphere(new vn(this._boundingSphereCenter));if(this.dimensionsManager?.enabled){const i=this.canvasSize.height/this.canvasSize.width;t.radius+=i}return t}async getUsdzUrlForAr(){return this.__usdzBlobUrl=await this.renderEngine.getSceneAsUsdzUrl(),this.eventsManager.arModelReadyEvent.fire(this.__usdzBlobUrl),this.__usdzBlobUrl}async getGlbUrlForAr(){return this.__glbBlobUrl=await this.renderEngine.getSceneAsGlbUrl(),this.eventsManager.arModelReadyEvent.fire(this.__glbBlobUrl),this.__glbBlobUrl}async launchAR(){if(!this.isLoading)return await this.viewInYourSpaceManager.launchAR()}highlightEntityByAssetId(e){const t=this.sceneManager.sceneStructure.getEntityForAssetId(e);if(!t){window.epigraph.logger.error({title:`No asset found for ID: ${e}`});return}t.highlight()}unhighlightAllEntities(){for(const e of this.sceneManager.sceneStructure.getSceneEntities())e.unhighlight()}async spawnAssetInScene(e){const t=this.sceneManager.sceneStructure.getPossibleConnectionsForAssetInScene(e);if(t.length<=0)return Promise.resolve(void 0);const i=t[0];i.connect();const a=new Va(e);await a.initialize();const l=i.receiver,h=i.plug.clone();this.sceneManager.sceneStructure.add(h);const d=new se;l.getWorldPosition(d),h.position.set(d.x,d.y,d.z),h.attach(a);const p=new zi;return l.getWorldQuaternion(p),h.setRotationFromQuaternion(p),l.attach(a),h.removeFromParent(),Et.dispose3(h),this.eventsManager.structureChangedEvent.fire(),Promise.resolve(a)}showDimensions(){this.dimensionsManager.enabled=!0,this.areDimensionsActive=!0,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled),this.cameraManager.fitCameraToSceneBounds()}hideDimensions(e=!1){this.dimensionsManager.enabled=!1,this.areDimensionsActive=!1,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled),e||this.cameraManager.fitCameraToSceneBounds()}getDimensions(){const e=this.dimensionsManager.getCurrentDimensionsState(),t=this.dimensionsManager.dimensionsUnit;return{length:e.length.distance,width:e.width.distance,height:e.height.distance,unit:t}}printSceneHierarchy(){this.renderEngine.printSceneHierarchy()}showCameraAim(){this.cameraAimElemRef.classList.remove("hide")}hideCameraAim(){this.cameraAimElemRef.classList.add("hide")}showHelp(){this.isHelpVisible=!0}hideHelp(){this.isHelpVisible=!1}toggleHelp(){this.isHelpVisible=!this.isHelpVisible}showHotspots(){window.epigraph.logger.info({title:"Showing Hotspots"}),this.areHotspotsActive=!0,this.eventsManager.hotspotsVisibilityChanged.fire({visible:!0})}hideHotspots(){window.epigraph.logger.info({title:"Hiding Hotspots"}),this.areHotspotsActive=!1,this.eventsManager.hotspotsVisibilityChanged.fire({visible:!1})}toggleHotspots(){this.hotspotsManager.enabled?this.hideHotspots():this.showHotspots()}updateHotspotsOrder(e){this.hotspotsManager.updateHotspotsOrder(e)}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this.hotspotsManager.openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i})}closeActiveHotspot(){this.hotspotsManager.closeActiveHotspot()}setActiveHotspotState(e){this.hotspotsManager.setActiveHotspotState(e)}nextHotspot(){return this.hotspotsManager.nextHotspot()}previousHotspot(){return this.hotspotsManager.previousHotspot()}getActiveHotspot(){return this.hotspotsManager.activeHotspot}areHotspotsVisible(){return this.hotspotsManager.enabled}getAllHotspots(){return Array.from(this.hotspotsManager.hotspots.values())}getAllHotspotIds(){return Array.from(this.hotspotsManager.hotspots.keys())}getHotspotById(e){return this.hotspotsManager.hotspots.get(e)}async __onPlayInteractionPrompt(e=2){this.showCameraInteractionPromptIndicator(),await Et.wait(800);for(let t=0;t<e;t++)this.cameraInteractionPromptIndicatorElemRef.classList.add("play-wiggle-animation"),await this.cameraManager.wiggleCamera();this.cameraInteractionPromptIndicatorElemRef.classList.remove("play-wiggle-animation"),this.hideCameraInteractionPromptIndicator(),this._isSceneInteractedWith||setTimeout(()=>{this.__onPlayInteractionPrompt()},3e3)}getAllAnimations(){const e=this.sceneManager.sceneStructure.getFirstEntity();return e?e.getAllAnimations():[]}getAllAnimationNames(){const e=this.sceneManager.sceneStructure.getFirstEntity();return e?e.getAllAnimationNames():[]}playAnimationByName({animationName:e,clampWhenFinished:t=!1,loop:i=!1,repetitions:a=1/0,reverse:l=!1}){if(!e)return;const h=this.getAllAnimationNames();if(!h.includes(e)){window.epigraph.logger.warn({title:`Invalid animation name: ${e}. Expand for a list of valid names`,details:h});return}const d=h.indexOf(e),p=this.getAllAnimations()[d];return l?(p.timeScale=-1,p.fadeOut(this._animationFadeDurationInMiliseconds*.001)):(p.timeScale=1,p.fadeIn(this._animationFadeDurationInMiliseconds*.001)),p.setLoop(i?$a:xl,a),p.clampWhenFinished=t,p.enabled=!0,p.play(),this._activeAnimations.set(e,p),{animationName:e,targetAnimationAction:p}}stopAnimationByName(e){if(!e)return;const t=this.getAllAnimationNames();if(!t.includes(e)){window.epigraph.logger.warn({title:`Invalid animation name: ${e}. Expand for a list of valid names`,details:t});return}const i=t.indexOf(e),a=this.getAllAnimations()[i];a.fadeOut(this._animationFadeDurationInMiliseconds*.001),setTimeout(()=>{a.stop()},this._animationFadeDurationInMiliseconds),this._activeAnimations.delete(e)}pauseActiveAnimations(e){for(const t of this._activeAnimations.values())t.paused=!0,e!==void 0&&(t.weight=e)}resumeActiveAnimations(){for(const e of this._activeAnimations.values())e.paused=!1,e.weight=1}stopAllAnimations(){for(const[e,t]of this._activeAnimations.entries())t.fadeOut(this._animationFadeDurationInMiliseconds*.001),setTimeout(()=>{t.stop(),this._activeAnimations.delete(e)},this._animationFadeDurationInMiliseconds)}postRenderFrameUpdateInEngine(e){try{this.cameraManager.mainCameraControls.update(e),this.debugManager&&this.debugManager.stats.update(),this.renderEngine.mainRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().main),this.renderEngine.textRenderer.render(this.renderEngine.scene,this.cameraManager.getCameras().main)}catch(t){return t}}getScreenPositionFromWorld(e){const t=new He,i=this.cameraManager.getCameras().main,a=this.renderEngine.canvas.clientWidth*.5,l=this.renderEngine.canvas.clientHeight*.5,d=e.clone().project(i);return t.x=(d.x+1)*a,t.y=-(d.y-1)*l,t}_renderAppCanvasContainer(){return this.featuresToEnable.viewer?Ee`
|
|
8534
8534
|
<div id="appCanvasContainer" class="app-canvas-container">
|
|
8535
8535
|
<span id="cameraAimIndicator" class="camera-aim-indicator hide"></span>
|
|
8536
8536
|
</div>
|
|
@@ -8736,7 +8736,7 @@ void main() {
|
|
|
8736
8736
|
id="viewInYourSpaceButton"
|
|
8737
8737
|
?is-loading=${this.isLoading}
|
|
8738
8738
|
></epg-button-view-in-your-space>
|
|
8739
|
-
</slot>`}_renderPoweredByEpigraphButton(){return $e}_renderToolset(){return $e}};kH([ue({type:String,attribute:zT.label.name})],GT.prototype,"label");let UH=GT;class HT{constructor(e){this._appWcRef=e}async viewInYourSpace(){return await this._appWcRef.launchAR()}async launchAR(){return await this._appWcRef.launchAR()}async getViewInYourSpaceUrl(){return""}async getViewInYourSpaceQR(){return""}canLaunchAR(){return this._appWcRef.viewInYourSpaceManager.canLaunchAr()}isARSessionActive(){return this._appWcRef.viewInYourSpaceManager.isARSessionActive()}getMinimumRequirementsString(){return this._appWcRef.viewInYourSpaceManager.getMinimumRequirementsString()}setCameraZoomLimits({minDistance:e,maxDistance:t}){this._appWcRef.cameraManager.setCameraZoomLimits({minDistance:e,maxDistance:t})}disableCameraZoomLimits(){this._appWcRef.cameraManager.disableCameraZoomLimits()}getCameraTransforms(){return this._appWcRef.cameraManager.getCurrentCameraTransforms()}setCameraTransforms(e){const t=new e0(e);return void this._appWcRef.cameraManager.moveCameraToLocation({newCameraTransforms:t})}getCameraRotation(){return this._appWcRef.cameraManager.getCurrentCameraRotation()}async setCameraRotation(e,t){const{azimuthAngle:i,polarAngle:a,distance:l}=e;return await this._appWcRef.cameraManager.rotateCameraToLocation({azimuthAngle:i,polarAngle:a,distance:l,transition:t})}getCameraFocalLength(){return this._appWcRef.cameraManager.getCameraFocalLength()}setCameraFocalLength(e){this._appWcRef.cameraManager.setCameraFocalLength(e)}getPositionOnMeshFromPoint(e,t){return this._appWcRef.getPositionOnMeshFromPoint(e,t)}getIntersectionOnProductFromPoint(e,t){return this._appWcRef.getIntersectionOnProductFromPoint(e,t)}
|
|
8739
|
+
</slot>`}_renderPoweredByEpigraphButton(){return $e}_renderToolset(){return $e}};kH([ue({type:String,attribute:zT.label.name})],GT.prototype,"label");let UH=GT;class HT{constructor(e){this._appWcRef=e}async viewInYourSpace(){return await this._appWcRef.launchAR()}async launchAR(){return await this._appWcRef.launchAR()}async getViewInYourSpaceUrl(){return""}async getViewInYourSpaceQR(){return""}canLaunchAR(){return this._appWcRef.viewInYourSpaceManager.canLaunchAr()}isARSessionActive(){return this._appWcRef.viewInYourSpaceManager.isARSessionActive()}getMinimumRequirementsString(){return this._appWcRef.viewInYourSpaceManager.getMinimumRequirementsString()}setCameraZoomLimits({minDistance:e,maxDistance:t}){this._appWcRef.cameraManager.setCameraZoomLimits({minDistance:e,maxDistance:t})}disableCameraZoomLimits(){this._appWcRef.cameraManager.disableCameraZoomLimits()}getCameraTransforms(){return this._appWcRef.cameraManager.getCurrentCameraTransforms()}setCameraTransforms(e){const t=new e0(e);return void this._appWcRef.cameraManager.moveCameraToLocation({newCameraTransforms:t})}getCameraRotation(){return this._appWcRef.cameraManager.getCurrentCameraRotation()}async setCameraRotation(e,t){const{azimuthAngle:i,polarAngle:a,distance:l}=e;return await this._appWcRef.cameraManager.rotateCameraToLocation({azimuthAngle:i,polarAngle:a,distance:l,transition:t})}getCameraFocalLength(){return this._appWcRef.cameraManager.getCameraFocalLength()}setCameraFocalLength(e){this._appWcRef.cameraManager.setCameraFocalLength(e)}getPositionOnMeshFromPoint(e,t){return this._appWcRef.getPositionOnMeshFromPoint(e,t)}getIntersectionOnProductFromPoint(e,t){return this._appWcRef.getIntersectionOnProductFromPoint(e,t)}highlightEntityByAssetId(e){this._appWcRef.highlightEntityByAssetId(e)}unhighlightAllEntities(){this._appWcRef.unhighlightAllEntities()}showDimensions(){this._appWcRef.showDimensions()}hideDimensions(){this._appWcRef.hideDimensions()}areDimensionsVisible(){return this._appWcRef.areDimensionsActive}getDimensions(){return this._appWcRef.getDimensions()}toggleDimensions(){}getAllAnimations(){return this._appWcRef.getAllAnimations()}getAllAnimationNames(){return this._appWcRef.getAllAnimationNames()}playAnimationByName({animationName:e,clampWhenFinished:t=!1,loop:i=!1,repetitions:a=1/0,reverse:l=!1}){this._appWcRef.playAnimationByName({animationName:e,clampWhenFinished:t,loop:i,repetitions:a,reverse:l})}stopAnimationByName(e){this._appWcRef.stopAnimationByName(e)}pauseActiveAnimations(e){this._appWcRef.pauseActiveAnimations(e)}resumeActiveAnimations(){this._appWcRef.resumeActiveAnimations()}stopAllAnimations(){this._appWcRef.stopAllAnimations()}showHelp(){this._appWcRef.showHelp()}hideHelp(){this._appWcRef.hideHelp()}toggleHelp(){this._appWcRef.toggleHelp()}isHelpVisible(){return this._appWcRef.isHelpVisible}}var FH=Object.defineProperty,$H=(o,e,t,i)=>{for(var a=void 0,l=o.length-1,h;l>=0;l--)(h=o[l])&&(a=h(e,t,a)||a);return a&&FH(e,t,a),a};const VT=class Ia extends z_{constructor(){super(),this.featuresToEnable={viewer:!0,hotspots:!1,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=viewer",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=viewer"},this._loggerContext=Ia.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Ia.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new HT(this)}static{this.webComponentName="epigraph-viewer"}static{this.styles=[super.styles,ct`
|
|
8740
8740
|
:host {
|
|
8741
8741
|
position: relative;
|
|
8742
8742
|
}
|