calculateWorldTransform method

void calculateWorldTransform()

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();
  }
}