@shapediver/viewer.shared.types 2.12.7 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/implementation/data/GeometryData.d.ts +24 -30
- package/dist/implementation/data/GeometryData.d.ts.map +1 -1
- package/dist/implementation/data/GeometryData.js +100 -106
- package/dist/implementation/data/GeometryData.js.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.d.ts.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.js +3 -14
- package/dist/implementation/data/HTMLElementAnchorData.js.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.d.ts +11 -8
- package/dist/implementation/material/AbstractMaterialData.d.ts.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.js +32 -9
- package/dist/implementation/material/AbstractMaterialData.js.map +1 -1
- package/dist/implementation/material/MapData.d.ts +9 -3
- package/dist/implementation/material/MapData.d.ts.map +1 -1
- package/dist/implementation/material/MapData.js +24 -6
- package/dist/implementation/material/MapData.js.map +1 -1
- package/dist/implementation/material/MaterialBasicLineData.d.ts +15 -0
- package/dist/implementation/material/MaterialBasicLineData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialBasicLineData.js +91 -0
- package/dist/implementation/material/MaterialBasicLineData.js.map +1 -0
- package/dist/implementation/material/MaterialGemData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialGemData.js +23 -14
- package/dist/implementation/material/MaterialGemData.js.map +1 -1
- package/dist/implementation/material/MaterialMultiPointData.d.ts +102 -0
- package/dist/implementation/material/MaterialMultiPointData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialMultiPointData.js +603 -0
- package/dist/implementation/material/MaterialMultiPointData.js.map +1 -0
- package/dist/implementation/material/MaterialPointData.d.ts +20 -0
- package/dist/implementation/material/MaterialPointData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialPointData.js +132 -0
- package/dist/implementation/material/MaterialPointData.js.map +1 -0
- package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialSpecularGlossinessData.js +9 -0
- package/dist/implementation/material/MaterialSpecularGlossinessData.js.map +1 -1
- package/dist/implementation/material/MaterialStandardData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialStandardData.js +9 -0
- package/dist/implementation/material/MaterialStandardData.js.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.js +9 -0
- package/dist/implementation/material/MaterialUnlitData.js.map +1 -1
- package/dist/index.d.ts +42 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -31
- package/dist/index.js.map +1 -1
- package/dist/interfaces/data/material/IMapData.d.ts +3 -1
- package/dist/interfaces/data/material/IMapData.d.ts.map +1 -1
- package/dist/interfaces/data/material/IMaterialAbstractData.d.ts +47 -44
- package/dist/interfaces/data/material/IMaterialAbstractData.d.ts.map +1 -1
- package/dist/interfaces/data/material/IMaterialAbstractData.js +10 -7
- package/dist/interfaces/data/material/IMaterialAbstractData.js.map +1 -1
- package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts +7 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.js +4 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.js.map +1 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts +94 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.js +4 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.js.map +1 -0
- package/dist/interfaces/data/material/IMaterialPointData.d.ts +12 -0
- package/dist/interfaces/data/material/IMaterialPointData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialPointData.js +3 -0
- package/dist/interfaces/data/material/IMaterialPointData.js.map +1 -0
- package/dist/interfaces/events/EventResponseMapping.d.ts +20 -8
- package/dist/interfaces/events/EventResponseMapping.d.ts.map +1 -1
- package/dist/interfaces/events/EventResponseMapping.js.map +1 -1
- package/dist/interfaces/events/ICameraEvent.d.ts +8 -1
- package/dist/interfaces/events/ICameraEvent.d.ts.map +1 -1
- package/dist/interfaces/events/IOutputEvent.d.ts +20 -4
- package/dist/interfaces/events/IOutputEvent.d.ts.map +1 -1
- package/dist/interfaces/events/IParameterEvent.d.ts +16 -0
- package/dist/interfaces/events/IParameterEvent.d.ts.map +1 -0
- package/dist/interfaces/events/IParameterEvent.js +3 -0
- package/dist/interfaces/events/IParameterEvent.js.map +1 -0
- package/dist/interfaces/events/IRenderingEvent.d.ts +7 -0
- package/dist/interfaces/events/IRenderingEvent.d.ts.map +1 -0
- package/dist/interfaces/events/IRenderingEvent.js +3 -0
- package/dist/interfaces/events/IRenderingEvent.js.map +1 -0
- package/dist/interfaces/events/ISceneEvent.d.ts +9 -2
- package/dist/interfaces/events/ISceneEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ISessionEvent.d.ts +8 -1
- package/dist/interfaces/events/ISessionEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ITaskEvent.d.ts +31 -8
- package/dist/interfaces/events/ITaskEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ITaskEvent.js +7 -0
- package/dist/interfaces/events/ITaskEvent.js.map +1 -1
- package/dist/interfaces/events/IViewportEvent.d.ts +5 -1
- package/dist/interfaces/events/IViewportEvent.d.ts.map +1 -1
- package/dist/types.d.ts +46 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +6 -5
- package/src/implementation/data/GeometryData.ts +139 -140
- package/src/implementation/data/HTMLElementAnchorData.ts +3 -14
- package/src/implementation/material/AbstractMaterialData.ts +48 -20
- package/src/implementation/material/MapData.ts +32 -8
- package/src/implementation/material/MaterialBasicLineData.ts +99 -0
- package/src/implementation/material/MaterialGemData.ts +23 -14
- package/src/implementation/material/MaterialMultiPointData.ts +659 -0
- package/src/implementation/material/MaterialPointData.ts +136 -0
- package/src/implementation/material/MaterialSpecularGlossinessData.ts +9 -0
- package/src/implementation/material/MaterialStandardData.ts +9 -0
- package/src/implementation/material/MaterialUnlitData.ts +9 -0
- package/src/index.ts +92 -57
- package/src/interfaces/data/material/IMapData.ts +3 -1
- package/src/interfaces/data/material/IMaterialAbstractData.ts +64 -51
- package/src/interfaces/data/material/IMaterialBasicLineData.ts +20 -0
- package/src/interfaces/data/material/IMaterialMultiPointData.ts +112 -0
- package/src/interfaces/data/material/IMaterialPointData.ts +26 -0
- package/src/interfaces/events/EventResponseMapping.ts +29 -8
- package/src/interfaces/events/ICameraEvent.ts +12 -1
- package/src/interfaces/events/IOutputEvent.ts +24 -4
- package/src/interfaces/events/IParameterEvent.ts +21 -0
- package/src/interfaces/events/IRenderingEvent.ts +7 -0
- package/src/interfaces/events/ISceneEvent.ts +13 -2
- package/src/interfaces/events/ISessionEvent.ts +13 -2
- package/src/interfaces/events/ITaskEvent.ts +43 -8
- package/src/interfaces/events/IViewportEvent.ts +9 -1
- package/src/types.ts +67 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IParameterEvent.js","sourceRoot":"","sources":["../../../src/interfaces/events/IParameterEvent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IViewportEvent } from './IViewportEvent';
|
|
2
|
+
/**
|
|
3
|
+
* Definition of the rendering event.
|
|
4
|
+
* These events are sent for rendering specific events ({@link EVENTTYPE_RENDERING}).
|
|
5
|
+
*/
|
|
6
|
+
export declare type IRenderingEvent = IViewportEvent;
|
|
7
|
+
//# sourceMappingURL=IRenderingEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRenderingEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/IRenderingEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,oBAAY,eAAe,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRenderingEvent.js","sourceRoot":"","sources":["../../../src/interfaces/events/IRenderingEvent.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IViewportEvent } from './IViewportEvent';
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
/**
|
|
4
|
+
* Definition of the scene event.
|
|
5
|
+
* These events are sent for scene specific events ({@link EVENTTYPE_SCENE}).
|
|
6
|
+
*/
|
|
3
7
|
export interface ISceneEvent extends IViewportEvent {
|
|
8
|
+
/**
|
|
9
|
+
* The bounding box of the scene.
|
|
10
|
+
*/
|
|
4
11
|
boundingBox: {
|
|
5
12
|
min: vec3;
|
|
6
13
|
max: vec3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISceneEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ISceneEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ISceneEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ISceneEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IAG/C;;OAEG;IACH,WAAW,EAAE;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,CAAA;KAAC,CAAA;CAGvC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { IEvent } from
|
|
1
|
+
import { IEvent } from '@shapediver/viewer.shared.services';
|
|
2
|
+
/**
|
|
3
|
+
* Definition of the session event.
|
|
4
|
+
* These events are sent for session specific events ({@link EVENTTYPE_SESSION}).
|
|
5
|
+
*/
|
|
2
6
|
export interface ISessionEvent extends IEvent {
|
|
7
|
+
/**
|
|
8
|
+
* The id of the session.
|
|
9
|
+
*/
|
|
3
10
|
sessionId: string;
|
|
4
11
|
}
|
|
5
12
|
//# sourceMappingURL=ISessionEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISessionEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ISessionEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,MAAM,WAAW,aAAc,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"ISessionEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ISessionEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,MAAM;IAGzC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAGpB"}
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
import { IEvent } from
|
|
1
|
+
import { IEvent } from '@shapediver/viewer.shared.services';
|
|
2
|
+
/**
|
|
3
|
+
* Definition of the task event.
|
|
4
|
+
* These events are sent for task specific events ({@link EVENTTYPE_TASK}).
|
|
5
|
+
*/
|
|
6
|
+
export interface ITaskEvent extends IEvent {
|
|
7
|
+
/**
|
|
8
|
+
* The data of the task.
|
|
9
|
+
*/
|
|
10
|
+
data?: unknown;
|
|
11
|
+
/**
|
|
12
|
+
* The id of the task.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* The progress of the task.
|
|
17
|
+
*/
|
|
18
|
+
progress: number;
|
|
19
|
+
/**
|
|
20
|
+
* The status of the task.
|
|
21
|
+
*/
|
|
22
|
+
status?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The type of the task.
|
|
25
|
+
*/
|
|
26
|
+
type: TASK_TYPE;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Definition of the task types.
|
|
30
|
+
* These types are used to identify the type of a task in a task event {@link ITaskEvent}.
|
|
31
|
+
*/
|
|
2
32
|
export declare enum TASK_TYPE {
|
|
3
33
|
AR_LOADING = "ar_loading",
|
|
4
34
|
ENVIRONMENT_MAP_LOADING = "environment_map_loading",
|
|
@@ -15,11 +45,4 @@ export declare enum TASK_TYPE {
|
|
|
15
45
|
VIEWPORT_CREATION = "viewer_creation",
|
|
16
46
|
EXPORT_REQUEST = "export_request"
|
|
17
47
|
}
|
|
18
|
-
export interface ITaskEvent extends IEvent {
|
|
19
|
-
type: TASK_TYPE;
|
|
20
|
-
id: string;
|
|
21
|
-
progress: number;
|
|
22
|
-
data?: any;
|
|
23
|
-
status?: string;
|
|
24
|
-
}
|
|
25
48
|
//# sourceMappingURL=ITaskEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITaskEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ITaskEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"ITaskEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/ITaskEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAI5D;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,MAAM;IAGtC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CAGnB;AAMD;;;GAGG;AACH,oBAAY,SAAS;IACjB,UAAU,eAAe;IACzB,uBAAuB,4BAA4B;IACnD,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,oBAAoB,yBAAyB;IAC7C,wBAAwB,6BAA6B;IACrD,mBAAmB,wBAAwB;IAC3C,oBAAoB,yBAAyB;IAC7C,qBAAqB,0BAA0B;IAC/C,gBAAgB,qBAAqB;IACrC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,iBAAiB,oBAAoB;IACrC,cAAc,mBAAmB;CACpC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TASK_TYPE = void 0;
|
|
4
|
+
// #endregion Interfaces (1)
|
|
5
|
+
// #region Enums (1)
|
|
6
|
+
/**
|
|
7
|
+
* Definition of the task types.
|
|
8
|
+
* These types are used to identify the type of a task in a task event {@link ITaskEvent}.
|
|
9
|
+
*/
|
|
4
10
|
var TASK_TYPE;
|
|
5
11
|
(function (TASK_TYPE) {
|
|
6
12
|
TASK_TYPE["AR_LOADING"] = "ar_loading";
|
|
@@ -18,4 +24,5 @@ var TASK_TYPE;
|
|
|
18
24
|
TASK_TYPE["VIEWPORT_CREATION"] = "viewer_creation";
|
|
19
25
|
TASK_TYPE["EXPORT_REQUEST"] = "export_request";
|
|
20
26
|
})(TASK_TYPE = exports.TASK_TYPE || (exports.TASK_TYPE = {}));
|
|
27
|
+
// #endregion Enums (1)
|
|
21
28
|
//# sourceMappingURL=ITaskEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITaskEvent.js","sourceRoot":"","sources":["../../../src/interfaces/events/ITaskEvent.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ITaskEvent.js","sourceRoot":"","sources":["../../../src/interfaces/events/ITaskEvent.ts"],"names":[],"mappings":";;;AAmCA,4BAA4B;AAE5B,oBAAoB;AAEpB;;;GAGG;AACH,IAAY,SAeX;AAfD,WAAY,SAAS;IACjB,sCAAyB,CAAA;IACzB,gEAAmD,CAAA;IACnD,8DAAiD,CAAA;IACjD,4CAA+B,CAAA;IAC/B,0DAA6C,CAAA;IAC7C,kEAAqD,CAAA;IACrD,wDAA2C,CAAA;IAC3C,0DAA6C,CAAA;IAC7C,4DAA+C,CAAA;IAC/C,kDAAqC,CAAA;IACrC,8DAAiD,CAAA;IACjD,gEAAmD,CAAA;IACnD,kDAAqC,CAAA;IACrC,8CAAiC,CAAA;AACrC,CAAC,EAfW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAepB;AAED,uBAAuB"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { IEvent } from
|
|
1
|
+
import { IEvent } from '@shapediver/viewer.shared.services';
|
|
2
|
+
/**
|
|
3
|
+
* Definition of the viewport event.
|
|
4
|
+
* These events are sent for viewport specific events ({@link EVENTTYPE_VIEWPORT}).
|
|
5
|
+
*/
|
|
2
6
|
export interface IViewportEvent extends IEvent {
|
|
3
7
|
viewportId: string;
|
|
4
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IViewportEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/IViewportEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,MAAM,WAAW,cAAe,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"IViewportEvent.d.ts","sourceRoot":"","sources":["../../../src/interfaces/events/IViewportEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,MAAM;IAG1C,UAAU,EAAE,MAAM,CAAC;CAGtB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShapeDiverResponseParameterType, ShapeDiverResponseParameterVisualization } from '@shapediver/sdk.geometry-api-sdk-v2';
|
|
2
|
+
import { vec3, vec4 } from 'gl-matrix';
|
|
2
3
|
export declare type Color = string | number | number[] | vec3 | vec4;
|
|
4
|
+
/**
|
|
5
|
+
* The type of the parameter.
|
|
6
|
+
*/
|
|
7
|
+
export { ShapeDiverResponseParameterType as PARAMETER_TYPE, ShapeDiverResponseParameterVisualization as PARAMETER_VISUALIZATION };
|
|
8
|
+
export interface ISettingsSections {
|
|
9
|
+
session?: ISessionSettingsSections;
|
|
10
|
+
viewport?: IViewportSettingsSections;
|
|
11
|
+
}
|
|
12
|
+
export interface ISessionSettingsSections {
|
|
13
|
+
export?: {
|
|
14
|
+
/** Option to update the displayname of the exports (default: false) */
|
|
15
|
+
displayname?: boolean;
|
|
16
|
+
/** Option to update the order of the exports (default: false) */
|
|
17
|
+
order?: boolean;
|
|
18
|
+
/** Option to update the hidden state of the exports (default: false) */
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
};
|
|
21
|
+
parameter?: {
|
|
22
|
+
/** Option to update the displayname of the parameters (default: false) */
|
|
23
|
+
displayname?: boolean;
|
|
24
|
+
/** Option to update the order of the parameters (default: false) */
|
|
25
|
+
order?: boolean;
|
|
26
|
+
/** Option to update the hidden state of the parameters (default: false) */
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
/** Option to update the value of the parameters (default: false) */
|
|
29
|
+
value?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface IViewportSettingsSections {
|
|
33
|
+
/** Option to update the ar settings (default: false) */
|
|
34
|
+
ar?: boolean;
|
|
35
|
+
/** Option to update the camera settings (default: false) */
|
|
36
|
+
camera?: boolean;
|
|
37
|
+
/** Option to update the environment settings (default: false) */
|
|
38
|
+
environment?: boolean;
|
|
39
|
+
/** Option to update the general settings (default: false) */
|
|
40
|
+
general?: boolean;
|
|
41
|
+
/** Option to update the light settings (default: false) */
|
|
42
|
+
light?: boolean;
|
|
43
|
+
/** Option to update the postprocessing settings (default: false) */
|
|
44
|
+
postprocessing?: boolean;
|
|
45
|
+
/** Option to update the scene settings (default: false) */
|
|
46
|
+
scene?: boolean;
|
|
47
|
+
}
|
|
3
48
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEvC,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,wCAAwC,EAAE,MAAM,qCAAqC,CAAC;AAChI,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEvC,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D;;GAEG;AACH,OAAO,EACH,+BAA+B,IAAI,cAAc,EACjD,wCAAwC,IAAI,uBAAuB,EACtE,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAG9B,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,QAAQ,CAAC,EAAE,yBAAyB,CAAA;CAGvC;AAED,MAAM,WAAW,wBAAwB;IAGrC,MAAM,CAAC,EAAE;QACL,uEAAuE;QACvE,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,iEAAiE;QACjE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,wEAAwE;QACxE,MAAM,CAAC,EAAE,OAAO,CAAA;KACnB,CAAA;IAED,SAAS,CAAC,EAAE;QACR,0EAA0E;QAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,oEAAoE;QACpE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,2EAA2E;QAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,oEAAoE;QACpE,KAAK,CAAC,EAAE,OAAO,CAAA;KAClB,CAAC;CAGL;AAED,MAAM,WAAW,yBAAyB;IAGtC,wDAAwD;IACxD,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CAGnB"}
|
package/dist/types.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PARAMETER_VISUALIZATION = exports.PARAMETER_TYPE = void 0;
|
|
4
|
+
const sdk_geometry_api_sdk_v2_1 = require("@shapediver/sdk.geometry-api-sdk-v2");
|
|
5
|
+
Object.defineProperty(exports, "PARAMETER_TYPE", { enumerable: true, get: function () { return sdk_geometry_api_sdk_v2_1.ShapeDiverResponseParameterType; } });
|
|
6
|
+
Object.defineProperty(exports, "PARAMETER_VISUALIZATION", { enumerable: true, get: function () { return sdk_geometry_api_sdk_v2_1.ShapeDiverResponseParameterVisualization; } });
|
|
3
7
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,iFAAgI;AASzF,+FAT9B,yDAA+B,OASa;AACL,wGAVN,kEAAwC,OAUX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.shared.types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -39,11 +39,12 @@
|
|
|
39
39
|
"testEnvironment": "node"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@shapediver/sdk.geometry-api-sdk-v2": "1.8.2",
|
|
42
43
|
"@shapediver/sdk.sdtf-v1": "1.4.2",
|
|
43
|
-
"@shapediver/viewer.shared.math": "
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "
|
|
45
|
-
"@shapediver/viewer.shared.services": "
|
|
44
|
+
"@shapediver/viewer.shared.math": "3.0.0",
|
|
45
|
+
"@shapediver/viewer.shared.node-tree": "3.0.0",
|
|
46
|
+
"@shapediver/viewer.shared.services": "3.0.0",
|
|
46
47
|
"gl-matrix": "3.3.0"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b6b0010bf5d5652aa338df8016405d97f33fcabb"
|
|
49
50
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { AbstractTreeNodeData } from '@shapediver/viewer.shared.node-tree';
|
|
2
|
+
import { Box, IBox } from '@shapediver/viewer.shared.math';
|
|
3
|
+
import {
|
|
4
|
+
IAttributeData,
|
|
5
|
+
IGeometryData,
|
|
6
|
+
IPrimitiveData,
|
|
7
|
+
PRIMITIVE_MODE
|
|
8
|
+
} from '../../interfaces/data/IGeometryData';
|
|
5
9
|
import { IMaterialAbstractData } from '../../interfaces/data/material/IMaterialAbstractData';
|
|
10
|
+
import { mat4, quat, vec3 } from 'gl-matrix';
|
|
11
|
+
|
|
12
|
+
// #region Classes (3)
|
|
6
13
|
|
|
7
14
|
export class AttributeData extends AbstractTreeNodeData implements IAttributeData {
|
|
8
15
|
// #region Properties (15)
|
|
@@ -76,7 +83,7 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
76
83
|
|
|
77
84
|
// #endregion Constructors (1)
|
|
78
85
|
|
|
79
|
-
// #region Public
|
|
86
|
+
// #region Public Getters And Setters (15)
|
|
80
87
|
|
|
81
88
|
public get array(): Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array {
|
|
82
89
|
return this.#array;
|
|
@@ -138,7 +145,7 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
138
145
|
return this.#target;
|
|
139
146
|
}
|
|
140
147
|
|
|
141
|
-
// #endregion Public
|
|
148
|
+
// #endregion Public Getters And Setters (15)
|
|
142
149
|
|
|
143
150
|
// #region Public Methods (1)
|
|
144
151
|
|
|
@@ -170,131 +177,8 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
170
177
|
// #endregion Public Methods (1)
|
|
171
178
|
}
|
|
172
179
|
|
|
173
|
-
export class PrimitiveData extends AbstractTreeNodeData implements IPrimitiveData {
|
|
174
|
-
// #region Properties (4)
|
|
175
|
-
|
|
176
|
-
readonly #attributes: {
|
|
177
|
-
[key: string]: IAttributeData
|
|
178
|
-
} = {};
|
|
179
|
-
|
|
180
|
-
#boundingBoxes: {
|
|
181
|
-
matrix: mat4,
|
|
182
|
-
boundingBox: IBox
|
|
183
|
-
}[] = [];
|
|
184
|
-
#indices: IAttributeData | null = null;
|
|
185
|
-
#threeJsObject: { [key: string]: THREE.BufferGeometry } = {};
|
|
186
|
-
|
|
187
|
-
// #endregion Properties (4)
|
|
188
|
-
|
|
189
|
-
// #region Constructors (1)
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Creates a primitive data object.
|
|
193
|
-
*
|
|
194
|
-
* @param _attributes the attributes as key-value pairs
|
|
195
|
-
* @param _indices the indices
|
|
196
|
-
*/
|
|
197
|
-
constructor(
|
|
198
|
-
attributes: {
|
|
199
|
-
[key: string]: IAttributeData
|
|
200
|
-
} = {},
|
|
201
|
-
indices: IAttributeData | null = null,
|
|
202
|
-
id?: string,
|
|
203
|
-
version?: string
|
|
204
|
-
) {
|
|
205
|
-
super(id, version);
|
|
206
|
-
this.#attributes = attributes;
|
|
207
|
-
this.#indices = indices;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// #endregion Constructors (1)
|
|
211
|
-
|
|
212
|
-
// #region Public Accessors (5)
|
|
213
|
-
|
|
214
|
-
public get attributes(): {
|
|
215
|
-
[key: string]: IAttributeData
|
|
216
|
-
} {
|
|
217
|
-
return this.#attributes;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
public get boundingBox(): IBox {
|
|
221
|
-
return this.computeBoundingBox(mat4.create());
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
public get indices(): IAttributeData | null {
|
|
225
|
-
return this.#indices;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
public set indices(value: IAttributeData | null) {
|
|
229
|
-
this.#indices = value
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
public get threeJsObject(): { [key: string]: THREE.BufferGeometry } {
|
|
233
|
-
return this.#threeJsObject;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// #endregion Public Accessors (5)
|
|
237
|
-
|
|
238
|
-
// #region Public Methods (2)
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Clones the primitive data.
|
|
242
|
-
*/
|
|
243
|
-
public clone(): IPrimitiveData {
|
|
244
|
-
let attributes: {
|
|
245
|
-
[key: string]: IAttributeData
|
|
246
|
-
} = {};
|
|
247
|
-
for (let attribute in this.#attributes)
|
|
248
|
-
attributes[attribute] = <IAttributeData>this.#attributes[attribute].clone();
|
|
249
|
-
|
|
250
|
-
return new PrimitiveData(attributes, <AttributeData>this.#indices, this.id, this.version);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
public computeBoundingBox(matrix: mat4): IBox {
|
|
254
|
-
const res = this.#boundingBoxes.find(b => mat4.equals(matrix, b.matrix));
|
|
255
|
-
if(res) return res.boundingBox;
|
|
256
|
-
|
|
257
|
-
if (this.#attributes['POSITION']) {
|
|
258
|
-
if (this.#attributes['POSITION'].min.length === 3 && this.#attributes['POSITION'].max.length === 3 && mat4.equals(matrix, mat4.create())) {
|
|
259
|
-
const boundingBox = new Box(vec3.fromValues(this.#attributes['POSITION'].min[0], this.#attributes['POSITION'].min[1], this.#attributes['POSITION'].min[2]), vec3.fromValues(this.#attributes['POSITION'].max[0], this.#attributes['POSITION'].max[1], this.#attributes['POSITION'].max[2]));
|
|
260
|
-
this.#boundingBoxes.push({
|
|
261
|
-
boundingBox,
|
|
262
|
-
matrix: mat4.clone(matrix)
|
|
263
|
-
})
|
|
264
|
-
return boundingBox;
|
|
265
|
-
} else if(mat4.equals(matrix, mat4.create())) {
|
|
266
|
-
const boundingBox = new Box();
|
|
267
|
-
boundingBox.setFromAttributeArray(this.#attributes['POSITION'].array, this.#attributes['POSITION'].byteStride, this.#attributes['POSITION'].itemBytes);
|
|
268
|
-
this.#boundingBoxes.push({
|
|
269
|
-
boundingBox,
|
|
270
|
-
matrix: mat4.clone(matrix)
|
|
271
|
-
})
|
|
272
|
-
} else if(quat.equals(mat4.getRotation(quat.create(), matrix), quat.create())) {
|
|
273
|
-
const identityBB = this.computeBoundingBox(mat4.create());
|
|
274
|
-
const boundingBox = identityBB.clone().applyMatrix(matrix);
|
|
275
|
-
this.#boundingBoxes.push({
|
|
276
|
-
boundingBox,
|
|
277
|
-
matrix: mat4.clone(matrix)
|
|
278
|
-
})
|
|
279
|
-
return boundingBox;
|
|
280
|
-
} else {
|
|
281
|
-
const boundingBox = new Box();
|
|
282
|
-
boundingBox.setFromAttributeArray(this.#attributes['POSITION'].array, this.#attributes['POSITION'].byteStride, this.#attributes['POSITION'].itemBytes, matrix);
|
|
283
|
-
this.#boundingBoxes.push({
|
|
284
|
-
boundingBox,
|
|
285
|
-
matrix: mat4.clone(matrix)
|
|
286
|
-
})
|
|
287
|
-
return boundingBox;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
return new Box();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// #endregion Public Methods (2)
|
|
294
|
-
}
|
|
295
|
-
|
|
296
180
|
export class GeometryData extends AbstractTreeNodeData implements IGeometryData {
|
|
297
|
-
// #region Properties (
|
|
181
|
+
// #region Properties (10)
|
|
298
182
|
|
|
299
183
|
readonly #mode: PRIMITIVE_MODE = PRIMITIVE_MODE.TRIANGLES;
|
|
300
184
|
readonly #primitive: IPrimitiveData;
|
|
@@ -307,9 +191,8 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
307
191
|
#morphWeights: number[] = [];
|
|
308
192
|
#renderOrder: number = 0;
|
|
309
193
|
#standardMaterial: IMaterialAbstractData | null = null;
|
|
310
|
-
#threeJsObject: { [key: string]: THREE.Mesh | THREE.Points | THREE.LineSegments | THREE.LineLoop | THREE.Line } = {};
|
|
311
194
|
|
|
312
|
-
// #endregion Properties (
|
|
195
|
+
// #endregion Properties (10)
|
|
313
196
|
|
|
314
197
|
// #region Constructors (1)
|
|
315
198
|
|
|
@@ -341,7 +224,7 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
341
224
|
|
|
342
225
|
// #endregion Constructors (1)
|
|
343
226
|
|
|
344
|
-
// #region Public
|
|
227
|
+
// #region Public Getters And Setters (15)
|
|
345
228
|
|
|
346
229
|
public get attributeMaterial(): IMaterialAbstractData | null {
|
|
347
230
|
return this.#attributeMaterial;
|
|
@@ -380,7 +263,7 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
380
263
|
}
|
|
381
264
|
|
|
382
265
|
public set morphWeights(value: number[]) {
|
|
383
|
-
this.#morphWeights = value
|
|
266
|
+
this.#morphWeights = value;
|
|
384
267
|
}
|
|
385
268
|
|
|
386
269
|
public get primitive(): IPrimitiveData {
|
|
@@ -403,11 +286,7 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
403
286
|
this.#standardMaterial = value;
|
|
404
287
|
}
|
|
405
288
|
|
|
406
|
-
|
|
407
|
-
return this.#threeJsObject;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// #endregion Public Accessors (16)
|
|
289
|
+
// #endregion Public Getters And Setters (15)
|
|
411
290
|
|
|
412
291
|
// #region Public Methods (2)
|
|
413
292
|
|
|
@@ -424,4 +303,124 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
424
303
|
}
|
|
425
304
|
|
|
426
305
|
// #endregion Public Methods (2)
|
|
427
|
-
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export class PrimitiveData extends AbstractTreeNodeData implements IPrimitiveData {
|
|
309
|
+
// #region Properties (3)
|
|
310
|
+
|
|
311
|
+
readonly #attributes: {
|
|
312
|
+
[key: string]: IAttributeData
|
|
313
|
+
} = {};
|
|
314
|
+
|
|
315
|
+
#boundingBoxes: {
|
|
316
|
+
matrix: mat4,
|
|
317
|
+
boundingBox: IBox
|
|
318
|
+
}[] = [];
|
|
319
|
+
#indices: IAttributeData | null = null;
|
|
320
|
+
|
|
321
|
+
// #endregion Properties (3)
|
|
322
|
+
|
|
323
|
+
// #region Constructors (1)
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Creates a primitive data object.
|
|
327
|
+
*
|
|
328
|
+
* @param _attributes the attributes as key-value pairs
|
|
329
|
+
* @param _indices the indices
|
|
330
|
+
*/
|
|
331
|
+
constructor(
|
|
332
|
+
attributes: {
|
|
333
|
+
[key: string]: IAttributeData
|
|
334
|
+
} = {},
|
|
335
|
+
indices: IAttributeData | null = null,
|
|
336
|
+
id?: string,
|
|
337
|
+
version?: string
|
|
338
|
+
) {
|
|
339
|
+
super(id, version);
|
|
340
|
+
this.#attributes = attributes;
|
|
341
|
+
this.#indices = indices;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// #endregion Constructors (1)
|
|
345
|
+
|
|
346
|
+
// #region Public Getters And Setters (4)
|
|
347
|
+
|
|
348
|
+
public get attributes(): {
|
|
349
|
+
[key: string]: IAttributeData
|
|
350
|
+
} {
|
|
351
|
+
return this.#attributes;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
public get boundingBox(): IBox {
|
|
355
|
+
return this.computeBoundingBox(mat4.create());
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
public get indices(): IAttributeData | null {
|
|
359
|
+
return this.#indices;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
public set indices(value: IAttributeData | null) {
|
|
363
|
+
this.#indices = value;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// #endregion Public Getters And Setters (4)
|
|
367
|
+
|
|
368
|
+
// #region Public Methods (2)
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Clones the primitive data.
|
|
372
|
+
*/
|
|
373
|
+
public clone(): IPrimitiveData {
|
|
374
|
+
const attributes: {
|
|
375
|
+
[key: string]: IAttributeData
|
|
376
|
+
} = {};
|
|
377
|
+
for (const attribute in this.#attributes)
|
|
378
|
+
attributes[attribute] = <IAttributeData>this.#attributes[attribute].clone();
|
|
379
|
+
|
|
380
|
+
return new PrimitiveData(attributes, <AttributeData>this.#indices, this.id, this.version);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
public computeBoundingBox(matrix: mat4): IBox {
|
|
384
|
+
const res = this.#boundingBoxes.find(b => mat4.equals(matrix, b.matrix));
|
|
385
|
+
if (res) return res.boundingBox;
|
|
386
|
+
|
|
387
|
+
if (this.#attributes['POSITION']) {
|
|
388
|
+
if (this.#attributes['POSITION'].min.length === 3 && this.#attributes['POSITION'].max.length === 3 && mat4.equals(matrix, mat4.create())) {
|
|
389
|
+
const boundingBox = new Box(vec3.fromValues(this.#attributes['POSITION'].min[0], this.#attributes['POSITION'].min[1], this.#attributes['POSITION'].min[2]), vec3.fromValues(this.#attributes['POSITION'].max[0], this.#attributes['POSITION'].max[1], this.#attributes['POSITION'].max[2]));
|
|
390
|
+
this.#boundingBoxes.push({
|
|
391
|
+
boundingBox,
|
|
392
|
+
matrix: mat4.clone(matrix)
|
|
393
|
+
});
|
|
394
|
+
return boundingBox;
|
|
395
|
+
} else if (mat4.equals(matrix, mat4.create())) {
|
|
396
|
+
const boundingBox = new Box();
|
|
397
|
+
boundingBox.setFromAttributeArray(this.#attributes['POSITION'].array, this.#attributes['POSITION'].byteStride, this.#attributes['POSITION'].itemBytes);
|
|
398
|
+
this.#boundingBoxes.push({
|
|
399
|
+
boundingBox,
|
|
400
|
+
matrix: mat4.clone(matrix)
|
|
401
|
+
});
|
|
402
|
+
} else if (quat.equals(mat4.getRotation(quat.create(), matrix), quat.create())) {
|
|
403
|
+
const identityBB = this.computeBoundingBox(mat4.create());
|
|
404
|
+
const boundingBox = identityBB.clone().applyMatrix(matrix);
|
|
405
|
+
this.#boundingBoxes.push({
|
|
406
|
+
boundingBox,
|
|
407
|
+
matrix: mat4.clone(matrix)
|
|
408
|
+
});
|
|
409
|
+
return boundingBox;
|
|
410
|
+
} else {
|
|
411
|
+
const boundingBox = new Box();
|
|
412
|
+
boundingBox.setFromAttributeArray(this.#attributes['POSITION'].array, this.#attributes['POSITION'].byteStride, this.#attributes['POSITION'].itemBytes, matrix);
|
|
413
|
+
this.#boundingBoxes.push({
|
|
414
|
+
boundingBox,
|
|
415
|
+
matrix: mat4.clone(matrix)
|
|
416
|
+
});
|
|
417
|
+
return boundingBox;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
return new Box();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// #endregion Public Methods (2)
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// #endregion Classes (3)
|
|
@@ -50,10 +50,7 @@ export abstract class HTMLElementAnchorData extends AbstractTreeNodeData impleme
|
|
|
50
50
|
this.#intersectionTarget = properties.intersectionTarget;
|
|
51
51
|
|
|
52
52
|
this.internalHtmlElement = <HTMLDivElement>document.createElement('div');
|
|
53
|
-
this.internalHtmlElement.
|
|
54
|
-
this.internalHtmlElement.style.whiteSpace = 'nowrap';
|
|
55
|
-
this.internalHtmlElement.style.textOverflow = 'clip';
|
|
56
|
-
this.internalHtmlElement.style.fontFamily = '"Helvetica Neue", Helvetica, Arial, sans-serif';
|
|
53
|
+
this.internalHtmlElement.classList.add('sdv-anchor-inner-container');
|
|
57
54
|
}
|
|
58
55
|
|
|
59
56
|
// #endregion Constructors (1)
|
|
@@ -227,15 +224,9 @@ export class HTMLElementAnchorTextData extends HTMLElementAnchorData {
|
|
|
227
224
|
public create(properties: { anchor: HTMLElementAnchorData, parent: HTMLDivElement }) {
|
|
228
225
|
|
|
229
226
|
const span = document.createElement('span');
|
|
230
|
-
span.
|
|
231
|
-
span.style.userSelect = 'none';
|
|
232
|
-
span.style.cursor = 'default';
|
|
233
|
-
span.style.pointerEvents = 'none';
|
|
227
|
+
span.classList.add('sdv-anchor-text');
|
|
234
228
|
span.style.color = properties.anchor.data.color?.toString();
|
|
235
229
|
span.innerHTML = properties.anchor.data.text;
|
|
236
|
-
span.style.display = 'block';
|
|
237
|
-
span.style.textOverflow = 'clip';
|
|
238
|
-
span.style.overflow = 'hidden';
|
|
239
230
|
properties.parent.appendChild(span);
|
|
240
231
|
|
|
241
232
|
if (properties.anchor.data.textAlign && (properties.anchor.data.textAlign === 'right' || properties.anchor.data.textAlign === 'center')) {
|
|
@@ -296,9 +287,7 @@ export class HTMLElementAnchorImageData extends HTMLElementAnchorData {
|
|
|
296
287
|
public create(properties: { anchor: HTMLElementAnchorData, parent: HTMLDivElement }) {
|
|
297
288
|
|
|
298
289
|
const img = document.createElement('img');
|
|
299
|
-
img.
|
|
300
|
-
img.style.cursor = 'default';
|
|
301
|
-
img.style.pointerEvents = 'none';
|
|
290
|
+
img.classList.add('sdv-anchor-image');
|
|
302
291
|
properties.parent.appendChild(img);
|
|
303
292
|
img.src = properties.anchor.data.src;
|
|
304
293
|
if (properties.anchor.data.height) img.height = properties.anchor.data.height;
|