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