EpigraphViewerApi

Constructors

Constructor

new EpigraphViewerApi(appWcRef): EpigraphViewerApi

Methods

areDimensionsVisible()

areDimensionsVisible(): boolean

Checks if the dimensions are currently visible.

Returns

boolean

true if the dimensions are visible, otherwise false.

Implementation of

IFeatureDimensions.areDimensionsVisible


canLaunchAR()

canLaunchAR(): boolean

Checks if the current device and browser support launching an AR session.

Returns

boolean

true if AR can be launched, otherwise false.

Implementation of

IFeatureViewInYourSpace.canLaunchAR

Inherited from

EpigraphButtonApi.canLaunchAR


disableCameraZoomLimits()

disableCameraZoomLimits(): void

Disables the camera zoom limits, allowing for infinite zoom in and out.

Returns

void

Implementation of

IFeatureCameraControls.disableCameraZoomLimits


getCameraFocalLength()

getCameraFocalLength(): number

Gets the current camera focal length.

Returns

number

The current camera focal length.

Implementation of

IFeatureCameraControls.getCameraFocalLength


getCameraRotation()

getCameraRotation(): ICameraRotationConfig

Gets the current camera rotation in terms of azimuth and polar angles.

Returns

ICameraRotationConfig

The current camera rotation.

Implementation of

IFeatureCameraControls.getCameraRotation


getCameraTransforms()

getCameraTransforms(): ICameraStateConfig

Gets the current camera position and target.

Returns

ICameraStateConfig

The current camera transforms.

Implementation of

IFeatureCameraControls.getCameraTransforms


getDimensions()

getDimensions(): object

Gets the dimensions of the product.

Returns

object

The dimensions of the product.

height

height: number = currentDimensions.height.distance

length

length: number = currentDimensions.length.distance

unit

unit: DistanceUnits = dimensionsUnit

width

width: number = currentDimensions.width.distance

Implementation of

IFeatureDimensions.getDimensions


getIntersectionOnProductFromPoint()

getIntersectionOnProductFromPoint(clientX, clientY): IAssetInterrsectionDetails | null

Gets detailed information about the intersection of a ray cast from a screen point with the product.

Parameters

clientX

number

The x-coordinate of the point on the screen.

clientY

number

The y-coordinate of the point on the screen.

Returns

IAssetInterrsectionDetails | null

The intersection details, or null if there is no intersection.

Implementation of

IFeatureViewer.getIntersectionOnProductFromPoint


getMinimumRequirementsString()

getMinimumRequirementsString(): string

Gets a string describing the minimum requirements for the AR feature.

Returns

string

A string with the minimum requirements.

Implementation of

IFeatureViewInYourSpace.getMinimumRequirementsString

Inherited from

EpigraphButtonApi.getMinimumRequirementsString


getPositionOnMeshFromPoint()

getPositionOnMeshFromPoint(clientX, clientY): Vector3 | null

Gets the 3D position on the mesh corresponding to a 2D point on the screen.

Parameters

clientX

number

The x-coordinate of the point on the screen.

clientY

number

The y-coordinate of the point on the screen.

Returns

Vector3 | null

The 3D position on the mesh, or null if there is no intersection.

Implementation of

IFeatureViewer.getPositionOnMeshFromPoint


getSceneAnimations()

getSceneAnimations(): ISceneAnimations

Gets the available animations for the scene.

Returns

ISceneAnimations

The available scene animations.

Implementation of

IFeatureAnimations.getSceneAnimations


getViewInYourSpaceQR()

getViewInYourSpaceQR(): Promise<string>

Beta

Gets the QR code for the "View in Your Space" feature.

Returns

Promise<string>

A promise that resolves with the QR code data. Currently returns an empty string.

Implementation of

IFeatureViewInYourSpace.getViewInYourSpaceQR

Inherited from

EpigraphButtonApi.getViewInYourSpaceQR


getViewInYourSpaceUrl()

getViewInYourSpaceUrl(): Promise<string>

Beta

Gets the URL for the "View in Your Space" feature.

Returns

Promise<string>

A promise that resolves with the URL string. Currently returns an empty string.

Implementation of

IFeatureViewInYourSpace.getViewInYourSpaceUrl

Inherited from

EpigraphButtonApi.getViewInYourSpaceUrl


hideDimensions()

hideDimensions(): void

Hides the dimensions of the product.

Returns

void

Implementation of

IFeatureDimensions.hideDimensions


hideHelp()

hideHelp(): void

Hides the help dialog.

Returns

void

Implementation of

IFeatureHelp.hideHelp


highlightEntityByAssetId()

highlightEntityByAssetId(assetId): void

Highlights an entity in the scene by its asset ID.

Parameters

assetId

number

The ID of the asset to highlight.

Returns

void

Implementation of

IFeatureViewer.highlightEntityByAssetId


isARSessionActive()

isARSessionActive(): boolean

