babylonjs-gui 5.0.0-alpha.59 → 5.0.0-alpha.62
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/babylon.gui.js +345 -273
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +2 -2
- package/babylon.gui.module.d.ts +387 -327
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
|
@@ -364,14 +364,16 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
364
364
|
import { Control } from "babylonjs-gui/2D/controls/control";
|
|
365
365
|
import { IFocusableControl } from "babylonjs-gui/2D/controls/focusableControl";
|
|
366
366
|
import { Style } from "babylonjs-gui/2D/style";
|
|
367
|
-
import { Viewport } from
|
|
367
|
+
import { Viewport } from "babylonjs/Maths/math.viewport";
|
|
368
368
|
/**
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
* Class used to create texture to support 2D GUI elements
|
|
370
|
+
* @see https://doc.babylonjs.com/how_to/gui
|
|
371
|
+
*/
|
|
372
372
|
export class AdvancedDynamicTexture extends DynamicTexture {
|
|
373
373
|
/** Define the Uurl to load snippets */
|
|
374
374
|
static SnippetUrl: string;
|
|
375
|
+
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
|
376
|
+
static AllowGPUOptimizations: boolean;
|
|
375
377
|
/** Snippet ID if the content was created from the snippet server */
|
|
376
378
|
snippetId: string;
|
|
377
379
|
private _isDirty;
|
|
@@ -426,152 +428,152 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
426
428
|
/** Gets the number of render calls made the last time the ADT has been rendered */
|
|
427
429
|
get numRenderCalls(): number;
|
|
428
430
|
/**
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
431
|
+
* Define type to string to ensure compatibility across browsers
|
|
432
|
+
* Safari doesn't support DataTransfer constructor
|
|
433
|
+
*/
|
|
432
434
|
private _clipboardData;
|
|
433
435
|
/**
|
|
434
|
-
|
|
435
|
-
|
|
436
|
+
* Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
437
|
+
*/
|
|
436
438
|
onClipboardObservable: Observable<ClipboardInfo>;
|
|
437
439
|
/**
|
|
438
|
-
|
|
439
|
-
|
|
440
|
+
* Observable event triggered each time a pointer down is intercepted by a control
|
|
441
|
+
*/
|
|
440
442
|
onControlPickedObservable: Observable<Control>;
|
|
441
443
|
/**
|
|
442
|
-
|
|
443
|
-
|
|
444
|
+
* Observable event triggered before layout is evaluated
|
|
445
|
+
*/
|
|
444
446
|
onBeginLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
445
447
|
/**
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
* Observable event triggered after the layout was evaluated
|
|
449
|
+
*/
|
|
448
450
|
onEndLayoutObservable: Observable<AdvancedDynamicTexture>;
|
|
449
451
|
/**
|
|
450
|
-
|
|
451
|
-
|
|
452
|
+
* Observable event triggered before the texture is rendered
|
|
453
|
+
*/
|
|
452
454
|
onBeginRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
453
455
|
/**
|
|
454
|
-
|
|
455
|
-
|
|
456
|
+
* Observable event triggered after the texture was rendered
|
|
457
|
+
*/
|
|
456
458
|
onEndRenderObservable: Observable<AdvancedDynamicTexture>;
|
|
457
459
|
/**
|
|
458
|
-
|
|
459
|
-
|
|
460
|
+
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
461
|
+
*/
|
|
460
462
|
premulAlpha: boolean;
|
|
461
463
|
/**
|
|
462
464
|
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
|
463
465
|
*/
|
|
464
466
|
applyYInversionOnUpdate: boolean;
|
|
465
467
|
/**
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
468
|
+
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
|
469
|
+
* Useful when you want more antialiasing
|
|
470
|
+
*/
|
|
469
471
|
get renderScale(): number;
|
|
470
472
|
set renderScale(value: number);
|
|
471
473
|
/** Gets or sets the background color */
|
|
472
474
|
get background(): string;
|
|
473
475
|
set background(value: string);
|
|
474
476
|
/**
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
* Gets or sets the ideal width used to design controls.
|
|
478
|
+
* The GUI will then rescale everything accordingly
|
|
479
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
480
|
+
*/
|
|
479
481
|
get idealWidth(): number;
|
|
480
482
|
set idealWidth(value: number);
|
|
481
483
|
/**
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
* Gets or sets the ideal height used to design controls.
|
|
485
|
+
* The GUI will then rescale everything accordingly
|
|
486
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
487
|
+
*/
|
|
486
488
|
get idealHeight(): number;
|
|
487
489
|
set idealHeight(value: number);
|
|
488
490
|
/**
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
491
|
+
* Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
|
|
492
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
493
|
+
*/
|
|
492
494
|
get useSmallestIdeal(): boolean;
|
|
493
495
|
set useSmallestIdeal(value: boolean);
|
|
494
496
|
/**
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
* Gets or sets a boolean indicating if adaptive scaling must be used
|
|
498
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
499
|
+
*/
|
|
498
500
|
get renderAtIdealSize(): boolean;
|
|
499
501
|
set renderAtIdealSize(value: boolean);
|
|
500
502
|
/**
|
|
501
503
|
* Gets the ratio used when in "ideal mode"
|
|
502
|
-
|
|
504
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
503
505
|
* */
|
|
504
506
|
get idealRatio(): number;
|
|
505
507
|
/**
|
|
506
|
-
|
|
507
|
-
|
|
508
|
+
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
509
|
+
*/
|
|
508
510
|
get layer(): Nullable<Layer>;
|
|
509
511
|
/**
|
|
510
|
-
|
|
511
|
-
|
|
512
|
+
* Gets the root container control
|
|
513
|
+
*/
|
|
512
514
|
get rootContainer(): Container;
|
|
513
515
|
/**
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
* Returns an array containing the root container.
|
|
517
|
+
* This is mostly used to let the Inspector introspects the ADT
|
|
518
|
+
* @returns an array containing the rootContainer
|
|
519
|
+
*/
|
|
518
520
|
getChildren(): Array<Container>;
|
|
519
521
|
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
522
|
+
* Will return all controls that are inside this texture
|
|
523
|
+
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
|
|
524
|
+
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
525
|
+
* @return all child controls
|
|
526
|
+
*/
|
|
525
527
|
getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
|
|
526
528
|
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
* Will return all controls with the given type name
|
|
530
|
+
* @param typeName defines the type name to search for
|
|
531
|
+
* @returns an array of all controls found
|
|
532
|
+
*/
|
|
531
533
|
getControlsByType(typeName: string): Control[];
|
|
532
534
|
/**
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
535
|
+
* Will return the first control with the given name
|
|
536
|
+
* @param name defines the name to search for
|
|
537
|
+
* @return the first control found or null
|
|
538
|
+
*/
|
|
537
539
|
getControlByName(name: string): Nullable<Control>;
|
|
538
540
|
private _getControlByKey;
|
|
539
541
|
/**
|
|
540
|
-
|
|
541
|
-
|
|
542
|
+
* Gets or sets the current focused control
|
|
543
|
+
*/
|
|
542
544
|
get focusedControl(): Nullable<IFocusableControl>;
|
|
543
545
|
set focusedControl(control: Nullable<IFocusableControl>);
|
|
544
546
|
/**
|
|
545
|
-
|
|
546
|
-
|
|
547
|
+
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
|
548
|
+
*/
|
|
547
549
|
get isForeground(): boolean;
|
|
548
550
|
set isForeground(value: boolean);
|
|
549
551
|
/**
|
|
550
|
-
|
|
551
|
-
|
|
552
|
+
* Gets or set information about clipboardData
|
|
553
|
+
*/
|
|
552
554
|
get clipboardData(): string;
|
|
553
555
|
set clipboardData(value: string);
|
|
554
556
|
/**
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
557
|
+
* Creates a new AdvancedDynamicTexture
|
|
558
|
+
* @param name defines the name of the texture
|
|
559
|
+
* @param width defines the width of the texture
|
|
560
|
+
* @param height defines the height of the texture
|
|
561
|
+
* @param scene defines the hosting scene
|
|
562
|
+
* @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
|
|
563
|
+
* @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
564
|
+
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
565
|
+
*/
|
|
564
566
|
constructor(name: string, width: number | undefined, height: number | undefined, scene: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
|
565
567
|
/**
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
568
|
+
* Get the current class name of the texture useful for serialization or dynamic coding.
|
|
569
|
+
* @returns "AdvancedDynamicTexture"
|
|
570
|
+
*/
|
|
569
571
|
getClassName(): string;
|
|
570
572
|
/**
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
* Function used to execute a function on all controls
|
|
574
|
+
* @param func defines the function to execute
|
|
575
|
+
* @param container defines the container where controls belong. If null the root container will be used
|
|
576
|
+
*/
|
|
575
577
|
executeOnAllControls(func: (control: Control) => void, container?: Container): void;
|
|
576
578
|
private _useInvalidateRectOptimization;
|
|
577
579
|
/**
|
|
@@ -589,47 +591,55 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
589
591
|
*/
|
|
590
592
|
invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
|
|
591
593
|
/**
|
|
592
|
-
|
|
593
|
-
|
|
594
|
+
* Marks the texture as dirty forcing a complete update
|
|
595
|
+
*/
|
|
594
596
|
markAsDirty(): void;
|
|
595
597
|
/**
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
* Helper function used to create a new style
|
|
599
|
+
* @returns a new style
|
|
600
|
+
* @see https://doc.babylonjs.com/how_to/gui#styles
|
|
601
|
+
*/
|
|
600
602
|
createStyle(): Style;
|
|
601
603
|
/**
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
* Adds a new control to the root container
|
|
605
|
+
* @param control defines the control to add
|
|
606
|
+
* @returns the current texture
|
|
607
|
+
*/
|
|
606
608
|
addControl(control: Control): AdvancedDynamicTexture;
|
|
607
609
|
/**
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
* Removes a control from the root container
|
|
611
|
+
* @param control defines the control to remove
|
|
612
|
+
* @returns the current texture
|
|
613
|
+
*/
|
|
612
614
|
removeControl(control: Control): AdvancedDynamicTexture;
|
|
613
615
|
/**
|
|
614
|
-
|
|
615
|
-
|
|
616
|
+
* Moves overlapped controls towards a position where it is not overlapping anymore.
|
|
617
|
+
* Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
|
|
618
|
+
* @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
|
|
619
|
+
* @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
|
|
620
|
+
* @param repelFactor how much is the control repelled by other controls
|
|
621
|
+
*/
|
|
622
|
+
moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
|
|
623
|
+
/**
|
|
624
|
+
* Release all resources
|
|
625
|
+
*/
|
|
616
626
|
dispose(): void;
|
|
617
627
|
private _onResize;
|
|
618
628
|
/** @hidden */
|
|
619
629
|
_getGlobalViewport(): Viewport;
|
|
620
630
|
/**
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
631
|
+
* Get screen coordinates for a vector3
|
|
632
|
+
* @param position defines the position to project
|
|
633
|
+
* @param worldMatrix defines the world matrix to use
|
|
634
|
+
* @returns the projected position
|
|
635
|
+
*/
|
|
626
636
|
getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
|
|
627
637
|
/**
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
638
|
+
* Get screen coordinates for a vector3
|
|
639
|
+
* @param position defines the position to project
|
|
640
|
+
* @param worldMatrix defines the world matrix to use
|
|
641
|
+
* @returns the projected position with Z
|
|
642
|
+
*/
|
|
633
643
|
getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
|
|
634
644
|
private _checkUpdate;
|
|
635
645
|
private _clearMeasure;
|
|
@@ -654,23 +664,23 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
654
664
|
/** @hidden */
|
|
655
665
|
private onClipboardPaste;
|
|
656
666
|
/**
|
|
657
|
-
|
|
658
|
-
|
|
667
|
+
* Register the clipboard Events onto the canvas
|
|
668
|
+
*/
|
|
659
669
|
registerClipboardEvents(): void;
|
|
660
670
|
/**
|
|
661
671
|
* Unregister the clipboard Events from the canvas
|
|
662
672
|
*/
|
|
663
673
|
unRegisterClipboardEvents(): void;
|
|
664
674
|
/**
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
675
|
+
* Connect the texture to a hosting mesh to enable interactions
|
|
676
|
+
* @param mesh defines the mesh to attach to
|
|
677
|
+
* @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
|
|
678
|
+
*/
|
|
669
679
|
attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
|
|
670
680
|
/**
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
681
|
+
* Move the focus to a specific control
|
|
682
|
+
* @param control defines the control which will receive the focus
|
|
683
|
+
*/
|
|
674
684
|
moveFocusToControl(control: IFocusableControl): void;
|
|
675
685
|
private _manageFocus;
|
|
676
686
|
private _attachToOnPointerOut;
|
|
@@ -694,12 +704,19 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
694
704
|
*/
|
|
695
705
|
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
|
|
696
706
|
/**
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
707
|
+
* Recreate the content of the ADT from a url json
|
|
708
|
+
* @param url defines the url to load
|
|
709
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
710
|
+
* @returns a promise that will resolve on success
|
|
711
|
+
*/
|
|
702
712
|
parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
|
|
713
|
+
/**
|
|
714
|
+
* Compares two rectangle based controls for pixel overlap
|
|
715
|
+
* @param control1 The first control to compare
|
|
716
|
+
* @param control2 The second control to compare
|
|
717
|
+
* @returns true if overlaps, otherwise false
|
|
718
|
+
*/
|
|
719
|
+
private static _Overlaps;
|
|
703
720
|
/**
|
|
704
721
|
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
|
|
705
722
|
* @param mesh defines the mesh which will receive the texture
|
|
@@ -722,17 +739,17 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
722
739
|
*/
|
|
723
740
|
static CreateForMeshTexture(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean): AdvancedDynamicTexture;
|
|
724
741
|
/**
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
742
|
+
* Creates a new AdvancedDynamicTexture in fullscreen mode.
|
|
743
|
+
* In this mode the texture will rely on a layer for its rendering.
|
|
744
|
+
* This allows it to be treated like any other layer.
|
|
745
|
+
* As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
|
|
746
|
+
* LayerMask is set through advancedTexture.layer.layerMask
|
|
747
|
+
* @param name defines name for the texture
|
|
748
|
+
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
|
749
|
+
* @param scene defines the hosting scene
|
|
750
|
+
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
|
751
|
+
* @returns a new AdvancedDynamicTexture
|
|
752
|
+
*/
|
|
736
753
|
static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number): AdvancedDynamicTexture;
|
|
737
754
|
}
|
|
738
755
|
}
|
|
@@ -740,7 +757,7 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
740
757
|
import { Nullable } from "babylonjs/types";
|
|
741
758
|
import { Observable } from "babylonjs/Misc/observable";
|
|
742
759
|
import { Vector2, Vector3 } from "babylonjs/Maths/math.vector";
|
|
743
|
-
import { PointerInfoBase } from
|
|
760
|
+
import { PointerInfoBase } from "babylonjs/Events/pointerEvents";
|
|
744
761
|
import { TransformNode } from "babylonjs/Meshes/transformNode";
|
|
745
762
|
import { Scene } from "babylonjs/scene";
|
|
746
763
|
import { Container } from "babylonjs-gui/2D/controls/container";
|
|
@@ -749,7 +766,7 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
749
766
|
import { Measure } from "babylonjs-gui/2D/measure";
|
|
750
767
|
import { Style } from "babylonjs-gui/2D/style";
|
|
751
768
|
import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/2D/math2D";
|
|
752
|
-
import { ICanvasRenderingContext } from
|
|
769
|
+
import { ICanvasRenderingContext } from "babylonjs/Engines/ICanvas";
|
|
753
770
|
/**
|
|
754
771
|
* Root class used for all 2D controls
|
|
755
772
|
* @see https://doc.babylonjs.com/how_to/gui#controls
|
|
@@ -836,6 +853,8 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
836
853
|
private _enterCount;
|
|
837
854
|
private _doNotRender;
|
|
838
855
|
private _downPointerIds;
|
|
856
|
+
private _evaluatedMeasure;
|
|
857
|
+
private _evaluatedParentMeasure;
|
|
839
858
|
protected _isEnabled: boolean;
|
|
840
859
|
protected _disabledColor: string;
|
|
841
860
|
protected _disabledColorItem: string;
|
|
@@ -916,36 +935,36 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
916
935
|
*/
|
|
917
936
|
getClassName(): string;
|
|
918
937
|
/**
|
|
919
|
-
|
|
920
|
-
|
|
938
|
+
* An event triggered when pointer wheel is scrolled
|
|
939
|
+
*/
|
|
921
940
|
onWheelObservable: Observable<Vector2>;
|
|
922
941
|
/**
|
|
923
|
-
|
|
924
|
-
|
|
942
|
+
* An event triggered when the pointer moves over the control.
|
|
943
|
+
*/
|
|
925
944
|
onPointerMoveObservable: Observable<Vector2>;
|
|
926
945
|
/**
|
|
927
|
-
|
|
928
|
-
|
|
946
|
+
* An event triggered when the pointer moves out of the control.
|
|
947
|
+
*/
|
|
929
948
|
onPointerOutObservable: Observable<Control>;
|
|
930
949
|
/**
|
|
931
|
-
|
|
932
|
-
|
|
950
|
+
* An event triggered when the pointer taps the control
|
|
951
|
+
*/
|
|
933
952
|
onPointerDownObservable: Observable<Vector2WithInfo>;
|
|
934
953
|
/**
|
|
935
|
-
|
|
936
|
-
|
|
954
|
+
* An event triggered when pointer up
|
|
955
|
+
*/
|
|
937
956
|
onPointerUpObservable: Observable<Vector2WithInfo>;
|
|
938
957
|
/**
|
|
939
|
-
|
|
940
|
-
|
|
958
|
+
* An event triggered when a control is clicked on
|
|
959
|
+
*/
|
|
941
960
|
onPointerClickObservable: Observable<Vector2WithInfo>;
|
|
942
961
|
/**
|
|
943
|
-
|
|
944
|
-
|
|
962
|
+
* An event triggered when pointer enters the control
|
|
963
|
+
*/
|
|
945
964
|
onPointerEnterObservable: Observable<Control>;
|
|
946
965
|
/**
|
|
947
|
-
|
|
948
|
-
|
|
966
|
+
* An event triggered when the control is marked as dirty
|
|
967
|
+
*/
|
|
949
968
|
onDirtyObservable: Observable<Control>;
|
|
950
969
|
/**
|
|
951
970
|
* An event triggered before drawing the control
|
|
@@ -956,8 +975,8 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
956
975
|
*/
|
|
957
976
|
onAfterDrawObservable: Observable<Control>;
|
|
958
977
|
/**
|
|
959
|
-
|
|
960
|
-
|
|
978
|
+
* An event triggered when the control has been disposed
|
|
979
|
+
*/
|
|
961
980
|
onDisposeObservable: Observable<Control>;
|
|
962
981
|
/**
|
|
963
982
|
* Get the hosting AdvancedDynamicTexture
|
|
@@ -994,27 +1013,27 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
994
1013
|
set highlightColor(value: string);
|
|
995
1014
|
/** Gets or sets a value indicating the scale factor on X axis (1 by default)
|
|
996
1015
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
997
|
-
|
|
1016
|
+
*/
|
|
998
1017
|
get scaleX(): number;
|
|
999
1018
|
set scaleX(value: number);
|
|
1000
1019
|
/** Gets or sets a value indicating the scale factor on Y axis (1 by default)
|
|
1001
1020
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
1002
|
-
|
|
1021
|
+
*/
|
|
1003
1022
|
get scaleY(): number;
|
|
1004
1023
|
set scaleY(value: number);
|
|
1005
1024
|
/** Gets or sets the rotation angle (0 by default)
|
|
1006
1025
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
1007
|
-
|
|
1026
|
+
*/
|
|
1008
1027
|
get rotation(): number;
|
|
1009
1028
|
set rotation(value: number);
|
|
1010
1029
|
/** Gets or sets the transformation center on Y axis (0 by default)
|
|
1011
1030
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
1012
|
-
|
|
1031
|
+
*/
|
|
1013
1032
|
get transformCenterY(): number;
|
|
1014
1033
|
set transformCenterY(value: number);
|
|
1015
1034
|
/** Gets or sets the transformation center on X axis (0 by default)
|
|
1016
1035
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
1017
|
-
|
|
1036
|
+
*/
|
|
1018
1037
|
get transformCenterX(): number;
|
|
1019
1038
|
set transformCenterX(value: number);
|
|
1020
1039
|
/**
|
|
@@ -1211,6 +1230,17 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
1211
1230
|
/** Gets or sets front color of control if it's disabled */
|
|
1212
1231
|
get disabledColorItem(): string;
|
|
1213
1232
|
set disabledColorItem(value: string);
|
|
1233
|
+
/**
|
|
1234
|
+
* Gets/sets the overlap group of the control.
|
|
1235
|
+
* Controls with overlapGroup set to a number can be deoverlapped.
|
|
1236
|
+
* Controls with overlapGroup set to undefined are not deoverlapped.
|
|
1237
|
+
* @see https://doc.babylonjs.com/how_to/gui#deoverlapping
|
|
1238
|
+
*/
|
|
1239
|
+
overlapGroup?: number;
|
|
1240
|
+
/**
|
|
1241
|
+
* Gets/sets the deoverlap movement multiplier
|
|
1242
|
+
*/
|
|
1243
|
+
overlapDeltaMultiplier?: number;
|
|
1214
1244
|
/**
|
|
1215
1245
|
* Creates a new control
|
|
1216
1246
|
* @param name defines the name of the control
|
|
@@ -1280,13 +1310,13 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
1280
1310
|
*/
|
|
1281
1311
|
linkWithMesh(mesh: Nullable<TransformNode>): void;
|
|
1282
1312
|
/**
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1313
|
+
* Shorthand funtion to set the top, right, bottom, and left padding values on the control.
|
|
1314
|
+
* @param { string | number} paddingTop - The value of the top padding.
|
|
1315
|
+
* @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
|
|
1316
|
+
* @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
|
|
1317
|
+
* @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.
|
|
1318
|
+
* @see https://doc.babylonjs.com/how_to/gui#position-and-size
|
|
1319
|
+
*/
|
|
1290
1320
|
setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number): void;
|
|
1291
1321
|
/**
|
|
1292
1322
|
* Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.
|
|
@@ -7399,12 +7429,14 @@ declare module BABYLON.GUI {
|
|
|
7399
7429
|
}
|
|
7400
7430
|
declare module BABYLON.GUI {
|
|
7401
7431
|
/**
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7432
|
+
* Class used to create texture to support 2D GUI elements
|
|
7433
|
+
* @see https://doc.babylonjs.com/how_to/gui
|
|
7434
|
+
*/
|
|
7405
7435
|
export class AdvancedDynamicTexture extends BABYLON.DynamicTexture {
|
|
7406
7436
|
/** Define the Uurl to load snippets */
|
|
7407
7437
|
static SnippetUrl: string;
|
|
7438
|
+
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
|
7439
|
+
static AllowGPUOptimizations: boolean;
|
|
7408
7440
|
/** Snippet ID if the content was created from the snippet server */
|
|
7409
7441
|
snippetId: string;
|
|
7410
7442
|
private _isDirty;
|
|
@@ -7459,152 +7491,152 @@ declare module BABYLON.GUI {
|
|
|
7459
7491
|
/** Gets the number of render calls made the last time the ADT has been rendered */
|
|
7460
7492
|
get numRenderCalls(): number;
|
|
7461
7493
|
/**
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7494
|
+
* Define type to string to ensure compatibility across browsers
|
|
7495
|
+
* Safari doesn't support DataTransfer constructor
|
|
7496
|
+
*/
|
|
7465
7497
|
private _clipboardData;
|
|
7466
7498
|
/**
|
|
7467
|
-
|
|
7468
|
-
|
|
7499
|
+
* BABYLON.Observable event triggered each time an clipboard event is received from the rendering canvas
|
|
7500
|
+
*/
|
|
7469
7501
|
onClipboardObservable: BABYLON.Observable<BABYLON.ClipboardInfo>;
|
|
7470
7502
|
/**
|
|
7471
|
-
|
|
7472
|
-
|
|
7503
|
+
* BABYLON.Observable event triggered each time a pointer down is intercepted by a control
|
|
7504
|
+
*/
|
|
7473
7505
|
onControlPickedObservable: BABYLON.Observable<Control>;
|
|
7474
7506
|
/**
|
|
7475
|
-
|
|
7476
|
-
|
|
7507
|
+
* BABYLON.Observable event triggered before layout is evaluated
|
|
7508
|
+
*/
|
|
7477
7509
|
onBeginLayoutObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
7478
7510
|
/**
|
|
7479
|
-
|
|
7480
|
-
|
|
7511
|
+
* BABYLON.Observable event triggered after the layout was evaluated
|
|
7512
|
+
*/
|
|
7481
7513
|
onEndLayoutObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
7482
7514
|
/**
|
|
7483
|
-
|
|
7484
|
-
|
|
7515
|
+
* BABYLON.Observable event triggered before the texture is rendered
|
|
7516
|
+
*/
|
|
7485
7517
|
onBeginRenderObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
7486
7518
|
/**
|
|
7487
|
-
|
|
7488
|
-
|
|
7519
|
+
* BABYLON.Observable event triggered after the texture was rendered
|
|
7520
|
+
*/
|
|
7489
7521
|
onEndRenderObservable: BABYLON.Observable<AdvancedDynamicTexture>;
|
|
7490
7522
|
/**
|
|
7491
|
-
|
|
7492
|
-
|
|
7523
|
+
* Gets or sets a boolean defining if alpha is stored as premultiplied
|
|
7524
|
+
*/
|
|
7493
7525
|
premulAlpha: boolean;
|
|
7494
7526
|
/**
|
|
7495
7527
|
* Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
|
|
7496
7528
|
*/
|
|
7497
7529
|
applyYInversionOnUpdate: boolean;
|
|
7498
7530
|
/**
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7531
|
+
* Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
|
|
7532
|
+
* Useful when you want more antialiasing
|
|
7533
|
+
*/
|
|
7502
7534
|
get renderScale(): number;
|
|
7503
7535
|
set renderScale(value: number);
|
|
7504
7536
|
/** Gets or sets the background color */
|
|
7505
7537
|
get background(): string;
|
|
7506
7538
|
set background(value: string);
|
|
7507
7539
|
/**
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7540
|
+
* Gets or sets the ideal width used to design controls.
|
|
7541
|
+
* The GUI will then rescale everything accordingly
|
|
7542
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
7543
|
+
*/
|
|
7512
7544
|
get idealWidth(): number;
|
|
7513
7545
|
set idealWidth(value: number);
|
|
7514
7546
|
/**
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7547
|
+
* Gets or sets the ideal height used to design controls.
|
|
7548
|
+
* The GUI will then rescale everything accordingly
|
|
7549
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
7550
|
+
*/
|
|
7519
7551
|
get idealHeight(): number;
|
|
7520
7552
|
set idealHeight(value: number);
|
|
7521
7553
|
/**
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7554
|
+
* Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
|
|
7555
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
7556
|
+
*/
|
|
7525
7557
|
get useSmallestIdeal(): boolean;
|
|
7526
7558
|
set useSmallestIdeal(value: boolean);
|
|
7527
7559
|
/**
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7560
|
+
* Gets or sets a boolean indicating if adaptive scaling must be used
|
|
7561
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
7562
|
+
*/
|
|
7531
7563
|
get renderAtIdealSize(): boolean;
|
|
7532
7564
|
set renderAtIdealSize(value: boolean);
|
|
7533
7565
|
/**
|
|
7534
7566
|
* Gets the ratio used when in "ideal mode"
|
|
7535
|
-
|
|
7567
|
+
* @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
|
|
7536
7568
|
* */
|
|
7537
7569
|
get idealRatio(): number;
|
|
7538
7570
|
/**
|
|
7539
|
-
|
|
7540
|
-
|
|
7571
|
+
* Gets the underlying layer used to render the texture when in fullscreen mode
|
|
7572
|
+
*/
|
|
7541
7573
|
get layer(): BABYLON.Nullable<BABYLON.Layer>;
|
|
7542
7574
|
/**
|
|
7543
|
-
|
|
7544
|
-
|
|
7575
|
+
* Gets the root container control
|
|
7576
|
+
*/
|
|
7545
7577
|
get rootContainer(): Container;
|
|
7546
7578
|
/**
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7579
|
+
* Returns an array containing the root container.
|
|
7580
|
+
* This is mostly used to let the Inspector introspects the ADT
|
|
7581
|
+
* @returns an array containing the rootContainer
|
|
7582
|
+
*/
|
|
7551
7583
|
getChildren(): Array<Container>;
|
|
7552
7584
|
/**
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7585
|
+
* Will return all controls that are inside this texture
|
|
7586
|
+
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
|
|
7587
|
+
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
7588
|
+
* @return all child controls
|
|
7589
|
+
*/
|
|
7558
7590
|
getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
|
|
7559
7591
|
/**
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7592
|
+
* Will return all controls with the given type name
|
|
7593
|
+
* @param typeName defines the type name to search for
|
|
7594
|
+
* @returns an array of all controls found
|
|
7595
|
+
*/
|
|
7564
7596
|
getControlsByType(typeName: string): Control[];
|
|
7565
7597
|
/**
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7598
|
+
* Will return the first control with the given name
|
|
7599
|
+
* @param name defines the name to search for
|
|
7600
|
+
* @return the first control found or null
|
|
7601
|
+
*/
|
|
7570
7602
|
getControlByName(name: string): BABYLON.Nullable<Control>;
|
|
7571
7603
|
private _getControlByKey;
|
|
7572
7604
|
/**
|
|
7573
|
-
|
|
7574
|
-
|
|
7605
|
+
* Gets or sets the current focused control
|
|
7606
|
+
*/
|
|
7575
7607
|
get focusedControl(): BABYLON.Nullable<IFocusableControl>;
|
|
7576
7608
|
set focusedControl(control: BABYLON.Nullable<IFocusableControl>);
|
|
7577
7609
|
/**
|
|
7578
|
-
|
|
7579
|
-
|
|
7610
|
+
* Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
|
|
7611
|
+
*/
|
|
7580
7612
|
get isForeground(): boolean;
|
|
7581
7613
|
set isForeground(value: boolean);
|
|
7582
7614
|
/**
|
|
7583
|
-
|
|
7584
|
-
|
|
7615
|
+
* Gets or set information about clipboardData
|
|
7616
|
+
*/
|
|
7585
7617
|
get clipboardData(): string;
|
|
7586
7618
|
set clipboardData(value: string);
|
|
7587
7619
|
/**
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7620
|
+
* Creates a new AdvancedDynamicTexture
|
|
7621
|
+
* @param name defines the name of the texture
|
|
7622
|
+
* @param width defines the width of the texture
|
|
7623
|
+
* @param height defines the height of the texture
|
|
7624
|
+
* @param scene defines the hosting scene
|
|
7625
|
+
* @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
|
|
7626
|
+
* @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
7627
|
+
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
7628
|
+
*/
|
|
7597
7629
|
constructor(name: string, width: number | undefined, height: number | undefined, scene: BABYLON.Nullable<BABYLON.Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
|
|
7598
7630
|
/**
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7631
|
+
* Get the current class name of the texture useful for serialization or dynamic coding.
|
|
7632
|
+
* @returns "AdvancedDynamicTexture"
|
|
7633
|
+
*/
|
|
7602
7634
|
getClassName(): string;
|
|
7603
7635
|
/**
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7636
|
+
* Function used to execute a function on all controls
|
|
7637
|
+
* @param func defines the function to execute
|
|
7638
|
+
* @param container defines the container where controls belong. If null the root container will be used
|
|
7639
|
+
*/
|
|
7608
7640
|
executeOnAllControls(func: (control: Control) => void, container?: Container): void;
|
|
7609
7641
|
private _useInvalidateRectOptimization;
|
|
7610
7642
|
/**
|
|
@@ -7622,47 +7654,55 @@ declare module BABYLON.GUI {
|
|
|
7622
7654
|
*/
|
|
7623
7655
|
invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
|
|
7624
7656
|
/**
|
|
7625
|
-
|
|
7626
|
-
|
|
7657
|
+
* Marks the texture as dirty forcing a complete update
|
|
7658
|
+
*/
|
|
7627
7659
|
markAsDirty(): void;
|
|
7628
7660
|
/**
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7661
|
+
* Helper function used to create a new style
|
|
7662
|
+
* @returns a new style
|
|
7663
|
+
* @see https://doc.babylonjs.com/how_to/gui#styles
|
|
7664
|
+
*/
|
|
7633
7665
|
createStyle(): Style;
|
|
7634
7666
|
/**
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7667
|
+
* Adds a new control to the root container
|
|
7668
|
+
* @param control defines the control to add
|
|
7669
|
+
* @returns the current texture
|
|
7670
|
+
*/
|
|
7639
7671
|
addControl(control: Control): AdvancedDynamicTexture;
|
|
7640
7672
|
/**
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7673
|
+
* Removes a control from the root container
|
|
7674
|
+
* @param control defines the control to remove
|
|
7675
|
+
* @returns the current texture
|
|
7676
|
+
*/
|
|
7645
7677
|
removeControl(control: Control): AdvancedDynamicTexture;
|
|
7646
7678
|
/**
|
|
7647
|
-
|
|
7648
|
-
|
|
7679
|
+
* Moves overlapped controls towards a position where it is not overlapping anymore.
|
|
7680
|
+
* Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
|
|
7681
|
+
* @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
|
|
7682
|
+
* @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
|
|
7683
|
+
* @param repelFactor how much is the control repelled by other controls
|
|
7684
|
+
*/
|
|
7685
|
+
moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
|
|
7686
|
+
/**
|
|
7687
|
+
* Release all resources
|
|
7688
|
+
*/
|
|
7649
7689
|
dispose(): void;
|
|
7650
7690
|
private _onResize;
|
|
7651
7691
|
/** @hidden */
|
|
7652
7692
|
_getGlobalViewport(): BABYLON.Viewport;
|
|
7653
7693
|
/**
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7694
|
+
* Get screen coordinates for a vector3
|
|
7695
|
+
* @param position defines the position to project
|
|
7696
|
+
* @param worldMatrix defines the world matrix to use
|
|
7697
|
+
* @returns the projected position
|
|
7698
|
+
*/
|
|
7659
7699
|
getProjectedPosition(position: BABYLON.Vector3, worldMatrix: BABYLON.Matrix): BABYLON.Vector2;
|
|
7660
7700
|
/**
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7701
|
+
* Get screen coordinates for a vector3
|
|
7702
|
+
* @param position defines the position to project
|
|
7703
|
+
* @param worldMatrix defines the world matrix to use
|
|
7704
|
+
* @returns the projected position with Z
|
|
7705
|
+
*/
|
|
7666
7706
|
getProjectedPositionWithZ(position: BABYLON.Vector3, worldMatrix: BABYLON.Matrix): BABYLON.Vector3;
|
|
7667
7707
|
private _checkUpdate;
|
|
7668
7708
|
private _clearMeasure;
|
|
@@ -7687,23 +7727,23 @@ declare module BABYLON.GUI {
|
|
|
7687
7727
|
/** @hidden */
|
|
7688
7728
|
private onClipboardPaste;
|
|
7689
7729
|
/**
|
|
7690
|
-
|
|
7691
|
-
|
|
7730
|
+
* Register the clipboard Events onto the canvas
|
|
7731
|
+
*/
|
|
7692
7732
|
registerClipboardEvents(): void;
|
|
7693
7733
|
/**
|
|
7694
7734
|
* Unregister the clipboard Events from the canvas
|
|
7695
7735
|
*/
|
|
7696
7736
|
unRegisterClipboardEvents(): void;
|
|
7697
7737
|
/**
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7738
|
+
* Connect the texture to a hosting mesh to enable interactions
|
|
7739
|
+
* @param mesh defines the mesh to attach to
|
|
7740
|
+
* @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
|
|
7741
|
+
*/
|
|
7702
7742
|
attachToMesh(mesh: BABYLON.AbstractMesh, supportPointerMove?: boolean): void;
|
|
7703
7743
|
/**
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7744
|
+
* Move the focus to a specific control
|
|
7745
|
+
* @param control defines the control which will receive the focus
|
|
7746
|
+
*/
|
|
7707
7747
|
moveFocusToControl(control: IFocusableControl): void;
|
|
7708
7748
|
private _manageFocus;
|
|
7709
7749
|
private _attachToOnPointerOut;
|
|
@@ -7727,12 +7767,19 @@ declare module BABYLON.GUI {
|
|
|
7727
7767
|
*/
|
|
7728
7768
|
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
|
|
7729
7769
|
/**
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7770
|
+
* Recreate the content of the ADT from a url json
|
|
7771
|
+
* @param url defines the url to load
|
|
7772
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
7773
|
+
* @returns a promise that will resolve on success
|
|
7774
|
+
*/
|
|
7735
7775
|
parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
|
|
7776
|
+
/**
|
|
7777
|
+
* Compares two rectangle based controls for pixel overlap
|
|
7778
|
+
* @param control1 The first control to compare
|
|
7779
|
+
* @param control2 The second control to compare
|
|
7780
|
+
* @returns true if overlaps, otherwise false
|
|
7781
|
+
*/
|
|
7782
|
+
private static _Overlaps;
|
|
7736
7783
|
/**
|
|
7737
7784
|
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
|
|
7738
7785
|
* @param mesh defines the mesh which will receive the texture
|
|
@@ -7755,17 +7802,17 @@ declare module BABYLON.GUI {
|
|
|
7755
7802
|
*/
|
|
7756
7803
|
static CreateForMeshTexture(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean): AdvancedDynamicTexture;
|
|
7757
7804
|
/**
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7805
|
+
* Creates a new AdvancedDynamicTexture in fullscreen mode.
|
|
7806
|
+
* In this mode the texture will rely on a layer for its rendering.
|
|
7807
|
+
* This allows it to be treated like any other layer.
|
|
7808
|
+
* As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
|
|
7809
|
+
* LayerMask is set through advancedTexture.layer.layerMask
|
|
7810
|
+
* @param name defines name for the texture
|
|
7811
|
+
* @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
|
|
7812
|
+
* @param scene defines the hosting scene
|
|
7813
|
+
* @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
|
|
7814
|
+
* @returns a new AdvancedDynamicTexture
|
|
7815
|
+
*/
|
|
7769
7816
|
static CreateFullscreenUI(name: string, foreground?: boolean, scene?: BABYLON.Nullable<BABYLON.Scene>, sampling?: number): AdvancedDynamicTexture;
|
|
7770
7817
|
}
|
|
7771
7818
|
}
|
|
@@ -7856,6 +7903,8 @@ declare module BABYLON.GUI {
|
|
|
7856
7903
|
private _enterCount;
|
|
7857
7904
|
private _doNotRender;
|
|
7858
7905
|
private _downPointerIds;
|
|
7906
|
+
private _evaluatedMeasure;
|
|
7907
|
+
private _evaluatedParentMeasure;
|
|
7859
7908
|
protected _isEnabled: boolean;
|
|
7860
7909
|
protected _disabledColor: string;
|
|
7861
7910
|
protected _disabledColorItem: string;
|
|
@@ -7936,36 +7985,36 @@ declare module BABYLON.GUI {
|
|
|
7936
7985
|
*/
|
|
7937
7986
|
getClassName(): string;
|
|
7938
7987
|
/**
|
|
7939
|
-
|
|
7940
|
-
|
|
7988
|
+
* An event triggered when pointer wheel is scrolled
|
|
7989
|
+
*/
|
|
7941
7990
|
onWheelObservable: BABYLON.Observable<BABYLON.Vector2>;
|
|
7942
7991
|
/**
|
|
7943
|
-
|
|
7944
|
-
|
|
7992
|
+
* An event triggered when the pointer moves over the control.
|
|
7993
|
+
*/
|
|
7945
7994
|
onPointerMoveObservable: BABYLON.Observable<BABYLON.Vector2>;
|
|
7946
7995
|
/**
|
|
7947
|
-
|
|
7948
|
-
|
|
7996
|
+
* An event triggered when the pointer moves out of the control.
|
|
7997
|
+
*/
|
|
7949
7998
|
onPointerOutObservable: BABYLON.Observable<Control>;
|
|
7950
7999
|
/**
|
|
7951
|
-
|
|
7952
|
-
|
|
8000
|
+
* An event triggered when the pointer taps the control
|
|
8001
|
+
*/
|
|
7953
8002
|
onPointerDownObservable: BABYLON.Observable<Vector2WithInfo>;
|
|
7954
8003
|
/**
|
|
7955
|
-
|
|
7956
|
-
|
|
8004
|
+
* An event triggered when pointer up
|
|
8005
|
+
*/
|
|
7957
8006
|
onPointerUpObservable: BABYLON.Observable<Vector2WithInfo>;
|
|
7958
8007
|
/**
|
|
7959
|
-
|
|
7960
|
-
|
|
8008
|
+
* An event triggered when a control is clicked on
|
|
8009
|
+
*/
|
|
7961
8010
|
onPointerClickObservable: BABYLON.Observable<Vector2WithInfo>;
|
|
7962
8011
|
/**
|
|
7963
|
-
|
|
7964
|
-
|
|
8012
|
+
* An event triggered when pointer enters the control
|
|
8013
|
+
*/
|
|
7965
8014
|
onPointerEnterObservable: BABYLON.Observable<Control>;
|
|
7966
8015
|
/**
|
|
7967
|
-
|
|
7968
|
-
|
|
8016
|
+
* An event triggered when the control is marked as dirty
|
|
8017
|
+
*/
|
|
7969
8018
|
onDirtyObservable: BABYLON.Observable<Control>;
|
|
7970
8019
|
/**
|
|
7971
8020
|
* An event triggered before drawing the control
|
|
@@ -7976,8 +8025,8 @@ declare module BABYLON.GUI {
|
|
|
7976
8025
|
*/
|
|
7977
8026
|
onAfterDrawObservable: BABYLON.Observable<Control>;
|
|
7978
8027
|
/**
|
|
7979
|
-
|
|
7980
|
-
|
|
8028
|
+
* An event triggered when the control has been disposed
|
|
8029
|
+
*/
|
|
7981
8030
|
onDisposeObservable: BABYLON.Observable<Control>;
|
|
7982
8031
|
/**
|
|
7983
8032
|
* Get the hosting AdvancedDynamicTexture
|
|
@@ -8014,27 +8063,27 @@ declare module BABYLON.GUI {
|
|
|
8014
8063
|
set highlightColor(value: string);
|
|
8015
8064
|
/** Gets or sets a value indicating the scale factor on X axis (1 by default)
|
|
8016
8065
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
8017
|
-
|
|
8066
|
+
*/
|
|
8018
8067
|
get scaleX(): number;
|
|
8019
8068
|
set scaleX(value: number);
|
|
8020
8069
|
/** Gets or sets a value indicating the scale factor on Y axis (1 by default)
|
|
8021
8070
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
8022
|
-
|
|
8071
|
+
*/
|
|
8023
8072
|
get scaleY(): number;
|
|
8024
8073
|
set scaleY(value: number);
|
|
8025
8074
|
/** Gets or sets the rotation angle (0 by default)
|
|
8026
8075
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
8027
|
-
|
|
8076
|
+
*/
|
|
8028
8077
|
get rotation(): number;
|
|
8029
8078
|
set rotation(value: number);
|
|
8030
8079
|
/** Gets or sets the transformation center on Y axis (0 by default)
|
|
8031
8080
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
8032
|
-
|
|
8081
|
+
*/
|
|
8033
8082
|
get transformCenterY(): number;
|
|
8034
8083
|
set transformCenterY(value: number);
|
|
8035
8084
|
/** Gets or sets the transformation center on X axis (0 by default)
|
|
8036
8085
|
* @see https://doc.babylonjs.com/how_to/gui#rotation-and-scaling
|
|
8037
|
-
|
|
8086
|
+
*/
|
|
8038
8087
|
get transformCenterX(): number;
|
|
8039
8088
|
set transformCenterX(value: number);
|
|
8040
8089
|
/**
|
|
@@ -8231,6 +8280,17 @@ declare module BABYLON.GUI {
|
|
|
8231
8280
|
/** Gets or sets front color of control if it's disabled */
|
|
8232
8281
|
get disabledColorItem(): string;
|
|
8233
8282
|
set disabledColorItem(value: string);
|
|
8283
|
+
/**
|
|
8284
|
+
* Gets/sets the overlap group of the control.
|
|
8285
|
+
* Controls with overlapGroup set to a number can be deoverlapped.
|
|
8286
|
+
* Controls with overlapGroup set to undefined are not deoverlapped.
|
|
8287
|
+
* @see https://doc.babylonjs.com/how_to/gui#deoverlapping
|
|
8288
|
+
*/
|
|
8289
|
+
overlapGroup?: number;
|
|
8290
|
+
/**
|
|
8291
|
+
* Gets/sets the deoverlap movement multiplier
|
|
8292
|
+
*/
|
|
8293
|
+
overlapDeltaMultiplier?: number;
|
|
8234
8294
|
/**
|
|
8235
8295
|
* Creates a new control
|
|
8236
8296
|
* @param name defines the name of the control
|
|
@@ -8300,13 +8360,13 @@ declare module BABYLON.GUI {
|
|
|
8300
8360
|
*/
|
|
8301
8361
|
linkWithMesh(mesh: BABYLON.Nullable<BABYLON.TransformNode>): void;
|
|
8302
8362
|
/**
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8363
|
+
* Shorthand funtion to set the top, right, bottom, and left padding values on the control.
|
|
8364
|
+
* @param { string | number} paddingTop - The value of the top padding.
|
|
8365
|
+
* @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
|
|
8366
|
+
* @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
|
|
8367
|
+
* @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.
|
|
8368
|
+
* @see https://doc.babylonjs.com/how_to/gui#position-and-size
|
|
8369
|
+
*/
|
|
8310
8370
|
setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number): void;
|
|
8311
8371
|
/**
|
|
8312
8372
|
* Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.
|