@inweb/viewer-core 26.9.1 → 26.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/viewer-core.js +1 -1
- package/dist/viewer-core.js.map +1 -1
- package/dist/viewer-core.module.js +12 -12
- package/dist/viewer-core.module.js.map +1 -1
- package/lib/viewer/IViewer.d.ts +12 -0
- package/lib/viewer/ViewerEvents.d.ts +77 -15
- package/package.json +3 -3
- package/src/viewer/IViewer.ts +13 -0
- package/src/viewer/ViewerEvents.ts +88 -17
package/dist/viewer-core.js
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
const { handler, thisArg } = command;
|
|
59
59
|
const result = handler.apply(thisArg, [viewer, ...args]);
|
|
60
|
-
viewer === null || viewer ===
|
|
60
|
+
viewer === null || viewer === void 0 ? void 0 : viewer.emit({ type: "command", data: id, args });
|
|
61
61
|
return result;
|
|
62
62
|
}
|
|
63
63
|
}
|
package/dist/viewer-core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-core.js","sources":["../src/commands/Commands.ts","../src/draggers/Dragger.ts","../src/draggers/Draggers.ts","../src/components/Component.ts","../src/components/Components.ts","../src/loaders/Loader.ts","../src/loaders/Loaders.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsRegistry } from \"./ICommands\";\n\nclass CommandsRegistry implements ICommandsRegistry {\n private readonly _commands = new Map<string, ICommand>();\n\n registerCommand(id: string, handler: ICommandHandler, description?: ICommandDescription, thisArg?: any): void {\n this._commands.set(id, { id, handler, thisArg, description });\n }\n\n registerCommandAlias(id: string, alias: string): void {\n this.registerCommand(alias, (viewer: IViewer, ...args) => this.executeCommand(id, viewer, ...args));\n }\n\n getCommand(id: string): ICommand | undefined {\n return this._commands.get(id);\n }\n\n getCommands(): Map<string, ICommand> {\n const map = new Map<string, ICommand>();\n this._commands.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n executeCommand(id: string, viewer: IViewer, ...args: any[]): any {\n const command = this._commands.get(id);\n if (!command) {\n if (viewer) {\n const isDraggerCommand = viewer.draggers.includes(id);\n if (isDraggerCommand) return viewer.setActiveDragger(id);\n }\n\n console.warn(`Command '${id}' not found`);\n return undefined;\n }\n\n const { handler, thisArg } = command;\n const result = handler.apply(thisArg, [viewer, ...args]);\n\n viewer?.emit({ type: \"command\", data: id, args });\n\n return result;\n }\n}\n\nconst _commandsRegistry = new Map<string, CommandsRegistry>();\n\nfunction commandsRegistry(viewerType = \"\"): ICommandsRegistry {\n let result = _commandsRegistry.get(viewerType);\n if (!result) {\n result = new CommandsRegistry();\n _commandsRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { commandsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IDragger } from \"./IDraggers\";\n\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IDragger, IDraggerProvider, IDraggersRegistry } from \"./IDraggers\";\n\nclass DraggersRegistry implements IDraggersRegistry {\n private readonly _providers = new Map<string, IDraggerProvider>();\n\n registerDragger(name: string, provider: IDraggerProvider): void {\n this._providers.set(name, provider);\n }\n\n registerDraggerAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerDragger(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getDraggers(): Map<string, IDraggerProvider> {\n const map = new Map<string, IDraggerProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createDragger(name: string, viewer: IViewer): IDragger | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const dragger = provider(viewer);\n dragger.name = name;\n\n return dragger;\n }\n}\n\nconst _draggersRegistry = new Map<string, DraggersRegistry>();\n\nfunction draggersRegistry(viewerType = \"\"): IDraggersRegistry {\n let result = _draggersRegistry.get(viewerType);\n if (!result) {\n result = new DraggersRegistry();\n _draggersRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { draggersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IComponent } from \"./IComponents\";\n\nexport class Component implements IComponent {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IComponent, IComponentProvider, IComponentsRegistry } from \"./IComponents\";\n\nclass Components implements IComponentsRegistry {\n private readonly _providers = new Map<string, IComponentProvider>();\n\n registerComponent(name: string, provider: IComponentProvider): void {\n this._providers.set(name, provider);\n }\n\n registerComponentAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerComponent(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getComponents(): Map<string, IComponentProvider> {\n const map = new Map<string, IComponentProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createComponent(name: string, viewer: IViewer): IComponent | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const component = provider(viewer);\n component.name = name;\n\n return component;\n }\n}\n\nconst _components = new Map<string, Components>();\n\nfunction componentsRegistry(viewerType = \"\"): IComponentsRegistry {\n let result = _components.get(viewerType);\n if (!result) {\n result = new Components();\n _components.set(viewerType, result);\n }\n return result;\n}\n\nexport { componentsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { FileSource, ILoader, LoadParams } from \"./ILoader\";\n\nexport class Loader implements ILoader {\n public name = \"\";\n public abortController: AbortController = new AbortController();\n\n dispose(): void {\n this.abortController.abort();\n this.abortController = undefined;\n }\n\n isSupport(file: FileSource, format?: string): boolean {\n return false;\n }\n\n load(file: FileSource, format?: string, params?: LoadParams): Promise<this> {\n return Promise.resolve(this);\n }\n\n cancel(): void {\n this.abortController.abort();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { FileSource, ILoader, ILoaderProvider, ILoadersRegistry } from \"./ILoader\";\n\nclass Loaders implements ILoadersRegistry {\n private readonly _providers = new Map<string, ILoaderProvider>();\n\n registerLoader(name: string, provider: ILoaderProvider): void {\n this._providers.set(name, provider);\n }\n\n getLoader(name: string): ILoaderProvider | undefined {\n return this._providers.get(name);\n }\n\n getLoaders(): Map<string, ILoaderProvider> {\n const map = new Map<string, ILoaderProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createLoader(viewer: IViewer, file: FileSource, format?: string): ILoader | null {\n let result: ILoader = null;\n this._providers.forEach((provider, key) => {\n const loader = provider(viewer);\n if (loader.isSupport(file, format)) {\n result = loader;\n result.name = key;\n }\n });\n return result;\n }\n}\n\nconst _loaders = new Map<string, Loaders>();\n\nfunction loadersRegistry(viewerType = \"\"): ILoadersRegistry {\n let result = _loaders.get(viewerType);\n if (!result) {\n result = new Loaders();\n _loaders.set(viewerType, result);\n }\n return result;\n}\n\nexport { loadersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport interface RGB {\n red: number;\n green: number;\n blue: number;\n}\n\n/**\n * Viewer options interface.\n */\nexport interface IOptions {\n /**\n * Show the world coordinate system axes in the bottom-left corner of the viewer.\n *\n * @defaultValue true\n */\n showWCS?: boolean;\n\n /**\n * Enable camera animation.\n *\n * @defaultValue true\n */\n cameraAnimation?: boolean;\n\n /**\n * Enable anti-aliasing. Can be one of:\n *\n * - `false` - Disable anti-aliasing.\n * - `true` - Enable anti-aliasing using MSAA.\n * - `fxaa` - Enable Fast Approximate anti-aliasing (FXAA).\n * - `smaa` - Enable Subpixel Morphological anti-aliasing (SMAA).\n * - `msaa` - Enable Multisample anti-aliasing (MSAA), if the underlying WebGL context supports it.\n *\n * @defaultValue true\n */\n antialiasing?: boolean | string;\n\n /**\n * Show ground shadows below the model.\n *\n * @defaultValue false\n */\n groundShadow?: boolean;\n\n /**\n * Enable ambient shadows.\n *\n * @defaultValue false\n */\n shadows?: boolean;\n\n /**\n * Camera speed on X axis.\n *\n * @defaultValue 4\n */\n cameraAxisXSpeed?: number;\n\n /**\n * Camera speed on Y axis.\n *\n * @defaultValue 1\n */\n cameraAxisYSpeed?: number;\n\n /**\n * Enable ambient occlusion.\n *\n * @defaultValue false\n */\n ambientOcclusion?: boolean;\n\n /**\n * Enable streaming of drawings from the server.\n *\n * If streaming is disabled, the file/assembly will be loaded in one go. The viewer will only update\n * once the loading is complete, which may take a while.\n *\n * If streaming is enabled, {@link enablePartialMode | partial streaming} mode may be enabled as well.\n *\n * @defaultValue true\n */\n enableStreamingMode?: boolean;\n\n /**\n * Enable partial streaming mode to be able open large drawing.\n *\n * In partial streaming mode, the viewer keeps only visible objects in memory and loads other objects\n * when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is enabled,\n * then {@link sceneGraph | scene graph} will be disabled.\n *\n * @defaultValue false\n */\n enablePartialMode?: boolean;\n\n /**\n * The size of the memory buffer for graphics data, in bytes.\n *\n * @defaultValue 3294967296\n */\n memoryLimit?: number;\n\n /**\n * Cutting planes fill color.\n *\n * @defaultValue { red: 0xff, green: 0x98, blue: 0x00 }\n */\n cuttingPlaneFillColor?: RGB;\n\n /**\n * Edges highlight color.\n */\n edgesColor?: { r: number; g: number; b: number };\n\n /**\n * Faces highlight color.\n */\n facesColor?: { r: number; g: number; b: number };\n\n /**\n * Show highlighted edges.\n */\n edgesVisibility?: boolean;\n\n /**\n * Show highlighted edges over drawing.\n */\n edgesOverlap?: boolean;\n\n /**\n * Show highlighted faces over drawing.\n */\n facesOverlap?: boolean;\n\n /**\n * Highlighted faces transparency value, from 0 to 255.\n */\n facesTransparancy?: number;\n\n /**\n * Enable custom highlight settings.\n */\n enableCustomHighlight?: boolean;\n\n /**\n * Enable scene graph.\n *\n * Scene graph increases perfomance improvement, but consumes memory. If scene graph is enabled, then\n * {@link enablePartialMode | partial streaming} mode will be disabled.\n */\n sceneGraph: boolean;\n\n /**\n * Show the edges of the model:\n *\n * - `false` - No model edges are displayed. Usefull for less memory consumption.\n * - `true` - Display isolines.\n */\n edgeModel: boolean;\n\n /**\n * Reverse the mouse wheel direction for zooming:\n *\n * - `false` - Moving the wheel up zooms in, moving down zooms out.\n * - `true` - Moving the wheel up zooms out, moving down zooms in.\n */\n reverseZoomWheel: boolean;\n\n /**\n * Enable mouse wheel zooming.\n */\n enableZoomWheel: boolean;\n\n /**\n * Enable touch gestures.\n *\n * This option will be ignored when {@link enableZoomWheel | mouse wheel zooming} is disabled, since\n * gestures contains touch zoom.\n */\n enableGestures: boolean;\n\n /**\n * Deprecated since `25.8`.\n */\n geometryType?: string;\n\n /**\n * Ruler unit.\n *\n * Available values: Default, Millimeters, Centimeters, Meters, Feet, Inches, Yards, Kilometers, Miles,\n * Micrometers, MicroInches\n *\n * @defaultValue Default\n */\n rulerUnit: string;\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset.\n */\n resetToDefaults?: (fields?: string[]) => void;\n}\n\nexport function defaultOptions(): IOptions {\n return {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { IOptions, RGB, defaultOptions } from \"./IOptions\";\n\nexport class Options implements IOptions {\n protected _emitter?: EventEmitter2;\n protected _data: IOptions;\n\n constructor(emitter?: EventEmitter2) {\n this._emitter = emitter;\n this._data = defaultOptions();\n this.loadFromStorage();\n }\n\n static defaults(): IOptions {\n return defaultOptions();\n }\n\n notifierChangeEvent(): void {\n console.warn(\n \"Options.notifierChangeEvent() has been deprecated since 25.3 and will be removed in a future release, use Options.change() instead.\"\n );\n this.change();\n }\n\n change(): void {\n if (this._emitter !== undefined) {\n this.saveToStorage();\n this._emitter.emit({ type: \"optionschange\", data: this });\n }\n }\n\n saveToStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n localStorage.setItem(\"od-client-settings\", JSON.stringify(this.data));\n } catch (error) {\n console.error(\"Cannot save client settings.\", error);\n }\n }\n\n loadFromStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n const item = localStorage.getItem(\"od-client-settings\");\n if (item) {\n const data = JSON.parse(item);\n this.data = { ...data };\n }\n } catch (error) {\n console.error(\"Cannot load client settings.\", error);\n }\n }\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset. Specify `undefined` to reset all.\n */\n resetToDefaults(fields?: string[]): void {\n if (fields !== undefined) {\n const defaults = Options.defaults();\n const resetData = fields.reduce((acc, field) => {\n acc[field] = defaults[field];\n return acc;\n }, {});\n this.data = { ...this.data, ...resetData };\n } else {\n this.data = { ...this.data, ...Options.defaults() };\n }\n }\n\n get data(): IOptions {\n return this._data;\n }\n\n set data(value: IOptions) {\n const enablePartialMode = value.enableStreamingMode ? value.enablePartialMode : false;\n const sceneGraph = enablePartialMode ? false : value.sceneGraph;\n this._data = { ...Options.defaults(), ...this._data, ...value, enablePartialMode, sceneGraph };\n this.change();\n }\n\n get showWCS(): boolean {\n return this._data.showWCS;\n }\n\n set showWCS(value: boolean) {\n this._data.showWCS = value;\n this.change();\n }\n\n get cameraAnimation(): boolean {\n return this._data.cameraAnimation;\n }\n\n set cameraAnimation(value: boolean) {\n this._data.cameraAnimation = value;\n this.change();\n }\n\n get antialiasing(): boolean | string {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean | string) {\n this._data.antialiasing = value;\n this.change();\n }\n\n get groundShadow(): boolean {\n return this._data.groundShadow;\n }\n\n set groundShadow(value: boolean) {\n this._data.groundShadow = value;\n this.change();\n }\n\n get shadows(): boolean {\n return this._data.shadows;\n }\n\n set shadows(value: boolean) {\n this._data.shadows = value;\n this.change();\n }\n\n get cameraAxisXSpeed(): number {\n return this._data.cameraAxisXSpeed;\n }\n\n set cameraAxisXSpeed(value: number) {\n this._data.cameraAxisXSpeed = value;\n this.change();\n }\n\n get cameraAxisYSpeed(): number {\n return this._data.cameraAxisYSpeed;\n }\n\n set cameraAxisYSpeed(value: number) {\n this.cameraAxisYSpeed = value;\n this.change();\n }\n\n get ambientOcclusion(): boolean {\n return this._data.ambientOcclusion;\n }\n\n set ambientOcclusion(value: boolean) {\n this._data.ambientOcclusion = value;\n this.change();\n }\n\n get enableStreamingMode(): boolean {\n return this._data.enableStreamingMode;\n }\n\n set enableStreamingMode(value: boolean) {\n this._data.enableStreamingMode = value;\n if (!value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get enablePartialMode(): boolean {\n return this._data.enablePartialMode;\n }\n\n set enablePartialMode(value: boolean) {\n this._data.enablePartialMode = value;\n if (value) {\n this._data.enableStreamingMode = true;\n this._data.sceneGraph = false;\n }\n this.change();\n }\n\n get memoryLimit(): number {\n return this._data.memoryLimit;\n }\n\n set memoryLimit(value: number) {\n this._data.memoryLimit = value;\n this.change();\n }\n\n get cuttingPlaneFillColor(): RGB {\n return this._data.cuttingPlaneFillColor;\n }\n\n set cuttingPlaneFillColor(value: RGB) {\n this._data.cuttingPlaneFillColor = value;\n this.change();\n }\n\n get edgesColor() {\n return this._data.edgesColor;\n }\n\n set edgesColor(value) {\n this._data.edgesColor = value;\n this.change();\n }\n\n get facesColor() {\n return this._data.facesColor;\n }\n\n set facesColor(value) {\n this._data.facesColor = value;\n this.change();\n }\n\n get edgesVisibility() {\n return this._data.edgesVisibility;\n }\n\n set edgesVisibility(value) {\n this._data.edgesVisibility = value;\n this.change();\n }\n\n get edgesOverlap() {\n return this._data.edgesOverlap;\n }\n\n set edgesOverlap(value) {\n this._data.edgesOverlap = value;\n this.change();\n }\n\n get facesOverlap() {\n return this._data.facesOverlap;\n }\n\n set facesOverlap(value) {\n this._data.facesOverlap = value;\n this.change();\n }\n\n get facesTransparancy() {\n return this._data.facesTransparancy;\n }\n\n set facesTransparancy(value) {\n this._data.facesTransparancy = value;\n this.change();\n }\n\n get enableCustomHighlight() {\n return this._data.enableCustomHighlight;\n }\n\n set enableCustomHighlight(value) {\n this._data.enableCustomHighlight = value;\n this.change();\n }\n\n get sceneGraph() {\n return this._data.sceneGraph;\n }\n\n set sceneGraph(value) {\n this._data.sceneGraph = value;\n if (value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get edgeModel() {\n return Boolean(this._data.edgeModel);\n }\n\n set edgeModel(value) {\n this._data.edgeModel = Boolean(value);\n this.change();\n }\n\n get reverseZoomWheel() {\n return this._data.reverseZoomWheel;\n }\n\n set reverseZoomWheel(value: boolean) {\n this._data.reverseZoomWheel = !!value;\n this.change();\n }\n\n get enableZoomWheel() {\n return this._data.enableZoomWheel;\n }\n\n set enableZoomWheel(value: boolean) {\n this._data.enableZoomWheel = !!value;\n this.change();\n }\n\n get enableGestures() {\n return this._data.enableGestures;\n }\n\n set enableGestures(value: boolean) {\n this._data.enableGestures = !!value;\n this.change();\n }\n\n get geometryType() {\n return this._data.geometryType;\n }\n\n set geometryType(value: string) {\n this._data.geometryType = value;\n this.change();\n }\n\n get rulerUnit(): string {\n return this._data.rulerUnit;\n }\n\n set rulerUnit(value: string) {\n this._data.rulerUnit = value;\n this.change();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport const CanvasEvents = [\n \"click\",\n \"contextmenu\",\n \"dblclick\",\n \"mousedown\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseup\",\n \"pointercancel\",\n \"pointerdown\",\n \"pointerleave\",\n \"pointermove\",\n \"pointerup\",\n \"touchcancel\",\n \"touchend\",\n \"touchmove\",\n \"touchstart\",\n \"wheel\",\n];\n\nexport const CANVAS_EVENTS = CanvasEvents;\n\n/**\n * Canvas Events.\n *\n * @event\n */\nexport interface CanvasEventMap {\n /**\n * Event that fires on mouse click.\n */\n click: MouseEvent;\n\n /**\n * Event that fires when the user attempts to open a context menu.\n */\n contextmenu: PointerEvent;\n\n /**\n * Event that fires on mouse double click.\n */\n dblclick: MouseEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n mousedown: MouseEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n mouseleave: MouseEvent;\n\n /**\n * Event that fires on mouse move.\n */\n mousemove: MouseEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n mouseup: MouseEvent;\n\n /**\n * Event is fired when the browser determines that there are unlikely to be any more pointer events.\n */\n pointercancel: PointerEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n pointerdown: PointerEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n pointerleave: PointerEvent;\n\n /**\n * Event that fires on mouse move.\n */\n pointermove: PointerEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n pointerup: PointerEvent;\n\n /**\n * Event that fires touch is canceled.\n */\n touchcancel: TouchEvent;\n\n /**\n * Event that fires touch is ended.\n */\n touchend: TouchEvent;\n\n /**\n * Event that fires touch is moving.\n */\n touchmove: TouchEvent;\n\n /**\n * Event that fires when touch is started.\n */\n touchstart: TouchEvent;\n\n /**\n * Event that fires when mouse wheel is moving.\n */\n wheel: MouseEvent;\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAKA,MAAM,gBAAgB,CAAA;IAAtB,IAAA,WAAA,GAAA;IACmB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAoB;;IAExD,IAAA,eAAe,CAAC,EAAU,EAAE,OAAwB,EAAE,WAAiC,EAAE,OAAa,EAAA;IACpG,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;;QAG/D,oBAAoB,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EAAA;IACzB,QAAA,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK;YAC5B,IAAI,CAAC,MAAM,EAAE;;IAEhB;;ICxVD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAEa,UAAA,YAAY,GAAG;QAC1B,OAAO;QACP,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,WAAW;QACX,SAAS;QACT,eAAe;QACf,aAAa;QACb,cAAc;QACd,aAAa;QACb,WAAW;QACX,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,OAAO;;AAGF,UAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"viewer-core.js","sources":["../src/commands/Commands.ts","../src/draggers/Dragger.ts","../src/draggers/Draggers.ts","../src/components/Component.ts","../src/components/Components.ts","../src/loaders/Loader.ts","../src/loaders/Loaders.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsRegistry } from \"./ICommands\";\n\nclass CommandsRegistry implements ICommandsRegistry {\n private readonly _commands = new Map<string, ICommand>();\n\n registerCommand(id: string, handler: ICommandHandler, description?: ICommandDescription, thisArg?: any): void {\n this._commands.set(id, { id, handler, thisArg, description });\n }\n\n registerCommandAlias(id: string, alias: string): void {\n this.registerCommand(alias, (viewer: IViewer, ...args) => this.executeCommand(id, viewer, ...args));\n }\n\n getCommand(id: string): ICommand | undefined {\n return this._commands.get(id);\n }\n\n getCommands(): Map<string, ICommand> {\n const map = new Map<string, ICommand>();\n this._commands.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n executeCommand(id: string, viewer: IViewer, ...args: any[]): any {\n const command = this._commands.get(id);\n if (!command) {\n if (viewer) {\n const isDraggerCommand = viewer.draggers.includes(id);\n if (isDraggerCommand) return viewer.setActiveDragger(id);\n }\n\n console.warn(`Command '${id}' not found`);\n return undefined;\n }\n\n const { handler, thisArg } = command;\n const result = handler.apply(thisArg, [viewer, ...args]);\n\n viewer?.emit({ type: \"command\", data: id, args });\n\n return result;\n }\n}\n\nconst _commandsRegistry = new Map<string, CommandsRegistry>();\n\nfunction commandsRegistry(viewerType = \"\"): ICommandsRegistry {\n let result = _commandsRegistry.get(viewerType);\n if (!result) {\n result = new CommandsRegistry();\n _commandsRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { commandsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IDragger } from \"./IDraggers\";\n\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IDragger, IDraggerProvider, IDraggersRegistry } from \"./IDraggers\";\n\nclass DraggersRegistry implements IDraggersRegistry {\n private readonly _providers = new Map<string, IDraggerProvider>();\n\n registerDragger(name: string, provider: IDraggerProvider): void {\n this._providers.set(name, provider);\n }\n\n registerDraggerAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerDragger(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getDraggers(): Map<string, IDraggerProvider> {\n const map = new Map<string, IDraggerProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createDragger(name: string, viewer: IViewer): IDragger | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const dragger = provider(viewer);\n dragger.name = name;\n\n return dragger;\n }\n}\n\nconst _draggersRegistry = new Map<string, DraggersRegistry>();\n\nfunction draggersRegistry(viewerType = \"\"): IDraggersRegistry {\n let result = _draggersRegistry.get(viewerType);\n if (!result) {\n result = new DraggersRegistry();\n _draggersRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { draggersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IComponent } from \"./IComponents\";\n\nexport class Component implements IComponent {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IComponent, IComponentProvider, IComponentsRegistry } from \"./IComponents\";\n\nclass Components implements IComponentsRegistry {\n private readonly _providers = new Map<string, IComponentProvider>();\n\n registerComponent(name: string, provider: IComponentProvider): void {\n this._providers.set(name, provider);\n }\n\n registerComponentAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerComponent(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getComponents(): Map<string, IComponentProvider> {\n const map = new Map<string, IComponentProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createComponent(name: string, viewer: IViewer): IComponent | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const component = provider(viewer);\n component.name = name;\n\n return component;\n }\n}\n\nconst _components = new Map<string, Components>();\n\nfunction componentsRegistry(viewerType = \"\"): IComponentsRegistry {\n let result = _components.get(viewerType);\n if (!result) {\n result = new Components();\n _components.set(viewerType, result);\n }\n return result;\n}\n\nexport { componentsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { FileSource, ILoader, LoadParams } from \"./ILoader\";\n\nexport class Loader implements ILoader {\n public name = \"\";\n public abortController: AbortController = new AbortController();\n\n dispose(): void {\n this.abortController.abort();\n this.abortController = undefined;\n }\n\n isSupport(file: FileSource, format?: string): boolean {\n return false;\n }\n\n load(file: FileSource, format?: string, params?: LoadParams): Promise<this> {\n return Promise.resolve(this);\n }\n\n cancel(): void {\n this.abortController.abort();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { FileSource, ILoader, ILoaderProvider, ILoadersRegistry } from \"./ILoader\";\n\nclass Loaders implements ILoadersRegistry {\n private readonly _providers = new Map<string, ILoaderProvider>();\n\n registerLoader(name: string, provider: ILoaderProvider): void {\n this._providers.set(name, provider);\n }\n\n getLoader(name: string): ILoaderProvider | undefined {\n return this._providers.get(name);\n }\n\n getLoaders(): Map<string, ILoaderProvider> {\n const map = new Map<string, ILoaderProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createLoader(viewer: IViewer, file: FileSource, format?: string): ILoader | null {\n let result: ILoader = null;\n this._providers.forEach((provider, key) => {\n const loader = provider(viewer);\n if (loader.isSupport(file, format)) {\n result = loader;\n result.name = key;\n }\n });\n return result;\n }\n}\n\nconst _loaders = new Map<string, Loaders>();\n\nfunction loadersRegistry(viewerType = \"\"): ILoadersRegistry {\n let result = _loaders.get(viewerType);\n if (!result) {\n result = new Loaders();\n _loaders.set(viewerType, result);\n }\n return result;\n}\n\nexport { loadersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport interface RGB {\n red: number;\n green: number;\n blue: number;\n}\n\n/**\n * Viewer options interface.\n */\nexport interface IOptions {\n /**\n * Show the world coordinate system axes in the bottom-left corner of the viewer.\n *\n * @defaultValue true\n */\n showWCS?: boolean;\n\n /**\n * Enable camera animation.\n *\n * @defaultValue true\n */\n cameraAnimation?: boolean;\n\n /**\n * Enable anti-aliasing. Can be one of:\n *\n * - `false` - Disable anti-aliasing.\n * - `true` - Enable anti-aliasing using MSAA.\n * - `fxaa` - Enable Fast Approximate anti-aliasing (FXAA).\n * - `smaa` - Enable Subpixel Morphological anti-aliasing (SMAA).\n * - `msaa` - Enable Multisample anti-aliasing (MSAA), if the underlying WebGL context supports it.\n *\n * @defaultValue true\n */\n antialiasing?: boolean | string;\n\n /**\n * Show ground shadows below the model.\n *\n * @defaultValue false\n */\n groundShadow?: boolean;\n\n /**\n * Enable ambient shadows.\n *\n * @defaultValue false\n */\n shadows?: boolean;\n\n /**\n * Camera speed on X axis.\n *\n * @defaultValue 4\n */\n cameraAxisXSpeed?: number;\n\n /**\n * Camera speed on Y axis.\n *\n * @defaultValue 1\n */\n cameraAxisYSpeed?: number;\n\n /**\n * Enable ambient occlusion.\n *\n * @defaultValue false\n */\n ambientOcclusion?: boolean;\n\n /**\n * Enable streaming of drawings from the server.\n *\n * If streaming is disabled, the file/assembly will be loaded in one go. The viewer will only update\n * once the loading is complete, which may take a while.\n *\n * If streaming is enabled, {@link enablePartialMode | partial streaming} mode may be enabled as well.\n *\n * @defaultValue true\n */\n enableStreamingMode?: boolean;\n\n /**\n * Enable partial streaming mode to be able open large drawing.\n *\n * In partial streaming mode, the viewer keeps only visible objects in memory and loads other objects\n * when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is enabled,\n * then {@link sceneGraph | scene graph} will be disabled.\n *\n * @defaultValue false\n */\n enablePartialMode?: boolean;\n\n /**\n * The size of the memory buffer for graphics data, in bytes.\n *\n * @defaultValue 3294967296\n */\n memoryLimit?: number;\n\n /**\n * Cutting planes fill color.\n *\n * @defaultValue { red: 0xff, green: 0x98, blue: 0x00 }\n */\n cuttingPlaneFillColor?: RGB;\n\n /**\n * Edges highlight color.\n */\n edgesColor?: { r: number; g: number; b: number };\n\n /**\n * Faces highlight color.\n */\n facesColor?: { r: number; g: number; b: number };\n\n /**\n * Show highlighted edges.\n */\n edgesVisibility?: boolean;\n\n /**\n * Show highlighted edges over drawing.\n */\n edgesOverlap?: boolean;\n\n /**\n * Show highlighted faces over drawing.\n */\n facesOverlap?: boolean;\n\n /**\n * Highlighted faces transparency value, from 0 to 255.\n */\n facesTransparancy?: number;\n\n /**\n * Enable custom highlight settings.\n */\n enableCustomHighlight?: boolean;\n\n /**\n * Enable scene graph.\n *\n * Scene graph increases perfomance improvement, but consumes memory. If scene graph is enabled, then\n * {@link enablePartialMode | partial streaming} mode will be disabled.\n */\n sceneGraph: boolean;\n\n /**\n * Show the edges of the model:\n *\n * - `false` - No model edges are displayed. Usefull for less memory consumption.\n * - `true` - Display isolines.\n */\n edgeModel: boolean;\n\n /**\n * Reverse the mouse wheel direction for zooming:\n *\n * - `false` - Moving the wheel up zooms in, moving down zooms out.\n * - `true` - Moving the wheel up zooms out, moving down zooms in.\n */\n reverseZoomWheel: boolean;\n\n /**\n * Enable mouse wheel zooming.\n */\n enableZoomWheel: boolean;\n\n /**\n * Enable touch gestures.\n *\n * This option will be ignored when {@link enableZoomWheel | mouse wheel zooming} is disabled, since\n * gestures contains touch zoom.\n */\n enableGestures: boolean;\n\n /**\n * Deprecated since `25.8`.\n */\n geometryType?: string;\n\n /**\n * Ruler unit.\n *\n * Available values: Default, Millimeters, Centimeters, Meters, Feet, Inches, Yards, Kilometers, Miles,\n * Micrometers, MicroInches\n *\n * @defaultValue Default\n */\n rulerUnit: string;\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset.\n */\n resetToDefaults?: (fields?: string[]) => void;\n}\n\nexport function defaultOptions(): IOptions {\n return {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { IOptions, RGB, defaultOptions } from \"./IOptions\";\n\nexport class Options implements IOptions {\n protected _emitter?: EventEmitter2;\n protected _data: IOptions;\n\n constructor(emitter?: EventEmitter2) {\n this._emitter = emitter;\n this._data = defaultOptions();\n this.loadFromStorage();\n }\n\n static defaults(): IOptions {\n return defaultOptions();\n }\n\n notifierChangeEvent(): void {\n console.warn(\n \"Options.notifierChangeEvent() has been deprecated since 25.3 and will be removed in a future release, use Options.change() instead.\"\n );\n this.change();\n }\n\n change(): void {\n if (this._emitter !== undefined) {\n this.saveToStorage();\n this._emitter.emit({ type: \"optionschange\", data: this });\n }\n }\n\n saveToStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n localStorage.setItem(\"od-client-settings\", JSON.stringify(this.data));\n } catch (error) {\n console.error(\"Cannot save client settings.\", error);\n }\n }\n\n loadFromStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n const item = localStorage.getItem(\"od-client-settings\");\n if (item) {\n const data = JSON.parse(item);\n this.data = { ...data };\n }\n } catch (error) {\n console.error(\"Cannot load client settings.\", error);\n }\n }\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset. Specify `undefined` to reset all.\n */\n resetToDefaults(fields?: string[]): void {\n if (fields !== undefined) {\n const defaults = Options.defaults();\n const resetData = fields.reduce((acc, field) => {\n acc[field] = defaults[field];\n return acc;\n }, {});\n this.data = { ...this.data, ...resetData };\n } else {\n this.data = { ...this.data, ...Options.defaults() };\n }\n }\n\n get data(): IOptions {\n return this._data;\n }\n\n set data(value: IOptions) {\n const enablePartialMode = value.enableStreamingMode ? value.enablePartialMode : false;\n const sceneGraph = enablePartialMode ? false : value.sceneGraph;\n this._data = { ...Options.defaults(), ...this._data, ...value, enablePartialMode, sceneGraph };\n this.change();\n }\n\n get showWCS(): boolean {\n return this._data.showWCS;\n }\n\n set showWCS(value: boolean) {\n this._data.showWCS = value;\n this.change();\n }\n\n get cameraAnimation(): boolean {\n return this._data.cameraAnimation;\n }\n\n set cameraAnimation(value: boolean) {\n this._data.cameraAnimation = value;\n this.change();\n }\n\n get antialiasing(): boolean | string {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean | string) {\n this._data.antialiasing = value;\n this.change();\n }\n\n get groundShadow(): boolean {\n return this._data.groundShadow;\n }\n\n set groundShadow(value: boolean) {\n this._data.groundShadow = value;\n this.change();\n }\n\n get shadows(): boolean {\n return this._data.shadows;\n }\n\n set shadows(value: boolean) {\n this._data.shadows = value;\n this.change();\n }\n\n get cameraAxisXSpeed(): number {\n return this._data.cameraAxisXSpeed;\n }\n\n set cameraAxisXSpeed(value: number) {\n this._data.cameraAxisXSpeed = value;\n this.change();\n }\n\n get cameraAxisYSpeed(): number {\n return this._data.cameraAxisYSpeed;\n }\n\n set cameraAxisYSpeed(value: number) {\n this.cameraAxisYSpeed = value;\n this.change();\n }\n\n get ambientOcclusion(): boolean {\n return this._data.ambientOcclusion;\n }\n\n set ambientOcclusion(value: boolean) {\n this._data.ambientOcclusion = value;\n this.change();\n }\n\n get enableStreamingMode(): boolean {\n return this._data.enableStreamingMode;\n }\n\n set enableStreamingMode(value: boolean) {\n this._data.enableStreamingMode = value;\n if (!value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get enablePartialMode(): boolean {\n return this._data.enablePartialMode;\n }\n\n set enablePartialMode(value: boolean) {\n this._data.enablePartialMode = value;\n if (value) {\n this._data.enableStreamingMode = true;\n this._data.sceneGraph = false;\n }\n this.change();\n }\n\n get memoryLimit(): number {\n return this._data.memoryLimit;\n }\n\n set memoryLimit(value: number) {\n this._data.memoryLimit = value;\n this.change();\n }\n\n get cuttingPlaneFillColor(): RGB {\n return this._data.cuttingPlaneFillColor;\n }\n\n set cuttingPlaneFillColor(value: RGB) {\n this._data.cuttingPlaneFillColor = value;\n this.change();\n }\n\n get edgesColor() {\n return this._data.edgesColor;\n }\n\n set edgesColor(value) {\n this._data.edgesColor = value;\n this.change();\n }\n\n get facesColor() {\n return this._data.facesColor;\n }\n\n set facesColor(value) {\n this._data.facesColor = value;\n this.change();\n }\n\n get edgesVisibility() {\n return this._data.edgesVisibility;\n }\n\n set edgesVisibility(value) {\n this._data.edgesVisibility = value;\n this.change();\n }\n\n get edgesOverlap() {\n return this._data.edgesOverlap;\n }\n\n set edgesOverlap(value) {\n this._data.edgesOverlap = value;\n this.change();\n }\n\n get facesOverlap() {\n return this._data.facesOverlap;\n }\n\n set facesOverlap(value) {\n this._data.facesOverlap = value;\n this.change();\n }\n\n get facesTransparancy() {\n return this._data.facesTransparancy;\n }\n\n set facesTransparancy(value) {\n this._data.facesTransparancy = value;\n this.change();\n }\n\n get enableCustomHighlight() {\n return this._data.enableCustomHighlight;\n }\n\n set enableCustomHighlight(value) {\n this._data.enableCustomHighlight = value;\n this.change();\n }\n\n get sceneGraph() {\n return this._data.sceneGraph;\n }\n\n set sceneGraph(value) {\n this._data.sceneGraph = value;\n if (value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get edgeModel() {\n return Boolean(this._data.edgeModel);\n }\n\n set edgeModel(value) {\n this._data.edgeModel = Boolean(value);\n this.change();\n }\n\n get reverseZoomWheel() {\n return this._data.reverseZoomWheel;\n }\n\n set reverseZoomWheel(value: boolean) {\n this._data.reverseZoomWheel = !!value;\n this.change();\n }\n\n get enableZoomWheel() {\n return this._data.enableZoomWheel;\n }\n\n set enableZoomWheel(value: boolean) {\n this._data.enableZoomWheel = !!value;\n this.change();\n }\n\n get enableGestures() {\n return this._data.enableGestures;\n }\n\n set enableGestures(value: boolean) {\n this._data.enableGestures = !!value;\n this.change();\n }\n\n get geometryType() {\n return this._data.geometryType;\n }\n\n set geometryType(value: string) {\n this._data.geometryType = value;\n this.change();\n }\n\n get rulerUnit(): string {\n return this._data.rulerUnit;\n }\n\n set rulerUnit(value: string) {\n this._data.rulerUnit = value;\n this.change();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport const CanvasEvents = [\n \"click\",\n \"contextmenu\",\n \"dblclick\",\n \"mousedown\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseup\",\n \"pointercancel\",\n \"pointerdown\",\n \"pointerleave\",\n \"pointermove\",\n \"pointerup\",\n \"touchcancel\",\n \"touchend\",\n \"touchmove\",\n \"touchstart\",\n \"wheel\",\n];\n\nexport const CANVAS_EVENTS = CanvasEvents;\n\n/**\n * Canvas Events.\n *\n * @event\n */\nexport interface CanvasEventMap {\n /**\n * Event that fires on mouse click.\n */\n click: MouseEvent;\n\n /**\n * Event that fires when the user attempts to open a context menu.\n */\n contextmenu: PointerEvent;\n\n /**\n * Event that fires on mouse double click.\n */\n dblclick: MouseEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n mousedown: MouseEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n mouseleave: MouseEvent;\n\n /**\n * Event that fires on mouse move.\n */\n mousemove: MouseEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n mouseup: MouseEvent;\n\n /**\n * Event is fired when the browser determines that there are unlikely to be any more pointer events.\n */\n pointercancel: PointerEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n pointerdown: PointerEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n pointerleave: PointerEvent;\n\n /**\n * Event that fires on mouse move.\n */\n pointermove: PointerEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n pointerup: PointerEvent;\n\n /**\n * Event that fires touch is canceled.\n */\n touchcancel: TouchEvent;\n\n /**\n * Event that fires touch is ended.\n */\n touchend: TouchEvent;\n\n /**\n * Event that fires touch is moving.\n */\n touchmove: TouchEvent;\n\n /**\n * Event that fires when touch is started.\n */\n touchstart: TouchEvent;\n\n /**\n * Event that fires when mouse wheel is moving.\n */\n wheel: MouseEvent;\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAKA,MAAM,gBAAgB,CAAA;IAAtB,IAAA,WAAA,GAAA;IACmB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAoB;QAuC1D;IArCE,IAAA,eAAe,CAAC,EAAU,EAAE,OAAwB,EAAE,WAAiC,EAAE,OAAa,EAAA;IACpG,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAC/D;QAEA,oBAAoB,CAAC,EAAU,EAAE,KAAa,EAAA;YAC5C,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,MAAe,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CA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CAAC,YAAY;QAChC;QAEA,IAAI,YAAY,CAAC,KAAa,EAAA;IAC5B,QAAA,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK;YAC/B,IAAI,CAAC,MAAM,EAAE;QACf;IAEA,IAAA,IAAI,SAAS,GAAA;IACX,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS;QAC7B;QAEA,IAAI,SAAS,CAAC,KAAa,EAAA;IACzB,QAAA,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK;YAC5B,IAAI,CAAC,MAAM,EAAE;QACf;IACD;;ICxVD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAEO,UAAM,YAAY,GAAG;QAC1B,OAAO;QACP,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,WAAW;QACX,SAAS;QACT,eAAe;QACf,aAAa;QACb,cAAc;QACd,aAAa;QACb,WAAW;QACX,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,OAAO;;AAGF,UAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,14 +11,14 @@ class CommandsRegistry {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
registerCommandAlias(id, alias) {
|
|
14
|
-
this.registerCommand(alias, (
|
|
14
|
+
this.registerCommand(alias, (viewer, ...args) => this.executeCommand(id, viewer, ...args));
|
|
15
15
|
}
|
|
16
16
|
getCommand(id) {
|
|
17
17
|
return this._commands.get(id);
|
|
18
18
|
}
|
|
19
19
|
getCommands() {
|
|
20
20
|
const map = new Map;
|
|
21
|
-
this._commands.forEach((
|
|
21
|
+
this._commands.forEach((value, key) => map.set(key, value));
|
|
22
22
|
return map;
|
|
23
23
|
}
|
|
24
24
|
executeCommand(id, viewer, ...args) {
|
|
@@ -33,7 +33,7 @@ class CommandsRegistry {
|
|
|
33
33
|
}
|
|
34
34
|
const {handler: handler, thisArg: thisArg} = command;
|
|
35
35
|
const result = handler.apply(thisArg, [ viewer, ...args ]);
|
|
36
|
-
viewer === null || viewer ===
|
|
36
|
+
viewer === null || viewer === void 0 ? void 0 : viewer.emit({
|
|
37
37
|
type: "command",
|
|
38
38
|
data: id,
|
|
39
39
|
args: args
|
|
@@ -69,11 +69,11 @@ class DraggersRegistry {
|
|
|
69
69
|
}
|
|
70
70
|
registerDraggerAlias(name, alias) {
|
|
71
71
|
const provider = this._providers.get(name);
|
|
72
|
-
if (provider) this.registerDragger(alias,
|
|
72
|
+
if (provider) this.registerDragger(alias, viewer => provider(viewer));
|
|
73
73
|
}
|
|
74
74
|
getDraggers() {
|
|
75
75
|
const map = new Map;
|
|
76
|
-
this._providers.forEach((
|
|
76
|
+
this._providers.forEach((value, key) => map.set(key, value));
|
|
77
77
|
return map;
|
|
78
78
|
}
|
|
79
79
|
createDragger(name, viewer) {
|
|
@@ -112,11 +112,11 @@ class Components {
|
|
|
112
112
|
}
|
|
113
113
|
registerComponentAlias(name, alias) {
|
|
114
114
|
const provider = this._providers.get(name);
|
|
115
|
-
if (provider) this.registerComponent(alias,
|
|
115
|
+
if (provider) this.registerComponent(alias, viewer => provider(viewer));
|
|
116
116
|
}
|
|
117
117
|
getComponents() {
|
|
118
118
|
const map = new Map;
|
|
119
|
-
this._providers.forEach((
|
|
119
|
+
this._providers.forEach((value, key) => map.set(key, value));
|
|
120
120
|
return map;
|
|
121
121
|
}
|
|
122
122
|
createComponent(name, viewer) {
|
|
@@ -171,18 +171,18 @@ class Loaders {
|
|
|
171
171
|
}
|
|
172
172
|
getLoaders() {
|
|
173
173
|
const map = new Map;
|
|
174
|
-
this._providers.forEach((
|
|
174
|
+
this._providers.forEach((value, key) => map.set(key, value));
|
|
175
175
|
return map;
|
|
176
176
|
}
|
|
177
177
|
createLoader(viewer, file, format) {
|
|
178
178
|
let result = null;
|
|
179
|
-
this._providers.forEach((
|
|
179
|
+
this._providers.forEach((provider, key) => {
|
|
180
180
|
const loader = provider(viewer);
|
|
181
181
|
if (loader.isSupport(file, format)) {
|
|
182
182
|
result = loader;
|
|
183
183
|
result.name = key;
|
|
184
184
|
}
|
|
185
|
-
})
|
|
185
|
+
});
|
|
186
186
|
return result;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -286,10 +286,10 @@ class Options {
|
|
|
286
286
|
resetToDefaults(fields) {
|
|
287
287
|
if (fields !== undefined) {
|
|
288
288
|
const defaults = Options.defaults();
|
|
289
|
-
const resetData = fields.reduce((
|
|
289
|
+
const resetData = fields.reduce((acc, field) => {
|
|
290
290
|
acc[field] = defaults[field];
|
|
291
291
|
return acc;
|
|
292
|
-
}
|
|
292
|
+
}, {});
|
|
293
293
|
this.data = {
|
|
294
294
|
...this.data,
|
|
295
295
|
...resetData
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-core.module.js","sources":["../src/commands/Commands.ts","../src/draggers/Dragger.ts","../src/draggers/Draggers.ts","../src/components/Component.ts","../src/components/Components.ts","../src/loaders/Loader.ts","../src/loaders/Loaders.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsRegistry } from \"./ICommands\";\n\nclass CommandsRegistry implements ICommandsRegistry {\n private readonly _commands = new Map<string, ICommand>();\n\n registerCommand(id: string, handler: ICommandHandler, description?: ICommandDescription, thisArg?: any): void {\n this._commands.set(id, { id, handler, thisArg, description });\n }\n\n registerCommandAlias(id: string, alias: string): void {\n this.registerCommand(alias, (viewer: IViewer, ...args) => this.executeCommand(id, viewer, ...args));\n }\n\n getCommand(id: string): ICommand | undefined {\n return this._commands.get(id);\n }\n\n getCommands(): Map<string, ICommand> {\n const map = new Map<string, ICommand>();\n this._commands.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n executeCommand(id: string, viewer: IViewer, ...args: any[]): any {\n const command = this._commands.get(id);\n if (!command) {\n if (viewer) {\n const isDraggerCommand = viewer.draggers.includes(id);\n if (isDraggerCommand) return viewer.setActiveDragger(id);\n }\n\n console.warn(`Command '${id}' not found`);\n return undefined;\n }\n\n const { handler, thisArg } = command;\n const result = handler.apply(thisArg, [viewer, ...args]);\n\n viewer?.emit({ type: \"command\", data: id, args });\n\n return result;\n }\n}\n\nconst _commandsRegistry = new Map<string, CommandsRegistry>();\n\nfunction commandsRegistry(viewerType = \"\"): ICommandsRegistry {\n let result = _commandsRegistry.get(viewerType);\n if (!result) {\n result = new CommandsRegistry();\n _commandsRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { commandsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IDragger } from \"./IDraggers\";\n\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IDragger, IDraggerProvider, IDraggersRegistry } from \"./IDraggers\";\n\nclass DraggersRegistry implements IDraggersRegistry {\n private readonly _providers = new Map<string, IDraggerProvider>();\n\n registerDragger(name: string, provider: IDraggerProvider): void {\n this._providers.set(name, provider);\n }\n\n registerDraggerAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerDragger(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getDraggers(): Map<string, IDraggerProvider> {\n const map = new Map<string, IDraggerProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createDragger(name: string, viewer: IViewer): IDragger | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const dragger = provider(viewer);\n dragger.name = name;\n\n return dragger;\n }\n}\n\nconst _draggersRegistry = new Map<string, DraggersRegistry>();\n\nfunction draggersRegistry(viewerType = \"\"): IDraggersRegistry {\n let result = _draggersRegistry.get(viewerType);\n if (!result) {\n result = new DraggersRegistry();\n _draggersRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { draggersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IComponent } from \"./IComponents\";\n\nexport class Component implements IComponent {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IComponent, IComponentProvider, IComponentsRegistry } from \"./IComponents\";\n\nclass Components implements IComponentsRegistry {\n private readonly _providers = new Map<string, IComponentProvider>();\n\n registerComponent(name: string, provider: IComponentProvider): void {\n this._providers.set(name, provider);\n }\n\n registerComponentAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerComponent(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getComponents(): Map<string, IComponentProvider> {\n const map = new Map<string, IComponentProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createComponent(name: string, viewer: IViewer): IComponent | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const component = provider(viewer);\n component.name = name;\n\n return component;\n }\n}\n\nconst _components = new Map<string, Components>();\n\nfunction componentsRegistry(viewerType = \"\"): IComponentsRegistry {\n let result = _components.get(viewerType);\n if (!result) {\n result = new Components();\n _components.set(viewerType, result);\n }\n return result;\n}\n\nexport { componentsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { FileSource, ILoader, LoadParams } from \"./ILoader\";\n\nexport class Loader implements ILoader {\n public name = \"\";\n public abortController: AbortController = new AbortController();\n\n dispose(): void {\n this.abortController.abort();\n this.abortController = undefined;\n }\n\n isSupport(file: FileSource, format?: string): boolean {\n return false;\n }\n\n load(file: FileSource, format?: string, params?: LoadParams): Promise<this> {\n return Promise.resolve(this);\n }\n\n cancel(): void {\n this.abortController.abort();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { FileSource, ILoader, ILoaderProvider, ILoadersRegistry } from \"./ILoader\";\n\nclass Loaders implements ILoadersRegistry {\n private readonly _providers = new Map<string, ILoaderProvider>();\n\n registerLoader(name: string, provider: ILoaderProvider): void {\n this._providers.set(name, provider);\n }\n\n getLoader(name: string): ILoaderProvider | undefined {\n return this._providers.get(name);\n }\n\n getLoaders(): Map<string, ILoaderProvider> {\n const map = new Map<string, ILoaderProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createLoader(viewer: IViewer, file: FileSource, format?: string): ILoader | null {\n let result: ILoader = null;\n this._providers.forEach((provider, key) => {\n const loader = provider(viewer);\n if (loader.isSupport(file, format)) {\n result = loader;\n result.name = key;\n }\n });\n return result;\n }\n}\n\nconst _loaders = new Map<string, Loaders>();\n\nfunction loadersRegistry(viewerType = \"\"): ILoadersRegistry {\n let result = _loaders.get(viewerType);\n if (!result) {\n result = new Loaders();\n _loaders.set(viewerType, result);\n }\n return result;\n}\n\nexport { loadersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport interface RGB {\n red: number;\n green: number;\n blue: number;\n}\n\n/**\n * Viewer options interface.\n */\nexport interface IOptions {\n /**\n * Show the world coordinate system axes in the bottom-left corner of the viewer.\n *\n * @defaultValue true\n */\n showWCS?: boolean;\n\n /**\n * Enable camera animation.\n *\n * @defaultValue true\n */\n cameraAnimation?: boolean;\n\n /**\n * Enable anti-aliasing. Can be one of:\n *\n * - `false` - Disable anti-aliasing.\n * - `true` - Enable anti-aliasing using MSAA.\n * - `fxaa` - Enable Fast Approximate anti-aliasing (FXAA).\n * - `smaa` - Enable Subpixel Morphological anti-aliasing (SMAA).\n * - `msaa` - Enable Multisample anti-aliasing (MSAA), if the underlying WebGL context supports it.\n *\n * @defaultValue true\n */\n antialiasing?: boolean | string;\n\n /**\n * Show ground shadows below the model.\n *\n * @defaultValue false\n */\n groundShadow?: boolean;\n\n /**\n * Enable ambient shadows.\n *\n * @defaultValue false\n */\n shadows?: boolean;\n\n /**\n * Camera speed on X axis.\n *\n * @defaultValue 4\n */\n cameraAxisXSpeed?: number;\n\n /**\n * Camera speed on Y axis.\n *\n * @defaultValue 1\n */\n cameraAxisYSpeed?: number;\n\n /**\n * Enable ambient occlusion.\n *\n * @defaultValue false\n */\n ambientOcclusion?: boolean;\n\n /**\n * Enable streaming of drawings from the server.\n *\n * If streaming is disabled, the file/assembly will be loaded in one go. The viewer will only update\n * once the loading is complete, which may take a while.\n *\n * If streaming is enabled, {@link enablePartialMode | partial streaming} mode may be enabled as well.\n *\n * @defaultValue true\n */\n enableStreamingMode?: boolean;\n\n /**\n * Enable partial streaming mode to be able open large drawing.\n *\n * In partial streaming mode, the viewer keeps only visible objects in memory and loads other objects\n * when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is enabled,\n * then {@link sceneGraph | scene graph} will be disabled.\n *\n * @defaultValue false\n */\n enablePartialMode?: boolean;\n\n /**\n * The size of the memory buffer for graphics data, in bytes.\n *\n * @defaultValue 3294967296\n */\n memoryLimit?: number;\n\n /**\n * Cutting planes fill color.\n *\n * @defaultValue { red: 0xff, green: 0x98, blue: 0x00 }\n */\n cuttingPlaneFillColor?: RGB;\n\n /**\n * Edges highlight color.\n */\n edgesColor?: { r: number; g: number; b: number };\n\n /**\n * Faces highlight color.\n */\n facesColor?: { r: number; g: number; b: number };\n\n /**\n * Show highlighted edges.\n */\n edgesVisibility?: boolean;\n\n /**\n * Show highlighted edges over drawing.\n */\n edgesOverlap?: boolean;\n\n /**\n * Show highlighted faces over drawing.\n */\n facesOverlap?: boolean;\n\n /**\n * Highlighted faces transparency value, from 0 to 255.\n */\n facesTransparancy?: number;\n\n /**\n * Enable custom highlight settings.\n */\n enableCustomHighlight?: boolean;\n\n /**\n * Enable scene graph.\n *\n * Scene graph increases perfomance improvement, but consumes memory. If scene graph is enabled, then\n * {@link enablePartialMode | partial streaming} mode will be disabled.\n */\n sceneGraph: boolean;\n\n /**\n * Show the edges of the model:\n *\n * - `false` - No model edges are displayed. Usefull for less memory consumption.\n * - `true` - Display isolines.\n */\n edgeModel: boolean;\n\n /**\n * Reverse the mouse wheel direction for zooming:\n *\n * - `false` - Moving the wheel up zooms in, moving down zooms out.\n * - `true` - Moving the wheel up zooms out, moving down zooms in.\n */\n reverseZoomWheel: boolean;\n\n /**\n * Enable mouse wheel zooming.\n */\n enableZoomWheel: boolean;\n\n /**\n * Enable touch gestures.\n *\n * This option will be ignored when {@link enableZoomWheel | mouse wheel zooming} is disabled, since\n * gestures contains touch zoom.\n */\n enableGestures: boolean;\n\n /**\n * Deprecated since `25.8`.\n */\n geometryType?: string;\n\n /**\n * Ruler unit.\n *\n * Available values: Default, Millimeters, Centimeters, Meters, Feet, Inches, Yards, Kilometers, Miles,\n * Micrometers, MicroInches\n *\n * @defaultValue Default\n */\n rulerUnit: string;\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset.\n */\n resetToDefaults?: (fields?: string[]) => void;\n}\n\nexport function defaultOptions(): IOptions {\n return {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { IOptions, RGB, defaultOptions } from \"./IOptions\";\n\nexport class Options implements IOptions {\n protected _emitter?: EventEmitter2;\n protected _data: IOptions;\n\n constructor(emitter?: EventEmitter2) {\n this._emitter = emitter;\n this._data = defaultOptions();\n this.loadFromStorage();\n }\n\n static defaults(): IOptions {\n return defaultOptions();\n }\n\n notifierChangeEvent(): void {\n console.warn(\n \"Options.notifierChangeEvent() has been deprecated since 25.3 and will be removed in a future release, use Options.change() instead.\"\n );\n this.change();\n }\n\n change(): void {\n if (this._emitter !== undefined) {\n this.saveToStorage();\n this._emitter.emit({ type: \"optionschange\", data: this });\n }\n }\n\n saveToStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n localStorage.setItem(\"od-client-settings\", JSON.stringify(this.data));\n } catch (error) {\n console.error(\"Cannot save client settings.\", error);\n }\n }\n\n loadFromStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n const item = localStorage.getItem(\"od-client-settings\");\n if (item) {\n const data = JSON.parse(item);\n this.data = { ...data };\n }\n } catch (error) {\n console.error(\"Cannot load client settings.\", error);\n }\n }\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset. Specify `undefined` to reset all.\n */\n resetToDefaults(fields?: string[]): void {\n if (fields !== undefined) {\n const defaults = Options.defaults();\n const resetData = fields.reduce((acc, field) => {\n acc[field] = defaults[field];\n return acc;\n }, {});\n this.data = { ...this.data, ...resetData };\n } else {\n this.data = { ...this.data, ...Options.defaults() };\n }\n }\n\n get data(): IOptions {\n return this._data;\n }\n\n set data(value: IOptions) {\n const enablePartialMode = value.enableStreamingMode ? value.enablePartialMode : false;\n const sceneGraph = enablePartialMode ? false : value.sceneGraph;\n this._data = { ...Options.defaults(), ...this._data, ...value, enablePartialMode, sceneGraph };\n this.change();\n }\n\n get showWCS(): boolean {\n return this._data.showWCS;\n }\n\n set showWCS(value: boolean) {\n this._data.showWCS = value;\n this.change();\n }\n\n get cameraAnimation(): boolean {\n return this._data.cameraAnimation;\n }\n\n set cameraAnimation(value: boolean) {\n this._data.cameraAnimation = value;\n this.change();\n }\n\n get antialiasing(): boolean | string {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean | string) {\n this._data.antialiasing = value;\n this.change();\n }\n\n get groundShadow(): boolean {\n return this._data.groundShadow;\n }\n\n set groundShadow(value: boolean) {\n this._data.groundShadow = value;\n this.change();\n }\n\n get shadows(): boolean {\n return this._data.shadows;\n }\n\n set shadows(value: boolean) {\n this._data.shadows = value;\n this.change();\n }\n\n get cameraAxisXSpeed(): number {\n return this._data.cameraAxisXSpeed;\n }\n\n set cameraAxisXSpeed(value: number) {\n this._data.cameraAxisXSpeed = value;\n this.change();\n }\n\n get cameraAxisYSpeed(): number {\n return this._data.cameraAxisYSpeed;\n }\n\n set cameraAxisYSpeed(value: number) {\n this.cameraAxisYSpeed = value;\n this.change();\n }\n\n get ambientOcclusion(): boolean {\n return this._data.ambientOcclusion;\n }\n\n set ambientOcclusion(value: boolean) {\n this._data.ambientOcclusion = value;\n this.change();\n }\n\n get enableStreamingMode(): boolean {\n return this._data.enableStreamingMode;\n }\n\n set enableStreamingMode(value: boolean) {\n this._data.enableStreamingMode = value;\n if (!value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get enablePartialMode(): boolean {\n return this._data.enablePartialMode;\n }\n\n set enablePartialMode(value: boolean) {\n this._data.enablePartialMode = value;\n if (value) {\n this._data.enableStreamingMode = true;\n this._data.sceneGraph = false;\n }\n this.change();\n }\n\n get memoryLimit(): number {\n return this._data.memoryLimit;\n }\n\n set memoryLimit(value: number) {\n this._data.memoryLimit = value;\n this.change();\n }\n\n get cuttingPlaneFillColor(): RGB {\n return this._data.cuttingPlaneFillColor;\n }\n\n set cuttingPlaneFillColor(value: RGB) {\n this._data.cuttingPlaneFillColor = value;\n this.change();\n }\n\n get edgesColor() {\n return this._data.edgesColor;\n }\n\n set edgesColor(value) {\n this._data.edgesColor = value;\n this.change();\n }\n\n get facesColor() {\n return this._data.facesColor;\n }\n\n set facesColor(value) {\n this._data.facesColor = value;\n this.change();\n }\n\n get edgesVisibility() {\n return this._data.edgesVisibility;\n }\n\n set edgesVisibility(value) {\n this._data.edgesVisibility = value;\n this.change();\n }\n\n get edgesOverlap() {\n return this._data.edgesOverlap;\n }\n\n set edgesOverlap(value) {\n this._data.edgesOverlap = value;\n this.change();\n }\n\n get facesOverlap() {\n return this._data.facesOverlap;\n }\n\n set facesOverlap(value) {\n this._data.facesOverlap = value;\n this.change();\n }\n\n get facesTransparancy() {\n return this._data.facesTransparancy;\n }\n\n set facesTransparancy(value) {\n this._data.facesTransparancy = value;\n this.change();\n }\n\n get enableCustomHighlight() {\n return this._data.enableCustomHighlight;\n }\n\n set enableCustomHighlight(value) {\n this._data.enableCustomHighlight = value;\n this.change();\n }\n\n get sceneGraph() {\n return this._data.sceneGraph;\n }\n\n set sceneGraph(value) {\n this._data.sceneGraph = value;\n if (value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get edgeModel() {\n return Boolean(this._data.edgeModel);\n }\n\n set edgeModel(value) {\n this._data.edgeModel = Boolean(value);\n this.change();\n }\n\n get reverseZoomWheel() {\n return this._data.reverseZoomWheel;\n }\n\n set reverseZoomWheel(value: boolean) {\n this._data.reverseZoomWheel = !!value;\n this.change();\n }\n\n get enableZoomWheel() {\n return this._data.enableZoomWheel;\n }\n\n set enableZoomWheel(value: boolean) {\n this._data.enableZoomWheel = !!value;\n this.change();\n }\n\n get enableGestures() {\n return this._data.enableGestures;\n }\n\n set enableGestures(value: boolean) {\n this._data.enableGestures = !!value;\n this.change();\n }\n\n get geometryType() {\n return this._data.geometryType;\n }\n\n set geometryType(value: string) {\n this._data.geometryType = value;\n this.change();\n }\n\n get rulerUnit(): string {\n return this._data.rulerUnit;\n }\n\n set rulerUnit(value: string) {\n this._data.rulerUnit = value;\n this.change();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport const CanvasEvents = [\n \"click\",\n \"contextmenu\",\n \"dblclick\",\n \"mousedown\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseup\",\n \"pointercancel\",\n \"pointerdown\",\n \"pointerleave\",\n \"pointermove\",\n \"pointerup\",\n \"touchcancel\",\n \"touchend\",\n \"touchmove\",\n \"touchstart\",\n \"wheel\",\n];\n\nexport const CANVAS_EVENTS = CanvasEvents;\n\n/**\n * Canvas Events.\n *\n * @event\n */\nexport interface CanvasEventMap {\n /**\n * Event that fires on mouse click.\n */\n click: MouseEvent;\n\n /**\n * Event that fires when the user attempts to open a context menu.\n */\n contextmenu: PointerEvent;\n\n /**\n * Event that fires on mouse double click.\n */\n dblclick: MouseEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n mousedown: MouseEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n mouseleave: MouseEvent;\n\n /**\n * Event that fires on mouse move.\n */\n mousemove: MouseEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n mouseup: MouseEvent;\n\n /**\n * Event is fired when the browser determines that there are unlikely to be any more pointer events.\n */\n pointercancel: PointerEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n pointerdown: PointerEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n pointerleave: PointerEvent;\n\n /**\n * Event that fires on mouse move.\n */\n pointermove: PointerEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n pointerup: PointerEvent;\n\n /**\n * Event that fires touch is canceled.\n */\n touchcancel: TouchEvent;\n\n /**\n * Event that fires touch is ended.\n */\n touchend: TouchEvent;\n\n /**\n * Event that fires touch is moving.\n */\n touchmove: TouchEvent;\n\n /**\n * Event that fires when touch is started.\n */\n touchstart: TouchEvent;\n\n /**\n * Event that fires when mouse wheel is moving.\n */\n wheel: MouseEvent;\n}\n"],"names":["CommandsRegistry","constructor","this","_commands","Map","registerCommand","id","handler","description","thisArg","set","registerCommandAlias","alias","viewer","args","executeCommand","getCommand","get","getCommands","map","forEach","value","key","command","isDraggerCommand","draggers","includes","setActiveDragger","console","warn","undefined","result","apply","emit","type","data","_commandsRegistry","commandsRegistry","viewerType","Dragger","name","dispose","DraggersRegistry","_providers","registerDragger","provider","registerDraggerAlias","getDraggers","createDragger","dragger","_draggersRegistry","draggersRegistry","Component","Components","registerComponent","registerComponentAlias","getComponents","createComponent","component","_components","componentsRegistry","Loader","abortController","AbortController","abort","isSupport","file","format","load","params","Promise","resolve","cancel","Loaders","registerLoader","getLoader","getLoaders","createLoader","loader","_loaders","loadersRegistry","defaultOptions","showWCS","cameraAnimation","antialiasing","groundShadow","shadows","cameraAxisXSpeed","cameraAxisYSpeed","ambientOcclusion","enableStreamingMode","enablePartialMode","memoryLimit","cuttingPlaneFillColor","red","green","blue","edgesColor","r","g","b","facesColor","edgesVisibility","edgesOverlap","facesOverlap","facesTransparancy","enableCustomHighlight","sceneGraph","edgeModel","reverseZoomWheel","enableZoomWheel","enableGestures","geometryType","rulerUnit","Options","emitter","_emitter","_data","loadFromStorage","defaults","notifierChangeEvent","change","saveToStorage","window","localStorage","setItem","JSON","stringify","error","item","getItem","parse","resetToDefaults","fields","resetData","reduce","acc","field","Boolean","CanvasEvents","CANVAS_EVENTS"],"mappings":"AA0BA,MAAMA;IAAN,WAAAC;QACmBC,KAAAC,YAAY,IAAIC;;IAEjC,eAAAC,CAAgBC,IAAYC,SAA0BC,aAAmCC;QACvFP,KAAKC,UAAUO,IAAIJ,IAAI;YAAEA;YAAIC;YAASE;YAASD;;;IAGjD,oBAAAG,CAAqBL,IAAYM;QAC/BV,KAAKG,gBAAgBO,QAAO,CAACC,WAAoBC,SAASZ,KAAKa,eAAeT,IAAIO,WAAWC;;IAG/F,UAAAE,CAAWV;QACT,OAAOJ,KAAKC,UAAUc,IAAIX;;IAG5B,WAAAY;QACE,MAAMC,MAAM,IAAIf;QAChBF,KAAKC,UAAUiB,SAAQ,CAACC,OAAOC,QAAQH,IAAIT,IAAIY,KAAKD;QACpD,OAAOF;;IAGT,cAAAJ,CAAeT,IAAYO,WAAoBC;QAC7C,MAAMS,UAAUrB,KAAKC,UAAUc,IAAIX;QACnC,KAAKiB,SAAS;YACZ,IAAIV,QAAQ;gBACV,MAAMW,mBAAmBX,OAAOY,SAASC,SAASpB;gBAClD,IAAIkB,kBAAkB,OAAOX,OAAOc,iBAAiBrB;;YAGvDsB,QAAQC,KAAK,YAAYvB;YACzB,OAAOwB;;QAGT,OAAMvB,SAAEA,SAAOE,SAAEA,WAAYc;QAC7B,MAAMQ,SAASxB,QAAQyB,MAAMvB,SAAS,EAACI,WAAWC;QAElDD,mBAAAA,WAAMiB,YAAAA,YAANjB,OAAQoB,KAAK;YAAEC,MAAM;YAAWC,MAAM7B;YAAIQ;;QAE1C,OAAOiB;;;;AAIX,MA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QACZnB,KAAKmH,MAAMT,YAAY8B,QAAQrH;QAC/BnB,KAAKuH;;IAGP,oBAAIZ;QACF,OAAO3G,KAAKmH,MAAMR;;IAGpB,oBAAIA,CAAiBxF;QACnBnB,KAAKmH,MAAMR,qBAAqBxF;QAChCnB,KAAKuH;;IAGP,mBAAIX;QACF,OAAO5G,KAAKmH,MAAMP;;IAGpB,mBAAIA,CAAgBzF;QAClBnB,KAAKmH,MAAMP,oBAAoBzF;QAC/BnB,KAAKuH;;IAGP,kBAAIV;QACF,OAAO7G,KAAKmH,MAAMN;;IAGpB,kBAAIA,CAAe1F;QACjBnB,KAAKmH,MAAMN,mBAAmB1F;QAC9BnB,KAAKuH;;IAGP,gBAAIT;QACF,OAAO9G,KAAKmH,MAAML;;IAGpB,gBAAIA,CAAa3F;QACfnB,KAAKmH,MAAML,eAAe3F;QAC1BnB,KAAKuH;;IAGP,aAAIR;QACF,OAAO/G,KAAKmH,MAAMJ;;IAGpB,aAAIA,CAAU5F;QACZnB,KAAKmH,MAAMJ,YAAY5F;QACvBnB,KAAKuH;;;;AC/TI,MAAAkB,eAAe,EAC1B,SACA,eACA,YACA,aACA,cACA,aACA,WACA,iBACA,eACA,gBACA,eACA,aACA,eACA,YACA,aACA,cACA;;AAGK,MAAMC,gBAAgBD;;"}
|
|
1
|
+
{"version":3,"file":"viewer-core.module.js","sources":["../src/commands/Commands.ts","../src/draggers/Dragger.ts","../src/draggers/Draggers.ts","../src/components/Component.ts","../src/components/Components.ts","../src/loaders/Loader.ts","../src/loaders/Loaders.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsRegistry } from \"./ICommands\";\n\nclass CommandsRegistry implements ICommandsRegistry {\n private readonly _commands = new Map<string, ICommand>();\n\n registerCommand(id: string, handler: ICommandHandler, description?: ICommandDescription, thisArg?: any): void {\n this._commands.set(id, { id, handler, thisArg, description });\n }\n\n registerCommandAlias(id: string, alias: string): void {\n this.registerCommand(alias, (viewer: IViewer, ...args) => this.executeCommand(id, viewer, ...args));\n }\n\n getCommand(id: string): ICommand | undefined {\n return this._commands.get(id);\n }\n\n getCommands(): Map<string, ICommand> {\n const map = new Map<string, ICommand>();\n this._commands.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n executeCommand(id: string, viewer: IViewer, ...args: any[]): any {\n const command = this._commands.get(id);\n if (!command) {\n if (viewer) {\n const isDraggerCommand = viewer.draggers.includes(id);\n if (isDraggerCommand) return viewer.setActiveDragger(id);\n }\n\n console.warn(`Command '${id}' not found`);\n return undefined;\n }\n\n const { handler, thisArg } = command;\n const result = handler.apply(thisArg, [viewer, ...args]);\n\n viewer?.emit({ type: \"command\", data: id, args });\n\n return result;\n }\n}\n\nconst _commandsRegistry = new Map<string, CommandsRegistry>();\n\nfunction commandsRegistry(viewerType = \"\"): ICommandsRegistry {\n let result = _commandsRegistry.get(viewerType);\n if (!result) {\n result = new CommandsRegistry();\n _commandsRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { commandsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IDragger } from \"./IDraggers\";\n\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IDragger, IDraggerProvider, IDraggersRegistry } from \"./IDraggers\";\n\nclass DraggersRegistry implements IDraggersRegistry {\n private readonly _providers = new Map<string, IDraggerProvider>();\n\n registerDragger(name: string, provider: IDraggerProvider): void {\n this._providers.set(name, provider);\n }\n\n registerDraggerAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerDragger(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getDraggers(): Map<string, IDraggerProvider> {\n const map = new Map<string, IDraggerProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createDragger(name: string, viewer: IViewer): IDragger | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const dragger = provider(viewer);\n dragger.name = name;\n\n return dragger;\n }\n}\n\nconst _draggersRegistry = new Map<string, DraggersRegistry>();\n\nfunction draggersRegistry(viewerType = \"\"): IDraggersRegistry {\n let result = _draggersRegistry.get(viewerType);\n if (!result) {\n result = new DraggersRegistry();\n _draggersRegistry.set(viewerType, result);\n }\n return result;\n}\n\nexport { draggersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport type { IComponent } from \"./IComponents\";\n\nexport class Component implements IComponent {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n dispose(): void {}\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { IComponent, IComponentProvider, IComponentsRegistry } from \"./IComponents\";\n\nclass Components implements IComponentsRegistry {\n private readonly _providers = new Map<string, IComponentProvider>();\n\n registerComponent(name: string, provider: IComponentProvider): void {\n this._providers.set(name, provider);\n }\n\n registerComponentAlias(name: string, alias: string): void {\n const provider = this._providers.get(name);\n if (provider) this.registerComponent(alias, (viewer: IViewer) => provider(viewer));\n }\n\n getComponents(): Map<string, IComponentProvider> {\n const map = new Map<string, IComponentProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createComponent(name: string, viewer: IViewer): IComponent | null {\n const provider = this._providers.get(name);\n if (!provider) return null;\n\n const component = provider(viewer);\n component.name = name;\n\n return component;\n }\n}\n\nconst _components = new Map<string, Components>();\n\nfunction componentsRegistry(viewerType = \"\"): IComponentsRegistry {\n let result = _components.get(viewerType);\n if (!result) {\n result = new Components();\n _components.set(viewerType, result);\n }\n return result;\n}\n\nexport { componentsRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { FileSource, ILoader, LoadParams } from \"./ILoader\";\n\nexport class Loader implements ILoader {\n public name = \"\";\n public abortController: AbortController = new AbortController();\n\n dispose(): void {\n this.abortController.abort();\n this.abortController = undefined;\n }\n\n isSupport(file: FileSource, format?: string): boolean {\n return false;\n }\n\n load(file: FileSource, format?: string, params?: LoadParams): Promise<this> {\n return Promise.resolve(this);\n }\n\n cancel(): void {\n this.abortController.abort();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2024, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { IViewer } from \"../viewer/IViewer\";\nimport { FileSource, ILoader, ILoaderProvider, ILoadersRegistry } from \"./ILoader\";\n\nclass Loaders implements ILoadersRegistry {\n private readonly _providers = new Map<string, ILoaderProvider>();\n\n registerLoader(name: string, provider: ILoaderProvider): void {\n this._providers.set(name, provider);\n }\n\n getLoader(name: string): ILoaderProvider | undefined {\n return this._providers.get(name);\n }\n\n getLoaders(): Map<string, ILoaderProvider> {\n const map = new Map<string, ILoaderProvider>();\n this._providers.forEach((value, key) => map.set(key, value));\n return map;\n }\n\n createLoader(viewer: IViewer, file: FileSource, format?: string): ILoader | null {\n let result: ILoader = null;\n this._providers.forEach((provider, key) => {\n const loader = provider(viewer);\n if (loader.isSupport(file, format)) {\n result = loader;\n result.name = key;\n }\n });\n return result;\n }\n}\n\nconst _loaders = new Map<string, Loaders>();\n\nfunction loadersRegistry(viewerType = \"\"): ILoadersRegistry {\n let result = _loaders.get(viewerType);\n if (!result) {\n result = new Loaders();\n _loaders.set(viewerType, result);\n }\n return result;\n}\n\nexport { loadersRegistry };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport interface RGB {\n red: number;\n green: number;\n blue: number;\n}\n\n/**\n * Viewer options interface.\n */\nexport interface IOptions {\n /**\n * Show the world coordinate system axes in the bottom-left corner of the viewer.\n *\n * @defaultValue true\n */\n showWCS?: boolean;\n\n /**\n * Enable camera animation.\n *\n * @defaultValue true\n */\n cameraAnimation?: boolean;\n\n /**\n * Enable anti-aliasing. Can be one of:\n *\n * - `false` - Disable anti-aliasing.\n * - `true` - Enable anti-aliasing using MSAA.\n * - `fxaa` - Enable Fast Approximate anti-aliasing (FXAA).\n * - `smaa` - Enable Subpixel Morphological anti-aliasing (SMAA).\n * - `msaa` - Enable Multisample anti-aliasing (MSAA), if the underlying WebGL context supports it.\n *\n * @defaultValue true\n */\n antialiasing?: boolean | string;\n\n /**\n * Show ground shadows below the model.\n *\n * @defaultValue false\n */\n groundShadow?: boolean;\n\n /**\n * Enable ambient shadows.\n *\n * @defaultValue false\n */\n shadows?: boolean;\n\n /**\n * Camera speed on X axis.\n *\n * @defaultValue 4\n */\n cameraAxisXSpeed?: number;\n\n /**\n * Camera speed on Y axis.\n *\n * @defaultValue 1\n */\n cameraAxisYSpeed?: number;\n\n /**\n * Enable ambient occlusion.\n *\n * @defaultValue false\n */\n ambientOcclusion?: boolean;\n\n /**\n * Enable streaming of drawings from the server.\n *\n * If streaming is disabled, the file/assembly will be loaded in one go. The viewer will only update\n * once the loading is complete, which may take a while.\n *\n * If streaming is enabled, {@link enablePartialMode | partial streaming} mode may be enabled as well.\n *\n * @defaultValue true\n */\n enableStreamingMode?: boolean;\n\n /**\n * Enable partial streaming mode to be able open large drawing.\n *\n * In partial streaming mode, the viewer keeps only visible objects in memory and loads other objects\n * when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is enabled,\n * then {@link sceneGraph | scene graph} will be disabled.\n *\n * @defaultValue false\n */\n enablePartialMode?: boolean;\n\n /**\n * The size of the memory buffer for graphics data, in bytes.\n *\n * @defaultValue 3294967296\n */\n memoryLimit?: number;\n\n /**\n * Cutting planes fill color.\n *\n * @defaultValue { red: 0xff, green: 0x98, blue: 0x00 }\n */\n cuttingPlaneFillColor?: RGB;\n\n /**\n * Edges highlight color.\n */\n edgesColor?: { r: number; g: number; b: number };\n\n /**\n * Faces highlight color.\n */\n facesColor?: { r: number; g: number; b: number };\n\n /**\n * Show highlighted edges.\n */\n edgesVisibility?: boolean;\n\n /**\n * Show highlighted edges over drawing.\n */\n edgesOverlap?: boolean;\n\n /**\n * Show highlighted faces over drawing.\n */\n facesOverlap?: boolean;\n\n /**\n * Highlighted faces transparency value, from 0 to 255.\n */\n facesTransparancy?: number;\n\n /**\n * Enable custom highlight settings.\n */\n enableCustomHighlight?: boolean;\n\n /**\n * Enable scene graph.\n *\n * Scene graph increases perfomance improvement, but consumes memory. If scene graph is enabled, then\n * {@link enablePartialMode | partial streaming} mode will be disabled.\n */\n sceneGraph: boolean;\n\n /**\n * Show the edges of the model:\n *\n * - `false` - No model edges are displayed. Usefull for less memory consumption.\n * - `true` - Display isolines.\n */\n edgeModel: boolean;\n\n /**\n * Reverse the mouse wheel direction for zooming:\n *\n * - `false` - Moving the wheel up zooms in, moving down zooms out.\n * - `true` - Moving the wheel up zooms out, moving down zooms in.\n */\n reverseZoomWheel: boolean;\n\n /**\n * Enable mouse wheel zooming.\n */\n enableZoomWheel: boolean;\n\n /**\n * Enable touch gestures.\n *\n * This option will be ignored when {@link enableZoomWheel | mouse wheel zooming} is disabled, since\n * gestures contains touch zoom.\n */\n enableGestures: boolean;\n\n /**\n * Deprecated since `25.8`.\n */\n geometryType?: string;\n\n /**\n * Ruler unit.\n *\n * Available values: Default, Millimeters, Centimeters, Meters, Feet, Inches, Yards, Kilometers, Miles,\n * Micrometers, MicroInches\n *\n * @defaultValue Default\n */\n rulerUnit: string;\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset.\n */\n resetToDefaults?: (fields?: string[]) => void;\n}\n\nexport function defaultOptions(): IOptions {\n return {\n showWCS: true,\n cameraAnimation: true,\n antialiasing: true,\n groundShadow: false,\n shadows: false,\n cameraAxisXSpeed: 4,\n cameraAxisYSpeed: 1,\n ambientOcclusion: false,\n enableStreamingMode: true,\n enablePartialMode: false,\n memoryLimit: 3294967296,\n cuttingPlaneFillColor: { red: 0xff, green: 0x98, blue: 0x00 },\n edgesColor: { r: 0xff, g: 0x98, b: 0x00 },\n facesColor: { r: 0xff, g: 0x98, b: 0x00 },\n edgesVisibility: true,\n edgesOverlap: true,\n facesOverlap: false,\n facesTransparancy: 200,\n enableCustomHighlight: true,\n sceneGraph: false,\n edgeModel: true,\n reverseZoomWheel: false,\n enableZoomWheel: true,\n enableGestures: true,\n geometryType: \"vsfx\",\n rulerUnit: \"Default\",\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { IOptions, RGB, defaultOptions } from \"./IOptions\";\n\nexport class Options implements IOptions {\n protected _emitter?: EventEmitter2;\n protected _data: IOptions;\n\n constructor(emitter?: EventEmitter2) {\n this._emitter = emitter;\n this._data = defaultOptions();\n this.loadFromStorage();\n }\n\n static defaults(): IOptions {\n return defaultOptions();\n }\n\n notifierChangeEvent(): void {\n console.warn(\n \"Options.notifierChangeEvent() has been deprecated since 25.3 and will be removed in a future release, use Options.change() instead.\"\n );\n this.change();\n }\n\n change(): void {\n if (this._emitter !== undefined) {\n this.saveToStorage();\n this._emitter.emit({ type: \"optionschange\", data: this });\n }\n }\n\n saveToStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n localStorage.setItem(\"od-client-settings\", JSON.stringify(this.data));\n } catch (error) {\n console.error(\"Cannot save client settings.\", error);\n }\n }\n\n loadFromStorage(): void {\n if (typeof window !== \"undefined\")\n try {\n const item = localStorage.getItem(\"od-client-settings\");\n if (item) {\n const data = JSON.parse(item);\n this.data = { ...data };\n }\n } catch (error) {\n console.error(\"Cannot load client settings.\", error);\n }\n }\n\n /**\n * Resets options to default values.\n *\n * @param fields - Name of fields to be reset. Specify `undefined` to reset all.\n */\n resetToDefaults(fields?: string[]): void {\n if (fields !== undefined) {\n const defaults = Options.defaults();\n const resetData = fields.reduce((acc, field) => {\n acc[field] = defaults[field];\n return acc;\n }, {});\n this.data = { ...this.data, ...resetData };\n } else {\n this.data = { ...this.data, ...Options.defaults() };\n }\n }\n\n get data(): IOptions {\n return this._data;\n }\n\n set data(value: IOptions) {\n const enablePartialMode = value.enableStreamingMode ? value.enablePartialMode : false;\n const sceneGraph = enablePartialMode ? false : value.sceneGraph;\n this._data = { ...Options.defaults(), ...this._data, ...value, enablePartialMode, sceneGraph };\n this.change();\n }\n\n get showWCS(): boolean {\n return this._data.showWCS;\n }\n\n set showWCS(value: boolean) {\n this._data.showWCS = value;\n this.change();\n }\n\n get cameraAnimation(): boolean {\n return this._data.cameraAnimation;\n }\n\n set cameraAnimation(value: boolean) {\n this._data.cameraAnimation = value;\n this.change();\n }\n\n get antialiasing(): boolean | string {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean | string) {\n this._data.antialiasing = value;\n this.change();\n }\n\n get groundShadow(): boolean {\n return this._data.groundShadow;\n }\n\n set groundShadow(value: boolean) {\n this._data.groundShadow = value;\n this.change();\n }\n\n get shadows(): boolean {\n return this._data.shadows;\n }\n\n set shadows(value: boolean) {\n this._data.shadows = value;\n this.change();\n }\n\n get cameraAxisXSpeed(): number {\n return this._data.cameraAxisXSpeed;\n }\n\n set cameraAxisXSpeed(value: number) {\n this._data.cameraAxisXSpeed = value;\n this.change();\n }\n\n get cameraAxisYSpeed(): number {\n return this._data.cameraAxisYSpeed;\n }\n\n set cameraAxisYSpeed(value: number) {\n this.cameraAxisYSpeed = value;\n this.change();\n }\n\n get ambientOcclusion(): boolean {\n return this._data.ambientOcclusion;\n }\n\n set ambientOcclusion(value: boolean) {\n this._data.ambientOcclusion = value;\n this.change();\n }\n\n get enableStreamingMode(): boolean {\n return this._data.enableStreamingMode;\n }\n\n set enableStreamingMode(value: boolean) {\n this._data.enableStreamingMode = value;\n if (!value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get enablePartialMode(): boolean {\n return this._data.enablePartialMode;\n }\n\n set enablePartialMode(value: boolean) {\n this._data.enablePartialMode = value;\n if (value) {\n this._data.enableStreamingMode = true;\n this._data.sceneGraph = false;\n }\n this.change();\n }\n\n get memoryLimit(): number {\n return this._data.memoryLimit;\n }\n\n set memoryLimit(value: number) {\n this._data.memoryLimit = value;\n this.change();\n }\n\n get cuttingPlaneFillColor(): RGB {\n return this._data.cuttingPlaneFillColor;\n }\n\n set cuttingPlaneFillColor(value: RGB) {\n this._data.cuttingPlaneFillColor = value;\n this.change();\n }\n\n get edgesColor() {\n return this._data.edgesColor;\n }\n\n set edgesColor(value) {\n this._data.edgesColor = value;\n this.change();\n }\n\n get facesColor() {\n return this._data.facesColor;\n }\n\n set facesColor(value) {\n this._data.facesColor = value;\n this.change();\n }\n\n get edgesVisibility() {\n return this._data.edgesVisibility;\n }\n\n set edgesVisibility(value) {\n this._data.edgesVisibility = value;\n this.change();\n }\n\n get edgesOverlap() {\n return this._data.edgesOverlap;\n }\n\n set edgesOverlap(value) {\n this._data.edgesOverlap = value;\n this.change();\n }\n\n get facesOverlap() {\n return this._data.facesOverlap;\n }\n\n set facesOverlap(value) {\n this._data.facesOverlap = value;\n this.change();\n }\n\n get facesTransparancy() {\n return this._data.facesTransparancy;\n }\n\n set facesTransparancy(value) {\n this._data.facesTransparancy = value;\n this.change();\n }\n\n get enableCustomHighlight() {\n return this._data.enableCustomHighlight;\n }\n\n set enableCustomHighlight(value) {\n this._data.enableCustomHighlight = value;\n this.change();\n }\n\n get sceneGraph() {\n return this._data.sceneGraph;\n }\n\n set sceneGraph(value) {\n this._data.sceneGraph = value;\n if (value) this._data.enablePartialMode = false;\n this.change();\n }\n\n get edgeModel() {\n return Boolean(this._data.edgeModel);\n }\n\n set edgeModel(value) {\n this._data.edgeModel = Boolean(value);\n this.change();\n }\n\n get reverseZoomWheel() {\n return this._data.reverseZoomWheel;\n }\n\n set reverseZoomWheel(value: boolean) {\n this._data.reverseZoomWheel = !!value;\n this.change();\n }\n\n get enableZoomWheel() {\n return this._data.enableZoomWheel;\n }\n\n set enableZoomWheel(value: boolean) {\n this._data.enableZoomWheel = !!value;\n this.change();\n }\n\n get enableGestures() {\n return this._data.enableGestures;\n }\n\n set enableGestures(value: boolean) {\n this._data.enableGestures = !!value;\n this.change();\n }\n\n get geometryType() {\n return this._data.geometryType;\n }\n\n set geometryType(value: string) {\n this._data.geometryType = value;\n this.change();\n }\n\n get rulerUnit(): string {\n return this._data.rulerUnit;\n }\n\n set rulerUnit(value: string) {\n this._data.rulerUnit = value;\n this.change();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2025, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nexport const CanvasEvents = [\n \"click\",\n \"contextmenu\",\n \"dblclick\",\n \"mousedown\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseup\",\n \"pointercancel\",\n \"pointerdown\",\n \"pointerleave\",\n \"pointermove\",\n \"pointerup\",\n \"touchcancel\",\n \"touchend\",\n \"touchmove\",\n \"touchstart\",\n \"wheel\",\n];\n\nexport const CANVAS_EVENTS = CanvasEvents;\n\n/**\n * Canvas Events.\n *\n * @event\n */\nexport interface CanvasEventMap {\n /**\n * Event that fires on mouse click.\n */\n click: MouseEvent;\n\n /**\n * Event that fires when the user attempts to open a context menu.\n */\n contextmenu: PointerEvent;\n\n /**\n * Event that fires on mouse double click.\n */\n dblclick: MouseEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n mousedown: MouseEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n mouseleave: MouseEvent;\n\n /**\n * Event that fires on mouse move.\n */\n mousemove: MouseEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n mouseup: MouseEvent;\n\n /**\n * Event is fired when the browser determines that there are unlikely to be any more pointer events.\n */\n pointercancel: PointerEvent;\n\n /**\n * Event that fires on mouse button is down.\n */\n pointerdown: PointerEvent;\n\n /**\n * Event that fires on mouse leave.\n */\n pointerleave: PointerEvent;\n\n /**\n * Event that fires on mouse move.\n */\n pointermove: PointerEvent;\n\n /**\n * Event that fires on mouse button is up.\n */\n pointerup: PointerEvent;\n\n /**\n * Event that fires touch is canceled.\n */\n touchcancel: TouchEvent;\n\n /**\n * Event that fires touch is ended.\n */\n touchend: TouchEvent;\n\n /**\n * Event that fires touch is moving.\n */\n touchmove: TouchEvent;\n\n /**\n * Event that fires when touch is started.\n */\n touchstart: TouchEvent;\n\n /**\n * Event that fires when mouse wheel is moving.\n */\n wheel: MouseEvent;\n}\n"],"names":["CommandsRegistry","constructor","this","_commands","Map","registerCommand","id","handler","description","thisArg","set","registerCommandAlias","alias","viewer","args","executeCommand","getCommand","get","getCommands","map","forEach","value","key","command","isDraggerCommand","draggers","includes","setActiveDragger","console","warn","undefined","result","apply","emit","type","data","_commandsRegistry","commandsRegistry","viewerType","Dragger","name","dispose","DraggersRegistry","_providers","registerDragger","provider","registerDraggerAlias","getDraggers","createDragger","dragger","_draggersRegistry","draggersRegistry","Component","Components","registerComponent","registerComponentAlias","getComponents","createComponent","component","_components","componentsRegistry","Loader","abortController","AbortController","abort","isSupport","file","format","load","params","Promise","resolve","cancel","Loaders","registerLoader","getLoader","getLoaders","createLoader","loader","_loaders","loadersRegistry","defaultOptions","showWCS","cameraAnimation","antialiasing","groundShadow","shadows","cameraAxisXSpeed","cameraAxisYSpeed","ambientOcclusion","enableStreamingMode","enablePartialMode","memoryLimit","cuttingPlaneFillColor","red","green","blue","edgesColor","r","g","b","facesColor","edgesVisibility","edgesOverlap","facesOverlap","facesTransparancy","enableCustomHighlight","sceneGraph","edgeModel","reverseZoomWheel","enableZoomWheel","enableGestures","geometryType","rulerUnit","Options","emitter","_emitter","_data","loadFromStorage","defaults","notifierChangeEvent","change","saveToStorage","window","localStorage","setItem","JSON","stringify","error","item","getItem","parse","resetToDefaults","fields","resetData","reduce","acc","field","Boolean","CanvasEvents","CANVAS_EVENTS"],"mappings":"AA0BA,MAAMA;IAAN,WAAAC;QACmBC,KAAAC,YAAY,IAAIC;AAuCnC;IArCE,eAAAC,CAAgBC,IAAYC,SAA0BC,aAAmCC;QACvFP,KAAKC,UAAUO,IAAIJ,IAAI;YAAEA;YAAIC;YAASE;YAASD;;AACjD;IAEA,oBAAAG,CAAqBL,IAAYM;QAC/BV,KAAKG,gBAAgBO,OAAO,CAACC,WAAoBC,SAASZ,KAAKa,eAAeT,IAAIO,WAAWC;AAC/F;IAEA,UAAAE,CAAWV;QACT,OAAOJ,KAAKC,UAAUc,IAAIX;AAC5B;IAEA,WAAAY;QACE,MAAMC,MAAM,IAAIf;QAChBF,KAAKC,UAAUiB,QAAQ,CAACC,OAAOC,QAAQH,IAAIT,IAAIY,KAAKD;QACpD,OAAOF;AACT;IAEA,cAAAJ,CAAeT,IAAYO,WAAoBC;QAC7C,MAAMS,UAAUrB,KAAKC,UAAUc,IAAIX;QACnC,KAAKiB,SAAS;YACZ,IAAIV,QAAQ;gBACV,MAAMW,mBAAmBX,OAAOY,SAASC,SAASpB;gBAClD,IAAIkB,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AC1BnB,KAAKuH;AACP;IAEA,aAAIR;QACF,OAAO/G,KAAKmH,MAAMJ;AACpB;IAEA,aAAIA,CAAU5F;QACZnB,KAAKmH,MAAMJ,YAAY5F;QACvBnB,KAAKuH;AACP;;;AChUK,MAAMkB,eAAe,EAC1B,SACA,eACA,YACA,aACA,cACA,aACA,WACA,iBACA,eACA,gBACA,eACA,aACA,eACA,YACA,aACA,cACA;;AAGK,MAAMC,gBAAgBD;;"}
|
package/lib/viewer/IViewer.d.ts
CHANGED
|
@@ -96,6 +96,18 @@ export interface IViewer extends IEventEmitter, ICommandService {
|
|
|
96
96
|
* Returns `true` if viewer has been initialized.
|
|
97
97
|
*/
|
|
98
98
|
isInitialized(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Resizes the output canvas to (width, height) with device pixel ratio taken into account.
|
|
101
|
+
*
|
|
102
|
+
* Fires:
|
|
103
|
+
*
|
|
104
|
+
* - {@link ResizeEvent | resize}
|
|
105
|
+
*
|
|
106
|
+
* @param width - The width of the canvas.
|
|
107
|
+
* @param height - The height of the canvas.
|
|
108
|
+
* @param updateStyle - Setting `updateStyle` to false prevents any style changes to the output canvas.
|
|
109
|
+
*/
|
|
110
|
+
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
99
111
|
/**
|
|
100
112
|
* Updates the viewer.
|
|
101
113
|
*
|
|
@@ -44,6 +44,15 @@ export interface ChangeActiveDraggerEvent {
|
|
|
44
44
|
*/
|
|
45
45
|
data: string;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Event that fires when a camera changes.
|
|
49
|
+
*/
|
|
50
|
+
export interface ChangeCameraEvent {
|
|
51
|
+
/**
|
|
52
|
+
* Event type.
|
|
53
|
+
*/
|
|
54
|
+
type: "changecamera";
|
|
55
|
+
}
|
|
47
56
|
/**
|
|
48
57
|
* Event that fires when the default color of new markup objects has been changed.
|
|
49
58
|
*
|
|
@@ -373,6 +382,44 @@ export interface OpenEvent {
|
|
|
373
382
|
*/
|
|
374
383
|
buffer?: Uint8Array | ArrayBuffer;
|
|
375
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* Event that fires when camera rotating.
|
|
387
|
+
*
|
|
388
|
+
* @event
|
|
389
|
+
*/
|
|
390
|
+
export interface OrbitEvent {
|
|
391
|
+
/**
|
|
392
|
+
* Event type.
|
|
393
|
+
*/
|
|
394
|
+
type: "orbit";
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Event that fires when camera panning.
|
|
398
|
+
*
|
|
399
|
+
* @event
|
|
400
|
+
*/
|
|
401
|
+
export interface PanEvent {
|
|
402
|
+
/**
|
|
403
|
+
* Event type.
|
|
404
|
+
*/
|
|
405
|
+
type: "pan";
|
|
406
|
+
/**
|
|
407
|
+
* The X coordinate of the mouse pointer in screen coordinates.
|
|
408
|
+
*/
|
|
409
|
+
x: number;
|
|
410
|
+
/**
|
|
411
|
+
* The Y coordinate of the mouse pointer in screen coordinates.
|
|
412
|
+
*/
|
|
413
|
+
y: number;
|
|
414
|
+
/**
|
|
415
|
+
* The X coordinate delta of the mouse pointer relative to the position of the last `Pan` event.
|
|
416
|
+
*/
|
|
417
|
+
dX: number;
|
|
418
|
+
/**
|
|
419
|
+
* The Y coordinate delta of the mouse pointer relative to the position of the last `Pan` event.
|
|
420
|
+
*/
|
|
421
|
+
dY: number;
|
|
422
|
+
}
|
|
376
423
|
/**
|
|
377
424
|
* Event that fires when rendering occurs.
|
|
378
425
|
*
|
|
@@ -532,31 +579,30 @@ export interface WalkStartEvent {
|
|
|
532
579
|
type: "walkstart";
|
|
533
580
|
}
|
|
534
581
|
/**
|
|
535
|
-
* Event that fires when
|
|
582
|
+
* Event that fires when fly speed changing.
|
|
536
583
|
*
|
|
537
584
|
* @event
|
|
538
585
|
*/
|
|
539
|
-
export interface
|
|
586
|
+
export interface FlySpeedChangeEvent {
|
|
540
587
|
/**
|
|
541
588
|
* Event type.
|
|
542
589
|
*/
|
|
543
|
-
type: "
|
|
544
|
-
/**
|
|
545
|
-
* The X coordinate of the mouse pointer in screen coordinates.
|
|
546
|
-
*/
|
|
547
|
-
x: number;
|
|
590
|
+
type: "flyspeedchange";
|
|
548
591
|
/**
|
|
549
|
-
*
|
|
592
|
+
* Fly speed multiplier.
|
|
550
593
|
*/
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
594
|
+
data: number;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Event that fires when fly started.
|
|
598
|
+
*
|
|
599
|
+
* @event
|
|
600
|
+
*/
|
|
601
|
+
export interface FlyStartEvent {
|
|
556
602
|
/**
|
|
557
|
-
*
|
|
603
|
+
* Event type.
|
|
558
604
|
*/
|
|
559
|
-
|
|
605
|
+
type: "flystart";
|
|
560
606
|
}
|
|
561
607
|
/**
|
|
562
608
|
* Event that fires when zooming to extents or selected objects.
|
|
@@ -629,6 +675,10 @@ export interface ViewerEventMap {
|
|
|
629
675
|
* Event that fires when the active dragger has been changed.
|
|
630
676
|
*/
|
|
631
677
|
changeactivedragger: ChangeActiveDraggerEvent;
|
|
678
|
+
/**
|
|
679
|
+
* Event that fires when a camera changes.
|
|
680
|
+
*/
|
|
681
|
+
changecamera: ChangeCameraEvent;
|
|
632
682
|
/**
|
|
633
683
|
* Event that fires when the markup color has been changed.
|
|
634
684
|
*/
|
|
@@ -701,6 +751,10 @@ export interface ViewerEventMap {
|
|
|
701
751
|
* Event that fires before model opens.
|
|
702
752
|
*/
|
|
703
753
|
open: OpenEvent;
|
|
754
|
+
/**
|
|
755
|
+
* Event that fires when camera rotating.
|
|
756
|
+
*/
|
|
757
|
+
orbit: OrbitEvent;
|
|
704
758
|
/**
|
|
705
759
|
* Event that fires when camera panning.
|
|
706
760
|
*/
|
|
@@ -743,6 +797,14 @@ export interface ViewerEventMap {
|
|
|
743
797
|
* Event that fires when walk started.
|
|
744
798
|
*/
|
|
745
799
|
walkstart: WalkStartEvent;
|
|
800
|
+
/**
|
|
801
|
+
* Event that fires when fly speed changing.
|
|
802
|
+
*/
|
|
803
|
+
flyspeedchange: FlySpeedChangeEvent;
|
|
804
|
+
/**
|
|
805
|
+
* Event that fires when fly started.
|
|
806
|
+
*/
|
|
807
|
+
flystart: FlyStartEvent;
|
|
746
808
|
/**
|
|
747
809
|
* Event that fires when zooming to extents or selected objects.
|
|
748
810
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-core",
|
|
3
|
-
"version": "26.9.
|
|
3
|
+
"version": "26.9.3",
|
|
4
4
|
"description": "3D CAD and BIM data Viewer core",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "karma start karma.conf.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/client": "~26.9.
|
|
30
|
-
"@inweb/eventemitter2": "~26.9.
|
|
29
|
+
"@inweb/client": "~26.9.3",
|
|
30
|
+
"@inweb/eventemitter2": "~26.9.3"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/viewer/IViewer.ts
CHANGED
|
@@ -129,6 +129,19 @@ export interface IViewer extends IEventEmitter, ICommandService {
|
|
|
129
129
|
*/
|
|
130
130
|
isInitialized(): boolean;
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Resizes the output canvas to (width, height) with device pixel ratio taken into account.
|
|
134
|
+
*
|
|
135
|
+
* Fires:
|
|
136
|
+
*
|
|
137
|
+
* - {@link ResizeEvent | resize}
|
|
138
|
+
*
|
|
139
|
+
* @param width - The width of the canvas.
|
|
140
|
+
* @param height - The height of the canvas.
|
|
141
|
+
* @param updateStyle - Setting `updateStyle` to false prevents any style changes to the output canvas.
|
|
142
|
+
*/
|
|
143
|
+
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
144
|
+
|
|
132
145
|
/**
|
|
133
146
|
* Updates the viewer.
|
|
134
147
|
*
|
|
@@ -50,6 +50,16 @@ export interface ChangeActiveDraggerEvent {
|
|
|
50
50
|
data: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Event that fires when a camera changes.
|
|
55
|
+
*/
|
|
56
|
+
export interface ChangeCameraEvent {
|
|
57
|
+
/**
|
|
58
|
+
* Event type.
|
|
59
|
+
*/
|
|
60
|
+
type: "changecamera";
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
/**
|
|
54
64
|
* Event that fires when the default color of new markup objects has been changed.
|
|
55
65
|
*
|
|
@@ -423,6 +433,50 @@ export interface OpenEvent {
|
|
|
423
433
|
buffer?: Uint8Array | ArrayBuffer;
|
|
424
434
|
}
|
|
425
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Event that fires when camera rotating.
|
|
438
|
+
*
|
|
439
|
+
* @event
|
|
440
|
+
*/
|
|
441
|
+
export interface OrbitEvent {
|
|
442
|
+
/**
|
|
443
|
+
* Event type.
|
|
444
|
+
*/
|
|
445
|
+
type: "orbit";
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Event that fires when camera panning.
|
|
450
|
+
*
|
|
451
|
+
* @event
|
|
452
|
+
*/
|
|
453
|
+
export interface PanEvent {
|
|
454
|
+
/**
|
|
455
|
+
* Event type.
|
|
456
|
+
*/
|
|
457
|
+
type: "pan";
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* The X coordinate of the mouse pointer in screen coordinates.
|
|
461
|
+
*/
|
|
462
|
+
x: number;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* The Y coordinate of the mouse pointer in screen coordinates.
|
|
466
|
+
*/
|
|
467
|
+
y: number;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* The X coordinate delta of the mouse pointer relative to the position of the last `Pan` event.
|
|
471
|
+
*/
|
|
472
|
+
dX: number;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* The Y coordinate delta of the mouse pointer relative to the position of the last `Pan` event.
|
|
476
|
+
*/
|
|
477
|
+
dY: number;
|
|
478
|
+
}
|
|
479
|
+
|
|
426
480
|
/**
|
|
427
481
|
* Event that fires when rendering occurs.
|
|
428
482
|
*
|
|
@@ -603,35 +657,32 @@ export interface WalkStartEvent {
|
|
|
603
657
|
}
|
|
604
658
|
|
|
605
659
|
/**
|
|
606
|
-
* Event that fires when
|
|
660
|
+
* Event that fires when fly speed changing.
|
|
607
661
|
*
|
|
608
662
|
* @event
|
|
609
663
|
*/
|
|
610
|
-
export interface
|
|
664
|
+
export interface FlySpeedChangeEvent {
|
|
611
665
|
/**
|
|
612
666
|
* Event type.
|
|
613
667
|
*/
|
|
614
|
-
type: "
|
|
668
|
+
type: "flyspeedchange";
|
|
615
669
|
|
|
616
670
|
/**
|
|
617
|
-
*
|
|
671
|
+
* Fly speed multiplier.
|
|
618
672
|
*/
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* The Y coordinate of the mouse pointer in screen coordinates.
|
|
623
|
-
*/
|
|
624
|
-
y: number;
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
* The X coordinate delta of the mouse pointer relative to the position of the last `Pan` event.
|
|
628
|
-
*/
|
|
629
|
-
dX: number;
|
|
673
|
+
data: number;
|
|
674
|
+
}
|
|
630
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Event that fires when fly started.
|
|
678
|
+
*
|
|
679
|
+
* @event
|
|
680
|
+
*/
|
|
681
|
+
export interface FlyStartEvent {
|
|
631
682
|
/**
|
|
632
|
-
*
|
|
683
|
+
* Event type.
|
|
633
684
|
*/
|
|
634
|
-
|
|
685
|
+
type: "flystart";
|
|
635
686
|
}
|
|
636
687
|
|
|
637
688
|
/**
|
|
@@ -716,6 +767,11 @@ export interface ViewerEventMap {
|
|
|
716
767
|
*/
|
|
717
768
|
changeactivedragger: ChangeActiveDraggerEvent;
|
|
718
769
|
|
|
770
|
+
/**
|
|
771
|
+
* Event that fires when a camera changes.
|
|
772
|
+
*/
|
|
773
|
+
changecamera: ChangeCameraEvent;
|
|
774
|
+
|
|
719
775
|
/**
|
|
720
776
|
* Event that fires when the markup color has been changed.
|
|
721
777
|
*/
|
|
@@ -806,6 +862,11 @@ export interface ViewerEventMap {
|
|
|
806
862
|
*/
|
|
807
863
|
open: OpenEvent;
|
|
808
864
|
|
|
865
|
+
/**
|
|
866
|
+
* Event that fires when camera rotating.
|
|
867
|
+
*/
|
|
868
|
+
orbit: OrbitEvent;
|
|
869
|
+
|
|
809
870
|
/**
|
|
810
871
|
* Event that fires when camera panning.
|
|
811
872
|
*/
|
|
@@ -858,6 +919,16 @@ export interface ViewerEventMap {
|
|
|
858
919
|
*/
|
|
859
920
|
walkstart: WalkStartEvent;
|
|
860
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Event that fires when fly speed changing.
|
|
924
|
+
*/
|
|
925
|
+
flyspeedchange: FlySpeedChangeEvent;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Event that fires when fly started.
|
|
929
|
+
*/
|
|
930
|
+
flystart: FlyStartEvent;
|
|
931
|
+
|
|
861
932
|
/**
|
|
862
933
|
* Event that fires when zooming to extents or selected objects.
|
|
863
934
|
*/
|