FMX.AnimationDemo3D Sample

From RAD Studio Code Examples
Jump to: navigation, search

Language:

Versions:

This sample illustrates how to create 3D animations using FireMonkey.

Contents

Location

You can find the AnimationDemo3D sample project at:

Description

This application uses several visual objects on a form and animates each of them with TColorAnimation and TFloatAnimation.

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio XE3 > Samples and open AnimationDemo3D.dproj.
  2. Press F9 or choose Run > Run.

Classes

FireMonkey 3D Animation is a TForm3D and represents the main window of the sample. It contains the following components:

Implementation

  • The first FloatAnimation is related to the second Sphere's Opacity property.
  • The second FloatAnimation is subordinated to the StrokeCube, relating to its RotationAngle.Y property.
  • The RoundCube handles the third FloatAnimation through the Position.Z property.
  • The first Sphere relates to the ColorAnimations, both of them being used for the Material.Diffuse property. IsMouseOver triggers the animations.
  • The ObjectLayer contains a 2D animation of a RoundRect on a sinusoidal path.
  • The Text3D object is animated by the fourth FloatAnimation through the RotationAngle.X property.

Note: The entire project is implemented at design time, using the Tool Palette and the Object Inspector.

Uses

See Also

Personal tools