Preparing search index...

    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)

    Index

    Properties

    autoLightSourcePosition: boolean

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

    false
    
    autoShadowFrustumSize: boolean

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

    false
    
    castsShadows: boolean

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

    Use LightSource.shadowType instead.

    false
    
    color: vec3

    The color of the light.

    (1, 1, 1)
    
    diffuseEnvmapTexture: Texture

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

    null
    
    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    true
    
    envmapExposure: number

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

    1
    
    envmapRotation: number

    Controls the amount of rotation applied to the diffuseEnvmapTexture.

    0
    
    falloffRange: number

    The distance (in cm) at which the light’s intensity reaches 0.0. Use any value that is larger than 100m (10000cm) for a limitless range and better performance (see FalloffType.Quadratic).

    Infinity
    
    falloffType: FalloffType

    The falloff type of the light.

    Lens Scripting Version 341

    FalloffType.None
    
    gaussianBlurSigma: number

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

    Use LightSource#shadowBlurRadius instead.

    -1
    
    intensity: number

    The intensity of the light.

    1
    
    isBeingDestroyed: boolean

    Returns true if this Component is currently being destroyed. Becomes true as soon as destruction begins via Component#destroy or destruction of its owning SceneObject, before any OnDestroyEvent callbacks fire.

    Lens Scripting Version 364

    if (!script.isBeingDestroyed) {
    // Component is still fully alive
    }
    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    lightType: LightType

    The type of light emitted from this light source.

    Lens Scripting Version 300

    LightType.Point
    
    renderLayer: LayerSet

    The set of layers this LightSource will affect.

    LayerSet.all()
    
    sceneObject: SceneObject

    The SceneObject this component is on.

    shadowBlurRadius: number

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

    0
    
    shadowColor: vec4

    Controls the color used when casting shadows from this LightSource.

    (0, 0, 0, 0)
    
    shadowDensity: number

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

    1
    
    shadowFrustumFarClipPlane: number

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

    1000
    
    shadowFrustumNearClipPlane: number

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

    1
    
    shadowFrustumSize: number

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

    30
    
    shadowType: ShadowType

    Control whether this light can cast shadows, and what techique to use: Projective or Shadow Map.

    Lens Scripting Version 307

    ShadowType.None
    
    specularEnvmapTexture: Texture

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

    null
    
    uniqueIdentifier: string

    Lens Scripting Version 176

    useEnvmap: boolean

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

    false
    

    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