Jelajahi Sumber

documentation

Raanan Weber 5 tahun lalu
induk
melakukan
36ba20d9c9

+ 3 - 0
src/Cameras/XR/webXRDefaultExperience.ts

@@ -23,6 +23,9 @@ export class WebXRDefaultExperienceOptions {
      */
     public disableDefaultUI: boolean;
 
+    /**
+     * optional configuration for the output canvas
+     */
     public outputCanvasOptions? : WebXRManagedOutputCanvasOptions;
 }
 

+ 9 - 1
src/Cameras/XR/webXRManagedOutputCanvas.ts

@@ -7,12 +7,19 @@ import { WebXRState, WebXRRenderTarget } from "./webXRTypes";
  * COnfiguration object for WebXR output canvas
  */
 export class WebXRManagedOutputCanvasOptions {
+    /**
+     * Options for this XR Layer output
+     */
     public canvasOptions: XRWebGLLayerOptions;
 
+    /**
+     * CSS styling for a newly created canvas (if not provided)
+     */
     public newCanvasCssStyle?: string;
 
     /**
-     *Get the default values of the configuration object
+     * Get the default values of the configuration object
+     * @returns default values of this configuration object
      */
     public static GetDefaults(): WebXRManagedOutputCanvasOptions {
         const defaults = new WebXRManagedOutputCanvasOptions();
@@ -75,6 +82,7 @@ export class WebXRManagedOutputCanvas implements WebXRRenderTarget {
      * @param engine the Babylon engine
      * @param canvas The canvas to be added/removed (If not specified a full screen canvas will be created)
      * @param onStateChangedObservable the mechanism by which the canvas will be added/removed based on XR state
+     * @param configuration optional configuration for this canvas output. defaults will be used if not provided
      */
     constructor(engine: ThinEngine, canvas?: HTMLCanvasElement, onStateChangedObservable?: Observable<WebXRState>, private configuration: WebXRManagedOutputCanvasOptions = WebXRManagedOutputCanvasOptions.GetDefaults()) {
         this._engine = engine;

+ 1 - 0
src/Cameras/XR/webXRSessionManager.ts

@@ -218,6 +218,7 @@ export class WebXRSessionManager implements IDisposable {
     /**
      * Creates a WebXRRenderTarget object for the XR session
      * @param onStateChangedObservable optional, mechanism for enabling/disabling XR rendering canvas, used only on Web
+     * @param options optional options to provide when creating a new render target
      * @returns a WebXR render target to which the session can render
      */
     public getWebXRRenderTarget(onStateChangedObservable?: Observable<WebXRState>, options?: WebXRManagedOutputCanvasOptions) : WebXRRenderTarget {