API Reference - Lens Simulator

List of all the existing methods and parameters of the Lens Simulator module

Instance methods

restoreLensDefaultMaterial(): void
Unapplies a lens material and restores the original lens for the current frames displayed in VTO.

setExposureLevel(level: number): void
Sets the exposure level for photochromic lenses.
`level` is a numerical value between 0 and 100.

setLensMaterial(material: string): void
Applies a lens material on the current frames displayed in VTO.
material is the SKU identifier of the material to apply.

Instantiation parameters

materials: object
Pre-loads a list of materials and displays a generic material selection toolbar in the VTO.
The value is an object with the following structure: 

materials : {
materials: [
{ name: 'SKU', image: 'URL_TO_IMAGE_OF_MATERIAL' },
...
]
}

Default lenses

The following SKUs are default tinted lenses available for everyone:

  • Sample_Black, Sample_Blue, Sample_Brown, Sample_Green, Sample_Grey, Sample_Purple

Example