Light.addAmbient method


This is a test of the Emergency Filtering Network.
santa with transparent background

Click several times. What do you observe?
To start over, use the Refresh command in your browser.

Ambient light is non-directional. The light is applied equally to the whole object, as though there were parallel rays of light striking perpendicular to the page.
Repeated clicks on "Apply Light.addAmbient" will apply the filter again and again to the object. Each click adds another light source!

The "Disable filter" button just disables the Light filter; it does not, in this case, remove all the light sources you added. I left this one this way to illustrate the problem. Other filter demos will reset the filters so you can play some more.

How many clicks before change is not detectable? [Hint: only 10 light sources can be in a filter at a time!]


What you should see

Clicking once on "Apply Light".
text and santas with 1 ambient light

Clicking twice on "Apply Light"
text and santas with 2 ambient lights

Clicking 9 times on "Apply Light"
text and santas with 9 ambient lights


Syntax & Settings

For example, the text above has the addAmbient method applied when the Apply Light button is clicked using:

efn.filters.light.addAmbient(0,255,255,80);

This adds a colored light, but it is hard to see the effect on the text.

In SCRIPT the addAmbient method is called with a statement like:

object.filters.Light.addAmbient(R,G,B,strength)

object is the ID of the filtered visual object.
R, G, B are the color values for red, green, and blue in the color of the light to be added. Saturation of 0 is lowest and 255 is highest.
Strength is the intensity of the light, ranging apparently from 0 to 100.


More examples

color settings: R,G,B

(0,255,255,80)


original settings

(255,255,0,80)

(255,0,255,80)
Strength settings

(0,255,255,100)

(0,255,255,50)

(0,255,255,20)
To clear filters, please use the Refresh command in your browser.
© 1997-2002 Jan Smith   <jegs1@jegsworks.com>