Skip to content

Commit

Permalink
Merge pull request BabylonJS#8379 from BabylonJS/master
Browse files Browse the repository at this point in the history
Nightly
  • Loading branch information
mergify[bot] authored Jun 12, 2020
2 parents bc1ff26 + 5874b2f commit 5906a97
Show file tree
Hide file tree
Showing 137 changed files with 58,376 additions and 64,745 deletions.
129 changes: 122 additions & 7 deletions dist/preview release/babylon.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9431,7 +9431,7 @@ declare module BABYLON {
* Internal only
* @hidden
*/
static _GetTargetProperty: (target: Scene | Node) => {
static _GetTargetProperty: (target: Node | Scene) => {
name: string;
targetType: string;
value: string;
Expand Down Expand Up @@ -34607,8 +34607,9 @@ declare module BABYLON {
* Force a specific size of the canvas
* @param width defines the new canvas' width
* @param height defines the new canvas' height
* @returns true if the size was changed
*/
setSize(width: number, height: number): void;
setSize(width: number, height: number): boolean;
/**
* Binds the frame buffer to the specified texture.
* @param texture The texture to render to or null for the default canvas
Expand Down Expand Up @@ -36999,8 +37000,9 @@ declare module BABYLON {
* Force a specific size of the canvas
* @param width defines the new canvas' width
* @param height defines the new canvas' height
* @returns true if the size was changed
*/
setSize(width: number, height: number): void;
setSize(width: number, height: number): boolean;
/**
* Updates a dynamic vertex buffer.
* @param vertexBuffer the vertex buffer to update
Expand Down Expand Up @@ -44007,6 +44009,47 @@ declare module BABYLON {
/** Z axis */
Z = 2
}
/**
* Represents the different customization options available
* for VirtualJoystick
*/
interface VirtualJoystickCustomizations {
/**
* Size of the joystick's puck
*/
puckSize: number;
/**
* Size of the joystick's container
*/
containerSize: number;
/**
* Color of the joystick && puck
*/
color: string;
/**
* Image URL for the joystick's puck
*/
puckImage?: string;
/**
* Image URL for the joystick's container
*/
containerImage?: string;
/**
* Defines the unmoving position of the joystick container
*/
position?: {
x: number;
y: number;
};
/**
* Defines whether or not the joystick container is always visible
*/
alwaysVisible: boolean;
/**
* Defines whether or not to limit the movement of the puck to the joystick's container
*/
limitToContainer: boolean;
}
/**
* Class used to define virtual joystick (used in touch mode)
*/
Expand All @@ -44031,11 +44074,17 @@ declare module BABYLON {
* Canvas the virtual joystick will render onto, default z-index of this is 5
*/
static Canvas: Nullable<HTMLCanvasElement>;
/**
* boolean indicating whether or not the joystick's puck's movement should be limited to the joystick's container area
*/
limitToContainer: boolean;
private static _globalJoystickIndex;
private static _alwaysVisibleSticks;
private static vjCanvasContext;
private static vjCanvasWidth;
private static vjCanvasHeight;
private static halfWidth;
private static _GetDefaultOptions;
private _action;
private _axisTargetedByLeftAndRight;
private _axisTargetedByUpAndDown;
Expand All @@ -44049,15 +44098,26 @@ declare module BABYLON {
private _deltaJoystickVector;
private _leftJoystick;
private _touches;
private _joystickPosition;
private _alwaysVisible;
private _puckImage;
private _containerImage;
private _joystickPuckSize;
private _joystickContainerSize;
private _clearPuckSize;
private _clearContainerSize;
private _clearPuckSizeOffset;
private _clearContainerSizeOffset;
private _onPointerDownHandlerRef;
private _onPointerMoveHandlerRef;
private _onPointerUpHandlerRef;
private _onResize;
/**
* Creates a new virtual joystick
* @param leftJoystick defines that the joystick is for left hand (false by default)
* @param customizations Defines the options we want to customize the VirtualJoystick
*/
constructor(leftJoystick?: boolean);
constructor(leftJoystick?: boolean, customizations?: Partial<VirtualJoystickCustomizations>);
/**
* Defines joystick sensibility (ie. the ratio beteen a physical move and virtual joystick position change)
* @param newJoystickSensibility defines the new sensibility
Expand All @@ -44067,10 +44127,35 @@ declare module BABYLON {
private _onPointerMove;
private _onPointerUp;
/**
* Change the color of the virtual joystick
* @param newColor a string that must be a CSS color value (like "red") or the hexa value (like "#FF0000")
*/
* Change the color of the virtual joystick
* @param newColor a string that must be a CSS color value (like "red") or the hexa value (like "#FF0000")
*/
setJoystickColor(newColor: string): void;
/**
* Size of the joystick's container
*/
set containerSize(newSize: number);
get containerSize(): number;
/**
* Size of the joystick's puck
*/
set puckSize(newSize: number);
get puckSize(): number;
/**
* Clears the set position of the joystick
*/
clearPosition(): void;
/**
* Defines whether or not the joystick container is always visible
*/
set alwaysVisible(value: boolean);
get alwaysVisible(): boolean;
/**
* Sets the constant position of the Joystick container
* @param x X axis coordinate
* @param y Y axis coordinate
*/
setPosition(x: number, y: number): void;
/**
* Defines a callback to call when the joystick is touched
* @param action defines the callback
Expand All @@ -44086,6 +44171,28 @@ declare module BABYLON {
* @param axis defines the axis to use
*/
setAxisForUpDown(axis: JoystickAxis): void;
/**
* Clears the canvas from the previous puck / container draw
*/
private _clearPreviousDraw;
/**
* Loads `urlPath` to be used for the container's image
* @param urlPath defines the urlPath of an image to use
*/
setContainerImage(urlPath: string): void;
/**
* Loads `urlPath` to be used for the puck's image
* @param urlPath defines the urlPath of an image to use
*/
setPuckImage(urlPath: string): void;
/**
* Draws the Virtual Joystick's container
*/
private _drawContainer;
/**
* Draws the Virtual Joystick's puck
*/
private _drawPuck;
private _drawVirtualJoystick;
/**
* Release internal HTML canvas
Expand Down Expand Up @@ -61664,6 +61771,10 @@ declare module BABYLON {
* Gets the rgb output component
*/
get rgb(): NodeMaterialConnectionPoint;
/**
* Gets the rgba output component
*/
get rgba(): NodeMaterialConnectionPoint;
/**
* Gets the r output component
*/
Expand All @@ -61676,6 +61787,10 @@ declare module BABYLON {
* Gets the b output component
*/
get b(): NodeMaterialConnectionPoint;
/**
* Gets the a output component
*/
get a(): NodeMaterialConnectionPoint;
autoConfigure(material: NodeMaterial): void;
protected _buildBlock(state: NodeMaterialBuildState): this;
}
Expand Down
24 changes: 12 additions & 12 deletions dist/preview release/babylon.js

Large diffs are not rendered by default.

Loading

0 comments on commit 5906a97

Please sign in to comment.