@epigraph/solutions 1.2.0 → 1.2.1
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.
|
@@ -18311,7 +18311,7 @@ void main() {
|
|
|
18311
18311
|
<div id="appCanvasContainer" class="app-canvas-container">
|
|
18312
18312
|
<span id="cameraAimIndicator" class="camera-aim-indicator hide"></span>
|
|
18313
18313
|
</div>
|
|
18314
|
-
`:_e}getWebComponentName(){return Ud.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.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(Ex.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:MG.AuthenticationFailedError,message:e})
|
|
18314
|
+
`:_e}getWebComponentName(){return Ud.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.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(Ex.MODULE_FAILED_ERRORS.AUTHENTICATION_FAILED,{errorCode:MG.AuthenticationFailedError,message:e})}async setupRenderEngine(){window.epigraph.logger.info({title:"Initiliazing Render Engine",contextOverride:this._loggerContext}),this._renderEngine=new tY(this);const{canvasHtmlElem:e,textRendererElem:t}=await this._renderEngine.setup();this.appCanvasContainerElemRef.appendChild(e),this.appCanvasContainerElemRef.appendChild(t),new ResizeObserver(this.__onWebComponentResize.bind(this)).observe(this.appCanvasContainerElemRef),requestAnimationFrame(()=>{this.__onWebComponentResize()})}_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,s=500;n.style.transition=`opacity ${s/1e3}s ease-in-out`,n.style.opacity="0",setTimeout(()=>n.style.visibility="hidden",s)})}_sendAnalyticsEventsOnModuleLoadStart(){const e=new uL(!1);this._epigraphAnalytics.sendEvent(e)}_sendAnalyticsEventsOnModuleLoadFinish(){const e=this.timeElapsedSinceLoadBegin,t=new dL(!1,e);this._epigraphAnalytics.sendEvent(t);const n=window.epigraph.isSessionWebGL2Compatible();let s;this.viewInYourSpaceManager.canLaunchAr()?s=n?Du.SUPPORT_TYPE.AR_WEBGL2:Du.SUPPORT_TYPE.AR:s=n?Du.SUPPORT_TYPE.QR_WEBGL2:Du.SUPPORT_TYPE.QR;const r=new Du(s);this._epigraphAnalytics.sendEvent(r)}_onNewExperienceLoadStart(){this.isLoading=!0,this._loadingProgress=0,this._hideCustomViewInYourSpaceButton(),this.renderEngine.pauseRendering(this.__isNewExperienceData),this.__isNewExperienceData&&this.variantSwitchMode==="default"&&this.showSplashScreen(),this.hotspotsManager?.activeHotspot&&this.hotspotsManager.closeActiveHotspot(),this._sendAnalyticsEventsOnModuleLoadStart()}async _onNewExperienceLoadFinish(e){this.isLoading=!1,this._showCustomViewInYourSpaceButton();const t=e?"variant":"product";this._eventsManager.experienceUpdatedEvent.fire(),this._eventsManager.appReadyEvent.fire({loadType:t}),this._eventsManager.appReadyEventLegacy.fire({loadType:t}),this.renderEngine.unpauseRendering(),await this._onSceneHierarchyUpdate(),this.hideSplashScreen(),setTimeout(()=>{this._isSceneInteractedWith||(this.playInteractionPrompt=!0)},3e3),this._sendAnalyticsEventsOnModuleLoadFinish(),this.isNewExperienceData&&(this.__isNewExperienceData=!1)}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 $a($a.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 $a($a.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([])}_renderAppManagers(){return re`
|
|
18315
18315
|
<div id="appManagersContainer" class="app-managers-container">
|
|
18316
18316
|
${this._renderDimensionsManager()}
|
|
18317
18317
|
|