Skip to main content

Editor.Model.LensApplicability

Enum

The various contexts in which this Lens can be used.

Index

Enumeration Members

Example

// LensApplicability controls which cameras the Lens is available on.
// It is set on project.metaInfo.lensApplicability as an array.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const metaInfo = model.project.metaInfo;

// Restrict Lens to the front camera only
metaInfo.lensApplicability = [Editor.Model.LensApplicability.Front];
console.log('Lens available on front camera only');

// Allow Lens on both cameras
metaInfo.lensApplicability = [
Editor.Model.LensApplicability.Front,
Editor.Model.LensApplicability.Back,
];
console.log('Lens available on front and back cameras');

Enumeration Members

Back

Back: number

Lens is usable on the back camera.


Front

Front: number

Lens is usable on the front camera.