@synchronized-console/viewer 2.26.0-rev.1 → 2.31.14

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.
Files changed (58) hide show
  1. package/dist/IViewer.d.ts +8 -2
  2. package/dist/index.d.ts +10 -6
  3. package/dist/index.js +4 -4
  4. package/dist/modules/EventEmitter.d.ts +5 -4
  5. package/dist/modules/LegacyViewer.d.ts +1 -1
  6. package/dist/modules/SynchronizedRenderer.d.ts +9 -1
  7. package/dist/modules/Viewer.d.ts +2 -1
  8. package/dist/modules/batching/Batch.d.ts +7 -0
  9. package/dist/modules/batching/BatchObject.d.ts +2 -1
  10. package/dist/modules/batching/Batcher.d.ts +3 -0
  11. package/dist/modules/batching/LineBatch.d.ts +7 -3
  12. package/dist/modules/batching/MeshBatch.d.ts +1 -1
  13. package/dist/modules/batching/PointBatch.d.ts +1 -1
  14. package/dist/modules/batching/TextBatch.d.ts +27 -8
  15. package/dist/modules/batching/TextBatchObject.d.ts +9 -0
  16. package/dist/modules/converter/Geometry.d.ts +18 -6
  17. package/dist/modules/converter/MeshTriangulationHelper.d.ts +2 -41
  18. package/dist/modules/converter/VirtualArray.d.ts +30 -0
  19. package/dist/modules/extensions/ExplodeExtension.d.ts +4 -0
  20. package/dist/modules/extensions/controls/FlyControls.d.ts +6 -3
  21. package/dist/modules/extensions/measurements/AreaMeasurement.d.ts +8 -2
  22. package/dist/modules/extensions/measurements/Measurement.d.ts +6 -0
  23. package/dist/modules/extensions/measurements/MeasurementPointGizmo.d.ts +8 -6
  24. package/dist/modules/extensions/measurements/MeasurementsExtension.d.ts +22 -16
  25. package/dist/modules/extensions/measurements/PerpendicularMeasurement.d.ts +4 -1
  26. package/dist/modules/extensions/measurements/PointMeasurement.d.ts +6 -4
  27. package/dist/modules/extensions/measurements/PointToPointMeasurement.d.ts +2 -0
  28. package/dist/modules/extensions/sections/SectionTool.d.ts +49 -2
  29. package/dist/modules/input/Input.d.ts +6 -2
  30. package/dist/modules/loaders/Synchronized/SynchronizedConverter.d.ts +7 -1
  31. package/dist/modules/loaders/Synchronized/SynchronizedGeometryConverter.d.ts +7 -3
  32. package/dist/modules/loaders/Synchronized/SynchronizedLoader.d.ts +5 -3
  33. package/dist/modules/materials/Materials.d.ts +1 -0
  34. package/dist/modules/materials/SynchronizedBasicMaterial.d.ts +8 -7
  35. package/dist/modules/materials/SynchronizedTextColoredMaterial.d.ts +8 -0
  36. package/dist/modules/materials/SynchronizedTextMaterial.d.ts +9 -17
  37. package/dist/modules/materials/shaders/synchronized-basic-vert.d.ts +1 -1
  38. package/dist/modules/materials/shaders/synchronized-depth-normal-id-vert.d.ts +1 -1
  39. package/dist/modules/materials/shaders/synchronized-depth-normal-vert.d.ts +1 -1
  40. package/dist/modules/materials/shaders/synchronized-displace.vert.d.ts +1 -1
  41. package/dist/modules/materials/shaders/synchronized-ghost-vert.d.ts +1 -1
  42. package/dist/modules/materials/shaders/synchronized-normal-vert.d.ts +1 -1
  43. package/dist/modules/materials/shaders/synchronized-standard-colored-vert.d.ts +1 -1
  44. package/dist/modules/materials/shaders/synchronized-standard-vert.d.ts +1 -1
  45. package/dist/modules/materials/shaders/synchronized-text-frag.d.ts +1 -1
  46. package/dist/modules/materials/shaders/synchronized-text-vert.d.ts +1 -1
  47. package/dist/modules/materials/shaders/synchronized-viewport-vert.d.ts +1 -1
  48. package/dist/modules/objects/AccelerationStructure.d.ts +1 -1
  49. package/dist/modules/objects/SynchronizedBatchedText.d.ts +59 -0
  50. package/dist/modules/objects/TextLabel.d.ts +51 -0
  51. package/dist/modules/pipeline/Passes/GPass.d.ts +9 -3
  52. package/dist/modules/pipeline/Pipelines/EdgesPipeline.d.ts +2 -0
  53. package/dist/modules/tree/NodeMap.d.ts +9 -0
  54. package/dist/modules/tree/NodeRenderView.d.ts +13 -5
  55. package/dist/modules/tree/RenderTree.d.ts +5 -1
  56. package/dist/modules/tree/WorldTree.d.ts +6 -0
  57. package/package.json +9 -7
  58. package/dist/modules/objects/SynchronizedText.d.ts +0 -39
package/dist/IViewer.d.ts CHANGED
@@ -24,10 +24,17 @@ export type SynchronizedObject = {
24
24
  units?: string;
25
25
  applicationId?: string;
26
26
  };
27
+ export type DataChunk = {
28
+ id: string;
29
+ data: number[];
30
+ references: number;
31
+ processed?: boolean;
32
+ };
27
33
  export interface ViewerParams {
28
34
  showStats: boolean;
29
35
  environmentSrc: Asset;
30
36
  verbose: boolean;
37
+ restrictInputToCanvas: boolean;
31
38
  }
32
39
  export declare enum AssetType {
33
40
  TEXTURE_8BPP = "png",// For now
@@ -58,7 +65,6 @@ export declare enum ViewerEvent {
58
65
  LoadComplete = "load-complete",
59
66
  UnloadComplete = "unload-complete",
60
67
  UnloadAllComplete = "unload-all-complete",
61
- Busy = "busy",
62
68
  FilteringStateSet = "filtering-state-set",
63
69
  LightConfigUpdated = "light-config-updated"
64
70
  }
@@ -68,7 +74,6 @@ export interface ViewerEventPayload {
68
74
  [ViewerEvent.LoadComplete]: string;
69
75
  [ViewerEvent.UnloadComplete]: string;
70
76
  [ViewerEvent.UnloadAllComplete]: void;
71
- [ViewerEvent.Busy]: boolean;
72
77
  [ViewerEvent.FilteringStateSet]: FilteringState;
73
78
  [ViewerEvent.LightConfigUpdated]: LightConfiguration;
74
79
  }
@@ -150,6 +155,7 @@ export interface IViewer {
150
155
  query<T extends Query>(query: T): QueryArgsResultMap[T['operation']] | null;
151
156
  getRenderer(): SynchronizedRenderer;
152
157
  getContainer(): HTMLElement;
158
+ getCanvas(): HTMLCanvasElement;
153
159
  createExtension<T extends Extension>(type: Constructor<T>): T;
154
160
  getExtension<T extends Extension>(type: Constructor<T>): T;
155
161
  hasExtension<T extends Extension>(type: Constructor<T>): boolean;
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { type NodeData, type TreeNode, WorldTree } from './modules/tree/WorldTre
7
7
  import type { PointQuery, QueryResult, IntersectionQuery, PointQueryResult, IntersectionQueryResult } from './modules/queries/Query.js';
8
8
  import { type Utils } from './modules/Utils.js';
9
9
  import { BatchObject } from './modules/batching/BatchObject.js';
10
- import { type MeasurementOptions, MeasurementType, MeasurementsExtension } from './modules/extensions/measurements/MeasurementsExtension.js';
10
+ import { MeasurementsExtension, MeasurementEvent, MeasurementEventPayload } from './modules/extensions/measurements/MeasurementsExtension.js';
11
11
  import { Units } from './modules/converter/Units.js';
12
12
  import { SelectionExtension, SelectionExtensionOptions, DefaultSelectionExtensionOptions } from './modules/extensions/SelectionExtension.js';
13
13
  import { CameraController, CameraControllerOptions, NearPlaneCalculation } from './modules/extensions/CameraController.js';
@@ -25,11 +25,11 @@ import { ObjLoader } from './modules/loaders/OBJ/ObjLoader.js';
25
25
  import { LegacyViewer } from './modules/LegacyViewer.js';
26
26
  import { GeometryConverter, SynchronizedType } from './modules/loaders/GeometryConverter.js';
27
27
  import Input, { InputEvent, InputEventPayload } from './modules/input/Input.js';
28
- import { GeometryType } from './modules/batching/Batch.js';
28
+ import { Batch, GeometryType } from './modules/batching/Batch.js';
29
29
  import { MeshBatch } from './modules/batching/MeshBatch.js';
30
30
  import SynchronizedStandardMaterial from './modules/materials/SynchronizedStandardMaterial.js';
31
31
  import SynchronizedTextMaterial from './modules/materials/SynchronizedTextMaterial.js';
32
- import { SynchronizedText } from './modules/objects/SynchronizedText.js';
32
+ import { TextLabel } from './modules/objects/TextLabel.js';
33
33
  import { NodeRenderView } from './modules/tree/NodeRenderView.js';
34
34
  import { CONTAINED, INTERSECTED, NOT_INTERSECTED, type ExtendedIntersection } from './modules/objects/SynchronizedRaycaster.js';
35
35
  import { SynchronizedGeometryConverter } from './modules/loaders/Synchronized/SynchronizedGeometryConverter.js';
@@ -50,7 +50,7 @@ import { RenderTree } from './modules/tree/RenderTree.js';
50
50
  import SynchronizedConverter from './modules/loaders/Synchronized/SynchronizedConverter.js';
51
51
  import { ViewMode, ViewModes } from './modules/extensions/ViewModes.js';
52
52
  import { BaseGPass, ClearFlags, GPass, ObjectVisibility, PassOptions, ProgressiveGPass } from './modules/pipeline/Passes/GPass.js';
53
- import { DefaultPipelineOptions, Pipeline } from './modules/pipeline/Pipelines/Pipeline.js';
53
+ import { PipelineOptions, BasePipelineOptions, DefaultPipelineOptions, Pipeline } from './modules/pipeline/Pipelines/Pipeline.js';
54
54
  import { ProgressivePipeline } from './modules/pipeline/Pipelines/ProgressivePipeline.js';
55
55
  import { DepthPass, DepthPassOptions } from './modules/pipeline/Passes/DepthPass.js';
56
56
  import { GeometryPass } from './modules/pipeline/Passes/GeometryPass.js';
@@ -84,6 +84,10 @@ import { AreaMeasurement } from './modules/extensions/measurements/AreaMeasureme
84
84
  import { PointMeasurement } from './modules/extensions/measurements/PointMeasurement.js';
85
85
  import { DefaultEdgesPipelineOptions, EdgesPipeline } from './modules/pipeline/Pipelines/EdgesPipeline.js';
86
86
  import { Geometry } from './modules/converter/Geometry.js';
87
- export { Viewer, LegacyViewer, WebXrViewer, SynchronizedWebGLRenderer, DefaultViewerParams, ViewerEvent, DefaultLightConfiguration, World, BatchObject, InstancedBatchObject, WorldTree, RenderTree, VisualDiffMode, Measurement, PointToPointMeasurement, PerpendicularMeasurement, AreaMeasurement, PointMeasurement, MeasurementType, MeasurementState, Units, Extension, SelectionExtension, CameraController, SectionTool, SectionOutlines, MeasurementsExtension, FilteringExtension, CameraEvent, ExplodeExtension, ExplodeEvent, DiffExtension, Loader, SynchronizedConverter, GeometryConverter, Geometry, SynchronizedLoader, ObjLoader, LoaderEvent, UpdateFlags, SynchronizedType, Input, InputEvent, ObjectLayers, GeometryType, MeshBatch, InstancedMeshBatch, LineBatch, PointBatch, TextBatch, AccelerationStructure, TopLevelAccelerationStructure, SynchronizedStandardMaterial, SynchronizedBasicMaterial, SynchronizedTextMaterial, SynchronizedText, NodeRenderView, SynchronizedGeometryConverter, Assets, AssetType, HybridCameraController, SynchronizedRenderer, SectionToolEvent, StencilOutlineType, GPass, BaseGPass, ProgressiveGPass, DepthPass, GeometryPass, NormalsPass, OutputPass, ViewportPass, BlendPass, DepthNormalPass, ShadedPass as BasitPass, ProgressiveAOPass, TAAPass, StencilPass, StencilMaskPass, EdgesPass, PassOptions, EdgesPassOptions as EdgePassOptions, BlendPassOptions, DepthPassOptions, OutputPassOptions, ProgressiveAOPassOptions, ViewportPassOptions, DefaultEdgesPassOptions, DefaultProgressiveAOPassOptions, ClearFlags, ObjectVisibility, InputType, Pipeline, ProgressivePipeline, DefaultPipeline, EdgesPipeline, SolidViewPipeline, PenViewPipeline, ArcticViewPipeline, TAAPipeline, ShadedViewPipeline, DefaultPipelineOptions, DefaultEdgesPipelineOptions, ViewModes, ViewMode, FilterMaterial, FilterMaterialType, FilterMaterialOptions, SynchronizedOfflineLoader, NOT_INTERSECTED, INTERSECTED, CONTAINED, ViewModeEvent, SynchronizedMesh, SynchronizedInstancedMesh, CameraControllerOptions, NearPlaneCalculation };
88
- export type { IViewer, ViewerParams, SelectionEvent, PropertyInfo, StringPropertyInfo, NumericPropertyInfo, LightConfiguration, SunLightConfiguration, SynchronizedObject, SynchronizedReference, SynchronizedView, CanonicalView, InlineView, TreeNode, NodeData, PointQuery, IntersectionQuery, QueryResult, PointQueryResult, IntersectionQueryResult, Utils, DiffResult, MeasurementOptions, FilteringState, ExtendedIntersection, ViewerEventPayload, InputEventPayload, SectionToolEventPayload, CameraEventPayload, SelectionExtensionOptions, DefaultSelectionExtensionOptions, ViewModeEventPayload };
87
+ import { ObjectPickConfiguration, DefaultObjectPickConfiguration } from './modules/SynchronizedRenderer.js';
88
+ import { ChunkArray, VirtualArray } from './modules/converter/VirtualArray.js';
89
+ import SynchronizedLineMaterial from './modules/materials/SynchronizedLineMaterial.js';
90
+ import SynchronizedPointMaterial from './modules/materials/SynchronizedPointMaterial.js';
91
+ export { Viewer, LegacyViewer, WebXrViewer, SynchronizedWebGLRenderer, DefaultViewerParams, ViewerEvent, ObjectPickConfiguration, DefaultLightConfiguration, DefaultObjectPickConfiguration, World, BatchObject, InstancedBatchObject, WorldTree, RenderTree, VisualDiffMode, Measurement, PointToPointMeasurement, PerpendicularMeasurement, AreaMeasurement, PointMeasurement, MeasurementEvent, MeasurementState, Units, Extension, SelectionExtension, CameraController, SectionTool, SectionOutlines, MeasurementsExtension, FilteringExtension, CameraEvent, ExplodeExtension, ExplodeEvent, DiffExtension, Loader, SynchronizedConverter, GeometryConverter, Geometry, SynchronizedLoader, ObjLoader, LoaderEvent, UpdateFlags, SynchronizedType, Input, InputEvent, ObjectLayers, GeometryType, Batch, MeshBatch, InstancedMeshBatch, LineBatch, PointBatch, TextBatch, AccelerationStructure, TopLevelAccelerationStructure, SynchronizedStandardMaterial, SynchronizedBasicMaterial, SynchronizedTextMaterial, SynchronizedLineMaterial, SynchronizedPointMaterial, TextLabel, NodeRenderView, SynchronizedGeometryConverter, Assets, AssetType, HybridCameraController, SynchronizedRenderer, SectionToolEvent, StencilOutlineType, GPass, BaseGPass, ProgressiveGPass, DepthPass, GeometryPass, NormalsPass, OutputPass, ViewportPass, BlendPass, DepthNormalPass, ShadedPass as BasitPass, ProgressiveAOPass, TAAPass, StencilPass, StencilMaskPass, EdgesPass, PassOptions, EdgesPassOptions as EdgePassOptions, BlendPassOptions, DepthPassOptions, OutputPassOptions, ProgressiveAOPassOptions, ViewportPassOptions, DefaultEdgesPassOptions, DefaultProgressiveAOPassOptions, ClearFlags, ObjectVisibility, InputType, Pipeline, ProgressivePipeline, DefaultPipeline, EdgesPipeline, SolidViewPipeline, PenViewPipeline, ArcticViewPipeline, TAAPipeline, ShadedViewPipeline, PipelineOptions, BasePipelineOptions, DefaultPipelineOptions, DefaultEdgesPipelineOptions, ViewModes, ViewMode, FilterMaterial, FilterMaterialType, FilterMaterialOptions, SynchronizedOfflineLoader, NOT_INTERSECTED, INTERSECTED, CONTAINED, ViewModeEvent, SynchronizedMesh, SynchronizedInstancedMesh, CameraControllerOptions, NearPlaneCalculation, ChunkArray, VirtualArray };
92
+ export type { IViewer, ViewerParams, SelectionEvent, PropertyInfo, StringPropertyInfo, NumericPropertyInfo, LightConfiguration, SunLightConfiguration, SynchronizedObject, SynchronizedReference, SynchronizedView, CanonicalView, InlineView, TreeNode, NodeData, PointQuery, IntersectionQuery, QueryResult, PointQueryResult, IntersectionQueryResult, Utils, DiffResult, FilteringState, ExtendedIntersection, ViewerEventPayload, InputEventPayload, SectionToolEventPayload, CameraEventPayload, SelectionExtensionOptions, DefaultSelectionExtensionOptions, ViewModeEventPayload, MeasurementEventPayload };
89
93
  export * as UrlHelper from './modules/UrlHelper.js';