@inweb/viewer-core 25.11.2 → 25.12.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-core.js","sources":["../src/commands/Commands.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts","../src/viewer/IDragger.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\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 { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsMap, ICommands } from \"./ICommands\";\n\nclass Commands implements ICommands {\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(): ICommandsMap {\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 _commands = new Map<string, Commands>();\n\n/**\n * Returns the command manager for the specified viewer type.\n *\n * @param viewerType - Viewer type. Predefined viewer types are:\n *\n * - VisualizeJS - The `VisualizeJS` powered viewer.\n * - ThreeJS - The `Three.js` powered viewer.\n */\nfunction commands(viewerType = \"\"): ICommands {\n let result = _commands.get(viewerType);\n if (!result) {\n result = new Commands();\n _commands.set(viewerType, result);\n }\n return result;\n}\n\ncommands(\"\").registerCommand(\"noop\", () => {});\ncommands(\"VisualizeJS\").registerCommand(\"noop\", () => {});\ncommands(\"ThreeJS\").registerCommand(\"noop\", () => {});\n\nexport { commands };\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\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 using FXAA.\n *\n * @defaultValue true\n */\n antialiasing?: boolean;\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\n * update 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\n * objects when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is\n * enabled, 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. Large drawings can take\n * up a lot of 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,\n * since 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,\n * Kilometers, Miles, 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-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 { 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 {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean) {\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-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\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","///////////////////////////////////////////////////////////////////////////////\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 \"./IViewer\";\n\n/**\n * Defines the dragger of the viewer.\n */\nexport interface IDragger {\n /**\n * The name of the dragger. Use this name to activate dragger using\n * {@link Viewer.setActiveDragger | Viewer.setActiveDragger()}\n */\n name: string;\n\n /**\n * Initializes the dragger instance. Call {@link dispose | dispose()} to release allocated resources.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is activated. Do not\n * call this directly.\n */\n initialize(): void;\n\n /**\n * Releases resources allocated in the {@link initialize | initialize()}.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is deactivated. Do\n * not call this directly.\n */\n dispose(): void;\n\n /**\n * Updates the dragger preview if exists.\n *\n * This is internal method, called by the {@link Viewer} when it updates. Do not call this\n * method directly unless you are manually updating the viewer.\n */\n updatePreview(): void;\n}\n\n/**\n * Base class for the viewer draggers.\n *\n * To create your own dragger:\n *\n * 1. Define a dragger class inherited from Dragger.\n * 2. Override {@link initialize | initialize()} method to add mouse event listeners using\n * {@link Viewer.addEventListener | Viewer.addEventListener()}.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove`\n * event and zoom in/out when the left mouse button is pressed.\n * 4. Override {@link dispose | dispose()} method to remove mouse event listeners\n * {@link Viewer.removeEventListener | Viewer.removeEventListener()}.\n * 5. Register dragger class for the viewer instance.\n */\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n initialize(): void {}\n\n dispose(): void {}\n\n updatePreview(): void {}\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,QAAQ,CAAA;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CAAC,SAAS,CAAC;SAC7B;QAED,IAAI,SAAS,CAAC,KAAa,EAAA;IACzB,QAAA,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;YAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;IACF;;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;MACP;AAEK,UAAM,aAAa,GAAG;;IC3C7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAuCA;;;;;;;;;;;;;IAaG;UACU,OAAO,CAAA;IAGlB,IAAA,WAAA,CAAY,MAAe,EAAA;YAF3B,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;SAEqB;IAE/B,IAAA,UAAU,MAAW;IAErB,IAAA,OAAO,MAAW;IAElB,IAAA,aAAa,MAAW;IACzB;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"viewer-core.js","sources":["../src/commands/Commands.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts","../src/viewer/IDragger.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\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 { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsMap, ICommands } from \"./ICommands\";\n\nclass Commands implements ICommands {\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(): ICommandsMap {\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 _commands = new Map<string, Commands>();\n\n/**\n * Returns the command manager for the specified viewer type.\n *\n * @param viewerType - Viewer type. Predefined viewer types are:\n *\n * - VisualizeJS - The `VisualizeJS` powered viewer.\n * - ThreeJS - The `Three.js` powered viewer.\n */\nfunction commands(viewerType = \"\"): ICommands {\n let result = _commands.get(viewerType);\n if (!result) {\n result = new Commands();\n _commands.set(viewerType, result);\n }\n return result;\n}\n\ncommands(\"\").registerCommand(\"noop\", () => {});\ncommands(\"VisualizeJS\").registerCommand(\"noop\", () => {});\ncommands(\"ThreeJS\").registerCommand(\"noop\", () => {});\n\nexport { commands };\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\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 using FXAA.\n *\n * @defaultValue true\n */\n antialiasing?: boolean;\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\n * update 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\n * objects when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is\n * enabled, 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. Large drawings can take\n * up a lot of 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,\n * since 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,\n * Kilometers, Miles, 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-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 { 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 {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean) {\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-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\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","///////////////////////////////////////////////////////////////////////////////\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 \"./IViewer\";\n\n/**\n * Defines the dragger of the viewer.\n */\nexport interface IDragger {\n /**\n * The name of the dragger. Use this name to activate dragger using\n * {@link Viewer.setActiveDragger | Viewer.setActiveDragger()}\n */\n name: string;\n\n /**\n * Initializes the dragger instance. Call {@link dispose | dispose()} to release allocated resources.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is activated. Do not\n * call this directly.\n */\n initialize(): void;\n\n /**\n * Releases resources allocated in the {@link initialize | initialize()}.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is deactivated. Do\n * not call this directly.\n */\n dispose(): void;\n\n /**\n * Updates the dragger preview if exists.\n *\n * This is internal method, called by the {@link Viewer} when it updates. Do not call this\n * method directly unless you are manually updating the viewer.\n */\n updatePreview(): void;\n}\n\n/**\n * Base class for the viewer draggers.\n *\n * To create your own dragger:\n *\n * 1. Define a dragger class inherited from Dragger.\n * 2. Override {@link initialize | initialize()} method to add mouse event listeners using\n * {@link Viewer.addEventListener | Viewer.addEventListener()}.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove`\n * event and zoom in/out when the left mouse button is pressed.\n * 4. Override {@link dispose | dispose()} method to remove mouse event listeners\n * {@link Viewer.removeEventListener | Viewer.removeEventListener()}.\n * 5. Register dragger class for the viewer instance.\n */\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n initialize(): void {}\n\n dispose(): void {}\n\n updatePreview(): void {}\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,QAAQ,CAAA;IAAd,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,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,CAAC;;IAGrG,IAAA,UAAU,CAAC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AAS;QACT,eAAe;QACf,aAAa;QACb,cAAc;QACd,aAAa;QACb,WAAW;QACX,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,OAAO;;AAGF,UAAM,aAAa,GAAG;;IC3C7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAuCA;;;;;;;;;;;;;IAaG;UACU,OAAO,CAAA;IAGlB,IAAA,WAAA,CAAY,MAAe,EAAA;YAF3B,IAAI,CAAA,IAAA,GAAG,EAAE;;IAIT,IAAA,UAAU;IAEV,IAAA,OAAO;IAEP,IAAA,aAAa;IACd;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-core.module.js","sources":["../src/commands/Commands.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts","../src/viewer/IDragger.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\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 { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsMap, ICommands } from \"./ICommands\";\n\nclass Commands implements ICommands {\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(): ICommandsMap {\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 _commands = new Map<string, Commands>();\n\n/**\n * Returns the command manager for the specified viewer type.\n *\n * @param viewerType - Viewer type. Predefined viewer types are:\n *\n * - VisualizeJS - The `VisualizeJS` powered viewer.\n * - ThreeJS - The `Three.js` powered viewer.\n */\nfunction commands(viewerType = \"\"): ICommands {\n let result = _commands.get(viewerType);\n if (!result) {\n result = new Commands();\n _commands.set(viewerType, result);\n }\n return result;\n}\n\ncommands(\"\").registerCommand(\"noop\", () => {});\ncommands(\"VisualizeJS\").registerCommand(\"noop\", () => {});\ncommands(\"ThreeJS\").registerCommand(\"noop\", () => {});\n\nexport { commands };\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\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 using FXAA.\n *\n * @defaultValue true\n */\n antialiasing?: boolean;\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\n * update 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\n * objects when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is\n * enabled, 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. Large drawings can take\n * up a lot of 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,\n * since 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,\n * Kilometers, Miles, 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-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 { 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 {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean) {\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-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\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","///////////////////////////////////////////////////////////////////////////////\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 \"./IViewer\";\n\n/**\n * Defines the dragger of the viewer.\n */\nexport interface IDragger {\n /**\n * The name of the dragger. Use this name to activate dragger using\n * {@link Viewer.setActiveDragger | Viewer.setActiveDragger()}\n */\n name: string;\n\n /**\n * Initializes the dragger instance. Call {@link dispose | dispose()} to release allocated resources.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is activated. Do not\n * call this directly.\n */\n initialize(): void;\n\n /**\n * Releases resources allocated in the {@link initialize | initialize()}.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is deactivated. Do\n * not call this directly.\n */\n dispose(): void;\n\n /**\n * Updates the dragger preview if exists.\n *\n * This is internal method, called by the {@link Viewer} when it updates. Do not call this\n * method directly unless you are manually updating the viewer.\n */\n updatePreview(): void;\n}\n\n/**\n * Base class for the viewer draggers.\n *\n * To create your own dragger:\n *\n * 1. Define a dragger class inherited from Dragger.\n * 2. Override {@link initialize | initialize()} method to add mouse event listeners using\n * {@link Viewer.addEventListener | Viewer.addEventListener()}.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove`\n * event and zoom in/out when the left mouse button is pressed.\n * 4. Override {@link dispose | dispose()} method to remove mouse event listeners\n * {@link Viewer.removeEventListener | Viewer.removeEventListener()}.\n * 5. Register dragger class for the viewer instance.\n */\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n initialize(): void {}\n\n dispose(): void {}\n\n updatePreview(): void {}\n}\n"],"names":["Commands","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","commands","viewerType","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","Dragger","name","initialize","dispose","updatePreview"],"mappings":"AA0BA,MAAMA;IAAN,WAAAC;QACmBC,KAAAC,YAAY,IAAIC;AAuClC;IArCC,eAAAC,CAAgBC,IAAYC,SAA0BC,aAAmCC;QACvFP,KAAKC,UAAUO,IAAIJ,IAAI;YAAEA;YAAIC;YAASE;YAASD;;AAChD;IAED,oBAAAG,CAAqBL,IAAYM;QAC/BV,KAAKG,gBAAgBO,QAAO,CAACC,WAAoBC,SAASZ,KAAKa,eAAeT,IAAIO,WAAWC;AAC9F;IAED,UAAAE,CAAWV;QACT,OAAOJ,KAAKC,UAAUc,IAAIX;AAC3B;IAED,WAAAY;QACE,MAAMC,MAAM,IAAIf;QAChBF,KAAKC,UAAUiB,SAAQ,C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kB,eAAe,EAC1B,SACA,eACA,YACA,aACA,cACA,aACA,WACA,iBACA,eACA,gBACA,eACA,aACA,eACA,YACA,aACA,cACA;;AAGK,MAAMC,gBAAgBD;;MC+BhBE;IAGX,WAAAjG,CAAYY;QAFZX,KAAIiG,OAAG;AAEwB;IAE/B,UAAAC,IAAqB;IAErB,OAAAC,IAAkB;IAElB,aAAAC,IAAwB;;;"}
1
+ {"version":3,"file":"viewer-core.module.js","sources":["../src/commands/Commands.ts","../src/options/IOptions.ts","../src/options/Options.ts","../src/viewer/CanvasEvents.ts","../src/viewer/IDragger.ts"],"sourcesContent":["///////////////////////////////////////////////////////////////////////////////\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 { IViewer } from \"../viewer/IViewer\";\nimport { ICommand, ICommandHandler, ICommandDescription, ICommandsMap, ICommands } from \"./ICommands\";\n\nclass Commands implements ICommands {\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(): ICommandsMap {\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 _commands = new Map<string, Commands>();\n\n/**\n * Returns the command manager for the specified viewer type.\n *\n * @param viewerType - Viewer type. Predefined viewer types are:\n *\n * - VisualizeJS - The `VisualizeJS` powered viewer.\n * - ThreeJS - The `Three.js` powered viewer.\n */\nfunction commands(viewerType = \"\"): ICommands {\n let result = _commands.get(viewerType);\n if (!result) {\n result = new Commands();\n _commands.set(viewerType, result);\n }\n return result;\n}\n\ncommands(\"\").registerCommand(\"noop\", () => {});\ncommands(\"VisualizeJS\").registerCommand(\"noop\", () => {});\ncommands(\"ThreeJS\").registerCommand(\"noop\", () => {});\n\nexport { commands };\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\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 using FXAA.\n *\n * @defaultValue true\n */\n antialiasing?: boolean;\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\n * update 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\n * objects when the camera changes.\n *\n * Only used if {@link enableStreamingMode | streaming} is enabled. If partial streaming is\n * enabled, 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. Large drawings can take\n * up a lot of 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,\n * since 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,\n * Kilometers, Miles, 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-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 { 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 {\n return this._data.antialiasing;\n }\n\n set antialiasing(value: boolean) {\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-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\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","///////////////////////////////////////////////////////////////////////////////\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 \"./IViewer\";\n\n/**\n * Defines the dragger of the viewer.\n */\nexport interface IDragger {\n /**\n * The name of the dragger. Use this name to activate dragger using\n * {@link Viewer.setActiveDragger | Viewer.setActiveDragger()}\n */\n name: string;\n\n /**\n * Initializes the dragger instance. Call {@link dispose | dispose()} to release allocated resources.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is activated. Do not\n * call this directly.\n */\n initialize(): void;\n\n /**\n * Releases resources allocated in the {@link initialize | initialize()}.\n *\n * This is internal method, called by the {@link Viewer} when the dragger is deactivated. Do\n * not call this directly.\n */\n dispose(): void;\n\n /**\n * Updates the dragger preview if exists.\n *\n * This is internal method, called by the {@link Viewer} when it updates. Do not call this\n * method directly unless you are manually updating the viewer.\n */\n updatePreview(): void;\n}\n\n/**\n * Base class for the viewer draggers.\n *\n * To create your own dragger:\n *\n * 1. Define a dragger class inherited from Dragger.\n * 2. Override {@link initialize | initialize()} method to add mouse event listeners using\n * {@link Viewer.addEventListener | Viewer.addEventListener()}.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove`\n * event and zoom in/out when the left mouse button is pressed.\n * 4. Override {@link dispose | dispose()} method to remove mouse event listeners\n * {@link Viewer.removeEventListener | Viewer.removeEventListener()}.\n * 5. Register dragger class for the viewer instance.\n */\nexport class Dragger implements IDragger {\n name = \"\";\n\n constructor(viewer: IViewer) {}\n\n initialize(): void {}\n\n dispose(): void {}\n\n updatePreview(): void {}\n}\n"],"names":["Commands","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","commands","viewerType","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","Dragger","name","initialize","dispose","updatePreview"],"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;gBA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KwE,MAAM1B,oBAAoB;QAC1C9C,KAAK4E;;IAGP,aAAIb;QACF,OAAO8B,QAAQ7F,KAAKwE,MAAMT;;IAG5B,aAAIA,CAAU5C;QACZnB,KAAKwE,MAAMT,YAAY8B,QAAQ1E;QAC/BnB,KAAK4E;;IAGP,oBAAIZ;QACF,OAAOhE,KAAKwE,MAAMR;;IAGpB,oBAAIA,CAAiB7C;QACnBnB,KAAKwE,MAAMR,qBAAqB7C;QAChCnB,KAAK4E;;IAGP,mBAAIX;QACF,OAAOjE,KAAKwE,MAAMP;;IAGpB,mBAAIA,CAAgB9C;QAClBnB,KAAKwE,MAAMP,oBAAoB9C;QAC/BnB,KAAK4E;;IAGP,kBAAIV;QACF,OAAOlE,KAAKwE,MAAMN;;IAGpB,kBAAIA,CAAe/C;QACjBnB,KAAKwE,MAAMN,mBAAmB/C;QAC9BnB,KAAK4E;;IAGP,gBAAIT;QACF,OAAOnE,KAAKwE,MAAML;;IAGpB,gBAAIA,CAAahD;QACfnB,KAAKwE,MAAML,eAAehD;QAC1BnB,KAAK4E;;IAGP,aAAIR;QACF,OAAOpE,KAAKwE,MAAMJ;;IAGpB,aAAIA,CAAUjD;QACZnB,KAAKwE,MAAMJ,YAAYjD;QACvBnB,KAAK4E;;;;AC/TI,MAAAkB,eAAe,EAC1B,SACA,eACA,YACA,aACA,cACA,aACA,WACA,iBACA,eACA,gBACA,eACA,aACA,eACA,YACA,aACA,cACA;;AAGK,MAAMC,gBAAgBD;;MC+BhBE;IAGX,WAAAjG,CAAYY;QAFZX,KAAIiG,OAAG;;IAIP,UAAAC;IAEA,OAAAC;IAEA,aAAAC;;;"}
@@ -97,6 +97,9 @@ export interface IViewer extends IEventEmitter, ICommandService {
97
97
  * This method requires a `Client` instance to be specified to load model reference files
98
98
  * from the Open Cloud Server.
99
99
  *
100
+ * If there was an active dragger before opening the file, it will be deactivated. After
101
+ * opening the file, you must manually activate the required dragger.
102
+ *
100
103
  * Fires:
101
104
  *
102
105
  * - {@link OpenEvent | open}
@@ -121,7 +124,7 @@ export interface IViewer extends IEventEmitter, ICommandService {
121
124
  */
122
125
  cancel(): this;
123
126
  /**
124
- * Unloads an open file, clears the canvas and markups.
127
+ * Unloads an open file, clears the canvas and markups, deactivates the active dragger.
125
128
  *
126
129
  * Fires:
127
130
  *
@@ -214,13 +217,15 @@ export interface IViewer extends IEventEmitter, ICommandService {
214
217
  */
215
218
  activeDragger(): IDragger | null;
216
219
  /**
217
- * Changes the active dragger. Viewer must be initialized before enable dragger or exception is thrown.
220
+ * Changes the active dragger. The viewer must be initialized before activating the dragger,
221
+ * otherwise an exception will be thrown.
218
222
  *
219
223
  * Fires:
220
224
  *
221
225
  * - {@link ChangeActiveDraggerEvent | changeactivedragger}
222
226
  *
223
- * @param name - Dragger name. Can be one of the {@link draggers} list.
227
+ * @param name - Dragger name. Can be one of the {@link draggers} list or an ampty string to
228
+ * deactivate the current dragger.
224
229
  * @returns Returns the new active dragger reference or `null` if there is no dragger with
225
230
  * the given name.
226
231
  */
@@ -497,7 +497,7 @@ export interface PanEvent {
497
497
  dY: number;
498
498
  }
499
499
  /**
500
- * Event that fires when zooming of the camera.
500
+ * Event that fires when zooming to extents or selected objects.
501
501
  *
502
502
  * @event
503
503
  */
@@ -512,7 +512,7 @@ export interface ZoomEvent {
512
512
  data?: any;
513
513
  }
514
514
  /**
515
- * Event that fires when zooming of the camera.
515
+ * Event that fires when zooming of the camera using mouse wheel.
516
516
  *
517
517
  * @event
518
518
  */
@@ -674,15 +674,15 @@ export interface ViewerEventMap {
674
674
  */
675
675
  walkstart: WalkStartEvent;
676
676
  /**
677
- * Event that fires when zooming of the camera.
677
+ * Event that fires when zooming to extents or selected objects.
678
678
  */
679
679
  zoom: ZoomEvent;
680
680
  /**
681
- * Event that fires when zooming of the camera.
681
+ * Event that fires when zooming of the camera using mouse wheel.
682
682
  */
683
683
  zoomat: ZoomAtEvent;
684
684
  /**
685
- * Event that fires when zooming to entity.
685
+ * Event that fires when zooming to object.
686
686
  */
687
687
  zoomtoentity: ZoomToEntityEvent;
688
688
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-core",
3
- "version": "25.11.2",
3
+ "version": "25.12.1",
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,9 +26,9 @@
26
26
  "test": "karma start karma.conf.js"
27
27
  },
28
28
  "devDependencies": {
29
- "@inweb/eventemitter2": "~25.11.2"
29
+ "@inweb/eventemitter2": "~25.12.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@inweb/eventemitter2": "~25.11.2"
32
+ "@inweb/eventemitter2": "~25.12.1"
33
33
  }
34
34
  }
@@ -130,6 +130,9 @@ export interface IViewer extends IEventEmitter, ICommandService {
130
130
  * This method requires a `Client` instance to be specified to load model reference files
131
131
  * from the Open Cloud Server.
132
132
  *
133
+ * If there was an active dragger before opening the file, it will be deactivated. After
134
+ * opening the file, you must manually activate the required dragger.
135
+ *
133
136
  * Fires:
134
137
  *
135
138
  * - {@link OpenEvent | open}
@@ -156,7 +159,7 @@ export interface IViewer extends IEventEmitter, ICommandService {
156
159
  cancel(): this;
157
160
 
158
161
  /**
159
- * Unloads an open file, clears the canvas and markups.
162
+ * Unloads an open file, clears the canvas and markups, deactivates the active dragger.
160
163
  *
161
164
  * Fires:
162
165
  *
@@ -263,13 +266,15 @@ export interface IViewer extends IEventEmitter, ICommandService {
263
266
  activeDragger(): IDragger | null;
264
267
 
265
268
  /**
266
- * Changes the active dragger. Viewer must be initialized before enable dragger or exception is thrown.
269
+ * Changes the active dragger. The viewer must be initialized before activating the dragger,
270
+ * otherwise an exception will be thrown.
267
271
  *
268
272
  * Fires:
269
273
  *
270
274
  * - {@link ChangeActiveDraggerEvent | changeactivedragger}
271
275
  *
272
- * @param name - Dragger name. Can be one of the {@link draggers} list.
276
+ * @param name - Dragger name. Can be one of the {@link draggers} list or an ampty string to
277
+ * deactivate the current dragger.
273
278
  * @returns Returns the new active dragger reference or `null` if there is no dragger with
274
279
  * the given name.
275
280
  */
@@ -565,7 +565,7 @@ export interface PanEvent {
565
565
  }
566
566
 
567
567
  /**
568
- * Event that fires when zooming of the camera.
568
+ * Event that fires when zooming to extents or selected objects.
569
569
  *
570
570
  * @event
571
571
  */
@@ -582,7 +582,7 @@ export interface ZoomEvent {
582
582
  }
583
583
 
584
584
  /**
585
- * Event that fires when zooming of the camera.
585
+ * Event that fires when zooming of the camera using mouse wheel.
586
586
  *
587
587
  * @event
588
588
  */
@@ -779,17 +779,17 @@ export interface ViewerEventMap {
779
779
  walkstart: WalkStartEvent;
780
780
 
781
781
  /**
782
- * Event that fires when zooming of the camera.
782
+ * Event that fires when zooming to extents or selected objects.
783
783
  */
784
784
  zoom: ZoomEvent;
785
785
 
786
786
  /**
787
- * Event that fires when zooming of the camera.
787
+ * Event that fires when zooming of the camera using mouse wheel.
788
788
  */
789
789
  zoomat: ZoomAtEvent;
790
790
 
791
791
  /**
792
- * Event that fires when zooming to entity.
792
+ * Event that fires when zooming to object.
793
793
  */
794
794
  zoomtoentity: ZoomToEntityEvent;
795
795
  }