Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
The @itwin/core-frontend package contains the frontend (specific to running in a web browser) classes for querying, visualizing, and interacting with iModels.
See the iTwin.js documentation for more information.
The source code is laid out according to the following top-level directory structure:
-
src/common/
contains code that is safe to use in a Worker and on the main thread. Code within this directory must not import files outside ofsrc/common/
, and must also avoid taking dependencies on APIs that are only usable on the main thread (e.g., the DOM APIs) or only usable on Workers (e.g.,importScripts
). -
src/workers/
contains code that can only be used in Workers, along with specific Worker scripts delivered with the @itwin/core-frontend package. Code within this directory may import files fromsrc/common/
. - All other files in
src/
- excluding the two subdirectories listed above - contain code that can only be used on the main thread. They can import fromsrc/common/
, but not fromsrc/workers/
.