API Documentation
Classes
- _global_
- GLGE
- GLGE.Action
- GLGE.ActionChannel
- GLGE.Animatable
- GLGE.AnimationCurve
- GLGE.AnimationVector
- GLGE.Assets
- GLGE.BezTriple
- GLGE.Camera
- GLGE.Collada
- GLGE.Document
- GLGE.DocumentPreloader
- GLGE.Events
- GLGE.FilePreloader
- GLGE.FilterAO
- GLGE.FilterGlow
- GLGE.Group
- GLGE.GUI
- GLGE.HeightMap
- GLGE.JSONLoader
- GLGE.KeyInput
- GLGE.Light
- GLGE.LinearPoint
- GLGE.Material
- GLGE.MaterialLayer
- GLGE.MD2
- GLGE.Mesh
- GLGE.Message
- GLGE.MouseInput
- GLGE.MultiMaterial
- GLGE.Object
- GLGE.ObjectLod
- GLGE.ParticleSystem
- GLGE.PhysicsAbstract
- GLGE.PhysicsBox
- GLGE.PhysicsCar
- GLGE.PhysicsConstraintPoint
- GLGE.PhysicsMesh
- GLGE.PhysicsPlane
- GLGE.PhysicsSphere
- GLGE.PhysicsWheel
- GLGE.Placeable
- GLGE.QuickNotation
- GLGE.Renderer
- GLGE.Scene
- GLGE.Sphere
- GLGE.StepPoint
- GLGE.Text
- GLGE.Texture
- GLGE.TextureCamera
- GLGE.TextureCanvas
- GLGE.TextureCube
- GLGE.TextureVideo
- GLGE.Wavefront
- GUI.Gadget
- GUI.Preloader
- GUI.Progressbar
- GUI.Widget
Extends
GLGE.Animatable, GLGE.JSONLoader, GLGE.Placeable, GLGE.QuickNotation.
Creates a new light source to be added to a scene
Defined in: glge_light.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
GLGE.Light(uid)
|
| Field Attributes | Field Name and Description |
|---|---|
|
Dose this light source effect diffuse shading
|
|
|
Dose this light source effect specular shading
|
| Method Attributes | Method Name and Description |
|---|---|
|
getAttenuation(constant, linear, quadratic)
Sets the light sources Attenuation
|
|
|
Gets the shadow buffer width
|
|
|
Gets the shadow buffer width
|
|
|
Gets the number of cascade levels to use for directional shadows
|
|
|
Gets the shadow casting flag
|
|
|
getColor()
Gets the current color of the light source
|
|
|
Gets the shadow casting distance
|
|
|
getNegative(negative)
Gets negative shadow flag
|
|
|
Gets the shadow bias
|
|
|
Gets the number of samples for this shadow
|
|
|
Gets the spot light cut off
|
|
|
Gets the spot light cut off flag
|
|
|
Gets the spot light exponent
|
|
|
Gets the spotlights blur distance in pixels
|
|
|
Gets the softness of the spot shadow
|
|
|
getType()
Gets the type of the light
|
|
|
setAttenuation(constant, linear, quadratic)
Sets the light sources Attenuation
|
|
|
setAttenuationConstant(value)
Sets the light sources constant attenuation
|
|
|
setAttenuationLinear(value)
Sets the light sources linear attenuation
|
|
|
setAttenuationQuadratic(value)
Sets the light sources quadratic attenuation
|
|
|
setBufferHeight(value)
Sets the shadow buffer width
|
|
|
setBufferWidth(value)
Sets the shadow buffer width
|
|
|
setCascadeLevels(cascadeLevels)
Sets the number of cascade levels for directions shadows
|
|
|
setCastShadows(value)
Sets the shadow casting flag
|
|
|
setColor(color)
Sets the color of the light source
|
|
|
setColorB(value)
Sets the blue color of the light source
|
|
|
setColorG(value)
Sets the green color of the light source
|
|
|
setColorR(value)
Sets the red color of the light source
|
|
|
setDistance(distance)
Sets the shadow casting flag
|
|
|
setNegativeShadow(negative)
Sets negative shadow flag
|
|
|
setShadowBias(value)
Sets the shadow bias
|
|
|
setShadowSamples(value)
Sets the number of samples for this shadow
|
|
|
setShadowSoftness(value)
Sets the shadow softness
|
|
|
setSpotCosCutOff(value)
Sets the spot light cut off
|
|
|
setSpotCutOff(value)
Sets the spot light cut off true results in circle spot light otherwise square
|
|
|
setSpotExponent(value)
Sets the spot light exponent
|
|
|
setSpotSoftDistance(spotSoftnessDistance)
Sets the spotlights variance cutoff used to reduce light bleed
|
|
|
setSpotSoftness(spotSoftness)
Sets the softness of the spot shadow
|
|
|
setType(type)
Sets the type of the light
|
- Methods borrowed from class GLGE.Animatable:
- animate, blendTo, getAnimation, getBlendFunction, getFrameNumber, getFrameRate, getLoop, getName, getPaused, isLooping, setAnimation, setBlendFunction, setFrameRate, setLoop, setName, setPaused, setStartFrame, togglePaused
- Methods borrowed from class GLGE.Events:
- addEventListener, fireEvent, removeEventListener
- Methods borrowed from class GLGE.Placeable:
- clearStaticMatrix, getDLocX, getDLocY, getDLocZ, getDRotX, getDRotY, getDRotZ, getDScaleX, getDScaleY, getDScaleZ, getId, getInverseModelMatrix, getLocalMatrix, getLocX, getLocY, getLocZ, getLookat, getModelMatrix, getPosition, getQuatW, getQuatX, getQuatY, getQuatZ, getRef, getRoot, getRotation, getRotMatrix, getRotOrder, getRotX, getRotY, getRotZ, getScale, getScaleMatrix, getScaleX, getScaleY, getScaleZ, getTranslateMatrix, getTransposeInverseModelMatrix, getTransposeModelMatrix, getUpAxis, Lookat, move, setDLoc, setDLocX, setDLocY, setDLocZ, setDRot, setDRotX, setDRotY, setDRotZ, setDScale, setDScaleX, setDScaleY, setDScaleZ, setId, setLoc, setLocX, setLocY, setLocZ, setLookat, setQuat, setQuatW, setQuatX, setQuatY, setQuatZ, setRot, setRotMatrix, setRotOrder, setRotX, setRotY, setRotZ, setScale, setScaleX, setScaleY, setScaleZ, setStaticMatrix, setTransformMode, setUpAxis
- Methods borrowed from class GLGE.QuickNotation:
- _
- Methods borrowed from class GLGE.JSONLoader:
- getDownloadPriority, setDownloadPriority, setJSONSrc, setJSONString
| Event Attributes | Event Name and Description |
|---|---|
|
shaderupdate(data)
|
- Events borrowed from class GLGE.Animatable:
- animFinished
- Events borrowed from class GLGE.Placeable:
- appened, childMatrixUpdate, matrixUpdate, removed
Field Detail
{Boolean}
diffuse
Dose this light source effect diffuse shading
{Boolean}
specular
Dose this light source effect specular shading
Method Detail
disableLight()
enableLight()
{Object}
getAttenuation(constant, linear, quadratic)
Sets the light sources Attenuation
- Parameters:
- constant
- linear
- quadratic
- Returns:
- {Object} The components of the light sources attenuation
{number}
getBufferHeight()
Gets the shadow buffer width
- Returns:
- {number} The shadow buffer width
{number}
getBufferWidth()
Gets the shadow buffer width
- Returns:
- {number} The shadow buffer width
{number}
getCascadeLevels()
Gets the number of cascade levels to use for directional shadows
- Returns:
- {number} the number of cascades
{number}
getCastShadows()
Gets the shadow casting flag
- Returns:
- {number} true if casts shadows
{[r|g|b]}
getColor()
Gets the current color of the light source
- Returns:
- {[r|g|b]} The current position
{number}
getDistance()
Gets the shadow casting distance
- Returns:
- {number} distance
getNegative(negative)
Gets negative shadow flag
- Parameters:
- {boolean} negative
- shadow
{number}
getShadowBias()
Gets the shadow bias
- Returns:
- {number} The shadow buffer bias
{number}
getShadowSamples()
Gets the number of samples for this shadow
- Returns:
- {number} The number of samples
{number}
getSpotCosCutOff()
Gets the spot light cut off
- Returns:
- {number} The cos of the limiting angle
{number}
getSpotCutOff()
Gets the spot light cut off flag
- Returns:
- {number} The spot cutoff flag
{number}
getSpotExponent()
Gets the spot light exponent
- Returns:
- {number} The exponent of the spot light
{Number}
getSpotSoftDistance()
Gets the spotlights blur distance in pixels
- Returns:
- {Number} The blur distance for spot lights
{Number}
getSpotSoftness()
Gets the softness of the spot shadow
- Returns:
- {Number} The type of the light source eg GLGE.L_POINT
{Number}
getType()
Gets the type of the light
- Returns:
- {Number} The type of the light source eg GLGE.L_POINT
setAttenuation(constant, linear, quadratic)
Sets the light sources Attenuation
- Parameters:
- {Number} constant
- The constant part of the attenuation
- {Number} linear
- The linear part of the attenuation
- {Number} quadratic
- The quadratic part of the attenuation
setAttenuationConstant(value)
Sets the light sources constant attenuation
- Parameters:
- {Number} value
- The constant part of the attenuation
setAttenuationLinear(value)
Sets the light sources linear attenuation
- Parameters:
- {Number} value
- The linear part of the attenuation
setAttenuationQuadratic(value)
Sets the light sources quadratic attenuation
- Parameters:
- {Number} value
- The quadratic part of the attenuation
setBufferHeight(value)
Sets the shadow buffer width
- Parameters:
- {number} value
- The shadow buffer width
setBufferWidth(value)
Sets the shadow buffer width
- Parameters:
- {number} value
- The shadow buffer width
setCascadeLevels(cascadeLevels)
Sets the number of cascade levels for directions shadows
- Parameters:
- {number} cascadeLevels
- The number of cascade levels(higher slower better quailty)
setCastShadows(value)
Sets the shadow casting flag
- Parameters:
- {number} value
- should cast shadows?
setColor(color)
Sets the color of the light source
- Parameters:
- {string} color
- The color of the light
setColorB(value)
Sets the blue color of the light source
- Parameters:
- {Number} value
- The new blue level 0-1
setColorG(value)
Sets the green color of the light source
- Parameters:
- {Number} value
- The new green level 0-1
setColorR(value)
Sets the red color of the light source
- Parameters:
- {Number} value
- The new red level 0-1
setDistance(distance)
Sets the shadow casting flag
- Parameters:
- {number} distance
setNegativeShadow(negative)
Sets negative shadow flag
- Parameters:
- {boolean} negative
- shadow
setShadowBias(value)
Sets the shadow bias
- Parameters:
- {number} value
- The shadow bias
setShadowSamples(value)
Sets the number of samples for this shadow
- Parameters:
- {number} value
- The number of samples to perform
setShadowSoftness(value)
Sets the shadow softness
- Parameters:
- {number} value
- The number of samples to perform
setSpotCosCutOff(value)
Sets the spot light cut off
- Parameters:
- {number} value
- The cos of the angle to limit
setSpotCutOff(value)
Sets the spot light cut off true results in circle spot light otherwise square
- Parameters:
- {number} value
- The spot cutoff flag
setSpotExponent(value)
Sets the spot light exponent
- Parameters:
- {number} value
- The spot lights exponent
setSpotSoftDistance(spotSoftnessDistance)
Sets the spotlights variance cutoff used to reduce light bleed
- Parameters:
- {Number} spotSoftnessDistance
- the spotlights variance cutoff
setSpotSoftness(spotSoftness)
Sets the softness of the spot shadow
- Parameters:
- {Number} spotSoftness
- The type of the light source eg GLGE.L_POINT
setType(type)
Sets the type of the light
- Parameters:
- {Number} type
- The type of the light source eg GLGE.L_POINT
Event Detail
shaderupdate(data)
- Parameters:
- {object} data
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)