Checks if an AR session is currently active.

Returns

boolean

true if an AR session is active, otherwise false.

Implementation of

IFeatureViewInYourSpace.isARSessionActive

Inherited from

EpigraphButtonApi.isARSessionActive


isHelpVisible()

isHelpVisible(): boolean

Checks if the help dialog is currently visible.

Returns

boolean

true if the help dialog is visible, otherwise false.

Implementation of

IFeatureHelp.isHelpVisible


launchAR()

launchAR(): Promise<boolean | undefined>

Launches the Augmented Reality (AR) experience.

Returns

Promise<boolean | undefined>

A promise that resolves when the AR session is launched.

Implementation of

IFeatureViewInYourSpace.launchAR

Inherited from

EpigraphButtonApi.launchAR


pauseActiveAnimations()

pauseActiveAnimations(time?): void

Pauses all active animations.

Parameters

time?

number

The time at which to pause the animations.

Returns

void

Implementation of

IFeatureAnimations.pauseActiveAnimations


playAnimationByNameAndId()

playAnimationByNameAndId(options): void

Plays an animation by name and asset ID.

Parameters

options

IAnimationPlaybackOptions

The options for playing the animation.

Returns

void

Implementation of

IFeatureAnimations.playAnimationByNameAndId


resumeActiveAnimations()

resumeActiveAnimations(): void

Resumes all paused animations.

Returns

void

Implementation of

IFeatureAnimations.resumeActiveAnimations


selectFinishForAsset()

selectFinishForAsset(finishId, assetName): Promise<boolean>

Selects a finish for a specific asset in the scene.

Parameters

finishId

string

The ID of the finish to apply.

assetName

string

The name of the asset to apply the finish to.

Returns

Promise<boolean>

A promise that resolves to true if the finish was applied successfully, otherwise false.

Implementation of

IFeatureScene.selectFinishForAsset

Inherited from

EpigraphButtonApi.selectFinishForAsset


setCameraFocalLength()

setCameraFocalLength(focalLength): void

Sets the camera focal length.

Parameters

focalLength

number

The new focal length.

Returns

void

Implementation of

IFeatureCameraControls.setCameraFocalLength


setCameraRotation()

setCameraRotation(rotationConfig, transition?): Promise<void>

Rotates the camera to a new location.

Parameters

rotationConfig

ICameraRotationConfig

The new rotation configuration.

transition?

boolean

Whether to animate the camera movement.

Returns

Promise<void>

A promise that resolves when the camera has finished rotating.

Implementation of

IFeatureCameraControls.setCameraRotation


setCameraTransforms()

setCameraTransforms(newCameraTransformsConfig): void

Moves the camera to a new position and target.

Parameters

newCameraTransformsConfig

ICameraStateConfig

The new camera transforms.

Returns

void

Implementation of

IFeatureCameraControls.setCameraTransforms


setCameraZoomLimits()

setCameraZoomLimits(limits): void

Sets the minimum and maximum zoom distance for the camera.

Parameters

limits

An object containing the minimum and maximum distance.

maxDistance?

number

The maximum zoom distance.

minDistance?

number

The minimum zoom distance.

Returns

void

Implementation of

IFeatureCameraControls.setCameraZoomLimits


showDimensions()

showDimensions(): void

Shows the dimensions of the product.

Returns

void

Implementation of

IFeatureDimensions.showDimensions


showHelp()

showHelp(): void

Shows the help dialog.

Returns

void

Implementation of

IFeatureHelp.showHelp


stopAllAnimations()

stopAllAnimations(): void

Stops all animations.

Returns

void

Implementation of

IFeatureAnimations.stopAllAnimations


stopAnimationByNameAndAssetId()

stopAnimationByNameAndAssetId(animationName, assetId): void

Stops an animation by name and asset ID.

Parameters

animationName

string

The name of the animation to stop.

assetId

number

The ID of the asset whose animation should be stopped.

Returns

void

Implementation of

IFeatureAnimations.stopAnimationByNameAndAssetId


toggleDimensions()

toggleDimensions(): void

Toggles the visibility of the dimensions.

Returns

void

Todo

Implement the logic for this method.

Implementation of

IFeatureDimensions.toggleDimensions


toggleHelp()

toggleHelp(): void

Toggles the visibility of the help dialog.

Returns

void

Implementation of

IFeatureHelp.toggleHelp


unhighlightAllEntities()

unhighlightAllEntities(): void

Removes all highlights from entities in the scene.

Returns

void

Implementation of

IFeatureViewer.unhighlightAllEntities


viewInYourSpace()

viewInYourSpace(): Promise<boolean | undefined>

An alias for the launchAR method. Launches the "View in Your Space" (AR) experience.

Returns

Promise<boolean | undefined>

A promise that resolves when the AR session is launched.

Implementation of

IFeatureViewInYourSpace.viewInYourSpace

Inherited from

EpigraphButtonApi.viewInYourSpace