UArNode.plane constructor

UArNode.plane({
  1. required String id,
  2. double width = 0.2,
  3. double height = 0.2,
  4. UArMaterial material = const UArMaterial(doubleSided: true),
  5. String? anchorId,
  6. String? parentId,
  7. UArVector3 position = UArVector3.zero,
  8. UArQuaternion rotation = UArQuaternion.identity,
  9. UArBillboard billboard = UArBillboard.none,
})

A flat rectangle facing +Z (or lying flat when rotated -90° around X).

Implementation

factory UArNode.plane({
  required String id,
  double width = 0.2,
  double height = 0.2,
  UArMaterial material = const UArMaterial(doubleSided: true),
  String? anchorId,
  String? parentId,
  UArVector3 position = UArVector3.zero,
  UArQuaternion rotation = UArQuaternion.identity,
  UArBillboard billboard = UArBillboard.none,
}) => UArNode(
  id: id,
  type: UArNodeType.plane,
  width: width,
  height: height,
  material: material,
  anchorId: anchorId,
  parentId: parentId,
  position: position,
  rotation: rotation,
  billboard: billboard,
  castShadow: false,
);