From 9a8179394e4e26379e52e7d1120955306a3dda1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Guti=C3=A9rrez?= <78984964+MiguelG97@users.noreply.github.com> Date: Thu, 8 Jan 2026 00:24:02 +0000 Subject: [PATCH] chore: Enhance documentation for FragmentsManager usage Added documentation on utilizing the FragmentsManager component and its advantages. --- packages/core/src/fragments/FragmentsManager/example.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/fragments/FragmentsManager/example.ts b/packages/core/src/fragments/FragmentsManager/example.ts index 41741e712..f2cb99ce9 100644 --- a/packages/core/src/fragments/FragmentsManager/example.ts +++ b/packages/core/src/fragments/FragmentsManager/example.ts @@ -48,6 +48,10 @@ components.get(OBC.Grids).create(world); /* MD ### ✨ Utilizing the FragmentsManager Component Great! With the base viewer setup complete, let's dive into using the FragmentsManager component. This component serves as a convenient wrapper around the core FragmentsModels class from the `@thatopen/fragments` library. One of the key advantages of using Fragments in That Open Engine is its worker-based architecture, which offloads most operations (data retrieval, visibility management, color adjustments, etc.) to a separate thread. This ensures that the app remains responsive during processing. To get started, the first step is to specify the URL of the Fragments worker: + + :::info Which Fragments Class Should You Use? + When using the Components libraries, you should not use FragmentsModels directly. Instead, always use FragmentsManager. FragmentsManager is designed to integrate Fragments with the Components ecosystem, ensuring compatibility with pre-built features (such as Highlighter, Measurement, and more). Using FragmentsModels directly when Components are involved may cause these features to not work correctly with the loaded fragments! + ::: */ // One option, if you prefer not to rely on an external worker file,