Lens Scripting API

    Class LightSource

    Acts as a source of light in the scene.

    // Sets the intensity of a light source
    //@input Component.LightSource lightSource

    script.lightSource.intensity = 0.0;

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    autoLightSourcePosition: boolean

    If enabled, the LightSource will be automatically positioned based on its orientation relative to any shadow casting meshes in the scene.

    autoShadowFrustumSize: boolean

    If enabled, shadowFrustumSize will be automatically updated based on its orientation relative to any shadow casting meshes in the scene.

    castsShadows: boolean

    If enabled, the LightSource will be able to cast shadows.

    color: vec3

    The color of the light.

    diffuseEnvmapTexture: Texture

    A color image applied to an imaginary skybox the LightSource will use for color information.

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    envmapExposure: number

    A value used to increase the intensity of light information derived from the diffuseEnvmapTexture exponentially.

    envmapRotation: number

    Controls the amount of rotation applied to the diffuseEnvmapTexture.

    gaussianBlurSigma: number

    Controls the strength of blurring done to shadows cast by this LightSource.

    intensity: number

    The strength of the light on a scale of 0.0 1.0.

    lightType: LightType

    The type of light emitted from this light source.

    renderLayer: LayerSet

    The set of layers this LightSource will affect.

    sceneObject: SceneObject

    The scene object this component is on.

    shadowBlurRadius: number

    Controls the blurring size used when casting shadows from this LightSource.

    shadowColor: vec4

    Controls the color used when casting shadows from this LightSource.

    shadowDensity: number

    The lightness and darkness value of the shadow cast by objects from this light source.

    shadowFrustumFarClipPlane: number

    The maximum distance at which shadows will be calculated for this LightSource.

    shadowFrustumNearClipPlane: number

    The minimum distance at which shadows will be calculated for this LightSource.

    shadowFrustumSize: number

    The simulated distance of the light source from objects to calculate the softness of the shadow.

    specularEnvmapTexture: Texture

    A color image applied to an imaginary skybox the light source will use for specular and reflection information.

    uniqueIdentifier: string
    useEnvmap: boolean

    Enable if you would like the LightSource to use information from the diffuseEnvmapTexture for light color information.

    Methods

    • Destroys the component.

      Returns void

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR