Skip to main content

Editor.Components.EnvmapFromCameraMode

Enum

The same entity as in Lens Scripting.

Index

Enumeration Members

Example

const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;

// Create a LightSource of type EnvMap and set envmap from camera mode
const obj = scene.createSceneObject('EnvLight');
const light = obj.addComponent('LightSource');
light.lightType = Editor.Components.LightType.EnvMap;
light.useEnvmapFromCamera = true;
light.envmapFromCameraMode = Editor.Components.EnvmapFromCameraMode.Face;
console.log(`envmapFromCameraMode: ${light.envmapFromCameraMode}`);

Enumeration Members

Auto

Auto: number

Automatically select environment map source based on context.


Face

Face: number

Generate environment map from the face camera.


Surface

Surface: number

Generate environment map from the surface camera.

See also

Editor.Components.LightSource.