Canvas Library

shadowOnly Library Method

Short Description: Control display of shadows on transition

Signature: t.shadowOnly ([enable])
Group: Light and Shadow
Class: transition Class

If enabled (enable=true or missing) then only the shadows on the element are drawn, not the element itself. The idea is that the user makes sure that the element itself is drawn using HTML+CSS while taccgl™ draws just the shadows on top of that.

Note that in contrast to castShadow, which controlls the shadows casted by this transition on other transitions, shadowOnly controlls the shadows other elements or objects cast on this transition.

Using LightAmbDiff and lightBgAmbDiff the color of the shadow can be controlled.

The color and texture of the element becomes almost irrelevant, since only the shadow but not the element is drawn. The texture is however relevant in so far as no shadow is drawn where the texture is transparent while there is no or a transparent background color given. If on the other hand a non-transparent color is given, then shadows are shown throughout the animated element and the texture becomes completely irrelevant.


WebGL™ is a trademark of the Khronos Group Inc.

Next Page:transition.castShadow - Control casting of shadows on other transitions
Previous Page: transition.specLight - Set specular light factor and shininess
Please Add a Comment or Question, click here!