/** * @license * Copyright 2018-2026 Advanced Visual Systems Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This product includes software developed at * Advanced Visual Systems Inc. (http://www.avs.com) */ import { LitElement, PropertyValues } from 'lit'; import { Viewer, TransformInteractor, PanInteractor, ZoomRectangleInteractor, Animator } from '../lib/avs-three.module.min.js'; import { DataVizModel, DataVizResponse, MotionCaptureFrame, PickDepth, PickLevel, PickProperties, Renderer } from './types.js'; declare const AvsGoDataViz_base: (new (...args: any[]) => import("./avs-element-mixin.js").AvsElementMixinInterface) & typeof LitElement; /** * `avs-go-dataviz` is a Lit element which requests a data visualization * from either the `sceneName` class on the AVS/Go server application running at `url`, * or from a JSON file at `url` when `urlLoadJsonFile` is set. * * The request occurs upon: * * An explicit call to `updateViewer()` * * A change in `renderer` * * Additionally if `manualUpdate` is false: * * * Initialization of this element has completed * * * This element is resized outside of the `resizeThresold` percentage * * @customElement * @lit * @applysMixin AvsElementMixin */ export declare class AvsGoDataViz extends AvsGoDataViz_base { static styles: import("lit").CSSResult; render(): import("lit-html").TemplateResult<1>; /** Don't request a new scene upon initialization or resize. */ manualUpdate?: boolean; /** Highlight canvas elements when using the `THREEJS` renderer. */ displayCanvas: boolean; /** The URL to an instance of AVS/Go server application or file. */ url: string; /** Enables loading JSON from a file. */ urlLoadJsonFile?: boolean; /** Name of the data source registered in the library map on the server. */ dataSourceName?: string; /** User properties as JSON passed directly to the data source on the server. */ dataSourceUserProperties?: string; /** Name of the scene registered in the library map on the server. */ sceneName?: string; /** User properties as JSON passed directly to the scene on the server. */ sceneUserProperties?: string; /** Name of the renderer registered in the library map on the server. */ rendererName?: string; /** User properties as JSON passed directly to the renderer on the server. */ rendererUserProperties?: string; /** The type of renderer to be used to display a scene: `IMAGE`, `SVG` or `THREEJS` */ renderer: Renderer; /** Enables streaming of objects from the server. Only available when `renderer` is `THREEJS` */ streamEnable?: boolean; /** The number of objects streamed for the first chunk. */ streamChunkSizeFirst?: number; /** The number of objects streamed per chunk. */ streamChunkSize?: number; /** The name of the theme registered in the library map on the server, or undefined to use CSS, or one of the branded themes: `DEFAULT`, `AVS_LIGHT`, `AVS_DARK` or `AVS_BLACK` */ themeName?: string; /** Resize threshold (percent) to determine when the update is performed on the client or the server. Default is 10%. Set to zero to disable resize on the server. */ resizeThreshold?: number; /** Number of seconds between pointer moves before an `avs-pointer-timeout` event is dispatched. */ pointerTimeout?: number; /** Enables the `avs-tap` event. */ tapEnable?: boolean; /** The level of geometry within the scene to be modified by the tap event: `CELL`, `CELL_SET` or `SCENE_NODE` */ tapLevel?: PickLevel; /** The depth at which an object is selected: `ALL`, `CLOSEST` or `FIRST` */ tapDepth?: PickDepth; /** Enables highlight of selected geometry in the scene. */ tapHighlightEnable?: boolean; /** Enables drawing highlighted objects in front of all objects in the scene. This results in faster rendering in a 2D viewport when using the `THREEJS` renderer. */ tapHighlightLayerEnable?: boolean; /** Enables the processing of tap events on the client. Only available when `renderer` is `THREEJS` */ tapProcessEventOnClient?: boolean; /** Enables the `avs-track` event. */ trackEnable?: boolean; /** The level of geometry within the scene to be modified by the track event: `CELL`, `CELL_SET` or `SCENE_NODE` */ trackLevel?: PickLevel; /** The depth at which an object is selected: `ALL`, `CLOSEST` or `FIRST` */ trackDepth?: PickDepth; /** Enables highlight of selected geometry in the scene. */ trackHighlightEnable?: boolean; /** Enables drawing highlighted objects in front of all objects in the scene. This results in faster rendering in a 2D viewport when using the `THREEJS` renderer. */ trackHighlightLayerEnable?: boolean; /** Enables the processing of track events on the client. Only available when `renderer` is `THREEJS` */ trackProcessEventOnClient?: boolean; /** Enables the `avs-hover` event. */ hoverEnable?: boolean; /** The level of geometry within the scene to be modified by the hover event: `CELL`, `CELL_SET` or `SCENE_NODE` */ hoverLevel?: PickLevel; /** The depth at which an object is selected: `ALL`, `CLOSEST` or `FIRST` */ hoverDepth?: PickDepth; /** Enables highlight of selected geometry in the scene. */ hoverHighlightEnable?: boolean; /** Enables drawing highlighted objects in front of all objects in the scene. This results in faster rendering in a 2D viewport when using the `THREEJS` renderer. */ hoverHighlightLayerEnable?: boolean; /** * Enable the transform interactor. Only available when `renderer` is `THREEJS` * * Create an interactor for transforming a particular scene object on the client. * Use the IGoRenderer.addInteractor() method on the server to select which object to transform. */ transformEnable?: boolean; /** Transform on the client only, do not update the transform matrix on the server. */ transformClientOnly?: boolean; /** Disables rotation of the object. */ transformRotateDisable?: boolean; /** Disables zooming of the object. */ transformZoomDisable?: boolean; /** Disables panning of the object. */ transformPanDisable?: boolean; /** The twist angle of the object in degrees. */ transformTwistAngle?: number; /** The tilt angle of the object in degrees. */ transformTiltAngle?: number; /** The scale of the object in percent. */ transformScale?: number; /** Motion capture data or URL. */ motionCapture?: string; /** * Enable the zoom rectangle interactor. Only available when `renderer` is `THREEJS` * * Create an interactor for scaling an object by drawing a rectangle. * Use the IGoRenderer.addInteractor() method on the server to select which object to transform. */ zoomRectangleEnable?: boolean; /** * Enable the pan interactor. Only available when `renderer` is `THREEJS` * * Create an interactor for panning an OpenViz domain (axes and charts) on the client. */ panEnable?: boolean; /** * Use mousewheel or pinch zoom to adjust the pan interactor's zoom level. * Otherwise the zoom level must be set using `pan-width-zoom-level` and `pan-height-zoom-level`. */ panZoomEnable?: boolean; /** The width zoom level in percent of the original scene greater than 100% */ panWidthZoomLevel?: number; /** The height zoom level in percent of the original scene greater than 100% */ panHeightZoomLevel?: number; /** The maximum zoom level in percent of the original scene greater than 100% Default is 1000% */ panMaximumZoomLevel?: number; /** Show animated glyphs. Only available when `renderer` is `THREEJS` */ animatedGlyphsVisible?: boolean; /** Enable animated glyphs. Only available when `renderer` is `THREEJS` */ animatedGlyphsEnable?: boolean; /** Enable motion capture controls. Only available when `renderer` is `THREEJS` */ motionCaptureControlsEnable?: boolean; width: number; height: number; lowResizeWidth: number; highResizeWidth: number; lowResizeHeight: number; highResizeHeight: number; forceUpdate: boolean; chunkFile: number; model: DataVizModel; tapping: boolean; tracking: number; threeViewer: Viewer; transformInteractor: TransformInteractor; transformMatrix: Array; animator: Animator; panInteractor: PanInteractor; zoomRectangleInteractor: ZoomRectangleInteractor; highlightSvg: Array; pointerDown: boolean; pointerDownX: number; pointerDownY: number; hoverSelected: string; highlightColor: string; imageMapData?: Array; rectCanvas: HTMLCanvasElement; rectCtx: CanvasRenderingContext2D; sceneImage: HTMLImageElement; sceneImageMap: HTMLMapElement; svgDiv: HTMLDivElement; motionCaptureDelay: number; motionCaptureTime: number; motionCaptureFrames: Array; showMotionCaptureTooltip: boolean; zoomOverlayTimeoutId: number; timer: number; /** * Assemble the model from our properties to send to the server. */ _assembleModel(fullReset?: boolean): DataVizModel; /** * */ _applyCustomCssProperties(cssProperties: object, style: CSSStyleDeclaration, values: object): void; /** * */ _onResize(contentRect: DOMRect): void; _updateResizeLimits(): void; showSpinner(): void; hideSpinner(): void; startSpinner(): void; stopSpinner(): void; /** * At least one of the properties was changed. */ updated(changedProperties: PropertyValues): void; /** * HTTP error handler. */ _handleHttpError(): void; /** * */ updateViewer(): void; /** * */ clear(): void; /** * HTTP response handler. * @param response Response parsed from HTTP or file. */ _handleHttpResponse(response: DataVizResponse): void; _getInheritedBackgroundCol(el: HTMLElement): string; _getDefaultBackground(): string; _getTrackRectColor(): string; /** * */ _handleLoadComplete(): void; /** * */ _dispatchSceneData(data: DataVizResponse): void; /** * @param e */ _handleTap(x: number, y: number, currentTarget: EventTarget): void; /** * @param e */ _handleTrack(state: string, x: number, y: number, dx: number, dy: number): void; /** * @param e */ _handlePointerDown(e: PointerEvent): void; /** * @param e */ _handlePointerMove(e: PointerEvent): void; /** * @param e */ _handlePointerUp(e: PointerEvent): void; _getAdjustedCoords(x: number, y: number): { x: number; y: number; }; _getAdjustedRectangleCoords(x: number, y: number, dx: number, dy: number): { left: number; right: number; top: number; bottom: number; }; _processPick(pickProperties: PickProperties, processEventOnClient?: boolean, originalTarget?: any): void; _pointInPoly(x: number, y: number, coords: Array): boolean; /** * Dispatch the appropriate tap, track or hover event. */ _dispatchPickEvents(pickProperties: PickProperties): void; _resetTimer(): void; constructor(); /** * Element connected to the DOM */ connectedCallback(): void; /** * Element disconnected from the DOM */ disconnectedCallback(): void; _handlePointerEnterMotionCaptureControl(e: PointerEvent): void; _handlePointerLeaveMotionCaptureControl(): void; _round2dp(n: number): number; _handleMotionCaptureSnapshot(): void; _handleMotionCaptureDelayIncrease(): void; _handleMotionCaptureDelayDecrease(): void; _handleMotionCaptureCopyData(): void; _handleMotionCaptureCopyUrl(): Promise; /** * Gzip compress a string. * * @param {string} inString * @returns {Promise} */ _compress(inString: string): Promise; /** * Gzip decompress a string. * * @param {string} inString * @returns {Promise} */ _decompress(inString: string): Promise; _handleMotionCaptureClear(): void; _updatePixelRatio(change?: boolean): void; /** * Change in 'motion-capture-controls-enable' property. */ _motionCaptureControlsEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'transform-enable' property. */ _transformEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in the 'transform-client-only' property. */ _transformClientOnlyChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'transform-rotate-disable' property. */ _transformRotateDisableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'transform-zoom-disable' property. */ _transformZoomDisableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'transform-pan-disable' property. */ _transformPanDisableChanged(newValue: boolean, oldValue?: boolean): void; /** * Reset the transform interactor. */ resetTransform(): void; /** * Perform a zoom in using the transform interactor. */ zoomIn(): void; /** * Perform a zoom out using the transform interactor. */ zoomOut(): void; /** * Perform a pan to center the specified coordinate of the transformed object in the center of the scene. */ panTo(x: number, y: number, z: number): void; _getTransformComponents(): { position: import("three").Vector3Tuple; rotation: number[]; rotationOrder: import("three").EulerOrder; scale: number; }; getTransformMatrix(): any; runAnimation(): void; /** * Change in 'animated-glyphs-visible' property. */ _animatedGlyphsVisibleChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'animated-glyphs-enable' property. */ _animatedGlyphsEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'transform-twist-angle', 'transform-tilt-angle' or 'transform-scale' properties. */ _transformValueChanged(): void; /** * Change in 'motion-capture' property. */ _motionCaptureValueChanged(newValue: string, oldValue?: string): Promise; /** * Change in 'zoom-rectangle-enable' property. */ _zoomRectangleEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'pan-enable' property. */ _panEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'pan-zoom-enable' property. */ _panZoomEnableChanged(newValue: boolean, oldValue?: boolean): void; _handlePanChanged(e: CustomEvent): void; _handlePanZoom(e: CustomEvent): void; _handlePanZoomEnd(e: CustomEvent): void; /** * Change in 'pan-width-zoom-level' property. */ _panWidthZoomLevelChanged(newValue: number, oldValue?: number): void; /** * Change in 'pan-height-zoom-level' property. */ _panHeightZoomLevelChanged(newValue: number, oldValue?: number): void; /** * Change in 'pan-maximum-zoom-level' property. */ _panMaximumZoomLevelChanged(newValue: number, oldValue?: number): void; /** * Reset the pan interactor. */ resetPan(): void; /** * Change in 'renderer' property. */ _rendererChanged(newValue: Renderer, oldValue?: Renderer): void; /** * Change in 'track-enable' property. */ _trackEnableChanged(newValue: boolean, oldValue?: boolean): void; /** * Change in 'display-canvas' property. */ _displayCanvasChanged(newValue: boolean, oldValue?: boolean): void; setTooltipHTML(html: string): void; showTooltip(clientX: number, clientY: number): void; hideTooltip(): void; _calcTooltipPosition(tooltip: HTMLDivElement, clientX: number, clientY: number): { x: number; y: number; }; _getOffset(dataVizDiv: HTMLDivElement): { top: number; left: number; }; } declare global { interface HTMLElementTagNameMap { 'avs-go-dataviz': AvsGoDataViz; } } export {}; //# sourceMappingURL=avs-go-dataviz.d.ts.map