LOTRenderNode.m 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // LOTRenderNode.m
  3. // Pods
  4. //
  5. // Created by brandon_withrow on 6/27/17.
  6. //
  7. //
  8. #import "LOTRenderNode.h"
  9. @implementation LOTRenderNode
  10. - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode
  11. keyName:(NSString * _Nullable)keyname {
  12. self = [super initWithInputNode:inputNode keyName:keyname];
  13. if (self) {
  14. _outputLayer = [CAShapeLayer new];
  15. _outputLayer.actions = [self actionsForRenderLayer];
  16. }
  17. return self;
  18. }
  19. /// Layer Properties that need to disable implicit animations
  20. - (NSDictionary * _Nonnull)actionsForRenderLayer {
  21. return @{@"path": [NSNull null]};
  22. }
  23. /// Local interpolators have changed. Update layer specific properties.
  24. - (void)performLocalUpdate {
  25. }
  26. /// The path for rendering has changed. Do any rendering required.
  27. - (void)rebuildOutputs {
  28. }
  29. - (LOTBezierPath *)localPath {
  30. return self.inputNode.localPath;
  31. }
  32. /// Forwards its input node's output path forwards downstream
  33. - (LOTBezierPath *)outputPath {
  34. return self.inputNode.outputPath;
  35. }
  36. @end