|
@@ -1,6 +1,8 @@
|
|
|
-export = BABYLON;
|
|
|
-export as namespace BABYLON;
|
|
|
|
|
|
+
|
|
|
+declare module 'babylonjs' {
|
|
|
+ export = BABYLON;
|
|
|
+}
|
|
|
declare module BABYLON {
|
|
|
class InstancingAttributeInfo {
|
|
|
/**
|
|
@@ -87,6 +89,10 @@ declare module BABYLON {
|
|
|
lockstepMaxSteps?: number;
|
|
|
doNotHandleContextLost?: boolean;
|
|
|
}
|
|
|
+ interface IDisplayChangedEventArgs {
|
|
|
+ vrDisplay: any;
|
|
|
+ vrSupported: boolean;
|
|
|
+ }
|
|
|
/**
|
|
|
* The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio.
|
|
|
*/
|
|
@@ -209,9 +215,12 @@ declare module BABYLON {
|
|
|
* Observable event triggered each time the canvas receives pointerout event
|
|
|
*/
|
|
|
onCanvasPointerOutObservable: Observable<Engine>;
|
|
|
- vrDisplaysPromise: any;
|
|
|
- private _vrDisplays;
|
|
|
- private _vrDisplayEnabled;
|
|
|
+ /**
|
|
|
+ * Observable event triggered before each texture is initialized
|
|
|
+ */
|
|
|
+ onBeforeTextureInitObservable: Observable<Texture>;
|
|
|
+ private _vrDisplay;
|
|
|
+ private _vrSupported;
|
|
|
private _oldSize;
|
|
|
private _oldHardwareScaleFactor;
|
|
|
private _vrExclusivePointerMode;
|
|
@@ -238,6 +247,12 @@ declare module BABYLON {
|
|
|
private _onPointerLockChange;
|
|
|
private _onVRDisplayPointerRestricted;
|
|
|
private _onVRDisplayPointerUnrestricted;
|
|
|
+ private _onVrDisplayConnect;
|
|
|
+ private _onVrDisplayDisconnect;
|
|
|
+ private _onVrDisplayPresentChange;
|
|
|
+ onVRDisplayChangedObservable: Observable<IDisplayChangedEventArgs>;
|
|
|
+ onVRRequestPresentComplete: Observable<boolean>;
|
|
|
+ onVRRequestPresentStart: Observable<Engine>;
|
|
|
private _hardwareScalingLevel;
|
|
|
private _caps;
|
|
|
private _pointerLockRequested;
|
|
@@ -423,13 +438,16 @@ declare module BABYLON {
|
|
|
* @param {number} height - the new canvas' height
|
|
|
*/
|
|
|
setSize(width: number, height: number): void;
|
|
|
- isVRDevicePresent(callback: (result: boolean) => void): void;
|
|
|
- getVRDevice(name: string, callback: (device: any) => void): void;
|
|
|
- initWebVR(): void;
|
|
|
- enableVR(vrDevice: any): void;
|
|
|
+ isVRDevicePresent(): boolean;
|
|
|
+ getVRDevice(): any;
|
|
|
+ initWebVR(): Observable<{
|
|
|
+ vrDisplay: any;
|
|
|
+ vrSupported: any;
|
|
|
+ }>;
|
|
|
+ enableVR(): void;
|
|
|
disableVR(): void;
|
|
|
private _onVRFullScreenTriggered;
|
|
|
- private _getVRDisplays();
|
|
|
+ private _getVRDisplays(callback);
|
|
|
bindFramebuffer(texture: InternalTexture, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean): void;
|
|
|
private bindUnboundFramebuffer(framebuffer);
|
|
|
unBindFramebuffer(texture: InternalTexture, disableGenerateMipMaps?: boolean, onBeforeUnbind?: () => void): void;
|
|
@@ -2267,6 +2285,7 @@ declare module BABYLON {
|
|
|
private _child;
|
|
|
private _condition;
|
|
|
private _triggerParameter;
|
|
|
+ onBeforeExecuteObservable: Observable<Action>;
|
|
|
constructor(triggerOptions: any, condition?: Condition);
|
|
|
_prepare(): void;
|
|
|
getTriggerParameter(): any;
|
|
@@ -2588,6 +2607,7 @@ declare module BABYLON {
|
|
|
private _target;
|
|
|
private _effectiveTarget;
|
|
|
private _property;
|
|
|
+ onInterpolationDoneObservable: Observable<InterpolateValueAction>;
|
|
|
constructor(triggerOptions: any, target: any, propertyPath: string, value: any, duration?: number, condition?: Condition, stopOtherAnimations?: boolean, onInterpolationDone?: () => void);
|
|
|
_prepare(): void;
|
|
|
execute(): void;
|
|
@@ -4426,6 +4446,134 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class AxesViewer {
|
|
|
+ private _xline;
|
|
|
+ private _yline;
|
|
|
+ private _zline;
|
|
|
+ private _xmesh;
|
|
|
+ private _ymesh;
|
|
|
+ private _zmesh;
|
|
|
+ scene: Scene;
|
|
|
+ scaleLines: number;
|
|
|
+ constructor(scene: Scene, scaleLines?: number);
|
|
|
+ update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
+ mesh: Mesh;
|
|
|
+ bone: Bone;
|
|
|
+ pos: Vector3;
|
|
|
+ xaxis: Vector3;
|
|
|
+ yaxis: Vector3;
|
|
|
+ zaxis: Vector3;
|
|
|
+ constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
+ update(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class DebugLayer {
|
|
|
+ private _scene;
|
|
|
+ static InspectorURL: string;
|
|
|
+ private _inspector;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ /** Creates the inspector window. */
|
|
|
+ private _createInspector(config?);
|
|
|
+ isVisible(): boolean;
|
|
|
+ hide(): void;
|
|
|
+ show(config?: {
|
|
|
+ popup?: boolean;
|
|
|
+ initialTab?: number;
|
|
|
+ parentElement?: HTMLElement;
|
|
|
+ newColors?: {
|
|
|
+ backgroundColor?: string;
|
|
|
+ backgroundColorLighter?: string;
|
|
|
+ backgroundColorLighter2?: string;
|
|
|
+ backgroundColorLighter3?: string;
|
|
|
+ color?: string;
|
|
|
+ colorTop?: string;
|
|
|
+ colorBot?: string;
|
|
|
+ };
|
|
|
+ }): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class PhysicsViewer {
|
|
|
+ protected _impostors: Array<PhysicsImpostor>;
|
|
|
+ protected _meshes: Array<AbstractMesh>;
|
|
|
+ protected _scene: Scene;
|
|
|
+ protected _numMeshes: number;
|
|
|
+ protected _physicsEnginePlugin: IPhysicsEnginePlugin;
|
|
|
+ private _renderFunction;
|
|
|
+ private _debugBoxMesh;
|
|
|
+ private _debugSphereMesh;
|
|
|
+ private _debugMaterial;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ protected _updateDebugMeshes(): void;
|
|
|
+ showImpostor(impostor: PhysicsImpostor): void;
|
|
|
+ hideImpostor(impostor: PhysicsImpostor): void;
|
|
|
+ private _getDebugMaterial(scene);
|
|
|
+ private _getDebugBoxMesh(scene);
|
|
|
+ private _getDebugSphereMesh(scene);
|
|
|
+ private _getDebugMesh(impostor, scene);
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class RayHelper {
|
|
|
+ ray: Ray;
|
|
|
+ private _renderPoints;
|
|
|
+ private _renderLine;
|
|
|
+ private _renderFunction;
|
|
|
+ private _scene;
|
|
|
+ private _updateToMeshFunction;
|
|
|
+ private _attachedToMesh;
|
|
|
+ private _meshSpaceDirection;
|
|
|
+ private _meshSpaceOrigin;
|
|
|
+ static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
+ constructor(ray: Ray);
|
|
|
+ show(scene: Scene, color: Color3): void;
|
|
|
+ hide(): void;
|
|
|
+ private _render();
|
|
|
+ attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
+ detachFromMesh(): void;
|
|
|
+ private _updateToMesh();
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ /**
|
|
|
+ * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
+ */
|
|
|
+ class SkeletonViewer {
|
|
|
+ skeleton: Skeleton;
|
|
|
+ mesh: AbstractMesh;
|
|
|
+ autoUpdateBonesMatrices: boolean;
|
|
|
+ renderingGroupId: number;
|
|
|
+ color: Color3;
|
|
|
+ private _scene;
|
|
|
+ private _debugLines;
|
|
|
+ private _debugMesh;
|
|
|
+ private _isEnabled;
|
|
|
+ private _renderFunction;
|
|
|
+ constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
+ private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
+ private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
+ update(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
class KeyboardEventTypes {
|
|
|
static _KEYDOWN: number;
|
|
@@ -4490,158 +4638,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class StickValues {
|
|
|
- x: any;
|
|
|
- y: any;
|
|
|
- constructor(x: any, y: any);
|
|
|
- }
|
|
|
- interface GamepadButtonChanges {
|
|
|
- changed: boolean;
|
|
|
- pressChanged: boolean;
|
|
|
- touchChanged: boolean;
|
|
|
- valueChanged: boolean;
|
|
|
- }
|
|
|
- class Gamepad {
|
|
|
- id: string;
|
|
|
- index: number;
|
|
|
- browserGamepad: any;
|
|
|
- type: number;
|
|
|
- private _leftStick;
|
|
|
- private _rightStick;
|
|
|
- _isConnected: boolean;
|
|
|
- private _leftStickAxisX;
|
|
|
- private _leftStickAxisY;
|
|
|
- private _rightStickAxisX;
|
|
|
- private _rightStickAxisY;
|
|
|
- private _onleftstickchanged;
|
|
|
- private _onrightstickchanged;
|
|
|
- static GAMEPAD: number;
|
|
|
- static GENERIC: number;
|
|
|
- static XBOX: number;
|
|
|
- static POSE_ENABLED: number;
|
|
|
- readonly isConnected: boolean;
|
|
|
- constructor(id: string, index: number, browserGamepad: any, leftStickX?: number, leftStickY?: number, rightStickX?: number, rightStickY?: number);
|
|
|
- onleftstickchanged(callback: (values: StickValues) => void): void;
|
|
|
- onrightstickchanged(callback: (values: StickValues) => void): void;
|
|
|
- leftStick: StickValues;
|
|
|
- rightStick: StickValues;
|
|
|
- update(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
- class GenericPad extends Gamepad {
|
|
|
- private _buttons;
|
|
|
- private _onbuttondown;
|
|
|
- private _onbuttonup;
|
|
|
- onButtonDownObservable: Observable<number>;
|
|
|
- onButtonUpObservable: Observable<number>;
|
|
|
- onbuttondown(callback: (buttonPressed: number) => void): void;
|
|
|
- onbuttonup(callback: (buttonReleased: number) => void): void;
|
|
|
- constructor(id: string, index: number, browserGamepad: any);
|
|
|
- private _setButtonValue(newValue, currentValue, buttonIndex);
|
|
|
- update(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class GamepadManager {
|
|
|
- private _babylonGamepads;
|
|
|
- private _oneGamepadConnected;
|
|
|
- private _isMonitoring;
|
|
|
- private _gamepadEventSupported;
|
|
|
- private _gamepadSupport;
|
|
|
- onGamepadConnectedObservable: Observable<Gamepad>;
|
|
|
- onGamepadDisconnectedObservable: Observable<Gamepad>;
|
|
|
- private _onGamepadConnectedEvent;
|
|
|
- private _onGamepadDisconnectedEvent;
|
|
|
- constructor();
|
|
|
- readonly gamepads: Gamepad[];
|
|
|
- getGamepadByType(type?: number): Gamepad;
|
|
|
- dispose(): void;
|
|
|
- private _addNewGamepad(gamepad);
|
|
|
- private _startMonitoringGamepads();
|
|
|
- private _stopMonitoringGamepads();
|
|
|
- private _checkGamepadsStatus();
|
|
|
- private _updateGamepadObjects();
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- enum Xbox360Button {
|
|
|
- A = 0,
|
|
|
- B = 1,
|
|
|
- X = 2,
|
|
|
- Y = 3,
|
|
|
- Start = 4,
|
|
|
- Back = 5,
|
|
|
- LB = 6,
|
|
|
- RB = 7,
|
|
|
- LeftStick = 8,
|
|
|
- RightStick = 9,
|
|
|
- }
|
|
|
- enum Xbox360Dpad {
|
|
|
- Up = 0,
|
|
|
- Down = 1,
|
|
|
- Left = 2,
|
|
|
- Right = 3,
|
|
|
- }
|
|
|
- class Xbox360Pad extends Gamepad {
|
|
|
- private _leftTrigger;
|
|
|
- private _rightTrigger;
|
|
|
- private _onlefttriggerchanged;
|
|
|
- private _onrighttriggerchanged;
|
|
|
- private _onbuttondown;
|
|
|
- private _onbuttonup;
|
|
|
- private _ondpaddown;
|
|
|
- private _ondpadup;
|
|
|
- onButtonDownObservable: Observable<Xbox360Button>;
|
|
|
- onButtonUpObservable: Observable<Xbox360Button>;
|
|
|
- onPadDownObservable: Observable<Xbox360Dpad>;
|
|
|
- onPadUpObservable: Observable<Xbox360Dpad>;
|
|
|
- private _buttonA;
|
|
|
- private _buttonB;
|
|
|
- private _buttonX;
|
|
|
- private _buttonY;
|
|
|
- private _buttonBack;
|
|
|
- private _buttonStart;
|
|
|
- private _buttonLB;
|
|
|
- private _buttonRB;
|
|
|
- private _buttonLeftStick;
|
|
|
- private _buttonRightStick;
|
|
|
- private _dPadUp;
|
|
|
- private _dPadDown;
|
|
|
- private _dPadLeft;
|
|
|
- private _dPadRight;
|
|
|
- private _isXboxOnePad;
|
|
|
- constructor(id: string, index: number, gamepad: any, xboxOne?: boolean);
|
|
|
- onlefttriggerchanged(callback: (value: number) => void): void;
|
|
|
- onrighttriggerchanged(callback: (value: number) => void): void;
|
|
|
- leftTrigger: number;
|
|
|
- rightTrigger: number;
|
|
|
- onbuttondown(callback: (buttonPressed: Xbox360Button) => void): void;
|
|
|
- onbuttonup(callback: (buttonReleased: Xbox360Button) => void): void;
|
|
|
- ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void): void;
|
|
|
- ondpadup(callback: (dPadReleased: Xbox360Dpad) => void): void;
|
|
|
- private _setButtonValue(newValue, currentValue, buttonType);
|
|
|
- private _setDPadValue(newValue, currentValue, buttonType);
|
|
|
- buttonA: number;
|
|
|
- buttonB: number;
|
|
|
- buttonX: number;
|
|
|
- buttonY: number;
|
|
|
- buttonStart: number;
|
|
|
- buttonBack: number;
|
|
|
- buttonLB: number;
|
|
|
- buttonRB: number;
|
|
|
- buttonLeftStick: number;
|
|
|
- buttonRightStick: number;
|
|
|
- dPadUp: number;
|
|
|
- dPadDown: number;
|
|
|
- dPadLeft: number;
|
|
|
- dPadRight: number;
|
|
|
- update(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
/**
|
|
|
* Highlight layer options. This helps customizing the behaviour
|
|
|
* of the highlight layer.
|
|
@@ -4947,6 +4943,158 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class StickValues {
|
|
|
+ x: any;
|
|
|
+ y: any;
|
|
|
+ constructor(x: any, y: any);
|
|
|
+ }
|
|
|
+ interface GamepadButtonChanges {
|
|
|
+ changed: boolean;
|
|
|
+ pressChanged: boolean;
|
|
|
+ touchChanged: boolean;
|
|
|
+ valueChanged: boolean;
|
|
|
+ }
|
|
|
+ class Gamepad {
|
|
|
+ id: string;
|
|
|
+ index: number;
|
|
|
+ browserGamepad: any;
|
|
|
+ type: number;
|
|
|
+ private _leftStick;
|
|
|
+ private _rightStick;
|
|
|
+ _isConnected: boolean;
|
|
|
+ private _leftStickAxisX;
|
|
|
+ private _leftStickAxisY;
|
|
|
+ private _rightStickAxisX;
|
|
|
+ private _rightStickAxisY;
|
|
|
+ private _onleftstickchanged;
|
|
|
+ private _onrightstickchanged;
|
|
|
+ static GAMEPAD: number;
|
|
|
+ static GENERIC: number;
|
|
|
+ static XBOX: number;
|
|
|
+ static POSE_ENABLED: number;
|
|
|
+ readonly isConnected: boolean;
|
|
|
+ constructor(id: string, index: number, browserGamepad: any, leftStickX?: number, leftStickY?: number, rightStickX?: number, rightStickY?: number);
|
|
|
+ onleftstickchanged(callback: (values: StickValues) => void): void;
|
|
|
+ onrightstickchanged(callback: (values: StickValues) => void): void;
|
|
|
+ leftStick: StickValues;
|
|
|
+ rightStick: StickValues;
|
|
|
+ update(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+ class GenericPad extends Gamepad {
|
|
|
+ private _buttons;
|
|
|
+ private _onbuttondown;
|
|
|
+ private _onbuttonup;
|
|
|
+ onButtonDownObservable: Observable<number>;
|
|
|
+ onButtonUpObservable: Observable<number>;
|
|
|
+ onbuttondown(callback: (buttonPressed: number) => void): void;
|
|
|
+ onbuttonup(callback: (buttonReleased: number) => void): void;
|
|
|
+ constructor(id: string, index: number, browserGamepad: any);
|
|
|
+ private _setButtonValue(newValue, currentValue, buttonIndex);
|
|
|
+ update(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class GamepadManager {
|
|
|
+ private _babylonGamepads;
|
|
|
+ private _oneGamepadConnected;
|
|
|
+ private _isMonitoring;
|
|
|
+ private _gamepadEventSupported;
|
|
|
+ private _gamepadSupport;
|
|
|
+ onGamepadConnectedObservable: Observable<Gamepad>;
|
|
|
+ onGamepadDisconnectedObservable: Observable<Gamepad>;
|
|
|
+ private _onGamepadConnectedEvent;
|
|
|
+ private _onGamepadDisconnectedEvent;
|
|
|
+ constructor();
|
|
|
+ readonly gamepads: Gamepad[];
|
|
|
+ getGamepadByType(type?: number): Gamepad;
|
|
|
+ dispose(): void;
|
|
|
+ private _addNewGamepad(gamepad);
|
|
|
+ private _startMonitoringGamepads();
|
|
|
+ private _stopMonitoringGamepads();
|
|
|
+ private _checkGamepadsStatus();
|
|
|
+ private _updateGamepadObjects();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ enum Xbox360Button {
|
|
|
+ A = 0,
|
|
|
+ B = 1,
|
|
|
+ X = 2,
|
|
|
+ Y = 3,
|
|
|
+ Start = 4,
|
|
|
+ Back = 5,
|
|
|
+ LB = 6,
|
|
|
+ RB = 7,
|
|
|
+ LeftStick = 8,
|
|
|
+ RightStick = 9,
|
|
|
+ }
|
|
|
+ enum Xbox360Dpad {
|
|
|
+ Up = 0,
|
|
|
+ Down = 1,
|
|
|
+ Left = 2,
|
|
|
+ Right = 3,
|
|
|
+ }
|
|
|
+ class Xbox360Pad extends Gamepad {
|
|
|
+ private _leftTrigger;
|
|
|
+ private _rightTrigger;
|
|
|
+ private _onlefttriggerchanged;
|
|
|
+ private _onrighttriggerchanged;
|
|
|
+ private _onbuttondown;
|
|
|
+ private _onbuttonup;
|
|
|
+ private _ondpaddown;
|
|
|
+ private _ondpadup;
|
|
|
+ onButtonDownObservable: Observable<Xbox360Button>;
|
|
|
+ onButtonUpObservable: Observable<Xbox360Button>;
|
|
|
+ onPadDownObservable: Observable<Xbox360Dpad>;
|
|
|
+ onPadUpObservable: Observable<Xbox360Dpad>;
|
|
|
+ private _buttonA;
|
|
|
+ private _buttonB;
|
|
|
+ private _buttonX;
|
|
|
+ private _buttonY;
|
|
|
+ private _buttonBack;
|
|
|
+ private _buttonStart;
|
|
|
+ private _buttonLB;
|
|
|
+ private _buttonRB;
|
|
|
+ private _buttonLeftStick;
|
|
|
+ private _buttonRightStick;
|
|
|
+ private _dPadUp;
|
|
|
+ private _dPadDown;
|
|
|
+ private _dPadLeft;
|
|
|
+ private _dPadRight;
|
|
|
+ private _isXboxOnePad;
|
|
|
+ constructor(id: string, index: number, gamepad: any, xboxOne?: boolean);
|
|
|
+ onlefttriggerchanged(callback: (value: number) => void): void;
|
|
|
+ onrighttriggerchanged(callback: (value: number) => void): void;
|
|
|
+ leftTrigger: number;
|
|
|
+ rightTrigger: number;
|
|
|
+ onbuttondown(callback: (buttonPressed: Xbox360Button) => void): void;
|
|
|
+ onbuttonup(callback: (buttonReleased: Xbox360Button) => void): void;
|
|
|
+ ondpaddown(callback: (dPadPressed: Xbox360Dpad) => void): void;
|
|
|
+ ondpadup(callback: (dPadReleased: Xbox360Dpad) => void): void;
|
|
|
+ private _setButtonValue(newValue, currentValue, buttonType);
|
|
|
+ private _setDPadValue(newValue, currentValue, buttonType);
|
|
|
+ buttonA: number;
|
|
|
+ buttonB: number;
|
|
|
+ buttonX: number;
|
|
|
+ buttonY: number;
|
|
|
+ buttonStart: number;
|
|
|
+ buttonBack: number;
|
|
|
+ buttonLB: number;
|
|
|
+ buttonRB: number;
|
|
|
+ buttonLeftStick: number;
|
|
|
+ buttonRightStick: number;
|
|
|
+ dPadUp: number;
|
|
|
+ dPadDown: number;
|
|
|
+ dPadLeft: number;
|
|
|
+ dPadRight: number;
|
|
|
+ update(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class DirectionalLight extends ShadowLight {
|
|
|
private _shadowFrustumSize;
|
|
|
/**
|
|
@@ -6235,8 +6383,11 @@ declare module BABYLON {
|
|
|
*/
|
|
|
onUnBindObservable: Observable<Material>;
|
|
|
alphaMode: number;
|
|
|
+ private _needDepthPrePass;
|
|
|
needDepthPrePass: boolean;
|
|
|
disableDepthWrite: boolean;
|
|
|
+ forceDepthWrite: boolean;
|
|
|
+ separateCullingPass: boolean;
|
|
|
private _fogEnabled;
|
|
|
fogEnabled: boolean;
|
|
|
pointSize: number;
|
|
@@ -9100,21 +9251,85 @@ declare module BABYLON {
|
|
|
static getSphericalPolynomialFromHarmonics(harmonics: SphericalHarmonics): SphericalPolynomial;
|
|
|
scale(scale: number): void;
|
|
|
}
|
|
|
- class SphericalHarmonics {
|
|
|
- L00: Vector3;
|
|
|
- L1_1: Vector3;
|
|
|
- L10: Vector3;
|
|
|
- L11: Vector3;
|
|
|
- L2_2: Vector3;
|
|
|
- L2_1: Vector3;
|
|
|
- L20: Vector3;
|
|
|
- L21: Vector3;
|
|
|
- L22: Vector3;
|
|
|
- addLight(direction: Vector3, color: Color3, deltaSolidAngle: number): void;
|
|
|
- scale(scale: number): void;
|
|
|
- convertIncidentRadianceToIrradiance(): void;
|
|
|
- convertIrradianceToLambertianRadiance(): void;
|
|
|
- static getsphericalHarmonicsFromPolynomial(polynomial: SphericalPolynomial): SphericalHarmonics;
|
|
|
+ class SphericalHarmonics {
|
|
|
+ L00: Vector3;
|
|
|
+ L1_1: Vector3;
|
|
|
+ L10: Vector3;
|
|
|
+ L11: Vector3;
|
|
|
+ L2_2: Vector3;
|
|
|
+ L2_1: Vector3;
|
|
|
+ L20: Vector3;
|
|
|
+ L21: Vector3;
|
|
|
+ L22: Vector3;
|
|
|
+ addLight(direction: Vector3, color: Color3, deltaSolidAngle: number): void;
|
|
|
+ scale(scale: number): void;
|
|
|
+ convertIncidentRadianceToIrradiance(): void;
|
|
|
+ convertIrradianceToLambertianRadiance(): void;
|
|
|
+ static getsphericalHarmonicsFromPolynomial(polynomial: SphericalPolynomial): SphericalHarmonics;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class MorphTarget {
|
|
|
+ name: string;
|
|
|
+ animations: Animation[];
|
|
|
+ private _positions;
|
|
|
+ private _normals;
|
|
|
+ private _tangents;
|
|
|
+ private _influence;
|
|
|
+ onInfluenceChanged: Observable<boolean>;
|
|
|
+ influence: number;
|
|
|
+ constructor(name: string, influence?: number);
|
|
|
+ readonly hasNormals: boolean;
|
|
|
+ readonly hasTangents: boolean;
|
|
|
+ setPositions(data: Float32Array | number[]): void;
|
|
|
+ getPositions(): Float32Array;
|
|
|
+ setNormals(data: Float32Array | number[]): void;
|
|
|
+ getNormals(): Float32Array;
|
|
|
+ setTangents(data: Float32Array | number[]): void;
|
|
|
+ getTangents(): Float32Array;
|
|
|
+ /**
|
|
|
+ * Serializes the current target into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ static Parse(serializationObject: any): MorphTarget;
|
|
|
+ static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class MorphTargetManager {
|
|
|
+ private _targets;
|
|
|
+ private _targetObservable;
|
|
|
+ private _activeTargets;
|
|
|
+ private _scene;
|
|
|
+ private _influences;
|
|
|
+ private _supportsNormals;
|
|
|
+ private _supportsTangents;
|
|
|
+ private _vertexCount;
|
|
|
+ private _uniqueId;
|
|
|
+ private _tempInfluences;
|
|
|
+ constructor(scene?: Scene);
|
|
|
+ readonly uniqueId: number;
|
|
|
+ readonly vertexCount: number;
|
|
|
+ readonly supportsNormals: boolean;
|
|
|
+ readonly supportsTangents: boolean;
|
|
|
+ readonly numTargets: number;
|
|
|
+ readonly numInfluencers: number;
|
|
|
+ readonly influences: Float32Array;
|
|
|
+ getActiveTarget(index: number): MorphTarget;
|
|
|
+ getTarget(index: number): MorphTarget;
|
|
|
+ addTarget(target: MorphTarget): void;
|
|
|
+ removeTarget(target: MorphTarget): void;
|
|
|
+ /**
|
|
|
+ * Serializes the current manager into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ private _onInfluenceChanged(needUpdate);
|
|
|
+ private _syncActiveTargets(needUpdate);
|
|
|
+ static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -12546,70 +12761,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class MorphTarget {
|
|
|
- name: string;
|
|
|
- animations: Animation[];
|
|
|
- private _positions;
|
|
|
- private _normals;
|
|
|
- private _tangents;
|
|
|
- private _influence;
|
|
|
- onInfluenceChanged: Observable<boolean>;
|
|
|
- influence: number;
|
|
|
- constructor(name: string, influence?: number);
|
|
|
- readonly hasNormals: boolean;
|
|
|
- readonly hasTangents: boolean;
|
|
|
- setPositions(data: Float32Array | number[]): void;
|
|
|
- getPositions(): Float32Array;
|
|
|
- setNormals(data: Float32Array | number[]): void;
|
|
|
- getNormals(): Float32Array;
|
|
|
- setTangents(data: Float32Array | number[]): void;
|
|
|
- getTangents(): Float32Array;
|
|
|
- /**
|
|
|
- * Serializes the current target into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- static Parse(serializationObject: any): MorphTarget;
|
|
|
- static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class MorphTargetManager {
|
|
|
- private _targets;
|
|
|
- private _targetObservable;
|
|
|
- private _activeTargets;
|
|
|
- private _scene;
|
|
|
- private _influences;
|
|
|
- private _supportsNormals;
|
|
|
- private _supportsTangents;
|
|
|
- private _vertexCount;
|
|
|
- private _uniqueId;
|
|
|
- private _tempInfluences;
|
|
|
- constructor(scene?: Scene);
|
|
|
- readonly uniqueId: number;
|
|
|
- readonly vertexCount: number;
|
|
|
- readonly supportsNormals: boolean;
|
|
|
- readonly supportsTangents: boolean;
|
|
|
- readonly numTargets: number;
|
|
|
- readonly numInfluencers: number;
|
|
|
- readonly influences: Float32Array;
|
|
|
- getActiveTarget(index: number): MorphTarget;
|
|
|
- getTarget(index: number): MorphTarget;
|
|
|
- addTarget(target: MorphTarget): void;
|
|
|
- removeTarget(target: MorphTarget): void;
|
|
|
- /**
|
|
|
- * Serializes the current manager into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- private _onInfluenceChanged(needUpdate);
|
|
|
- private _syncActiveTargets(needUpdate);
|
|
|
- static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class GPUParticleSystem implements IDisposable, IParticleSystem {
|
|
|
name: string;
|
|
|
id: string;
|
|
@@ -13236,10 +13387,11 @@ declare module BABYLON {
|
|
|
getBoundingInfo?(): BoundingInfo;
|
|
|
computeWorldMatrix?(force: boolean): void;
|
|
|
getWorldMatrix?(): Matrix;
|
|
|
- getChildMeshes?(): Array<AbstractMesh>;
|
|
|
+ getChildMeshes?(directDecendantsOnly?: boolean): Array<AbstractMesh>;
|
|
|
getVerticesData?(kind: string): Array<number> | Float32Array;
|
|
|
getIndices?(): IndicesArray;
|
|
|
getScene?(): Scene;
|
|
|
+ getAbsolutePosition(): Vector3;
|
|
|
}
|
|
|
class PhysicsImpostor {
|
|
|
object: IPhysicsEnabledObject;
|
|
@@ -14428,134 +14580,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class AxesViewer {
|
|
|
- private _xline;
|
|
|
- private _yline;
|
|
|
- private _zline;
|
|
|
- private _xmesh;
|
|
|
- private _ymesh;
|
|
|
- private _zmesh;
|
|
|
- scene: Scene;
|
|
|
- scaleLines: number;
|
|
|
- constructor(scene: Scene, scaleLines?: number);
|
|
|
- update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
- mesh: Mesh;
|
|
|
- bone: Bone;
|
|
|
- pos: Vector3;
|
|
|
- xaxis: Vector3;
|
|
|
- yaxis: Vector3;
|
|
|
- zaxis: Vector3;
|
|
|
- constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
- update(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class DebugLayer {
|
|
|
- private _scene;
|
|
|
- static InspectorURL: string;
|
|
|
- private _inspector;
|
|
|
- constructor(scene: Scene);
|
|
|
- /** Creates the inspector window. */
|
|
|
- private _createInspector(config?);
|
|
|
- isVisible(): boolean;
|
|
|
- hide(): void;
|
|
|
- show(config?: {
|
|
|
- popup?: boolean;
|
|
|
- initialTab?: number;
|
|
|
- parentElement?: HTMLElement;
|
|
|
- newColors?: {
|
|
|
- backgroundColor?: string;
|
|
|
- backgroundColorLighter?: string;
|
|
|
- backgroundColorLighter2?: string;
|
|
|
- backgroundColorLighter3?: string;
|
|
|
- color?: string;
|
|
|
- colorTop?: string;
|
|
|
- colorBot?: string;
|
|
|
- };
|
|
|
- }): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class PhysicsViewer {
|
|
|
- protected _impostors: Array<PhysicsImpostor>;
|
|
|
- protected _meshes: Array<AbstractMesh>;
|
|
|
- protected _scene: Scene;
|
|
|
- protected _numMeshes: number;
|
|
|
- protected _physicsEnginePlugin: IPhysicsEnginePlugin;
|
|
|
- private _renderFunction;
|
|
|
- private _debugBoxMesh;
|
|
|
- private _debugSphereMesh;
|
|
|
- private _debugMaterial;
|
|
|
- constructor(scene: Scene);
|
|
|
- protected _updateDebugMeshes(): void;
|
|
|
- showImpostor(impostor: PhysicsImpostor): void;
|
|
|
- hideImpostor(impostor: PhysicsImpostor): void;
|
|
|
- private _getDebugMaterial(scene);
|
|
|
- private _getDebugBoxMesh(scene);
|
|
|
- private _getDebugSphereMesh(scene);
|
|
|
- private _getDebugMesh(impostor, scene);
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class RayHelper {
|
|
|
- ray: Ray;
|
|
|
- private _renderPoints;
|
|
|
- private _renderLine;
|
|
|
- private _renderFunction;
|
|
|
- private _scene;
|
|
|
- private _updateToMeshFunction;
|
|
|
- private _attachedToMesh;
|
|
|
- private _meshSpaceDirection;
|
|
|
- private _meshSpaceOrigin;
|
|
|
- static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
- constructor(ray: Ray);
|
|
|
- show(scene: Scene, color: Color3): void;
|
|
|
- hide(): void;
|
|
|
- private _render();
|
|
|
- attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
- detachFromMesh(): void;
|
|
|
- private _updateToMesh();
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- /**
|
|
|
- * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
- */
|
|
|
- class SkeletonViewer {
|
|
|
- skeleton: Skeleton;
|
|
|
- mesh: AbstractMesh;
|
|
|
- autoUpdateBonesMatrices: boolean;
|
|
|
- renderingGroupId: number;
|
|
|
- color: Color3;
|
|
|
- private _scene;
|
|
|
- private _debugLines;
|
|
|
- private _debugMesh;
|
|
|
- private _isEnabled;
|
|
|
- private _renderFunction;
|
|
|
- constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
- isEnabled: boolean;
|
|
|
- private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
- private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
- private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
- update(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module BABYLON.Internals {
|
|
|
class _AlphaState {
|
|
|
private _isAlphaBlendDirty;
|
|
@@ -15551,6 +15575,13 @@ declare module BABYLON {
|
|
|
static BaseUrl: string;
|
|
|
static CorsBehavior: any;
|
|
|
static UseFallbackTexture: boolean;
|
|
|
+ /**
|
|
|
+ * Use this object to register external classes like custom textures or material
|
|
|
+ * to allow the laoders to instantiate them
|
|
|
+ */
|
|
|
+ static RegisteredExternalClasses: {
|
|
|
+ [key: string]: Object;
|
|
|
+ };
|
|
|
private static fallbackTexture;
|
|
|
/**
|
|
|
* Interpolates between a and b via alpha
|
|
@@ -16223,14 +16254,33 @@ declare module BABYLON {
|
|
|
private _scene;
|
|
|
private _position;
|
|
|
private _btnVR;
|
|
|
- private _webVRsupportedAndReady;
|
|
|
+ private _webVRsupported;
|
|
|
+ private _webVRready;
|
|
|
+ private _webVRrequesting;
|
|
|
+ private _webVRpresenting;
|
|
|
+ private _fullscreenVRpresenting;
|
|
|
private _canvas;
|
|
|
- private _isInVRMode;
|
|
|
private _webVRCamera;
|
|
|
private _vrDeviceOrientationCamera;
|
|
|
private _deviceOrientationCamera;
|
|
|
+ private _onKeyDown;
|
|
|
+ private _onVrDisplayPresentChange;
|
|
|
+ private _onVRDisplayChanged;
|
|
|
+ private _onVRRequestPresentStart;
|
|
|
+ private _onVRRequestPresentComplete;
|
|
|
constructor(scene: Scene, webVROptions?: WebVROptions);
|
|
|
+ private isInVRMode();
|
|
|
+ private onVrDisplayPresentChange();
|
|
|
+ private onVRDisplayChanged(eventArgs);
|
|
|
+ private updateButtonVisibility();
|
|
|
+ /**
|
|
|
+ * Attempt to enter VR. If a headset is connected and ready, will request present on that.
|
|
|
+ * Otherwise, will use the fullscreen API.
|
|
|
+ */
|
|
|
enterVR(): void;
|
|
|
+ /**
|
|
|
+ * Attempt to exit VR, or fullscreen.
|
|
|
+ */
|
|
|
exitVR(): void;
|
|
|
position: Vector3;
|
|
|
dispose(): void;
|
|
@@ -16276,7 +16326,7 @@ declare module BABYLON {
|
|
|
private webVROptions;
|
|
|
_vrDevice: any;
|
|
|
rawPose: DevicePose;
|
|
|
- private _vrEnabled;
|
|
|
+ private _onVREnabled;
|
|
|
private _specsVersion;
|
|
|
private _attached;
|
|
|
private _oldSize;
|
|
@@ -16293,6 +16343,7 @@ declare module BABYLON {
|
|
|
rigParenting: boolean;
|
|
|
private _lightOnControllers;
|
|
|
constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
+ dispose(): void;
|
|
|
getControllerByName(name: string): WebVRController;
|
|
|
private _leftController;
|
|
|
readonly leftController: WebVRController;
|
|
@@ -16393,6 +16444,7 @@ declare module BABYLON {
|
|
|
pinchPrecision: number;
|
|
|
panningSensibility: number;
|
|
|
multiTouchPanning: boolean;
|
|
|
+ multiTouchPanAndZoom: boolean;
|
|
|
private _isPanClick;
|
|
|
pinchInwards: boolean;
|
|
|
private _pointerInput;
|
|
@@ -18434,6 +18486,7 @@ declare module BABYLON {
|
|
|
private _physicsMaterials;
|
|
|
private _fixedTimeStep;
|
|
|
private _currentCollisionGroup;
|
|
|
+ BJSCANNON: any;
|
|
|
constructor(_useDeltaForWorldStep?: boolean, iterations?: number);
|
|
|
setGravity(gravity: Vector3): void;
|
|
|
setTimeStep(timeStep: number): void;
|
|
@@ -18489,6 +18542,7 @@ declare module BABYLON {
|
|
|
class OimoJSPlugin implements IPhysicsEnginePlugin {
|
|
|
world: any;
|
|
|
name: string;
|
|
|
+ BJSOIMO: any;
|
|
|
constructor(iterations?: number);
|
|
|
setGravity(gravity: Vector3): void;
|
|
|
setTimeStep(timeStep: number): void;
|