allow null parent to setParent

This commit is contained in:
Nick Fisher
2024-11-30 13:58:56 +08:00
parent d72ed58436
commit 151935913f

View File

@@ -26,6 +26,8 @@ enum VisibilityLayers {
const VisibilityLayers(this.value); const VisibilityLayers(this.value);
} }
final ThermionEntity FILAMENT_ENTITY_NULL = 0;
abstract class ThermionViewer { abstract class ThermionViewer {
/// ///
/// A Future that resolves when the underlying rendering context has been successfully created. /// A Future that resolves when the underlying rendering context has been successfully created.
@@ -705,7 +707,7 @@ abstract class ThermionViewer {
/// ///
/// Sets the parent transform of [child] to [parent]. /// Sets the parent transform of [child] to [parent].
/// ///
Future setParent(ThermionEntity child, ThermionEntity parent, Future setParent(ThermionEntity child, ThermionEntity? parent,
{bool preserveScaling}); {bool preserveScaling});
/// ///
@@ -874,5 +876,7 @@ abstract class ThermionViewer {
/// Returns the camera specified by the given index. Note that the camera at /// Returns the camera specified by the given index. Note that the camera at
/// index 0 is always the main camera; this cannot be destroyed. /// index 0 is always the main camera; this cannot be destroyed.
/// ///
/// Throws an exception if the index is out-of-bounds.
///
Camera getCameraAt(int index); Camera getCameraAt(int index);
} }