@virtualdisplay.io/client 3.4.1 → 3.5.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +59 -1
- package/dist/virtualdisplay.client.cjs.js +3 -3
- package/dist/virtualdisplay.client.cjs.js.map +1 -1
- package/dist/virtualdisplay.client.es.js +70 -2
- package/dist/virtualdisplay.client.es.js.map +1 -1
- package/dist/virtualdisplay.client.umd.js +3 -3
- package/dist/virtualdisplay.client.umd.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.5.0](https://github.com/virtualdisplay-io/client/compare/v3.4.1...v3.5.0) (2025-07-16)
|
|
6
|
+
|
|
7
|
+
### ✨ Features
|
|
8
|
+
|
|
9
|
+
* camera control API ([#4](https://github.com/virtualdisplay-io/client/issues/4)) ([1e4c147](https://github.com/virtualdisplay-io/client/commit/1e4c14747cad2a4617c4cc763522b50941adaa7f))
|
|
10
|
+
|
|
5
11
|
## [3.4.1](https://github.com/virtualdisplay-io/client/compare/v3.4.0...v3.4.1) (2025-07-10)
|
|
6
12
|
|
|
7
13
|
### 🐛 Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,56 @@ export declare interface AttributeValueConfig {
|
|
|
121
121
|
readonly isSelected?: boolean;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Camera control API for positioning and zoom
|
|
126
|
+
* Uses chaining pattern for building commands
|
|
127
|
+
*/
|
|
128
|
+
export declare class Camera {
|
|
129
|
+
private readonly eventBus;
|
|
130
|
+
private commands;
|
|
131
|
+
constructor(eventBus: EventBus);
|
|
132
|
+
/**
|
|
133
|
+
* Rotate camera horizontally
|
|
134
|
+
* @param degrees - Absolute rotation in degrees (0 = front view)
|
|
135
|
+
*/
|
|
136
|
+
rotate(degrees: number): this;
|
|
137
|
+
/**
|
|
138
|
+
* Tilt camera vertically
|
|
139
|
+
* @param degrees - Absolute tilt in degrees (0 = top view, 90 = horizontal)
|
|
140
|
+
*/
|
|
141
|
+
tilt(degrees: number): this;
|
|
142
|
+
/**
|
|
143
|
+
* Zoom camera
|
|
144
|
+
* @param percentage - Zoom percentage (100 = normal, >100 = zoom in, <100 = zoom out)
|
|
145
|
+
*/
|
|
146
|
+
zoom(percentage: number): this;
|
|
147
|
+
/**
|
|
148
|
+
* Execute accumulated camera commands
|
|
149
|
+
*/
|
|
150
|
+
set(): void;
|
|
151
|
+
/**
|
|
152
|
+
* Reset camera to initial position
|
|
153
|
+
* This is not chainable and executes immediately
|
|
154
|
+
*/
|
|
155
|
+
reset(): void;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Camera command
|
|
160
|
+
*/
|
|
161
|
+
export declare interface CameraCommand {
|
|
162
|
+
readonly action: 'rotate' | 'tilt' | 'zoom' | 'reset';
|
|
163
|
+
readonly value?: number;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Camera message sent to server
|
|
168
|
+
*/
|
|
169
|
+
export declare interface CameraMessage {
|
|
170
|
+
readonly type: typeof MESSAGE_TYPES.CAMERA;
|
|
171
|
+
readonly commands: CameraCommand[];
|
|
172
|
+
}
|
|
173
|
+
|
|
124
174
|
/**
|
|
125
175
|
* Configuration options for VirtualdisplayClient
|
|
126
176
|
*/
|
|
@@ -157,6 +207,7 @@ export declare interface DomainEvents extends Record<string, unknown> {
|
|
|
157
207
|
[EVENT_NAMES.IFRAME_READY]: VoidEvent;
|
|
158
208
|
[EVENT_NAMES.MUTATION_MESSAGE]: MessageEvent_2<MutationMessage>;
|
|
159
209
|
[EVENT_NAMES.CONFIG_MESSAGE]: MessageEvent_2<ConfigMessage>;
|
|
210
|
+
[EVENT_NAMES.CAMERA_MESSAGE]: MessageEvent_2<CameraMessage>;
|
|
160
211
|
[EVENT_NAMES.MESSAGE_RECEIVED]: MessageEvent_2;
|
|
161
212
|
[EVENT_NAMES.STATE_CHANGED]: StateChangedEvent;
|
|
162
213
|
[EVENT_NAMES.INITIAL_STATE_RECEIVED]: VoidEvent;
|
|
@@ -185,6 +236,7 @@ export declare const EVENT_NAMES: {
|
|
|
185
236
|
readonly IFRAME_READY: "iframe:ready";
|
|
186
237
|
readonly MUTATION_MESSAGE: "mutation:message";
|
|
187
238
|
readonly CONFIG_MESSAGE: "config:message";
|
|
239
|
+
readonly CAMERA_MESSAGE: "camera:message";
|
|
188
240
|
readonly MESSAGE_RECEIVED: "message:received";
|
|
189
241
|
readonly STATE_CHANGED: "state:changed";
|
|
190
242
|
readonly INITIAL_STATE_RECEIVED: "state:initial-received";
|
|
@@ -306,7 +358,7 @@ export declare class MappingValidator {
|
|
|
306
358
|
/**
|
|
307
359
|
* Union of all possible messages
|
|
308
360
|
*/
|
|
309
|
-
export declare type Message = MutationMessage | StateMessage | ConfigMessage;
|
|
361
|
+
export declare type Message = MutationMessage | StateMessage | ConfigMessage | CameraMessage;
|
|
310
362
|
|
|
311
363
|
/**
|
|
312
364
|
* Types of messages exchanged between client and server
|
|
@@ -316,6 +368,7 @@ export declare const MESSAGE_TYPES: {
|
|
|
316
368
|
readonly MUTATION: "mutation";
|
|
317
369
|
readonly STATE: "state";
|
|
318
370
|
readonly CONFIG: "config";
|
|
371
|
+
readonly CAMERA: "camera";
|
|
319
372
|
};
|
|
320
373
|
|
|
321
374
|
/**
|
|
@@ -483,6 +536,7 @@ export declare class VirtualdisplayClient {
|
|
|
483
536
|
private readonly stateService;
|
|
484
537
|
private readonly messageHandler;
|
|
485
538
|
private readonly viewerService;
|
|
539
|
+
private readonly cameraApi;
|
|
486
540
|
private readonly options;
|
|
487
541
|
private iframe;
|
|
488
542
|
constructor(options: ClientOptions);
|
|
@@ -520,6 +574,10 @@ export declare class VirtualdisplayClient {
|
|
|
520
574
|
* Get the viewer service for UI configuration
|
|
521
575
|
*/
|
|
522
576
|
get viewer(): VirtualdisplayViewerService;
|
|
577
|
+
/**
|
|
578
|
+
* Get the camera control API
|
|
579
|
+
*/
|
|
580
|
+
get camera(): Camera;
|
|
523
581
|
destroy(): void;
|
|
524
582
|
}
|
|
525
583
|
|