calculateWorldTransform method Null safety

void calculateWorldTransform()
inherited

Implementation

void calculateWorldTransform() {
  var parent = this.parent;
  final chain = <TransformComponent>[this];

  while (parent != null) {
    if (parent is TransformComponent) {
      chain.insert(0, parent);
    }
    parent = parent.parent;
  }
  for (final item in chain) {
    item.updateTransform();
    item.updateWorldTransform();
  }
}