< Zurück | Inhalt | Weiter >

Simple texture image animation for flaming torches


To provide an animated effect for the flaming torch objects, a simple behavior was used to modify the Transform3D within the objects TextureAttributes. Even slight movement of the texture image was found to give quite pleasing results (figure 11.5).

image


Figure 11.5 The texture images used by the KeyNaviagateTest example application. Floor 128 — 128 (1), ceiling 128 x 128 (2), walls 32 — 32 transparent background (3), lights 32 — 32 transparent background (4), bookcases 32 —

32 (5), and water 32 — 32 (6)


The sample’s Light class defines the geometry and simple texture animation behavior for the light. Light is derived from the reusable ComplexObject class (defined in the org.selman.java3d.book package).


 

From Light.java