@epigraph/solutions 0.16.0 → 0.17.0-alpha
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.
|
@@ -5310,6 +5310,7 @@ ${l.join(`
|
|
|
5310
5310
|
font-weight: 400;
|
|
5311
5311
|
line-height: 32px;
|
|
5312
5312
|
letter-spacing: -0.5px;
|
|
5313
|
+
width: calc(100% - 32px);
|
|
5313
5314
|
}
|
|
5314
5315
|
|
|
5315
5316
|
.subhead-text {
|
|
@@ -8362,8 +8363,8 @@ void main() {
|
|
|
8362
8363
|
25% {
|
|
8363
8364
|
transform: translateX(-60px);
|
|
8364
8365
|
}
|
|
8365
|
-
|
|
8366
|
-
transform: translateX(
|
|
8366
|
+
65% {
|
|
8367
|
+
transform: translateX(40px);
|
|
8367
8368
|
}
|
|
8368
8369
|
100% {
|
|
8369
8370
|
transform: translateX(0px);
|
|
@@ -8472,7 +8473,7 @@ void main() {
|
|
|
8472
8473
|
opacity: 0;
|
|
8473
8474
|
pointer-events: none;
|
|
8474
8475
|
}
|
|
8475
|
-
`]}static setupWebComponent(){window.customElements.get(eu.webComponentName)||window.customElements.define(eu.webComponentName,eu)}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 appEvents(){return this._appEvents}get canvasSize(){return this.__canvasSize}get assetLoaders(){return this._assetLoaders}get assetManager(){return this._assetManager}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.pickerState=!0}exitPickerState(){this.pickerState=!1}renderScreenshotCanvasFrame(){this.renderEngine.screenshotRenderer.render(this.renderEngine.scene,this.cameraManager.cameras.screenshot)}onLoadFailed(e,t){this._appEvents.appFailedEvent.fire(t);const i=this.timeElapsedSinceLoadBegin,a=new V_(!0,i,e);this._epigraphAnalytics.sendEvent(a),this.showSplashScreen()}getPositionOnMeshFromPoint(e,t){const i=new q0,a=new Ve;a.x=e/this.canvasSize.width*2-1,a.y=-(t/this.canvasSize.height)*2+1,i.setFromCamera(a,this.cameraManager.cameras.main);const l=i.intersectObjects(this.renderEngine.sceneHierarchy.sceneStructure.children,!0);
|
|
8476
|
+
`]}static setupWebComponent(){window.customElements.get(eu.webComponentName)||window.customElements.define(eu.webComponentName,eu)}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 appEvents(){return this._appEvents}get canvasSize(){return this.__canvasSize}get assetLoaders(){return this._assetLoaders}get assetManager(){return this._assetManager}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.pickerState=!0}exitPickerState(){this.pickerState=!1}renderScreenshotCanvasFrame(){this.renderEngine.screenshotRenderer.render(this.renderEngine.scene,this.cameraManager.cameras.screenshot)}onLoadFailed(e,t){this._appEvents.appFailedEvent.fire(t);const i=this.timeElapsedSinceLoadBegin,a=new V_(!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}getPositionOnMeshFromPoint(e,t){const i=new q0,a=new Ve;a.x=e/this.canvasSize.width*2-1,a.y=-(t/this.canvasSize.height)*2+1,i.setFromCamera(a,this.cameraManager.cameras.main);const l=i.intersectObjects(this.renderEngine.sceneHierarchy.sceneStructure.children,!0);if(l.length>0){const u=this.getFirstNonProxyFromIntersections(l);return u===null?null:u.point}else return null}getSceneSphericalBoundsForCameraFocus(){const e=this.dimensionsManager.getCurrentSceneBounds();return e.getCenter(this._boundingSphereCenter),e.getBoundingSphere(new yn(this._boundingSphereCenter))}async getUsdzUrlForAr(){return this.hasSceneChanged?this.__usdzBlobUrl=await this.renderEngine.getSceneAsUsdzUrl():window.epigraph.logger.info({title:"Reusing cached USDZ for AR."}),this.appEvents.arModelReadyEvent.fire(this.__usdzBlobUrl),this.__usdzBlobUrl}async getGlbUrlForAr(){return this.hasSceneChanged?this.__glbBlobUrl=await this.renderEngine.getSceneAsGlbUrl():window.epigraph.logger.info({title:"Reusing cached GLB for AR."}),this.appEvents.arModelReadyEvent.fire(this.__glbBlobUrl),{glbSrc:this.__glbBlobUrl,variantName:null}}async launchAR(){if(!this.isLoading)return await this.viewInYourSpaceManager.launchAR()}async spawnProductInScene(e){const t=new RC(e);return this.renderEngine.sceneHierarchy.sceneStructure.add(t),await this._onSceneHierarchyUpdate(),Promise.resolve(t)}showDimensions(){this.dimensionsManager.enabled=!0,this.areDimensionsActive=!0,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled);const e=this.getSceneSphericalBoundsForCameraFocus();e.radius=e.radius*1.4,this.cameraManager.fitCameraToObject({objectToFocus:e})}hideDimensions(e=!1){if(this.dimensionsManager.enabled=!1,this.areDimensionsActive=!1,this.renderEngine.setDimensionsVisibility(this.dimensionsManager.enabled),!e){const t=this.getSceneSphericalBoundsForCameraFocus();this.cameraManager.fitCameraToObject({objectToFocus:t})}}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.appEvents.hotspotsVisibilityChanged.fire({visible:!0})}hideHotspots(){window.epigraph.logger.info({title:"Hiding Hotspots"}),this.areHotspotsActive=!1,this.appEvents.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)}createHotspots(e){this.hotspotsManager.createHotspots(e)}updateHotspots(e){this.hotspotsManager.updateHotspots(e)}removeHotspots(e){this.hotspotsManager.removeHotspots(e)}async __onPlayInteractionPrompt(e=2){this.showCameraInteractionPromptIndicator(),await Ft.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.getFirstEntity();return e?e.getAllAnimations():[]}getAllAnimationNames(){const e=this.sceneManager.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 u=this.getAllAnimationNames();if(!u.includes(e)){window.epigraph.logger.warn({title:`Invalid animation name: ${e}. Expand for a list of valid names`,details:u});return}const d=u.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?ka:yl,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.sceneManager.getFirstEntity().getAnimationMixer()?.update(e),this.renderEngine.mainRenderer.render(this.renderEngine.scene,this.cameraManager.cameras.main)}catch(t){return t}}getScreenPositionFromWorld(e){const t=new Ve,i=this.cameraManager.cameras.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`
|
|
8476
8477
|
<div id="appCanvasContainer" class="app-canvas-container">
|
|
8477
8478
|
<span id="cameraAimIndicator" class="camera-aim-indicator hide"></span>
|
|
8478
8479
|
</div>
|