UArNode.image constructor
UArNode.image({
- required String id,
- required UArSource source,
- double width = 0.3,
- String? anchorId,
- String? parentId,
- UArVector3 position = UArVector3.zero,
- UArQuaternion rotation = UArQuaternion.identity,
- UArBillboard billboard = UArBillboard.none,
- bool unlit = true,
- bool renderOnTop = false,
- double opacity = 1,
- Map<
String, Object?> data = const <String, Object?>{},
An image on a quad; width in metres, height follows the image aspect.
Implementation
factory UArNode.image({
required String id,
required UArSource source,
double width = 0.3,
String? anchorId,
String? parentId,
UArVector3 position = UArVector3.zero,
UArQuaternion rotation = UArQuaternion.identity,
UArBillboard billboard = UArBillboard.none,
bool unlit = true,
bool renderOnTop = false,
double opacity = 1,
Map<String, Object?> data = const <String, Object?>{},
}) => UArNode(
id: id,
type: UArNodeType.image,
source: source,
width: width,
height: 0,
anchorId: anchorId,
parentId: parentId,
position: position,
rotation: rotation,
billboard: billboard,
material: UArMaterial(unlit: unlit, doubleSided: true, renderOnTop: renderOnTop, opacity: opacity),
castShadow: false,
data: data,
);