@xeokit/xeokit-sdk 2.3.0-beta-35 → 2.3.0-beta-36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.3.0-beta-35",
3
+ "version": "2.3.0-beta-36",
4
4
  "description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
5
5
  "module": "/dist/xeokit-sdk.es.js",
6
6
  "main": "/dist/xeokit-sdk.cjs.js",
@@ -0,0 +1,185 @@
1
+ import {Marker} from "./Marker.js";
2
+ import {Component} from "../Component";
3
+ import {Entity} from "../Entity";
4
+
5
+ export declare type SpriteMarkerConfiguration = {
6
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
7
+ id?: string;
8
+ /** Entity to associate this SpriteMarker with. When the SpriteMarker has an Entity, then {@link SpriteMarker.visible} will always be ````false```` if {@link Entity.visible} is false. */
9
+ entity?: Entity
10
+ /** Indicates whether or not this SpriteMarker is hidden (ie. {@link SpriteMarker.visible} is ````false```` whenever occluded by {@link Entity}s in the {@link Scene}. */
11
+ occludable?: boolean;
12
+ /** World-space 3D SpriteMarker position. */
13
+ worldPos?: number[];
14
+ /** Path to image file to load into this SpriteMarker. */
15
+ src?: string;
16
+ /** HTML Image object to load into this SpriteMarker. See the {@link SpriteMarker#image} property for more info. */
17
+ image?: HTMLImageElement;
18
+ /** Flips this SpriteMarker's texture image along its vertical axis when true. */
19
+ flipY?: boolean;
20
+ /** Texture encoding format. See the {@link Texture#encoding} property for more info. */
21
+ encoding?: string;
22
+ };
23
+
24
+
25
+ /**
26
+ * A {@link Marker} with a billboarded and textured quad attached to it.
27
+ */
28
+ export declare class SpriteMarker extends Marker {
29
+
30
+ /**
31
+ * @constructor
32
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this SpriteMarker as well.
33
+ * @param {*} [cfg] Configs
34
+ * @param {String} [cfg.id] Optional ID for this SpriteMarker, unique among all components in the parent scene, generated automatically when omitted.
35
+ * @param {Entity} [cfg.entity] Entity to associate this Marker with. When the SpriteMarker has an Entity, then {@link Marker#visible} will always be ````false```` if {@link Entity#visible} is false.
36
+ * @param {Boolean} [cfg.occludable=false] Indicates whether or not this Marker is hidden (ie. {@link Marker#visible} is ````false```` whenever occluded by {@link Entity}s in the {@link Scene}.
37
+ * @param {Number[]} [cfg.worldPos=[0,0,0]] World-space 3D Marker position.
38
+ * @param {String} [cfg.src=null] Path to image file to load into this SpriteMarker. See the {@link SpriteMarker#src} property for more info.
39
+ * @param {HTMLImageElement} [cfg.image=null] HTML Image object to load into this SpriteMarker. See the {@link SpriteMarker#image} property for more info.
40
+ * @param {Boolean} [cfg.flipY=false] Flips this SpriteMarker's texture image along its vertical axis when true.
41
+ * @param {String} [cfg.encoding="linear"] Texture encoding format. See the {@link Texture#encoding} property for more info.
42
+ */
43
+ constructor(owner?: Component, cfg?: SpriteMarkerConfiguration);
44
+
45
+ /**
46
+ * Gets if this ````SpriteMarker```` is visible or not.
47
+ *
48
+ * Default value is ````true````.
49
+ *
50
+ * @returns {Boolean} Returns ````true```` if visible.
51
+ */
52
+ get visible(): boolean;
53
+
54
+ /**
55
+ * Sets if this ````SpriteMarker```` is visible or not.
56
+ *
57
+ * Default value is ````true````.
58
+ *
59
+ * @param {Boolean} visible Set ````true```` to make this ````SpriteMarker```` visible.
60
+ */
61
+ set visible(visible: boolean);
62
+
63
+ /**
64
+ * Gets the ````HTMLImageElement```` the ````SpriteMarker````'s image is sourced from, if set.
65
+ *
66
+ * Returns null if not set.
67
+ *
68
+ * @type {HTMLImageElement}
69
+ */
70
+ get image(): HTMLImageElement
71
+
72
+ /**
73
+ * Sets an ````HTMLImageElement```` to source the image from.
74
+ *
75
+ * Sets {@link Texture#src} null.
76
+ *
77
+ * @type {HTMLImageElement}
78
+ */
79
+ set image(image: HTMLImageElement) ;
80
+
81
+ /**
82
+ * Gets the image file path that the ````SpriteMarker````'s image is sourced from, if set.
83
+ *
84
+ * Returns null if not set.
85
+ *
86
+ * @type {String}
87
+ */
88
+ get src(): string;
89
+
90
+ /**
91
+ * Sets an image file path that the ````SpriteMarker````'s image is sourced from.
92
+ *
93
+ * Accepted file types are PNG and JPEG.
94
+ *
95
+ * Sets {@link Texture#image} null.
96
+ *
97
+ * @type {String}
98
+ */
99
+ set src(src: string);
100
+
101
+ /**
102
+ * Gets the World-space size of the longest edge of the ````SpriteMarker````.
103
+ *
104
+ * Returns {Number} World-space size of the ````SpriteMarker````.
105
+ */
106
+ get size(): number;
107
+
108
+ set size(size: number) ;
109
+
110
+ /**
111
+ * Gets if this ````SpriteMarker```` is included in boundary calculations.
112
+ *
113
+ * Default is ````true````.
114
+ *
115
+ * @type {Boolean}
116
+ */
117
+ get collidable(): boolean;
118
+
119
+ /**
120
+ * Sets if this ````SpriteMarker```` is included in boundary calculations.
121
+ *
122
+ * Default is ````true````.
123
+ *
124
+ * @type {Boolean}
125
+ */
126
+ set collidable(value: boolean);
127
+
128
+ /**
129
+ * Gets if this ````SpriteMarker```` is clippable.
130
+ *
131
+ * Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
132
+ *
133
+ * Default is ````true````.
134
+ *
135
+ * @type {Boolean}
136
+ */
137
+ get clippable(): boolean;
138
+
139
+ /**
140
+ * Sets if this ````SpriteMarker```` is clippable.
141
+ *
142
+ * Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
143
+ *
144
+ * Default is ````true````.
145
+ *
146
+ * @type {Boolean}
147
+ */
148
+ set clippable(value: boolean);
149
+
150
+ /**
151
+ * Gets if this ````SpriteMarker```` is pickable.
152
+ *
153
+ * Default is ````true````.
154
+ *
155
+ * @type {Boolean}
156
+ */
157
+ get pickable(): boolean;
158
+
159
+ /**
160
+ * Sets if this ````SpriteMarker```` is pickable.
161
+ *
162
+ * Default is ````true````.
163
+ *
164
+ * @type {Boolean}
165
+ */
166
+ set pickable(value: boolean);
167
+
168
+ /**
169
+ * Gets this ````SpriteMarker````'s opacity factor.
170
+ *
171
+ * This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
172
+ *
173
+ * @type {Number}
174
+ */
175
+ get opacity(): number;
176
+
177
+ /**
178
+ * Sets the opacity factor for this ````SpriteMarker````.
179
+ *
180
+ * This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
181
+ *
182
+ * @type {Number}
183
+ */
184
+ set opacity(opacity: number);
185
+ }
@@ -1 +1,2 @@
1
1
  export * from "./Marker";
2
+ export * from "./SpriteMarker";