From b6397b5f73d7c9f8e6245f0513f56af494160eec Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Mon, 23 Dec 2024 14:38:29 +0800 Subject: [PATCH] fix!: rename removeEntity to removeAsset --- .../lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart | 4 ++-- thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart b/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart index c579dde1..df65bdee 100644 --- a/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart +++ b/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart @@ -972,7 +972,7 @@ class ThermionViewerFFI extends ThermionViewer { /// /// @override - Future removeEntity(covariant FFIAsset asset) async { + Future removeAsset(covariant FFIAsset asset) async { await withVoidCallback((callback) => SceneManager_destroyAssetRenderThread( _sceneManager!, asset.pointer, callback)); } @@ -1346,7 +1346,7 @@ class ThermionViewerFFI extends ThermionViewer { /// /// @override - Future removeEntityFromScene(ThermionEntity entity) async { + Future removeAssetFromScene(ThermionEntity entity) async { if (SceneManager_removeFromScene(_sceneManager!, entity) != 1) { throw Exception("Failed to remove entity from scene"); } diff --git a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart index 40763b4c..b3f2b169 100644 --- a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart +++ b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart @@ -380,7 +380,7 @@ abstract class ThermionViewer { /// Removes/destroys the specified entity from the scene. /// [entity] will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete. /// - Future removeEntity(ThermionAsset asset); + Future removeAsset(ThermionAsset asset); /// /// Removes/destroys all renderable entities from the scene (including cameras). @@ -629,7 +629,7 @@ abstract class ThermionViewer { /// /// Removes a single [entity] from the scene. /// - Future removeEntityFromScene(ThermionEntity entity); + Future removeAssetFromScene(ThermionEntity entity); /// /// Hit test the viewport at the given coordinates. If the coordinates intersect