SpatialNode constructor

SpatialNode({
  1. Shape? shape,
  2. ShapeInheritance? inherit,
  3. Vector2? position,
  4. Vector2? scale,
  5. double? angle,
  6. Anchor? anchor,
  7. bool? enabled,
  8. int? priority,
  9. Iterable<Node> children = const [],
})

Implementation

SpatialNode({
  Shape? shape,
  ShapeInheritance? inherit,
  Vector2? position,
  Vector2? scale,
  double? angle,
  Anchor? anchor,
  super.enabled,
  super.priority,
  super.children,
}) : _shape = shape ?? .none,
     inherit = inherit ?? .none,
     position = .copy(position ?? .zero),
     scale = .copy(scale ?? .all(1)),
     angle = angle ?? 0,
     anchor = anchor ?? .topLeft;