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: [
{ id: 'SKU', name: 'COLOR NAME', image: 'URL_TO_IMAGE_OF_MATERIAL' },
{ id: 'SKU', name: 'COLOR NAME', image: 'URL_TO_IMAGE_OF_MATERIAL' },
...
]
Default lenses
The following SKUs are default tinted lenses available for everyone:
- Simple colors:
Sample_BlackSample_BlueSample_BrownSample_GreenSample_GreySample_Purple
- Metallic mirror-like colors:
Sample_MirrorBlackSample_MirrorBrownSample_MirrorGreenSample_MirrorGreySample_MirrorGreyBrownSample_MirrorPurple
- Photochromatic colors:
Sample_PhotochromaticBrownSample_PhotochromaticGreenSample_PhotochromaticGrey