Skip to content

0.5.1 - New memory management system based on Lifecyle + Ensure everything is destroyed when the SceneView is detached

Compare
Choose a tag to compare
@ThomasGorisse ThomasGorisse released this 20 Apr 20:38
· 590 commits to main since this release

Features

  • RIP CleanupRegistry welcome LifecycleObservers: Filament 3D Entities (Models, Materials, Textures, Lights,...), Engine and Loaders/Managers creation and destroy are now completely made around Android Lifecycle observers. They were previously managed by the Garbage collector.
    We now insure that every single consuming resource is destroyed when the Activity/Fragment/SceneView is destroyed and when it is not needed anymore internally.
    The only counterpart is that you have to give a lifecycle parameter when building a Filament entity that can be any of the Activity/Fragment/SceneView one.

e.g. You now have to give a Lifecycle parameter instead of the CoroutineScope when loading a model

  • RIP IEngine, FilamentEngineWrapper, EngineInstance,... welcome Filament single retainable object that contains the engine instance and every linked Filament Loaders/Managers. The Filament Engine can now be shared between different SceneViews. The last releasing retainer will destroy the Engine and the Loaders/Managers.

  • Allowed gesture detectors to be changed at runtime: GestureDetectors are vars and can be changed at any time

Fixes

  • Fixed wrong SceneView MainLight and Environment initialisation because of NullPointerException when getting ArSceneView lifecycle
  • Fixed Camera Stream init
  • Fixed Filament Engine not destroyed
  • Fixed move gesture: Some conditions for the move gesture are inverted
  • Fixed some double Filament entity destroys causing exception when the SceneView was destroyed