HoopsServiceRegistryElement

class wvc.HoopsServiceRegistryElement()

HoopsServiceRegistryElement is a LitElement-based web component that provides centralized service registration and management for the Hoops web viewer application.

This component acts as a dependency injection container, automatically registering all core services when connected to the DOM. It provides a convenient way to bootstrap the entire service ecosystem with sensible defaults while allowing for easy customization.

Features:

  • Automatic registration of all core services
  • Service customization through properties
  • Type-safe service retrieval methods
  • Zero-configuration setup with sensible defaults
  • Service locator pattern implementation

Constructors

wvc.HoopsServiceRegistryElement.constructor()
HoopsServiceRegistryElement(): HoopsServiceRegistryElement

Returns: HoopsServiceRegistryElement

Properties

wvc.HoopsServiceRegistryElement.cameraService
cameraService: ICameraService

Service for controlling camera movement and positioning. Manages camera animations, transitions, and view manipulations.

wvc.HoopsServiceRegistryElement.cuttingService
cuttingService: ICuttingService

Service for providing cutting plane functionality. Enables sectioning of 3D models with interactive cutting planes.

wvc.HoopsServiceRegistryElement.explodeService
explodeService: IExplodeService

Service for providing assembly explosion functionality. Enables visual separation of assembly components for better understanding.

wvc.HoopsServiceRegistryElement.floorplanService
floorplanService: IFloorplanService

Service for managing floorplan functionality and 2D representations. Provides tools for working with architectural floor plans and layouts.

wvc.HoopsServiceRegistryElement.ifcRelationshipsService
ifcRelationshipsService: IIFCRelationshipsService

Service for managing IFC (Industry Foundation Classes) model relationships. Handles building information modeling data and relationships between elements.

wvc.HoopsServiceRegistryElement.measurementService
measurementService: IMeasurementService

Service for handling measurement tools and calculations. Supports distance, angle, area, and volume measurements.

wvc.HoopsServiceRegistryElement.noteTextService
noteTextService: INoteTextService

Service for managing text notes and comments. Provides functionality for adding, editing, and organizing textual annotations.

wvc.HoopsServiceRegistryElement.pmiService
pmiService: IPmiService

Service for handling Product Manufacturing Information (PMI). Manages annotations, dimensions, tolerances, and other manufacturing data.

wvc.HoopsServiceRegistryElement.redlineService
redlineService: IRedlineService

Service for managing redline markup and annotations. Handles creation, editing, and persistence of redline elements.

wvc.HoopsServiceRegistryElement.renderOptionsService
renderOptionsService: IRenderOptionsService

Service for controlling rendering settings and visual options. Manages display modes, lighting, materials, and other rendering parameters.

wvc.HoopsServiceRegistryElement.selectionService
selectionService: ISelectionService

Service for managing object selection and highlighting. Handles single and multi-selection, selection events, and highlight visualization.

wvc.HoopsServiceRegistryElement.sheetService
sheetService: ISheetService

Service for managing drawing sheets and layouts. Handles 2D technical drawings, sheet navigation, and layout management.

wvc.HoopsServiceRegistryElement.spaceMouseService
spaceMouseService: ISpaceMouseService

Service for integrating 3D SpaceMouse navigation devices. Provides support for professional 3D input devices for enhanced navigation.

wvc.HoopsServiceRegistryElement.viewService
viewService: IViewService

Service for handling view management and navigation. Controls camera positions, view states, and navigation modes.

wvc.HoopsServiceRegistryElement.walkOperatorService
walkOperatorService: IWalkOperatorService

Service for handling walk-through navigation mode. Provides first-person navigation experience for architectural models.

Methods

wvc.HoopsServiceRegistryElement.connectedCallback()
connectedCallback(): void

Lifecycle callback invoked when the element is connected to the DOM. Automatically registers all configured services in the global service registry, making them available throughout the application.

Services are registered in a specific order to handle any potential dependencies. If a service with the same name already exists, it will be overwritten with a warning.

Returns: void

wvc.HoopsServiceRegistryElement.getService()
getService(serviceName: ServiceName): T

Retrieves a service from the global service registry by its name. This is a type-safe wrapper around the global getService function.

Parameters

serviceName: ServiceName

The unique name of the service to retrieve

Returns: T

The requested service instance
wvc.HoopsServiceRegistryElement.tryGetService()
tryGetService(serviceName: ServiceName): (undefined | T)

Attempts to retrieve a service from the global service registry by its name. Returns undefined if the service is not found, making it safe for optional services.

Parameters

serviceName: ServiceName

The unique name of the service to retrieve

Returns: (undefined | T)

The service instance if found, undefined otherwise