Animation Keypaths

 

Animation Keypaths

Different layer types have different supported animation keypaths.

Generally, all layers support these keypaths:

  • Position : Position of the layer related to canvas coordinate
  • Z Position : Layer position on z axis. Higher value means that the layer will be shown on top regardless layer hierarchies.
  • Transform : Transformation applied to the layer including scale, translation and rotation. All transformation are relative to the layer’s anchor point
  • Opacity : Opacity of the layer
  • Hidden
  • Shadow : Layer’s shadow properties including shadowColor, shadowOpacity, shadowOffset and shadowRadius.
  • Anchor Point : Origin of point where the transformation will be applied

Additionally, other layer types have their own supported keypaths respectively.

 

CALayer
  • Bounds : The layer’s size
  • Background Color : Background color of the layer
  • Border Width : The layer’s border width
  • Border Color : The layer’s border color

 

Shape Layer
  • Path : The layer’s path
  • Fill Color (Only if color fill selected): Layer fill color
  • Gradient (Only if gradient fill selected): Layer’s gradient properties including colors, locations, start and end point of the gradient
  • Line Dash Phase
  • Line Width : The path’s outline width
  • Stroke Color : Fill color of path’s outline
  • Stroke Start : The fraction value (0 – 1) where the path start drawing, default to 0..
  • Stroke End : The fraction value (0 – 1) where the path end drawing, default to 1.

 

Text Layer
  • Font Size: The text’s font size. Only works if advanced attributes disabled in Layer Inspector.
  • Foreground Color: The text’s fill color. Only works if advanced attributes disabled in Layer Inspector.

 

Replicator Layer
  • Instance Delay: Temporal delay between replicated copies
  • Instance Count : Number of copies of sublayers
  • Instance Transform : Transform applied to the layer is incrementally increased for each replicated copies.
  • Instance Color : The color to multiply the first object by
  • Instance Red Offset, Instance Green Offset, Instance Blue Offset and Instance Alpha Offset : The color components added to the color of instance k-1 to produce the modulation color of instance k.

 

Emitter Layer
  • Emitter Position: Position of the emitter in its own frame coordinate

 

Effect Layer
  • Effect layer keypaths are changed based on its first sublayer.
  • The keypaths will only affect its sublayers animations only.
  • In addition, it also have Parent Transform and Parent Position keypaths which are equivalent to position and transform keypaths  which are used to animate the layer itself.

 

Mask
  • Position : Position of the layer related to canvas coordinate
  • Transform : Transformation applied to the layer including scale, translation and rotation. All transformation are relative to the layer’s anchor point
  • Opacity : Opacity of the layer
  • Anchor Point : Origin of point where the transformation will be applied

 

UIVIew
  • Frame : Frame of the layer
  • Bounds : Bounds of the layer
  • Center : Center of the layer
  • Transform : Transform of the layer.
  • Alpha : Alpha of the layer.
  • Background Color : Background color of the layer.