View Issue Details

IDProjectCategoryView StatusLast Update
0000050Gorilla3DBug Reportspublic2019-12-04 10:22
Reporteradministrator Assigned Toadministrator  
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version0.8.1.x 
Target Version0.8.1.xFixed in Version0.8.1.x 
Summary0000050: TPoint3DKeyAnimation, TVector3DKeyAnimation, TTransformationKey, TCoordinateKeyAnimation not useable as standalone animations
DescriptionBecause TPoint3DKeyAnimation, TVector3DKeyAnimation, TTransformationKey and TCoordinateKeyAnimation are not useable as standalone animations to animate property values outside of TGorillaAnimation.
TagsNo tags attached.
Delphi-Version
OpenGLVersionOpenGL 4.6

Activities

administrator

2019-12-04 10:22

administrator   ~0000035

Fixed. And no need anymore to call AddElement() anymore.
The animation-types are now able to handle default FMX behaviour (only be set parent) and extended Gorilla3D behaviour, where we can add multiple components to be manipulated (AddElement)

Case #1 (default FMX behaviour)
<code>
  FAnim := Gorilla.Animation.TPoint3DKeyAnimation.Create(FViewport);
  FAnim.Parent := FAim;
  FAnim.Duration := 2;

  // add keys
  FAnim.Keys.Clear();

  // start key
  LKey := FAnim.Keys.Add() as TPoint3DKey;
  LKey.Key := 0;
  LKey.SetDefaultValue(FCurrentPoint3D);

  // end key
  LKey := FAnim.Keys.Add() as TPoint3DKey;
  LKey.Key := 1;
  LKey.SetDefaultValue(FDestPoint3D);
</code>

OR alternativly use multiple elements:
<code>
  FAnim := Gorilla.Animation.TPoint3DKeyAnimation.Create(FViewport);
  FAnim.Parent := FAim;
  FAnim.Duration := 2;
  FAnim.AddElement(FAim);
  FAnim.AddElement(FAim2);

  // add keys
  FAnim.Keys.Clear();

  // start key
  LKey := FAnim.Keys.Add() as TPoint3DKey;
  LKey.Key := 0;
  LKey.SetDefaultValue(FCurrentPoint3D);
  LKey.SetValue(FAim, FCurrentPoint3D_1);
  LKey.SetValue(FAim2, FCurrentPoint3D_2);

  // end key
  LKey := FAnim.Keys.Add() as TPoint3DKey;
  LKey.Key := 1;
  LKey.SetDefaultValue(FDestPoint3D);
  LKey.SetValue(FAim, FDestPoint3D_1);
  LKey.SetValue(FAim2, FDestPoint3D_2);
</code>

"SetDefaultValue" works as fallback value, which can be set or not!
In case you don't set a value for Aim2 it will detect the default value.

Issue History

Date Modified Username Field Change
2019-12-04 10:15 administrator New Issue
2019-12-04 10:15 administrator Status new => assigned
2019-12-04 10:15 administrator Assigned To => administrator
2019-12-04 10:22 administrator Status assigned => resolved
2019-12-04 10:22 administrator Resolution open => fixed
2019-12-04 10:22 administrator Fixed in Version => 0.8.1.x
2019-12-04 10:22 administrator Note Added: 0000035