UArNode class

Anything drawn in the scene. Positions are metres, relative to parentId when set, else to anchorId when set, else to the world origin.

Constructors

UArNode({required String id, required UArNodeType type, UArSource? source, UArSource? iosSource, String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity, UArVector3 scale = UArVector3.one, double width = 0.1, double height = 0.1, double depth = 0.1, double radius = 0.05, UArMaterial material = const UArMaterial(), UArBillboard billboard = UArBillboard.none, bool visible = true, bool castShadow = true, bool hittable = true, UArAnimation? animation, UArVideoOptions video = const UArVideoOptions(), double? fitSize, UArPivot pivot = UArPivot.original, Map<String, Object?> data = const <String, Object?>{}})
const
UArNode.box({required String id, double width = 0.1, double height = 0.1, double depth = 0.1, UArMaterial material = const UArMaterial(), String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity, bool castShadow = true})
factory
UArNode.cone({required String id, double radius = 0.05, double height = 0.1, UArMaterial material = const UArMaterial(), String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity})
factory
UArNode.cylinder({required String id, double radius = 0.05, double height = 0.1, UArMaterial material = const UArMaterial(), String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity})
factory
UArNode.group({required String id, String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity, UArVector3 scale = UArVector3.one})
An empty transform used to move several children together.
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?>{}})
An image on a quad; width in metres, height follows the image aspect.
factory
UArNode.line({required String id, required UArVector3 from, required UArVector3 to, double thickness = 0.004, Color color = const Color(0xFFFFFFFF), String? anchorId, bool renderOnTop = false})
A thin bar between two points, e.g. a measuring line.
factory
UArNode.model({required String id, required UArSource source, UArSource? iosSource, String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity, UArVector3 scale = UArVector3.one, double? fitSize, UArPivot pivot = UArPivot.bottom, UArAnimation? animation = const UArAnimation(), bool castShadow = true, bool hittable = true, UArBillboard billboard = UArBillboard.none, Map<String, Object?> data = const <String, Object?>{}})
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})
A flat rectangle facing +Z (or lying flat when rotated -90° around X).
factory
UArNode.sphere({required String id, double radius = 0.05, UArMaterial material = const UArMaterial(), String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, bool castShadow = true})
factory
UArNode.video({required String id, required UArSource source, double width = 0.6, double height = 0.3375, UArVideoOptions video = const UArVideoOptions(), String? anchorId, String? parentId, UArVector3 position = UArVector3.zero, UArQuaternion rotation = UArQuaternion.identity, UArBillboard billboard = UArBillboard.none})
factory

Properties

anchorId → String?
final
animation → UArAnimation?
final
billboard → UArBillboard
final
castShadow → bool
final
data → Map<String, Object?>
Free-form app data, never sent to the platform.
final
depth → double
final
fitSize → double?
Uniformly scales a model so its largest side is this many metres.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
final
hittable → bool
final
id → String
final
iosSource → UArSource?
iOS-only alternative (USDZ / Reality) for models, preferred over source there.
final
material → UArMaterial
final
parentId → String?
final
pivot → UArPivot
final
pose → UArPose
no setter
position → UArVector3
final
radius → double
final
rotation → UArQuaternion
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → UArVector3
final
source → UArSource?
final
type → UArNodeType
final
video → UArVideoOptions
final
visible → bool
final
width → double
final

Methods

copyWith({UArSource? source, UArSource? iosSource, String? anchorId, String? parentId, UArVector3? position, UArQuaternion? rotation, UArVector3? scale, double? width, double? height, double? depth, double? radius, UArMaterial? material, UArBillboard? billboard, bool? visible, bool? castShadow, bool? hittable, UArAnimation? animation, UArVideoOptions? video, double? fitSize, UArPivot? pivot, Map<String, Object?>? data}) → UArNode
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited