@shapediver/viewer.shared.types 3.3.3 → 3.3.6

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 (78) hide show
  1. package/dist/implementation/data/GeometryData.d.ts.map +1 -1
  2. package/dist/implementation/data/GeometryData.js +1 -0
  3. package/dist/implementation/data/GeometryData.js.map +1 -1
  4. package/dist/index.d.ts +5 -4
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +4 -5
  7. package/dist/index.js.map +1 -1
  8. package/dist/interfaces/parameter/IDrawingParametersSettings.d.ts +121 -0
  9. package/dist/interfaces/parameter/IDrawingParametersSettings.d.ts.map +1 -0
  10. package/dist/interfaces/parameter/IDrawingParametersSettings.js +22 -0
  11. package/dist/interfaces/parameter/IDrawingParametersSettings.js.map +1 -0
  12. package/dist/interfaces/parameter/IDrawingToolsParametersSettings.d.ts +159 -0
  13. package/dist/interfaces/parameter/IDrawingToolsParametersSettings.d.ts.map +1 -0
  14. package/dist/interfaces/parameter/IDrawingToolsParametersSettings.js +29 -0
  15. package/dist/interfaces/parameter/IDrawingToolsParametersSettings.js.map +1 -0
  16. package/dist/interfaces/parameter/IGumballParameterSettings.d.ts +1 -5
  17. package/dist/interfaces/parameter/IGumballParameterSettings.d.ts.map +1 -1
  18. package/dist/interfaces/parameter/IGumballParameterSettings.js +0 -7
  19. package/dist/interfaces/parameter/IGumballParameterSettings.js.map +1 -1
  20. package/dist/interfaces/parameter/ISelectionParameterSettings.d.ts +1 -5
  21. package/dist/interfaces/parameter/ISelectionParameterSettings.d.ts.map +1 -1
  22. package/dist/interfaces/parameter/ISelectionParameterSettings.js +0 -7
  23. package/dist/interfaces/parameter/ISelectionParameterSettings.js.map +1 -1
  24. package/package.json +7 -8
  25. package/src/implementation/data/AnimationData.ts +0 -310
  26. package/src/implementation/data/BoneData.ts +0 -32
  27. package/src/implementation/data/CustomData.ts +0 -52
  28. package/src/implementation/data/GeometryData.ts +0 -426
  29. package/src/implementation/data/HTMLElementAnchorData.ts +0 -365
  30. package/src/implementation/material/AbstractMaterialData.ts +0 -268
  31. package/src/implementation/material/MapData.ts +0 -218
  32. package/src/implementation/material/MaterialBasicLineData.ts +0 -99
  33. package/src/implementation/material/MaterialGemData.ts +0 -310
  34. package/src/implementation/material/MaterialMultiPointData.ts +0 -659
  35. package/src/implementation/material/MaterialPointData.ts +0 -136
  36. package/src/implementation/material/MaterialShadowData.ts +0 -45
  37. package/src/implementation/material/MaterialSpecularGlossinessData.ts +0 -191
  38. package/src/implementation/material/MaterialStandardData.ts +0 -502
  39. package/src/implementation/material/MaterialUnlitData.ts +0 -122
  40. package/src/implementation/material/MaterialVariantsData.ts +0 -60
  41. package/src/implementation/sdtf/SDTFAttributesData.ts +0 -128
  42. package/src/implementation/sdtf/SDTFItemData.ts +0 -72
  43. package/src/implementation/sdtf/SDTFOverviewData.ts +0 -80
  44. package/src/index.ts +0 -141
  45. package/src/interfaces/data/IAnimationData.ts +0 -42
  46. package/src/interfaces/data/IBoneData.ts +0 -9
  47. package/src/interfaces/data/ICustomData.ts +0 -15
  48. package/src/interfaces/data/IGeometryData.ts +0 -87
  49. package/src/interfaces/data/IHTMLElementAnchorData.ts +0 -68
  50. package/src/interfaces/data/material/IMapData.ts +0 -64
  51. package/src/interfaces/data/material/IMaterialAbstractData.ts +0 -86
  52. package/src/interfaces/data/material/IMaterialBasicLineData.ts +0 -21
  53. package/src/interfaces/data/material/IMaterialGemDataProperties.ts +0 -46
  54. package/src/interfaces/data/material/IMaterialMultiPointData.ts +0 -72
  55. package/src/interfaces/data/material/IMaterialPointData.ts +0 -31
  56. package/src/interfaces/data/material/IMaterialShadowData.ts +0 -21
  57. package/src/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.ts +0 -36
  58. package/src/interfaces/data/material/IMaterialStandardData.ts +0 -60
  59. package/src/interfaces/data/material/IMaterialUnlitData.ts +0 -30
  60. package/src/interfaces/data/material/IMaterialVariantsData.ts +0 -19
  61. package/src/interfaces/events/EventResponseMapping.ts +0 -53
  62. package/src/interfaces/events/ICameraEvent.ts +0 -16
  63. package/src/interfaces/events/IOutputEvent.ts +0 -29
  64. package/src/interfaces/events/IParameterEvent.ts +0 -21
  65. package/src/interfaces/events/IRenderingEvent.ts +0 -7
  66. package/src/interfaces/events/ISceneEvent.ts +0 -17
  67. package/src/interfaces/events/ISessionEvent.ts +0 -16
  68. package/src/interfaces/events/ITaskEvent.ts +0 -61
  69. package/src/interfaces/events/IViewportEvent.ts +0 -13
  70. package/src/interfaces/parameter/IGumballParameterSettings.ts +0 -44
  71. package/src/interfaces/parameter/IInteractionParameterSettings.ts +0 -85
  72. package/src/interfaces/parameter/ISelectionParameterSettings.ts +0 -37
  73. package/src/interfaces/sdtf/ISDTFAttributeVisualizationData.ts +0 -7
  74. package/src/interfaces/sdtf/ISDTFAttributesData.ts +0 -27
  75. package/src/interfaces/sdtf/ISDTFItemData.ts +0 -23
  76. package/src/interfaces/sdtf/ISDTFOverviewData.ts +0 -31
  77. package/src/types.ts +0 -68
  78. package/tsconfig.json +0 -17
@@ -1,128 +0,0 @@
1
- import { AbstractTreeNodeData, ITreeNodeData } from '@shapediver/viewer.shared.node-tree'
2
- import { ISDTFAttributeData, ISDTFAttributesData } from '../../interfaces/sdtf/ISDTFAttributesData';
3
- import { SdtfTypeHintName } from '@shapediver/sdk.sdtf-v1'
4
-
5
- export class SDTFAttributeData implements ISDTFAttributeData {
6
- // #region Properties (2)
7
-
8
- readonly #typeHint;
9
- readonly #value;
10
-
11
- #resolvedValue: any;
12
-
13
- // #endregion Properties (2)
14
-
15
- // #region Constructors (1)
16
-
17
- constructor(
18
- typeHint: SdtfTypeHintName | string,
19
- value: any
20
- ) {
21
- this.#typeHint = typeHint;
22
- this.#value = value;
23
- }
24
-
25
- // #endregion Constructors (1)
26
-
27
- // #region Public Accessors (2)
28
-
29
- public get typeHint(): SdtfTypeHintName | string {
30
- return this.#typeHint;
31
- }
32
-
33
- public get value(): any {
34
- if(this.#value instanceof Function && !this.#resolvedValue) {
35
- this.#resolvedValue = this.#value();
36
- return this.#resolvedValue;
37
- } else if(this.#value instanceof Function) {
38
- return this.#resolvedValue;
39
- }
40
-
41
- return this.#value;
42
- }
43
-
44
- // #endregion Public Accessors (2)
45
- }
46
-
47
- // export class SDTFAttributeAsyncData {
48
- // // #region Properties (2)
49
-
50
- // readonly #typeHint;
51
- // readonly #accessor;
52
- // private _value: Promise<any> | undefined;
53
- // private readonly _loadAccessor: (accessorID: number) => Promise<any>
54
-
55
- // // #endregion Properties (2)
56
-
57
- // // #region Constructors (1)
58
-
59
- // constructor(
60
- // typeHint: string,
61
- // accessor: number,
62
- // private readonly _loadAccessor: (accessorID: number) => Promise<any>
63
- // ) {
64
- // this._typeHint = typeHint;
65
- // this._accessor = accessor;
66
- // }
67
-
68
- // public get value(): Promise<any> {
69
- // if (this.value !== undefined) {
70
- // return this._value!;
71
- // } else {
72
- // this._value = this._loadAccessor!(this._accessor!);
73
- // return this._value;
74
- // }
75
- // }
76
-
77
- // public get typeHint(): string {
78
- // return this._typeHint;
79
- // }
80
-
81
- // // #endregion Constructors (1)
82
- // }
83
-
84
- export class SDTFAttributesData extends AbstractTreeNodeData implements ISDTFAttributesData {
85
- // #region Properties (1)
86
-
87
- readonly #attributes: {
88
- [key: string]: SDTFAttributeData
89
- } = {};
90
-
91
- // #endregion Properties (1)
92
-
93
- // #region Constructors (1)
94
-
95
- constructor(
96
- attributes: {
97
- [key: string]: SDTFAttributeData
98
- } = {},
99
- id?: string,
100
- version?: string
101
- ) {
102
- super(id, version);
103
- this.#attributes = attributes;
104
- }
105
-
106
- // #endregion Constructors (1)
107
-
108
- // #region Public Accessors (1)
109
-
110
- public get attributes(): {
111
- [key: string]: SDTFAttributeData
112
- } {
113
- return this.#attributes;
114
- }
115
-
116
- // #endregion Public Accessors (1)
117
-
118
- // #region Public Methods (1)
119
-
120
- /**
121
- * Clones the scene graph data.
122
- */
123
- public clone(): ISDTFAttributesData {
124
- return new SDTFAttributesData(this.attributes, this.id, this.version);
125
- }
126
-
127
- // #endregion Public Methods (1)
128
- }
@@ -1,72 +0,0 @@
1
- import { AbstractTreeNodeData, ITreeNodeData } from '@shapediver/viewer.shared.node-tree'
2
- import { ISDTFAttributeData } from '../../interfaces/sdtf/ISDTFAttributesData';
3
- import { ISDTFItemData } from '../../interfaces/sdtf/ISDTFItemData';
4
- import { SdtfTypeHintName } from '@shapediver/sdk.sdtf-v1'
5
-
6
- export class SDTFItemData extends AbstractTreeNodeData implements ISDTFItemData {
7
- // #region Properties (3)
8
-
9
- readonly #typeHint;
10
- readonly #value;
11
-
12
- #attributes: {
13
- [key: string]: ISDTFAttributeData
14
- } = {};
15
- #resolvedValue: any;
16
-
17
- // #endregion Properties (3)
18
-
19
- // #region Constructors (1)
20
-
21
- constructor(
22
- typeHint: SdtfTypeHintName | string,
23
- value: any,
24
- attributes: {
25
- [key: string]: ISDTFAttributeData
26
- },
27
- id?: string,
28
- version?: string
29
- ) {
30
- super(id, version);
31
- this.#attributes = attributes;
32
- this.#typeHint = typeHint;
33
- this.#value = value;
34
- }
35
-
36
- // #endregion Constructors (1)
37
-
38
- // #region Public Accessors (3)
39
-
40
- public get attributes(): {
41
- [key: string]: ISDTFAttributeData
42
- } {
43
- return this.#attributes;
44
- }
45
-
46
- public get typeHint(): SdtfTypeHintName | string {
47
- return this.#typeHint;
48
- }
49
-
50
- public get value(): any {
51
- if(this.#value instanceof Function && !this.#resolvedValue) {
52
- this.#resolvedValue = this.#value();
53
- return this.#resolvedValue;
54
- } else if(this.#value instanceof Function) {
55
- return this.#resolvedValue;
56
- }
57
- return this.#value;
58
- }
59
-
60
- // #endregion Public Accessors (3)
61
-
62
- // #region Public Methods (1)
63
-
64
- /**
65
- * Clones the scene graph data.
66
- */
67
- public clone(): ISDTFItemData {
68
- return new SDTFItemData(this.typeHint, this.value, this.attributes, this.id, this.version);
69
- }
70
-
71
- // #endregion Public Methods (1)
72
- }
@@ -1,80 +0,0 @@
1
- import { AbstractTreeNodeData, ITreeNodeData } from '@shapediver/viewer.shared.node-tree'
2
- import { ISDTFOverview, ISDTFOverviewData } from '../../interfaces/sdtf/ISDTFOverviewData';
3
- import { SdtfPrimitiveTypeGuard } from '@shapediver/sdk.sdtf-primitives'
4
-
5
- export class SDTFOverviewData extends AbstractTreeNodeData implements ISDTFOverviewData {
6
- // #region Properties (1)
7
-
8
- #overview: ISDTFOverview = {};
9
-
10
- // #endregion Properties (1)
11
-
12
- // #region Constructors (1)
13
-
14
- constructor(
15
- overview: ISDTFOverview,
16
- id?: string,
17
- version?: string
18
- ) {
19
- super(id, version);
20
- this.#overview = overview;
21
- }
22
-
23
- // #endregion Constructors (1)
24
-
25
- // #region Public Accessors (1)
26
-
27
- public get overview(): ISDTFOverview {
28
- return this.#overview;
29
- }
30
-
31
- // #endregion Public Accessors (1)
32
-
33
- // #region Public Methods (1)
34
-
35
- /**
36
- * Clones the scene graph data.
37
- */
38
- public clone(): ISDTFOverviewData {
39
- return new SDTFOverviewData(this.#overview, this.id, this.version);
40
- }
41
-
42
- public merge(data: ISDTFOverviewData) {
43
- for (let overviewKey in data.overview) {
44
- for(let i = 0; i < data.overview[overviewKey].length; i++){
45
- const dataToCopy = data.overview[overviewKey][i];
46
- const existingEntries = this.overview[overviewKey] ? this.overview[overviewKey].filter(o => o.typeHint === dataToCopy.typeHint) : [];
47
- if(this.overview[overviewKey] && existingEntries.length > 0) {
48
- const entry = existingEntries[0];
49
- entry.count++;
50
- if (SdtfPrimitiveTypeGuard.isStringType(dataToCopy.typeHint)) {
51
- entry.values = entry.values?.concat(dataToCopy.values!.filter((item) => entry.values!.indexOf(item) < 0))
52
- }
53
- if (SdtfPrimitiveTypeGuard.isNumberType(dataToCopy.typeHint)) {
54
- entry.min = Math.min(dataToCopy.min!, entry.min!);
55
- entry.max = Math.max(dataToCopy.max!, entry.max!);
56
- }
57
-
58
- } else if(this.overview[overviewKey]) {
59
- this.overview[overviewKey].push({
60
- typeHint: dataToCopy.typeHint,
61
- count: dataToCopy.count,
62
- values: dataToCopy.values,
63
- min: dataToCopy.min,
64
- max: dataToCopy.max,
65
- })
66
- } else {
67
- this.overview[overviewKey] = [{
68
- typeHint: dataToCopy.typeHint,
69
- count: dataToCopy.count,
70
- values: dataToCopy.values,
71
- min: dataToCopy.min,
72
- max: dataToCopy.max,
73
- }]
74
- }
75
- }
76
- }
77
- }
78
-
79
- // #endregion Public Methods (1)
80
- }
package/src/index.ts DELETED
@@ -1,141 +0,0 @@
1
- import { AbstractMaterialData } from './implementation/material/AbstractMaterialData';
2
- import { AnimationData } from './implementation/data/AnimationData';
3
- import { AttributeData, GeometryData, PrimitiveData } from './implementation/data/GeometryData';
4
- import { BoneData } from './implementation/data/BoneData';
5
- import {
6
- Color,
7
- ISessionSettingsSections,
8
- ISettingsSections,
9
- IViewportSettingsSections,
10
- PARAMETER_TYPE,
11
- PARAMETER_VISUALIZATION
12
- } from './types';
13
- import { CustomData } from './implementation/data/CustomData';
14
- import { EventResponseMapping } from './interfaces/events/EventResponseMapping';
15
- import { GumballParameterValue, IGumballParameterProps, isInteractionGumballParameterSettings } from './interfaces/parameter/IGumballParameterSettings';
16
- import {
17
- HTMLElementAnchorCustomData,
18
- HTMLElementAnchorData,
19
- HTMLElementAnchorImageData,
20
- HTMLElementAnchorTextData
21
- } from './implementation/data/HTMLElementAnchorData';
22
- import { IAnchorDataImage, IAnchorDataText, IHTMLElementAnchorData } from './interfaces/data/IHTMLElementAnchorData';
23
- import { IAnimationData, IAnimationTrack } from './interfaces/data/IAnimationData';
24
- import {
25
- IAttributeData,
26
- IGeometryData,
27
- IPrimitiveData,
28
- PRIMITIVE_MODE
29
- } from './interfaces/data/IGeometryData';
30
- import { IBoneData } from './interfaces/data/IBoneData';
31
- import { ICameraEvent } from './interfaces/events/ICameraEvent';
32
- import { ICustomData } from './interfaces/data/ICustomData';
33
- import {
34
- IInteractionParameterProps,
35
- IGumballParameterJsonSchema,
36
- IInteractionParameterJsonSchema,
37
- IInteractionParameterSettings,
38
- InteractionParameterSettingsType,
39
- ISelectionParameterJsonSchema,
40
- validateGumballParameterSettings,
41
- validateInteractionParameterSettings,
42
- validateSelectionParameterSettings
43
- } from './interfaces/parameter/IInteractionParameterSettings';
44
- import {
45
- IMapData,
46
- IMapDataProperties,
47
- IMapDataPropertiesDefinition,
48
- TEXTURE_FILTERING,
49
- TEXTURE_WRAPPING
50
- } from './interfaces/data/material/IMapData';
51
- import {
52
- IMaterialAbstractData,
53
- IMaterialAbstractDataProperties,
54
- IMaterialAbstractDataPropertiesDefinition,
55
- MATERIAL_ALPHA,
56
- MATERIAL_SHADING,
57
- MATERIAL_SIDE,
58
- MATERIAL_TYPE
59
- } from './interfaces/data/material/IMaterialAbstractData';
60
- import { IMaterialBasicLineData, IMaterialBasicLineDataProperties, IMaterialBasicLineDataPropertiesDefinition } from './interfaces/data/material/IMaterialBasicLineData';
61
- import { IMaterialGemData, IMaterialGemDataProperties, IMaterialGemDataPropertiesDefinition } from './interfaces/data/material/IMaterialGemDataProperties';
62
- import { IMaterialMultiPointData, IMaterialMultiPointDataProperties, IMaterialMultiPointDataPropertiesDefinition } from './interfaces/data/material/IMaterialMultiPointData';
63
- import { IMaterialPointData, IMaterialPointDataProperties, IMaterialPointDataPropertiesDefinition } from './interfaces/data/material/IMaterialPointData';
64
- import { IMaterialShadowData, IMaterialShadowDataProperties, IMaterialShadowDataPropertiesDefinition } from './interfaces/data/material/IMaterialShadowData';
65
- import { IMaterialSpecularGlossinessData, IMaterialSpecularGlossinessDataProperties, IMaterialSpecularGlossinessDataPropertiesDefinition } from './interfaces/data/material/IMaterialSpecularGlossinessDataProperties';
66
- import { IMaterialStandardData, IMaterialStandardDataProperties, IMaterialStandardDataPropertiesDefinition } from './interfaces/data/material/IMaterialStandardData';
67
- import { IMaterialUnlitData, IMaterialUnlitDataProperties, IMaterialUnlitDataPropertiesDefinition } from './interfaces/data/material/IMaterialUnlitData';
68
- import { IMaterialVariantsData } from './interfaces/data/material/IMaterialVariantsData';
69
- import { IOutputEvent } from './interfaces/events/IOutputEvent';
70
- import { IParameterEvent } from './interfaces/events/IParameterEvent';
71
- import { IRenderingEvent } from './interfaces/events/IRenderingEvent';
72
- import { ISceneEvent } from './interfaces/events/ISceneEvent';
73
- import { ISDTFAttributeData, ISDTFAttributesData } from './interfaces/sdtf/ISDTFAttributesData';
74
- import { ISDTFAttributeVisualizationData } from './interfaces/sdtf/ISDTFAttributeVisualizationData';
75
- import { ISDTFItemData } from './interfaces/sdtf/ISDTFItemData';
76
- import { ISDTFOverview, ISDTFOverviewData } from './interfaces/sdtf/ISDTFOverviewData';
77
- import { ISelectionParameterProps, isInteractionSelectionParameterSettings, SelectionParameterValue } from './interfaces/parameter/ISelectionParameterSettings';
78
- import { ISessionEvent } from './interfaces/events/ISessionEvent';
79
- import { ITaskEvent, TASK_TYPE } from './interfaces/events/ITaskEvent';
80
- import { IViewportEvent } from './interfaces/events/IViewportEvent';
81
- import { MapData } from './implementation/material/MapData';
82
- import { MaterialBasicLineData } from './implementation/material/MaterialBasicLineData';
83
- import { MaterialGemData } from './implementation/material/MaterialGemData';
84
- import { MaterialMultiPointData } from './implementation/material/MaterialMultiPointData';
85
- import { MaterialPointData } from './implementation/material/MaterialPointData';
86
- import { MaterialShadowData } from './implementation/material/MaterialShadowData';
87
- import { MaterialSpecularGlossinessData } from './implementation/material/MaterialSpecularGlossinessData';
88
- import { MaterialUnlitData } from './implementation/material/MaterialUnlitData';
89
- import { MaterialVariantsData } from './implementation/material/MaterialVariantsData';
90
- import { SDTFAttributeData, SDTFAttributesData } from './implementation/sdtf/SDTFAttributesData';
91
- import { SDTFItemData } from './implementation/sdtf/SDTFItemData';
92
- import { SDTFOverviewData } from './implementation/sdtf/SDTFOverviewData';
93
- import { SdtfPrimitiveTypeGuard } from '@shapediver/sdk.sdtf-primitives';
94
- import { SdtfTypeHintName } from '@shapediver/sdk.sdtf-v1';
95
- import {
96
- MaterialStandardData,
97
- } from './implementation/material/MaterialStandardData';
98
-
99
- export {
100
- IMaterialStandardData, MaterialStandardData, IMaterialStandardDataProperties, IMaterialStandardDataPropertiesDefinition,
101
- IMaterialAbstractData, IMaterialAbstractDataProperties, AbstractMaterialData, IMaterialAbstractDataPropertiesDefinition,
102
- IMaterialUnlitData, MaterialUnlitData, IMaterialUnlitDataProperties, IMaterialUnlitDataPropertiesDefinition,
103
- IMaterialShadowData, MaterialShadowData, IMaterialShadowDataProperties, IMaterialShadowDataPropertiesDefinition,
104
- IMaterialSpecularGlossinessData, MaterialSpecularGlossinessData, IMaterialSpecularGlossinessDataProperties, IMaterialSpecularGlossinessDataPropertiesDefinition,
105
- IMaterialGemData, MaterialGemData, IMaterialGemDataProperties, IMaterialGemDataPropertiesDefinition,
106
- IMaterialPointData, MaterialPointData, IMaterialPointDataProperties, IMaterialPointDataPropertiesDefinition,
107
- IMaterialMultiPointData, MaterialMultiPointData, IMaterialMultiPointDataProperties, IMaterialMultiPointDataPropertiesDefinition,
108
- IMaterialBasicLineData, MaterialBasicLineData, IMaterialBasicLineDataProperties, IMaterialBasicLineDataPropertiesDefinition,
109
- IMapData, IMapDataProperties, IMapDataPropertiesDefinition, MapData, MATERIAL_SIDE, MATERIAL_ALPHA, MATERIAL_SHADING, MATERIAL_TYPE, TEXTURE_WRAPPING, TEXTURE_FILTERING
110
- };
111
-
112
- export {
113
- IAnimationData, AnimationData, IAnimationTrack, IGeometryData, IAttributeData, IPrimitiveData, IMaterialVariantsData, GeometryData, AttributeData, PrimitiveData, MaterialVariantsData, PRIMITIVE_MODE
114
- };
115
-
116
- export {
117
- IAnchorDataImage, IAnchorDataText, IHTMLElementAnchorData, HTMLElementAnchorCustomData, HTMLElementAnchorTextData, HTMLElementAnchorImageData, HTMLElementAnchorData
118
- };
119
-
120
- export {
121
- ICustomData, CustomData, IBoneData, BoneData
122
- };
123
-
124
- export {
125
- EventResponseMapping, IViewportEvent, ISessionEvent, IOutputEvent, ICameraEvent, IRenderingEvent, IParameterEvent, ISceneEvent, ITaskEvent, TASK_TYPE
126
- };
127
-
128
- export {
129
- ISDTFOverviewData, SDTFOverviewData, ISDTFOverview, SDTFAttributesData, ISDTFAttributesData, ISDTFAttributeData, SDTFAttributeData, SDTFItemData, ISDTFItemData, ISDTFAttributeVisualizationData,
130
- SdtfTypeHintName as SDTF_TYPEHINT, SdtfPrimitiveTypeGuard
131
- };
132
-
133
- export {
134
- Color, PARAMETER_TYPE, PARAMETER_VISUALIZATION, ISettingsSections, ISessionSettingsSections, IViewportSettingsSections
135
- };
136
-
137
- export {
138
- InteractionParameterSettingsType, IInteractionParameterProps, IInteractionParameterSettings, IInteractionParameterJsonSchema, validateInteractionParameterSettings,
139
- ISelectionParameterProps, SelectionParameterValue, isInteractionSelectionParameterSettings, ISelectionParameterJsonSchema, validateSelectionParameterSettings,
140
- IGumballParameterProps, GumballParameterValue, isInteractionGumballParameterSettings, IGumballParameterJsonSchema, validateGumballParameterSettings
141
- };
@@ -1,42 +0,0 @@
1
- import { ITransformation, ITreeNode, ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
2
- import { vec3 } from "gl-matrix";
3
-
4
- export interface IAnimationTrack {
5
- // #region Properties (6)
6
-
7
- interpolation: 'linear' | 'step';
8
- node: ITreeNode,
9
- path: 'scale' | 'translation' | 'rotation';
10
- previousMatrix?: ITransformation;
11
- pivot?: vec3;
12
- times: Float32Array | Uint8Array | Uint16Array | Int8Array | Int16Array | Uint32Array | number[];
13
- values: Float32Array | Uint8Array | Uint16Array | Int8Array | Int16Array | Uint32Array | number[];
14
-
15
- // #endregion Properties (6)
16
- }
17
-
18
- export interface IAnimationData extends ITreeNodeData {
19
- // #region Properties (8)
20
-
21
- readonly animate: boolean;
22
- readonly duration: number;
23
- readonly name: string;
24
- readonly start: number;
25
-
26
- animationTime: number;
27
- repeat: boolean;
28
- reset: boolean;
29
- tracks: IAnimationTrack[];
30
-
31
- // #endregion Properties (8)
32
-
33
- // #region Public Methods (5)
34
-
35
- clone(): IAnimationData;
36
- continueAnimation(): void;
37
- pauseAnimation(): void;
38
- startAnimation(): void;
39
- stopAnimation(): void;
40
-
41
- // #endregion Public Methods (5)
42
- }
@@ -1,9 +0,0 @@
1
- import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
2
-
3
- export interface IBoneData extends ITreeNodeData {
4
- // #region Public Methods (1)
5
-
6
- clone(): IBoneData;
7
-
8
- // #endregion Public Methods (1)
9
- }
@@ -1,15 +0,0 @@
1
- import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
2
-
3
- export interface ICustomData extends ITreeNodeData {
4
- // #region Properties (1)
5
-
6
- data: { [key: string]: any };
7
-
8
- // #endregion Properties (1)
9
-
10
- // #region Public Methods (1)
11
-
12
- clone(): ICustomData;
13
-
14
- // #endregion Public Methods (1)
15
- }
@@ -1,87 +0,0 @@
1
- import { ITreeNode, ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
2
- import { IBox } from "@shapediver/viewer.shared.math";
3
- import { IMaterialAbstractData } from "./material/IMaterialAbstractData";
4
- import { mat4 } from "gl-matrix";
5
-
6
- export enum PRIMITIVE_MODE {
7
- POINTS = 0,
8
- LINES = 1,
9
- LINE_LOOP = 2,
10
- LINE_STRIP = 3,
11
- TRIANGLES = 4,
12
- TRIANGLE_STRIP = 5,
13
- TRIANGLE_FAN = 6
14
- }
15
-
16
- export interface IAttributeData extends ITreeNodeData {
17
- // #region Properties (15)
18
-
19
- readonly array: Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array;
20
- readonly byteOffset: number;
21
- readonly byteStride?: number;
22
- readonly count: number;
23
- readonly elementBytes: number;
24
- readonly itemBytes: number;
25
- readonly itemSize: number;
26
- readonly max: number[];
27
- readonly min: number[];
28
- readonly morphAttributeData: IAttributeData[];
29
- readonly normalized: boolean;
30
- readonly sparse?: boolean;
31
- readonly sparseIndices?: Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array;
32
- readonly sparseValues?: Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array;
33
- readonly target: number | undefined;
34
-
35
- // #endregion Properties (15)
36
-
37
- // #region Public Methods (1)
38
-
39
- clone(): IAttributeData;
40
-
41
- // #endregion Public Methods (1)
42
- }
43
-
44
- export interface IPrimitiveData extends ITreeNodeData {
45
- // #region Properties (3)
46
-
47
- readonly attributes: {
48
- [key: string]: IAttributeData
49
- };
50
-
51
- boundingBox: IBox;
52
- indices: IAttributeData | null;
53
-
54
- // #endregion Properties (3)
55
-
56
- // #region Public Methods (2)
57
-
58
- clone(): IPrimitiveData;
59
- computeBoundingBox(matrix: mat4): IBox;
60
-
61
- // #endregion Public Methods (2)
62
- }
63
-
64
- export interface IGeometryData extends ITreeNodeData {
65
- // #region Properties (11)
66
-
67
- readonly mode: PRIMITIVE_MODE;
68
- readonly primitive: IPrimitiveData;
69
-
70
- attributeMaterial: IMaterialAbstractData | null;
71
- boundingBox: IBox;
72
- effectMaterials: { material: IMaterialAbstractData, token: string }[];
73
- material: IMaterialAbstractData | null;
74
- materialVariants: { material: IMaterialAbstractData, variant: number }[];
75
- morphWeights: number[];
76
- renderOrder: number;
77
- skinNode?: ITreeNode;
78
- standardMaterial: IMaterialAbstractData | null;
79
-
80
- // #endregion Properties (11)
81
-
82
- // #region Public Methods (1)
83
-
84
- clone(): IGeometryData;
85
-
86
- // #endregion Public Methods (1)
87
- }
@@ -1,68 +0,0 @@
1
- import { vec2, vec3 } from "gl-matrix";
2
- import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
3
- import { IBox } from "@shapediver/viewer.shared.math";
4
- import { Color } from "../../types";
5
-
6
- export interface IAnchorDataImage {
7
- // #region Properties (6)
8
-
9
- alt: string,
10
- height: number,
11
- hidden?: boolean,
12
- position?: {
13
- horizontal?: string,
14
- vertical?: string
15
- }
16
-
17
- src: string,
18
- width: number,
19
-
20
- // #endregion Properties (6)
21
- }
22
-
23
- export interface IAnchorDataText {
24
- // #region Properties (5)
25
-
26
- color: Color,
27
- hidden?: boolean,
28
- position?: {
29
- horizontal?: string,
30
- vertical?: string
31
- },
32
- text: string,
33
- textAlign?: string
34
-
35
- // #endregion Properties (5)
36
- }
37
-
38
- export interface IHTMLElementAnchorData extends ITreeNodeData {
39
- // #region Properties (6)
40
-
41
- data: IAnchorDataImage | IAnchorDataText | any;
42
- format: 'text' | 'image' | 'custom';
43
- hideable: boolean;
44
- intersectionTarget: IBox | string | string[] | undefined;
45
- location: vec3;
46
- viewports: string[];
47
-
48
- // #endregion Properties (6)
49
-
50
- // #region Public Methods (5)
51
-
52
- clone(): IHTMLElementAnchorData;
53
- create(properties: { anchor: IHTMLElementAnchorData, parent: HTMLDivElement }): void;
54
- createViewerHtmlElement(viewer: string): HTMLDivElement | null;
55
- getViewerHtmlElement(viewer: string): HTMLDivElement | null;
56
- update(properties: {
57
- anchor: IHTMLElementAnchorData,
58
- htmlElement: HTMLDivElement,
59
- page: vec2,
60
- container: vec2,
61
- client: vec2,
62
- scale: vec2,
63
- hidden: boolean,
64
- visible: boolean
65
- }): void;
66
-
67
- // #endregion Public Methods (5)
68
- }