@illgrenoble/webx-client 0.10.0 → 1.1.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/WebXClient.d.ts +156 -16
- package/dist/WebXClient.js +170 -16
- package/dist/WebXClient.js.map +1 -1
- package/dist/display/WebXCursor.d.ts +65 -0
- package/dist/display/WebXCursor.js +65 -0
- package/dist/display/WebXCursor.js.map +1 -1
- package/dist/display/WebXCursorFactory.d.ts +18 -0
- package/dist/display/WebXCursorFactory.js +39 -16
- package/dist/display/WebXCursorFactory.js.map +1 -1
- package/dist/display/WebXDisplay.d.ts +150 -9
- package/dist/display/WebXDisplay.js +154 -9
- package/dist/display/WebXDisplay.js.map +1 -1
- package/dist/display/WebXSubImage.d.ts +42 -11
- package/dist/display/WebXSubImage.js +18 -12
- package/dist/display/WebXSubImage.js.map +1 -1
- package/dist/display/WebXTextureFactory.d.ts +30 -0
- package/dist/display/WebXTextureFactory.js +56 -19
- package/dist/display/WebXTextureFactory.js.map +1 -1
- package/dist/display/WebXWindow.d.ts +152 -0
- package/dist/display/WebXWindow.js +152 -0
- package/dist/display/WebXWindow.js.map +1 -1
- package/dist/display/WebXWindowProperties.d.ts +31 -6
- package/dist/display/WebXWindowProperties.js +16 -9
- package/dist/display/WebXWindowProperties.js.map +1 -1
- package/dist/input/WebXKeyboard.d.ts +40 -5
- package/dist/input/WebXKeyboard.js +52 -14
- package/dist/input/WebXKeyboard.js.map +1 -1
- package/dist/input/WebXMouse.d.ts +9 -0
- package/dist/input/WebXMouse.js +9 -4
- package/dist/input/WebXMouse.js.map +1 -1
- package/dist/input/keyboard/WebXKeyEvent.d.ts +35 -3
- package/dist/input/keyboard/WebXKeyEvent.js +115 -3
- package/dist/input/keyboard/WebXKeyEvent.js.map +1 -1
- package/dist/input/keyboard/WebXKeyPressEvent.d.ts +25 -8
- package/dist/input/keyboard/WebXKeyPressEvent.js +29 -11
- package/dist/input/keyboard/WebXKeyPressEvent.js.map +1 -1
- package/dist/input/keyboard/WebXKeyUpEvent.d.ts +30 -9
- package/dist/input/keyboard/WebXKeyUpEvent.js +19 -16
- package/dist/input/keyboard/WebXKeyUpEvent.js.map +1 -1
- package/dist/input/keyboard/WebXKeyboardModifierState.d.ts +69 -8
- package/dist/input/keyboard/WebXKeyboardModifierState.js +69 -8
- package/dist/input/keyboard/WebXKeyboardModifierState.js.map +1 -1
- package/dist/input/keyboard/WebXKeyboardUtils.d.ts +18 -2
- package/dist/input/keyboard/WebXKeyboardUtils.js +18 -2
- package/dist/input/keyboard/WebXKeyboardUtils.js.map +1 -1
- package/dist/input/keyboard/WebXKeydownEvent.d.ts +26 -9
- package/dist/input/keyboard/WebXKeydownEvent.js +17 -22
- package/dist/input/keyboard/WebXKeydownEvent.js.map +1 -1
- package/dist/input/mouse/WebXMouseState.d.ts +113 -2
- package/dist/input/mouse/WebXMouseState.js +104 -2
- package/dist/input/mouse/WebXMouseState.js.map +1 -1
- package/dist/instruction/WebXConnectInstruction.d.ts +16 -1
- package/dist/instruction/WebXConnectInstruction.js +13 -1
- package/dist/instruction/WebXConnectInstruction.js.map +1 -1
- package/dist/instruction/WebXCursorImageInstruction.d.ts +15 -3
- package/dist/instruction/WebXCursorImageInstruction.js +12 -5
- package/dist/instruction/WebXCursorImageInstruction.js.map +1 -1
- package/dist/instruction/WebXDataAckInstruction.d.ts +22 -5
- package/dist/instruction/WebXDataAckInstruction.js +15 -9
- package/dist/instruction/WebXDataAckInstruction.js.map +1 -1
- package/dist/instruction/WebXImageInstruction.d.ts +14 -3
- package/dist/instruction/WebXImageInstruction.js +11 -7
- package/dist/instruction/WebXImageInstruction.js.map +1 -1
- package/dist/instruction/WebXInstruction.d.ts +26 -10
- package/dist/instruction/WebXInstruction.js +19 -25
- package/dist/instruction/WebXInstruction.js.map +1 -1
- package/dist/instruction/WebXInstructionResponse.d.ts +55 -2
- package/dist/instruction/WebXInstructionResponse.js +40 -2
- package/dist/instruction/WebXInstructionResponse.js.map +1 -1
- package/dist/instruction/WebXInstructionType.d.ts +40 -0
- package/dist/instruction/WebXInstructionType.js +40 -0
- package/dist/instruction/WebXInstructionType.js.map +1 -1
- package/dist/instruction/WebXKeyboardInstruction.d.ts +19 -6
- package/dist/instruction/WebXKeyboardInstruction.js +13 -14
- package/dist/instruction/WebXKeyboardInstruction.js.map +1 -1
- package/dist/instruction/WebXMouseInstruction.d.ts +24 -9
- package/dist/instruction/WebXMouseInstruction.js +15 -21
- package/dist/instruction/WebXMouseInstruction.js.map +1 -1
- package/dist/instruction/WebXPongInstruction.d.ts +15 -3
- package/dist/instruction/WebXPongInstruction.js +12 -5
- package/dist/instruction/WebXPongInstruction.js.map +1 -1
- package/dist/instruction/WebXQualityInstruction.d.ts +16 -4
- package/dist/instruction/WebXQualityInstruction.js +13 -8
- package/dist/instruction/WebXQualityInstruction.js.map +1 -1
- package/dist/instruction/WebXScreenInstruction.d.ts +8 -0
- package/dist/instruction/WebXScreenInstruction.js +8 -0
- package/dist/instruction/WebXScreenInstruction.js.map +1 -1
- package/dist/instruction/WebXWindowsInstruction.d.ts +9 -0
- package/dist/instruction/WebXWindowsInstruction.js +9 -0
- package/dist/instruction/WebXWindowsInstruction.js.map +1 -1
- package/dist/message/WebXCursorImageMessage.d.ts +42 -13
- package/dist/message/WebXCursorImageMessage.js +24 -25
- package/dist/message/WebXCursorImageMessage.js.map +1 -1
- package/dist/message/WebXImageMessage.d.ts +37 -11
- package/dist/message/WebXImageMessage.js +22 -21
- package/dist/message/WebXImageMessage.js.map +1 -1
- package/dist/message/WebXMessage.d.ts +22 -6
- package/dist/message/WebXMessage.js +15 -9
- package/dist/message/WebXMessage.js.map +1 -1
- package/dist/message/WebXMessageType.d.ts +35 -0
- package/dist/message/WebXMessageType.js +35 -0
- package/dist/message/WebXMessageType.js.map +1 -1
- package/dist/message/WebXMouseMessage.d.ts +27 -7
- package/dist/message/WebXMouseMessage.js +18 -13
- package/dist/message/WebXMouseMessage.js.map +1 -1
- package/dist/message/WebXPingMessage.d.ts +9 -0
- package/dist/message/WebXPingMessage.js +9 -0
- package/dist/message/WebXPingMessage.js.map +1 -1
- package/dist/message/WebXQualityMessage.d.ts +36 -11
- package/dist/message/WebXQualityMessage.js +21 -21
- package/dist/message/WebXQualityMessage.js.map +1 -1
- package/dist/message/WebXScreenMessage.d.ts +17 -3
- package/dist/message/WebXScreenMessage.js +14 -5
- package/dist/message/WebXScreenMessage.js.map +1 -1
- package/dist/message/WebXSubImagesMessage.d.ts +27 -7
- package/dist/message/WebXSubImagesMessage.js +18 -13
- package/dist/message/WebXSubImagesMessage.js.map +1 -1
- package/dist/message/WebXWindowsMessage.d.ts +17 -3
- package/dist/message/WebXWindowsMessage.js +14 -5
- package/dist/message/WebXWindowsMessage.js.map +1 -1
- package/dist/tracer/WebXDebugImageMessageHandler.d.ts +30 -0
- package/dist/tracer/WebXDebugImageMessageHandler.js +30 -0
- package/dist/tracer/WebXDebugImageMessageHandler.js.map +1 -1
- package/dist/tracer/WebXHandler.d.ts +11 -0
- package/dist/tracer/WebXInstructionHandler.d.ts +17 -0
- package/dist/tracer/WebXInstructionHandler.js +6 -0
- package/dist/tracer/WebXInstructionHandler.js.map +1 -1
- package/dist/tracer/WebXMessageHandler.d.ts +17 -0
- package/dist/tracer/WebXMessageHandler.js +6 -0
- package/dist/tracer/WebXMessageHandler.js.map +1 -1
- package/dist/tracer/WebXStatsHandler.d.ts +16 -0
- package/dist/tracer/WebXStatsHandler.js +6 -0
- package/dist/tracer/WebXStatsHandler.js.map +1 -1
- package/dist/transport/WebXBinarySerializer.d.ts +20 -0
- package/dist/transport/WebXBinarySerializer.js +20 -0
- package/dist/transport/WebXBinarySerializer.js.map +1 -1
- package/dist/transport/WebXInstructionBuffer.d.ts +19 -0
- package/dist/transport/WebXInstructionBuffer.js +19 -0
- package/dist/transport/WebXInstructionBuffer.js.map +1 -1
- package/dist/transport/WebXInstructionEncoder.d.ts +138 -0
- package/dist/transport/WebXInstructionEncoder.js +138 -110
- package/dist/transport/WebXInstructionEncoder.js.map +1 -1
- package/dist/transport/WebXMessageBuffer.d.ts +63 -8
- package/dist/transport/WebXMessageBuffer.js +51 -16
- package/dist/transport/WebXMessageBuffer.js.map +1 -1
- package/dist/transport/WebXMessageDecoder.d.ts +69 -0
- package/dist/transport/WebXMessageDecoder.js +96 -18
- package/dist/transport/WebXMessageDecoder.js.map +1 -1
- package/dist/tunnel/WebXTunnel.d.ts +71 -0
- package/dist/tunnel/WebXTunnel.js +51 -4
- package/dist/tunnel/WebXTunnel.js.map +1 -1
- package/dist/tunnel/WebXWebSocketTunnel.d.ts +26 -0
- package/dist/tunnel/WebXWebSocketTunnel.js +26 -0
- package/dist/tunnel/WebXWebSocketTunnel.js.map +1 -1
- package/dist/utils/ColorGenerator.d.ts +19 -0
- package/dist/utils/ColorGenerator.js +19 -0
- package/dist/utils/ColorGenerator.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { Texture } from 'three';
|
|
3
3
|
import { WebXCursorFactory } from './WebXCursorFactory';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the cursor in the WebX display.
|
|
6
|
+
*
|
|
7
|
+
* This class manages the cursor's position, appearance, and updates based on
|
|
8
|
+
* the cursor ID and coordinates provided by the WebX Engine.
|
|
9
|
+
*/
|
|
4
10
|
export declare class WebXCursor {
|
|
5
11
|
private _cursorFactory;
|
|
6
12
|
private static _PLANE_GEOMETRY;
|
|
@@ -14,15 +20,74 @@ export declare class WebXCursor {
|
|
|
14
20
|
private _yHot;
|
|
15
21
|
private _width;
|
|
16
22
|
private _height;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the THREE.js mesh representing the cursor.
|
|
25
|
+
*
|
|
26
|
+
* @returns The cursor mesh.
|
|
27
|
+
*/
|
|
17
28
|
get mesh(): THREE.Mesh;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the cursor ID.
|
|
31
|
+
*
|
|
32
|
+
* @returns The cursor ID.
|
|
33
|
+
*/
|
|
18
34
|
get cursorId(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the texture of the cursor.
|
|
37
|
+
*
|
|
38
|
+
* @returns The cursor texture.
|
|
39
|
+
*/
|
|
19
40
|
get texture(): Texture;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the x-coordinate of the cursor.
|
|
43
|
+
*
|
|
44
|
+
* @param value The x-coordinate.
|
|
45
|
+
*/
|
|
20
46
|
set x(value: number);
|
|
47
|
+
/**
|
|
48
|
+
* Sets the y-coordinate of the cursor.
|
|
49
|
+
*
|
|
50
|
+
* @param value The y-coordinate.
|
|
51
|
+
*/
|
|
21
52
|
set y(value: number);
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new instance of WebXCursor.
|
|
55
|
+
*
|
|
56
|
+
* @param cursorFactory The factory used to create cursor textures.
|
|
57
|
+
*/
|
|
22
58
|
constructor(_cursorFactory: WebXCursorFactory);
|
|
59
|
+
/**
|
|
60
|
+
* Sets the position of the cursor.
|
|
61
|
+
*
|
|
62
|
+
* @param x The x-coordinate of the cursor.
|
|
63
|
+
* @param y The y-coordinate of the cursor.
|
|
64
|
+
*/
|
|
23
65
|
setPosition(x: number, y: number): void;
|
|
66
|
+
/**
|
|
67
|
+
* Updates the cursor's position and appearance based on the given cursor ID and coordinates.
|
|
68
|
+
*
|
|
69
|
+
* @param x The x-coordinate of the cursor.
|
|
70
|
+
* @param y The y-coordinate of the cursor.
|
|
71
|
+
* @param cursorId The ID of the cursor to display.
|
|
72
|
+
*/
|
|
24
73
|
updateCursorId(x: number, y: number, cursorId: number): void;
|
|
74
|
+
/**
|
|
75
|
+
* Updates the cursor's position, appearance, and texture.
|
|
76
|
+
*
|
|
77
|
+
* @param x The x-coordinate of the cursor.
|
|
78
|
+
* @param y The y-coordinate of the cursor.
|
|
79
|
+
* @param xHot The x-coordinate of the cursor's hotspot.
|
|
80
|
+
* @param yHot The y-coordinate of the cursor's hotspot.
|
|
81
|
+
* @param cursorId The ID of the cursor to display.
|
|
82
|
+
* @param texture The texture of the cursor.
|
|
83
|
+
*/
|
|
25
84
|
update(x: number, y: number, xHot: number, yHot: number, cursorId: number, texture: Texture): void;
|
|
85
|
+
/**
|
|
86
|
+
* Updates the scale of the cursor mesh based on its width and height.
|
|
87
|
+
*/
|
|
26
88
|
private _updateScale;
|
|
89
|
+
/**
|
|
90
|
+
* Updates the position of the cursor mesh based on its coordinates and hotspot.
|
|
91
|
+
*/
|
|
27
92
|
private _updatePosition;
|
|
28
93
|
}
|
|
@@ -3,24 +3,60 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WebXCursor = void 0;
|
|
4
4
|
const THREE = require("three");
|
|
5
5
|
const three_1 = require("three");
|
|
6
|
+
/**
|
|
7
|
+
* Represents the cursor in the WebX display.
|
|
8
|
+
*
|
|
9
|
+
* This class manages the cursor's position, appearance, and updates based on
|
|
10
|
+
* the cursor ID and coordinates provided by the WebX Engine.
|
|
11
|
+
*/
|
|
6
12
|
class WebXCursor {
|
|
13
|
+
/**
|
|
14
|
+
* Gets the THREE.js mesh representing the cursor.
|
|
15
|
+
*
|
|
16
|
+
* @returns The cursor mesh.
|
|
17
|
+
*/
|
|
7
18
|
get mesh() {
|
|
8
19
|
return this._mesh;
|
|
9
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Gets the cursor ID.
|
|
23
|
+
*
|
|
24
|
+
* @returns The cursor ID.
|
|
25
|
+
*/
|
|
10
26
|
get cursorId() {
|
|
11
27
|
return this._cursorId;
|
|
12
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets the texture of the cursor.
|
|
31
|
+
*
|
|
32
|
+
* @returns The cursor texture.
|
|
33
|
+
*/
|
|
13
34
|
get texture() {
|
|
14
35
|
return this._texture;
|
|
15
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Sets the x-coordinate of the cursor.
|
|
39
|
+
*
|
|
40
|
+
* @param value The x-coordinate.
|
|
41
|
+
*/
|
|
16
42
|
set x(value) {
|
|
17
43
|
this._x = value;
|
|
18
44
|
this._updatePosition();
|
|
19
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Sets the y-coordinate of the cursor.
|
|
48
|
+
*
|
|
49
|
+
* @param value The y-coordinate.
|
|
50
|
+
*/
|
|
20
51
|
set y(value) {
|
|
21
52
|
this._y = value;
|
|
22
53
|
this._updatePosition();
|
|
23
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new instance of WebXCursor.
|
|
57
|
+
*
|
|
58
|
+
* @param cursorFactory The factory used to create cursor textures.
|
|
59
|
+
*/
|
|
24
60
|
constructor(_cursorFactory) {
|
|
25
61
|
this._cursorFactory = _cursorFactory;
|
|
26
62
|
this._xHot = 0;
|
|
@@ -47,11 +83,24 @@ class WebXCursor {
|
|
|
47
83
|
this.update(cursorData.x, cursorData.y, cursor.xHot, cursor.yHot, cursor.cursorId, cursor.texture);
|
|
48
84
|
});
|
|
49
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Sets the position of the cursor.
|
|
88
|
+
*
|
|
89
|
+
* @param x The x-coordinate of the cursor.
|
|
90
|
+
* @param y The y-coordinate of the cursor.
|
|
91
|
+
*/
|
|
50
92
|
setPosition(x, y) {
|
|
51
93
|
this._x = x;
|
|
52
94
|
this._y = y;
|
|
53
95
|
this._updatePosition();
|
|
54
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Updates the cursor's position and appearance based on the given cursor ID and coordinates.
|
|
99
|
+
*
|
|
100
|
+
* @param x The x-coordinate of the cursor.
|
|
101
|
+
* @param y The y-coordinate of the cursor.
|
|
102
|
+
* @param cursorId The ID of the cursor to display.
|
|
103
|
+
*/
|
|
55
104
|
updateCursorId(x, y, cursorId) {
|
|
56
105
|
this._x = x;
|
|
57
106
|
this._y = y;
|
|
@@ -63,6 +112,16 @@ class WebXCursor {
|
|
|
63
112
|
});
|
|
64
113
|
this._updatePosition();
|
|
65
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Updates the cursor's position, appearance, and texture.
|
|
117
|
+
*
|
|
118
|
+
* @param x The x-coordinate of the cursor.
|
|
119
|
+
* @param y The y-coordinate of the cursor.
|
|
120
|
+
* @param xHot The x-coordinate of the cursor's hotspot.
|
|
121
|
+
* @param yHot The y-coordinate of the cursor's hotspot.
|
|
122
|
+
* @param cursorId The ID of the cursor to display.
|
|
123
|
+
* @param texture The texture of the cursor.
|
|
124
|
+
*/
|
|
66
125
|
update(x, y, xHot, yHot, cursorId, texture) {
|
|
67
126
|
this._x = x;
|
|
68
127
|
this._y = y;
|
|
@@ -82,9 +141,15 @@ class WebXCursor {
|
|
|
82
141
|
this._updateScale();
|
|
83
142
|
this._updatePosition();
|
|
84
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Updates the scale of the cursor mesh based on its width and height.
|
|
146
|
+
*/
|
|
85
147
|
_updateScale() {
|
|
86
148
|
this._mesh.scale.set(this._width, this._height, 1);
|
|
87
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Updates the position of the cursor mesh based on its coordinates and hotspot.
|
|
152
|
+
*/
|
|
88
153
|
_updatePosition() {
|
|
89
154
|
this._mesh.position.set(this._x - this._xHot + 0.5 * this._width, this._y - this._yHot + 0.5 * this._height, 999);
|
|
90
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebXCursor.js","sourceRoot":"","sources":["../../src/display/WebXCursor.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAA8C;AAG9C,MAAa,UAAU;IAerB,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAW,CAAC,CAAC,KAAa;QACxB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC;QAChB,IAA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EAAE,CAAC,CAAC,AAA/D,CAAgE"}
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import { WebXTunnel } from '../tunnel';
|
|
2
2
|
import { Texture } from 'three';
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing cursor data.
|
|
5
|
+
*/
|
|
3
6
|
export interface WebXCursorData {
|
|
4
7
|
xHot: number;
|
|
5
8
|
yHot: number;
|
|
6
9
|
cursorId: number;
|
|
7
10
|
texture: Texture;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Factory class for creating and managing cursor textures.
|
|
14
|
+
*
|
|
15
|
+
* This class retrieves cursor textures based on cursor IDs and caches them
|
|
16
|
+
* for reuse.
|
|
17
|
+
*/
|
|
9
18
|
export declare class WebXCursorFactory {
|
|
10
19
|
private _tunnel;
|
|
11
20
|
private _cursorMap;
|
|
12
21
|
constructor(_tunnel: WebXTunnel);
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the cursor texture for the given cursor ID.
|
|
24
|
+
*
|
|
25
|
+
* If the cursor texture is not already cached, it will be fetched and cached
|
|
26
|
+
* for future use.
|
|
27
|
+
*
|
|
28
|
+
* @param cursorId The ID of the cursor to retrieve.
|
|
29
|
+
* @returns A promise that resolves to the cursor texture and its dimensions.
|
|
30
|
+
*/
|
|
13
31
|
getCursor(cursorId?: number): Promise<{
|
|
14
32
|
x?: number;
|
|
15
33
|
y?: number;
|
|
@@ -1,33 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.WebXCursorFactory = void 0;
|
|
4
13
|
const instruction_1 = require("../instruction");
|
|
14
|
+
/**
|
|
15
|
+
* Factory class for creating and managing cursor textures.
|
|
16
|
+
*
|
|
17
|
+
* This class retrieves cursor textures based on cursor IDs and caches them
|
|
18
|
+
* for reuse.
|
|
19
|
+
*/
|
|
5
20
|
class WebXCursorFactory {
|
|
6
21
|
constructor(_tunnel) {
|
|
7
22
|
this._tunnel = _tunnel;
|
|
8
23
|
this._cursorMap = new Map();
|
|
9
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the cursor texture for the given cursor ID.
|
|
27
|
+
*
|
|
28
|
+
* If the cursor texture is not already cached, it will be fetched and cached
|
|
29
|
+
* for future use.
|
|
30
|
+
*
|
|
31
|
+
* @param cursorId The ID of the cursor to retrieve.
|
|
32
|
+
* @returns A promise that resolves to the cursor texture and its dimensions.
|
|
33
|
+
*/
|
|
10
34
|
getCursor(cursorId) {
|
|
11
|
-
return
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12
36
|
const cursorData = this._cursorMap.get(cursorId);
|
|
13
37
|
if (cursorData != null) {
|
|
14
|
-
|
|
38
|
+
return { cursor: cursorData };
|
|
15
39
|
}
|
|
16
40
|
else {
|
|
17
|
-
this._tunnel.sendRequest(new instruction_1.WebXCursorImageInstruction(cursorId))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
41
|
+
const response = yield this._tunnel.sendRequest(new instruction_1.WebXCursorImageInstruction(cursorId));
|
|
42
|
+
const newCursorData = {
|
|
43
|
+
xHot: response.xHot,
|
|
44
|
+
yHot: response.yHot,
|
|
45
|
+
cursorId: response.cursorId,
|
|
46
|
+
texture: response.texture
|
|
47
|
+
};
|
|
48
|
+
this._cursorMap.set(response.cursorId, newCursorData);
|
|
49
|
+
return {
|
|
50
|
+
x: response.x,
|
|
51
|
+
y: response.y,
|
|
52
|
+
cursor: newCursorData
|
|
53
|
+
};
|
|
31
54
|
}
|
|
32
55
|
});
|
|
33
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebXCursorFactory.js","sourceRoot":"","sources":["../../src/display/WebXCursorFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebXCursorFactory.js","sourceRoot":"","sources":["../../src/display/WebXCursorFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gDAAgF;AAahF;;;;;GAKG;AACH,MAAa,iBAAiB;IAG5B,YAAoB,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QAF/B,eAAU,GAAgC,IAAI,GAAG,EAAE,CAAC;IAElB,CAAC;IAE3C;;;;;;;;OAQG;IACU,SAAS,CAAC,QAAiB;;YACtC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACjD,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;gBACvB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;YAEhC,CAAC;iBAAM,CAAC;gBACN,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,wCAA0B,CAAC,QAAQ,CAAC,CAA2B,CAAC;gBAEpH,MAAM,aAAa,GAAG;oBACpB,IAAI,EAAE,QAAQ,CAAC,IAAI;oBACnB,IAAI,EAAE,QAAQ,CAAC,IAAI;oBACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;oBAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;iBAC1B,CAAA;gBAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAEtD,OAAO;oBACL,CAAC,EAAE,QAAQ,CAAC,CAAC;oBACb,CAAC,EAAE,QAAQ,CAAC,CAAC;oBACb,MAAM,EAAE,aAAa;iBACtB,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF;AAtCD,8CAsCC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { Texture } from 'three';
|
|
2
|
+
import { OrthographicCamera, Texture } from 'three';
|
|
3
3
|
import { WebXWindow } from './WebXWindow';
|
|
4
4
|
import { WebXWindowProperties } from './WebXWindowProperties';
|
|
5
5
|
import { WebXSubImage } from './WebXSubImage';
|
|
6
6
|
import { WebXTextureFactory } from './WebXTextureFactory';
|
|
7
7
|
import { WebXCursorFactory } from './WebXCursorFactory';
|
|
8
|
+
/**
|
|
9
|
+
* Manages the rendering of the WebX remote desktop using WebGL.
|
|
10
|
+
*
|
|
11
|
+
* This class handles the creation and management of the WebGL scene, including
|
|
12
|
+
* windows, cursor, and scaling. It provides methods to update the display
|
|
13
|
+
* and interact with the rendered elements.
|
|
14
|
+
*/
|
|
8
15
|
export declare class WebXDisplay {
|
|
9
16
|
private readonly _scene;
|
|
10
17
|
private readonly _camera;
|
|
@@ -20,50 +27,184 @@ export declare class WebXDisplay {
|
|
|
20
27
|
private _displayElement;
|
|
21
28
|
private _boundsElement;
|
|
22
29
|
private _disposed;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the WebGL renderer used for rendering the display.
|
|
32
|
+
*
|
|
33
|
+
* @returns The WebGLRenderer instance.
|
|
34
|
+
*/
|
|
23
35
|
get renderer(): THREE.WebGLRenderer;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the width of the screen.
|
|
38
|
+
*
|
|
39
|
+
* @returns The screen width in pixels.
|
|
40
|
+
*/
|
|
24
41
|
get screenWidth(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the height of the screen.
|
|
44
|
+
*
|
|
45
|
+
* @returns The screen height in pixels.
|
|
46
|
+
*/
|
|
25
47
|
get screenHeight(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the HTML container element for the display.
|
|
50
|
+
*
|
|
51
|
+
* @returns The container HTMLElement.
|
|
52
|
+
*/
|
|
26
53
|
get containerElement(): HTMLElement;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the current scale factor of the display.
|
|
56
|
+
*
|
|
57
|
+
* @returns The scale factor as a number.
|
|
58
|
+
*/
|
|
27
59
|
get scale(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the Three.js scene used for rendering.
|
|
62
|
+
*
|
|
63
|
+
* @returns The Scene instance.
|
|
64
|
+
*/
|
|
28
65
|
get scene(): THREE.Scene;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the Three.js camera used for rendering.
|
|
68
|
+
*
|
|
69
|
+
* @returns the Camera instance
|
|
70
|
+
*/
|
|
71
|
+
get camera(): OrthographicCamera;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a new instance of WebXDisplay.
|
|
74
|
+
*
|
|
75
|
+
* @param containerElement The HTML element to render the display.
|
|
76
|
+
* @param screenWidth The width of the screen.
|
|
77
|
+
* @param screenHeight The height of the screen.
|
|
78
|
+
* @param textureFactory The texture factory used for creating textures.
|
|
79
|
+
* @param cursorFactory The cursor factory used for managing cursors.
|
|
80
|
+
*/
|
|
29
81
|
constructor(containerElement: HTMLElement, screenWidth: number, screenHeight: number, textureFactory: WebXTextureFactory, cursorFactory: WebXCursorFactory);
|
|
82
|
+
/**
|
|
83
|
+
* Displays the screen by adding it to the scene.
|
|
84
|
+
*/
|
|
30
85
|
showScreen(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Hides the screen by removing it from the scene.
|
|
88
|
+
*/
|
|
31
89
|
hideScreen(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Disposes of all resources used by the display.
|
|
92
|
+
*
|
|
93
|
+
* This includes removing windows, clearing elements, and releasing WebGL resources.
|
|
94
|
+
*/
|
|
32
95
|
dispose(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Animates the display by continuously rendering the scene.
|
|
98
|
+
*
|
|
99
|
+
* This method uses `requestAnimationFrame` to update the display at regular intervals.
|
|
100
|
+
*/
|
|
33
101
|
animate(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Renders the display by updating the WebGL context.
|
|
104
|
+
*/
|
|
105
|
+
render(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Adds a new window to the display.
|
|
108
|
+
*
|
|
109
|
+
* @param window The WebXWindow instance to add.
|
|
110
|
+
*/
|
|
34
111
|
addWindow(window: WebXWindow): void;
|
|
112
|
+
/**
|
|
113
|
+
* Removes a window from the display.
|
|
114
|
+
*
|
|
115
|
+
* @param window The WebXWindow instance to remove.
|
|
116
|
+
*/
|
|
35
117
|
removeWindow(window: WebXWindow): void;
|
|
118
|
+
/**
|
|
119
|
+
* Updates the display with the given windows.
|
|
120
|
+
*
|
|
121
|
+
* @param windows The list of windows to update.
|
|
122
|
+
* @returns A promise that resolves when all windows are updated.
|
|
123
|
+
*/
|
|
36
124
|
updateWindows(windows: Array<WebXWindowProperties>): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Checks if all specified windows are visible.
|
|
127
|
+
*
|
|
128
|
+
* @param windowIds The list of window IDs to check.
|
|
129
|
+
* @returns True if all windows are visible, false otherwise.
|
|
130
|
+
*/
|
|
37
131
|
checkVisibility(windowIds: number[]): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Updates the texture of a window with new image data.
|
|
134
|
+
*
|
|
135
|
+
* @param windowId The ID of the window to update.
|
|
136
|
+
* @param depth The depth of the image.
|
|
137
|
+
* @param colorMap The color texture.
|
|
138
|
+
* @param alphaMap The alpha texture.
|
|
139
|
+
*/
|
|
38
140
|
updateImage(windowId: number, depth: number, colorMap: Texture, alphaMap: Texture): void;
|
|
141
|
+
/**
|
|
142
|
+
* Updates sub-images of a window with new image data.
|
|
143
|
+
*
|
|
144
|
+
* @param windowId The ID of the window to update.
|
|
145
|
+
* @param subImages The list of sub-images to update.
|
|
146
|
+
*/
|
|
39
147
|
updateSubImages(windowId: number, subImages: WebXSubImage[]): void;
|
|
148
|
+
/**
|
|
149
|
+
* Updates the mouse position and cursor on the display.
|
|
150
|
+
*
|
|
151
|
+
* @param x The x-coordinate of the mouse.
|
|
152
|
+
* @param y The y-coordinate of the mouse.
|
|
153
|
+
* @param cursorId The ID of the cursor to display.
|
|
154
|
+
*/
|
|
40
155
|
updateMouse(x: number, y: number, cursorId: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Updates the mouse position without changing the cursor.
|
|
158
|
+
*
|
|
159
|
+
* @param x The x-coordinate of the mouse.
|
|
160
|
+
* @param y The y-coordinate of the mouse.
|
|
161
|
+
*/
|
|
41
162
|
updateMousePosition(x: number, y: number): void;
|
|
163
|
+
/**
|
|
164
|
+
* Retrieves a window by its ID.
|
|
165
|
+
*
|
|
166
|
+
* @param id The ID of the window to retrieve.
|
|
167
|
+
* @returns The WebXWindow instance, or undefined if not found.
|
|
168
|
+
*/
|
|
42
169
|
getWindow(id: number): WebXWindow;
|
|
43
170
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
171
|
+
* Sets the scale of the display.
|
|
172
|
+
*
|
|
173
|
+
* @param scale The scale factor (between 0 and 1).
|
|
46
174
|
*/
|
|
47
175
|
setScale(scale: number): void;
|
|
48
176
|
/**
|
|
49
|
-
*
|
|
177
|
+
* Automatically scales the display to fit its container.
|
|
50
178
|
*/
|
|
51
179
|
autoScale(): void;
|
|
52
180
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
181
|
+
* Resizes the display to fit its container.
|
|
182
|
+
*
|
|
183
|
+
* @param scale Optional scale factor. If not provided, the display will auto-scale.
|
|
56
184
|
*/
|
|
57
185
|
resize(scale?: number): void;
|
|
186
|
+
/**
|
|
187
|
+
* Clears all child elements from the container element.
|
|
188
|
+
*/
|
|
58
189
|
private _clearElements;
|
|
190
|
+
/**
|
|
191
|
+
* Creates the main display element and sets its dimensions.
|
|
192
|
+
*
|
|
193
|
+
* @returns The created HTML element.
|
|
194
|
+
*/
|
|
59
195
|
private _createDisplayElement;
|
|
196
|
+
/**
|
|
197
|
+
* Creates the bounding element for the display.
|
|
198
|
+
*
|
|
199
|
+
* @returns The created HTML element.
|
|
200
|
+
*/
|
|
60
201
|
private _createDisplayBoundingElement;
|
|
61
202
|
/**
|
|
62
|
-
*
|
|
203
|
+
* Renders the display by appending the display and bounding elements to the container.
|
|
63
204
|
*/
|
|
64
205
|
private _render;
|
|
65
206
|
/**
|
|
66
|
-
*
|
|
207
|
+
* Binds event listeners for resizing and other interactions.
|
|
67
208
|
*/
|
|
68
209
|
private _bindListeners;
|
|
69
210
|
}
|