copyNode method

void copyNode(
  1. ActorNode node,
  2. ActorArtboard resetArtboard
)

Implementation

void copyNode(ActorNode node, ActorArtboard resetArtboard) {
  copyComponent(node, resetArtboard);
  _transform = Mat2D.clone(node._transform);
  _worldTransform = Mat2D.clone(node._worldTransform);
  _translation = Vec2D.clone(node._translation);
  _scale = Vec2D.clone(node._scale);
  _rotation = node._rotation;
  _opacity = node._opacity;
  _renderOpacity = node._renderOpacity;
  _overrideWorldTransform = node._overrideWorldTransform;

  if (node._clips != null) {
    _clips = <ActorClip>[];
    for (int i = 0, l = node._clips!.length; i < l; i++) {
      _clips!.add(ActorClip.copy(node._clips![i]));
    }
  } else {
    _clips = null;
  }
}