-
Notifications
You must be signed in to change notification settings - Fork 25
Lights
Christian Schlinkmann edited this page Oct 26, 2015
·
1 revision
xml3d.js has three predefined light models:
A simple point light with attenuation.
- URN
- urn:xml3d:light:point
- Supported parameters
Name | Type | Default | Description |
---|---|---|---|
intensity | <float3> | 1 1 1 | The RGB intensity of the point light. |
attenuation | <float3> | 0 0 1 | The attenuation of the point light given as its constant, linear, e.g quadratic component. |
The point light derives its position from the position of the referencing light element.
A simple directional light.
- URN
- urn:xml3d:light:directional
- Supported parameters
Name | Type | Default | Description |
---|---|---|---|
intensity | <float3> | 1 1 1 | The RGB intensity of the directional light. |
The directional light derives its direction from the orientation of the referencing light element. The default orientation is along the negative z-axis.
A simple spot light.
- URN
- urn:xml3d:light:spot
- Supported parameters
Name | Type | Default | Description |
---|---|---|---|
intensity | <float3> | 1 1 1 | The RGB intensity of the directional light. |
attenuation | <float3> | 0 0 1 | The attenuation of the point light given as its constant, linear, e.g quadratic component. |
cutOffAngle | <float> | Math.PI/4 | Spot angle in radians. Controls the size of the outer cone of a spot light, i.e. the circular area a spot light covers. |
softness | <float> | 0 | Softness of the spot light in the range [0;1]. |
Custom light models are not yet available.