@epigraph/solutions 1.0.20-alpha.1 → 1.0.20
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.
|
@@ -18080,7 +18080,7 @@ void main() {
|
|
|
18080
18080
|
<div id="appCanvasContainer" class="app-canvas-container">
|
|
18081
18081
|
<span id="cameraAimIndicator" class="camera-aim-indicator hide"></span>
|
|
18082
18082
|
</div>
|
|
18083
|
-
`:me}getWebComponentName(){return ed.webComponentName}async _resolveIdentifierAndType(){this.sku?(this._identifierType="sku",this._identifier=this.sku):this.shopify_variant_id?(this._identifierType="shopify_variant_id",this._identifier=this.shopify_variant_id):this.upc?(this._identifierType="upc",this._identifier=this.upc):this.asin?(this._identifierType="asin",this._identifier=this.asin):this.experience_id?(this._identifierType="experience_id",this._identifier=this.experience_id):this.product_variant_uuid&&(this._identifierType="product_variant_uuid",this._identifier=this.product_variant_uuid)}async _onAuthenticationFailed(e){window.epigraph.logger.error({title:"AUTHENTICATION FAILED: Expand for details...",details:e,contextOverride:this._loggerContext}),this.onLoadFailed(sv.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:$3.AuthenticationFailedError,message:e}),await this.disconnectedCallback()}async setupRenderEngine(){window.epigraph.logger.info({title:"Initiliazing Render Engine"}),this._renderEngine=new d5(this);const{canvasHtmlElem:e,screenshotRenderer:t,textRendererElem:n}=await this._renderEngine.setup();this.appCanvasContainerElemRef.appendChild(e),this.appCanvasContainerElemRef.appendChild(n),t?.domElement&&this.appCanvasContainerElemRef.appendChild(t.domElement),new ResizeObserver(this.__onWebComponentResize.bind(this)).observe(this.appCanvasContainerElemRef)}_showCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t;n.style.visibility="visible",n.style.transition="opacity 0.5s ease-in-out",n.style.opacity="1"})}_hideCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t,i=500;n.style.transition=`opacity ${i/1e3}s ease-in-out`,n.style.opacity="0",setTimeout(()=>n.style.visibility="hidden",i)})}_sendAnalyticsEventsOnModuleLoadStart(){const e=new dD(!1);this._epigraphAnalytics.sendEvent(e)}_sendAnalyticsEventsOnModuleLoadFinish(){const e=this.timeElapsedSinceLoadBegin,t=new AD(!1,e);this._epigraphAnalytics.sendEvent(t);const n=window.epigraph.isSessionWebGL2Compatible();let i;this.viewInYourSpaceManager.canLaunchAr()?i=n?Kh.SUPPORT_TYPE.AR_WEBGL2:Kh.SUPPORT_TYPE.AR:i=n?Kh.SUPPORT_TYPE.QR_WEBGL2:Kh.SUPPORT_TYPE.QR;const r=new Kh(i);this._epigraphAnalytics.sendEvent(r)}_onNewExperienceLoadStart(){this.isLoading=!0,this._loadingProgress=0,this._hideCustomViewInYourSpaceButton(),this.showSplashScreen(),this.hotspotsManager?.activeHotspot&&this.hotspotsManager.closeActiveHotspot(),this._sendAnalyticsEventsOnModuleLoadStart()}_onNewExperienceLoadFinish(){this._onSceneHierarchyUpdate(),this.isLoading=!1,this._showCustomViewInYourSpaceButton(),this._eventsManager.experienceUpdatedEvent.fire(),this._eventsManager.appReadyEvent.fire(),this.productSettings.camera.initial?.
|
|
18083
|
+
`:me}getWebComponentName(){return ed.webComponentName}async _resolveIdentifierAndType(){this.sku?(this._identifierType="sku",this._identifier=this.sku):this.shopify_variant_id?(this._identifierType="shopify_variant_id",this._identifier=this.shopify_variant_id):this.upc?(this._identifierType="upc",this._identifier=this.upc):this.asin?(this._identifierType="asin",this._identifier=this.asin):this.experience_id?(this._identifierType="experience_id",this._identifier=this.experience_id):this.product_variant_uuid&&(this._identifierType="product_variant_uuid",this._identifier=this.product_variant_uuid)}async _onAuthenticationFailed(e){window.epigraph.logger.error({title:"AUTHENTICATION FAILED: Expand for details...",details:e,contextOverride:this._loggerContext}),this.onLoadFailed(sv.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:$3.AuthenticationFailedError,message:e}),await this.disconnectedCallback()}async setupRenderEngine(){window.epigraph.logger.info({title:"Initiliazing Render Engine"}),this._renderEngine=new d5(this);const{canvasHtmlElem:e,screenshotRenderer:t,textRendererElem:n}=await this._renderEngine.setup();this.appCanvasContainerElemRef.appendChild(e),this.appCanvasContainerElemRef.appendChild(n),t?.domElement&&this.appCanvasContainerElemRef.appendChild(t.domElement),new ResizeObserver(this.__onWebComponentResize.bind(this)).observe(this.appCanvasContainerElemRef)}_showCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t;n.style.visibility="visible",n.style.transition="opacity 0.5s ease-in-out",n.style.opacity="1"})}_hideCustomViewInYourSpaceButton(){this._getSlottedElements(this.customViewInYourSpaceButtonSlotElem).forEach(t=>{const n=t,i=500;n.style.transition=`opacity ${i/1e3}s ease-in-out`,n.style.opacity="0",setTimeout(()=>n.style.visibility="hidden",i)})}_sendAnalyticsEventsOnModuleLoadStart(){const e=new dD(!1);this._epigraphAnalytics.sendEvent(e)}_sendAnalyticsEventsOnModuleLoadFinish(){const e=this.timeElapsedSinceLoadBegin,t=new AD(!1,e);this._epigraphAnalytics.sendEvent(t);const n=window.epigraph.isSessionWebGL2Compatible();let i;this.viewInYourSpaceManager.canLaunchAr()?i=n?Kh.SUPPORT_TYPE.AR_WEBGL2:Kh.SUPPORT_TYPE.AR:i=n?Kh.SUPPORT_TYPE.QR_WEBGL2:Kh.SUPPORT_TYPE.QR;const r=new Kh(i);this._epigraphAnalytics.sendEvent(r)}_onNewExperienceLoadStart(){this.isLoading=!0,this._loadingProgress=0,this._hideCustomViewInYourSpaceButton(),this.showSplashScreen(),this.hotspotsManager?.activeHotspot&&this.hotspotsManager.closeActiveHotspot(),this._sendAnalyticsEventsOnModuleLoadStart()}_onNewExperienceLoadFinish(){this._onSceneHierarchyUpdate(),this.isLoading=!1,this._showCustomViewInYourSpaceButton(),this._eventsManager.experienceUpdatedEvent.fire(),this._eventsManager.appReadyEvent.fire(),this.productSettings.camera.initial?.skipCameraFit||this.cameraManager.fitCameraToSceneBounds(),this.hideSplashScreen(),setTimeout(()=>{this._isSceneInteractedWith||(this.playInteractionPrompt=!0)},3e3),this._sendAnalyticsEventsOnModuleLoadFinish()}toggleDimensions(){this.dimensionsManager.enabled?this.hideDimensions():this.showDimensions()}_onDimensionsToolControlClick(e){e.stopPropagation(),e.preventDefault();const t=e.target;t.active?this.showDimensions():this.hideDimensions();const n=new xa(xa.BUTTON_TYPE.DIMENSION_TOGGLE,t.id);this._epigraphAnalytics.sendEvent(n)}_onViewInYourSpaceToolControlClick(e){e.stopPropagation(),e.preventDefault();const t=e.target;this.launchAR();const n=new xa(xa.BUTTON_TYPE.AR_VIEW,t.id);this._epigraphAnalytics.sendEvent(n)}async _onSceneHierarchyUpdate(e=!1){if(this.sceneManager.recalculateSceneBounds(),this.featuresToEnable.hotspots&&this._repopulateHotspots(),e)return Promise.resolve([]);await this._cameraManager.fitCameraToSceneBounds()}_renderAppManagers(){return ae`
|
|
18084
18084
|
<div id="appManagersContainer" class="app-managers-container">
|
|
18085
18085
|
${this._renderDimensionsManager()}
|
|
18086
18086
|
|