@babylonjs/accessibility 6.4.0 → 6.4.1

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/core/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/core/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
- static Render(scene: Scene): void;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/accessibility",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
4
4
  "main": "dist/babylon.accessibility.max.js",
5
5
  "module": "dist/babylon.accessibility.max.js",
6
6
  "esnext": "dist/babylon.accessibility.max.js",
@@ -24,8 +24,8 @@
24
24
  "@types/react-dom": ">=16.0.9"
25
25
  },
26
26
  "devDependencies": {
27
- "@babylonjs/core": "^6.4.0",
28
- "@babylonjs/gui": "^6.4.0",
27
+ "@babylonjs/core": "^6.4.1",
28
+ "@babylonjs/gui": "^6.4.1",
29
29
  "react": "^17.0.2",
30
30
  "react-dom": "^17.0.2",
31
31
  "rimraf": "^3.0.2",