babylonjs-accessibility 6.4.0 → 6.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.
@@ -49,14 +49,17 @@ declare module "babylonjs-accessibility/HtmlTwin/htmlTwinHostComponent" {
|
|
49
49
|
import * as React from "react";
|
50
50
|
import { HTMLTwinItem } from "babylonjs-accessibility/HtmlTwin/htmlTwinItem";
|
51
51
|
import { Scene } from "babylonjs/scene";
|
52
|
+
import { IHTMLTwinRendererOptions } from "babylonjs-accessibility/HtmlTwin/htmlTwinRenderer";
|
52
53
|
interface IHTMLTwinHostComponentProps {
|
53
54
|
scene: Scene;
|
55
|
+
options?: IHTMLTwinRendererOptions;
|
54
56
|
}
|
55
57
|
interface IHTMLTwinHostComponentState {
|
56
58
|
a11yTreeItems: HTMLTwinItem[];
|
57
59
|
}
|
58
60
|
export class HTMLTwinHostComponent extends React.Component<IHTMLTwinHostComponentProps, IHTMLTwinHostComponentState> {
|
59
61
|
private _observersMap;
|
62
|
+
private _options;
|
60
63
|
constructor(props: IHTMLTwinHostComponentProps);
|
61
64
|
componentDidUpdate(prevProps: Readonly<IHTMLTwinHostComponentProps>, prevState: Readonly<IHTMLTwinHostComponentState>, snapshot?: any): void;
|
62
65
|
/**
|
@@ -178,8 +181,28 @@ export class HTMLTwinNodeItem extends HTMLTwinItem {
|
|
178
181
|
}
|
179
182
|
declare module "babylonjs-accessibility/HtmlTwin/htmlTwinRenderer" {
|
180
183
|
import { Scene } from "babylonjs/scene";
|
184
|
+
/**
|
185
|
+
* Options for the HTMLTwinRenderer.
|
186
|
+
*/
|
187
|
+
export interface IHTMLTwinRendererOptions {
|
188
|
+
/**
|
189
|
+
* If this is true, all GUI controls will be added to the twin tree, regardless if they have
|
190
|
+
* a defined accessibility tag or not. If it's false, only controls with an accessibility tag
|
191
|
+
* will be added. True by default.
|
192
|
+
*/
|
193
|
+
addAllControls: boolean;
|
194
|
+
}
|
195
|
+
/**
|
196
|
+
* This class is the main entry point for the HTML twin renderer. To render a twin for a scene,
|
197
|
+
* simply call HTMLTwinRenderer.Render(scene).
|
198
|
+
*/
|
181
199
|
export class HTMLTwinRenderer {
|
182
|
-
|
200
|
+
/**
|
201
|
+
* Render the HTML twin for the given scene.
|
202
|
+
* @param scene the scene to render the twin for
|
203
|
+
* @param options options for the renderer
|
204
|
+
*/
|
205
|
+
static Render(scene: Scene, options?: IHTMLTwinRendererOptions): void;
|
183
206
|
}
|
184
207
|
|
185
208
|
}
|
@@ -263,12 +286,14 @@ declare module BABYLON.Accessibility {
|
|
263
286
|
|
264
287
|
interface IHTMLTwinHostComponentProps {
|
265
288
|
scene: BABYLON.Scene;
|
289
|
+
options?: IHTMLTwinRendererOptions;
|
266
290
|
}
|
267
291
|
interface IHTMLTwinHostComponentState {
|
268
292
|
a11yTreeItems: HTMLTwinItem[];
|
269
293
|
}
|
270
294
|
export class HTMLTwinHostComponent extends React.Component<IHTMLTwinHostComponentProps, IHTMLTwinHostComponentState> {
|
271
295
|
private _observersMap;
|
296
|
+
private _options;
|
272
297
|
constructor(props: IHTMLTwinHostComponentProps);
|
273
298
|
componentDidUpdate(prevProps: Readonly<IHTMLTwinHostComponentProps>, prevState: Readonly<IHTMLTwinHostComponentState>, snapshot?: any): void;
|
274
299
|
/**
|
@@ -379,8 +404,28 @@ declare module BABYLON.Accessibility {
|
|
379
404
|
}
|
380
405
|
|
381
406
|
|
407
|
+
/**
|
408
|
+
* Options for the HTMLTwinRenderer.
|
409
|
+
*/
|
410
|
+
export interface IHTMLTwinRendererOptions {
|
411
|
+
/**
|
412
|
+
* If this is true, all GUI controls will be added to the twin tree, regardless if they have
|
413
|
+
* a defined accessibility tag or not. If it's false, only controls with an accessibility tag
|
414
|
+
* will be added. True by default.
|
415
|
+
*/
|
416
|
+
addAllControls: boolean;
|
417
|
+
}
|
418
|
+
/**
|
419
|
+
* This class is the main entry point for the HTML twin renderer. To render a twin for a scene,
|
420
|
+
* simply call HTMLTwinRenderer.Render(scene).
|
421
|
+
*/
|
382
422
|
export class HTMLTwinRenderer {
|
383
|
-
|
423
|
+
/**
|
424
|
+
* Render the HTML twin for the given scene.
|
425
|
+
* @param scene the scene to render the twin for
|
426
|
+
* @param options options for the renderer
|
427
|
+
*/
|
428
|
+
static Render(scene: BABYLON.Scene, options?: IHTMLTwinRendererOptions): void;
|
384
429
|
}
|
385
430
|
|
386
431
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babylonjs-accessibility",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.5.0",
|
4
4
|
"main": "babylon.accessibility.max.js",
|
5
5
|
"types": "babylon.accessibility.module.d.ts",
|
6
6
|
"files": [
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"clean": "rimraf dist && rimraf babylon*.*"
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
|
-
"babylonjs": "^6.
|
18
|
-
"babylonjs-gui": "^6.
|
17
|
+
"babylonjs": "^6.5.0",
|
18
|
+
"babylonjs-gui": "^6.5.0"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"@dev/build-tools": "1.0.0",
|