|
@@ -1196,6 +1196,169 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class Animatable {
|
|
|
+ target: any;
|
|
|
+ fromFrame: number;
|
|
|
+ toFrame: number;
|
|
|
+ loopAnimation: boolean;
|
|
|
+ speedRatio: number;
|
|
|
+ onAnimationEnd: any;
|
|
|
+ private _localDelayOffset;
|
|
|
+ private _pausedDelay;
|
|
|
+ private _animations;
|
|
|
+ private _paused;
|
|
|
+ private _scene;
|
|
|
+ animationStarted: boolean;
|
|
|
+ constructor(scene: Scene, target: any, fromFrame?: number, toFrame?: number, loopAnimation?: boolean, speedRatio?: number, onAnimationEnd?: any, animations?: any);
|
|
|
+ getAnimations(): Animation[];
|
|
|
+ appendAnimations(target: any, animations: Animation[]): void;
|
|
|
+ getAnimationByTargetProperty(property: string): Animation;
|
|
|
+ reset(): void;
|
|
|
+ pause(): void;
|
|
|
+ restart(): void;
|
|
|
+ stop(): void;
|
|
|
+ _animate(delay: number): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class AnimationRange {
|
|
|
+ name: string;
|
|
|
+ from: number;
|
|
|
+ to: number;
|
|
|
+ constructor(name: string, from: number, to: number);
|
|
|
+ }
|
|
|
+ class Animation {
|
|
|
+ name: string;
|
|
|
+ targetProperty: string;
|
|
|
+ framePerSecond: number;
|
|
|
+ dataType: number;
|
|
|
+ loopMode: number;
|
|
|
+ private _keys;
|
|
|
+ private _offsetsCache;
|
|
|
+ private _highLimitsCache;
|
|
|
+ private _stopped;
|
|
|
+ _target: any;
|
|
|
+ private _easingFunction;
|
|
|
+ targetPropertyPath: string[];
|
|
|
+ currentFrame: number;
|
|
|
+ allowMatricesInterpolation: boolean;
|
|
|
+ private _ranges;
|
|
|
+ static CreateAndStartAnimation(name: string, mesh: AbstractMesh, targetProperty: string, framePerSecond: number, totalFrame: number, from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Animatable;
|
|
|
+ constructor(name: string, targetProperty: string, framePerSecond: number, dataType: number, loopMode?: number);
|
|
|
+ createRange(name: string, from: number, to: number): void;
|
|
|
+ deleteRange(name: string): void;
|
|
|
+ getRange(name: string): AnimationRange;
|
|
|
+ reset(): void;
|
|
|
+ isStopped(): boolean;
|
|
|
+ getKeys(): any[];
|
|
|
+ getEasingFunction(): IEasingFunction;
|
|
|
+ setEasingFunction(easingFunction: EasingFunction): void;
|
|
|
+ floatInterpolateFunction(startValue: number, endValue: number, gradient: number): number;
|
|
|
+ quaternionInterpolateFunction(startValue: Quaternion, endValue: Quaternion, gradient: number): Quaternion;
|
|
|
+ vector3InterpolateFunction(startValue: Vector3, endValue: Vector3, gradient: number): Vector3;
|
|
|
+ vector2InterpolateFunction(startValue: Vector2, endValue: Vector2, gradient: number): Vector2;
|
|
|
+ color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
|
|
|
+ matrixInterpolateFunction(startValue: Matrix, endValue: Matrix, gradient: number): Matrix;
|
|
|
+ clone(): Animation;
|
|
|
+ setKeys(values: Array<any>): void;
|
|
|
+ private _getKeyValue(value);
|
|
|
+ private _interpolate(currentFrame, repeatCount, loopMode, offsetValue?, highLimitValue?);
|
|
|
+ animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number): boolean;
|
|
|
+ private static _ANIMATIONTYPE_FLOAT;
|
|
|
+ private static _ANIMATIONTYPE_VECTOR3;
|
|
|
+ private static _ANIMATIONTYPE_QUATERNION;
|
|
|
+ private static _ANIMATIONTYPE_MATRIX;
|
|
|
+ private static _ANIMATIONTYPE_COLOR3;
|
|
|
+ private static _ANIMATIONTYPE_VECTOR2;
|
|
|
+ private static _ANIMATIONLOOPMODE_RELATIVE;
|
|
|
+ private static _ANIMATIONLOOPMODE_CYCLE;
|
|
|
+ private static _ANIMATIONLOOPMODE_CONSTANT;
|
|
|
+ static ANIMATIONTYPE_FLOAT: number;
|
|
|
+ static ANIMATIONTYPE_VECTOR3: number;
|
|
|
+ static ANIMATIONTYPE_VECTOR2: number;
|
|
|
+ static ANIMATIONTYPE_QUATERNION: number;
|
|
|
+ static ANIMATIONTYPE_MATRIX: number;
|
|
|
+ static ANIMATIONTYPE_COLOR3: number;
|
|
|
+ static ANIMATIONLOOPMODE_RELATIVE: number;
|
|
|
+ static ANIMATIONLOOPMODE_CYCLE: number;
|
|
|
+ static ANIMATIONLOOPMODE_CONSTANT: number;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ interface IEasingFunction {
|
|
|
+ ease(gradient: number): number;
|
|
|
+ }
|
|
|
+ class EasingFunction implements IEasingFunction {
|
|
|
+ private static _EASINGMODE_EASEIN;
|
|
|
+ private static _EASINGMODE_EASEOUT;
|
|
|
+ private static _EASINGMODE_EASEINOUT;
|
|
|
+ static EASINGMODE_EASEIN: number;
|
|
|
+ static EASINGMODE_EASEOUT: number;
|
|
|
+ static EASINGMODE_EASEINOUT: number;
|
|
|
+ private _easingMode;
|
|
|
+ setEasingMode(easingMode: number): void;
|
|
|
+ getEasingMode(): number;
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ ease(gradient: number): number;
|
|
|
+ }
|
|
|
+ class CircleEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class BackEase extends EasingFunction implements IEasingFunction {
|
|
|
+ amplitude: number;
|
|
|
+ constructor(amplitude?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class BounceEase extends EasingFunction implements IEasingFunction {
|
|
|
+ bounces: number;
|
|
|
+ bounciness: number;
|
|
|
+ constructor(bounces?: number, bounciness?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class CubicEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class ElasticEase extends EasingFunction implements IEasingFunction {
|
|
|
+ oscillations: number;
|
|
|
+ springiness: number;
|
|
|
+ constructor(oscillations?: number, springiness?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class ExponentialEase extends EasingFunction implements IEasingFunction {
|
|
|
+ exponent: number;
|
|
|
+ constructor(exponent?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class PowerEase extends EasingFunction implements IEasingFunction {
|
|
|
+ power: number;
|
|
|
+ constructor(power?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class QuadraticEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class QuarticEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class QuinticEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class SineEase extends EasingFunction implements IEasingFunction {
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+ class BezierCurveEase extends EasingFunction implements IEasingFunction {
|
|
|
+ x1: number;
|
|
|
+ y1: number;
|
|
|
+ x2: number;
|
|
|
+ y2: number;
|
|
|
+ constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
|
|
+ easeInCore(gradient: number): number;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Analyser {
|
|
|
SMOOTHING: number;
|
|
|
FFT_SIZE: number;
|
|
@@ -1362,169 +1525,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Animatable {
|
|
|
- target: any;
|
|
|
- fromFrame: number;
|
|
|
- toFrame: number;
|
|
|
- loopAnimation: boolean;
|
|
|
- speedRatio: number;
|
|
|
- onAnimationEnd: any;
|
|
|
- private _localDelayOffset;
|
|
|
- private _pausedDelay;
|
|
|
- private _animations;
|
|
|
- private _paused;
|
|
|
- private _scene;
|
|
|
- animationStarted: boolean;
|
|
|
- constructor(scene: Scene, target: any, fromFrame?: number, toFrame?: number, loopAnimation?: boolean, speedRatio?: number, onAnimationEnd?: any, animations?: any);
|
|
|
- getAnimations(): Animation[];
|
|
|
- appendAnimations(target: any, animations: Animation[]): void;
|
|
|
- getAnimationByTargetProperty(property: string): Animation;
|
|
|
- reset(): void;
|
|
|
- pause(): void;
|
|
|
- restart(): void;
|
|
|
- stop(): void;
|
|
|
- _animate(delay: number): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class AnimationRange {
|
|
|
- name: string;
|
|
|
- from: number;
|
|
|
- to: number;
|
|
|
- constructor(name: string, from: number, to: number);
|
|
|
- }
|
|
|
- class Animation {
|
|
|
- name: string;
|
|
|
- targetProperty: string;
|
|
|
- framePerSecond: number;
|
|
|
- dataType: number;
|
|
|
- loopMode: number;
|
|
|
- private _keys;
|
|
|
- private _offsetsCache;
|
|
|
- private _highLimitsCache;
|
|
|
- private _stopped;
|
|
|
- _target: any;
|
|
|
- private _easingFunction;
|
|
|
- targetPropertyPath: string[];
|
|
|
- currentFrame: number;
|
|
|
- allowMatricesInterpolation: boolean;
|
|
|
- private _ranges;
|
|
|
- static CreateAndStartAnimation(name: string, mesh: AbstractMesh, targetProperty: string, framePerSecond: number, totalFrame: number, from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Animatable;
|
|
|
- constructor(name: string, targetProperty: string, framePerSecond: number, dataType: number, loopMode?: number);
|
|
|
- createRange(name: string, from: number, to: number): void;
|
|
|
- deleteRange(name: string): void;
|
|
|
- getRange(name: string): AnimationRange;
|
|
|
- reset(): void;
|
|
|
- isStopped(): boolean;
|
|
|
- getKeys(): any[];
|
|
|
- getEasingFunction(): IEasingFunction;
|
|
|
- setEasingFunction(easingFunction: EasingFunction): void;
|
|
|
- floatInterpolateFunction(startValue: number, endValue: number, gradient: number): number;
|
|
|
- quaternionInterpolateFunction(startValue: Quaternion, endValue: Quaternion, gradient: number): Quaternion;
|
|
|
- vector3InterpolateFunction(startValue: Vector3, endValue: Vector3, gradient: number): Vector3;
|
|
|
- vector2InterpolateFunction(startValue: Vector2, endValue: Vector2, gradient: number): Vector2;
|
|
|
- color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
|
|
|
- matrixInterpolateFunction(startValue: Matrix, endValue: Matrix, gradient: number): Matrix;
|
|
|
- clone(): Animation;
|
|
|
- setKeys(values: Array<any>): void;
|
|
|
- private _getKeyValue(value);
|
|
|
- private _interpolate(currentFrame, repeatCount, loopMode, offsetValue?, highLimitValue?);
|
|
|
- animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number): boolean;
|
|
|
- private static _ANIMATIONTYPE_FLOAT;
|
|
|
- private static _ANIMATIONTYPE_VECTOR3;
|
|
|
- private static _ANIMATIONTYPE_QUATERNION;
|
|
|
- private static _ANIMATIONTYPE_MATRIX;
|
|
|
- private static _ANIMATIONTYPE_COLOR3;
|
|
|
- private static _ANIMATIONTYPE_VECTOR2;
|
|
|
- private static _ANIMATIONLOOPMODE_RELATIVE;
|
|
|
- private static _ANIMATIONLOOPMODE_CYCLE;
|
|
|
- private static _ANIMATIONLOOPMODE_CONSTANT;
|
|
|
- static ANIMATIONTYPE_FLOAT: number;
|
|
|
- static ANIMATIONTYPE_VECTOR3: number;
|
|
|
- static ANIMATIONTYPE_VECTOR2: number;
|
|
|
- static ANIMATIONTYPE_QUATERNION: number;
|
|
|
- static ANIMATIONTYPE_MATRIX: number;
|
|
|
- static ANIMATIONTYPE_COLOR3: number;
|
|
|
- static ANIMATIONLOOPMODE_RELATIVE: number;
|
|
|
- static ANIMATIONLOOPMODE_CYCLE: number;
|
|
|
- static ANIMATIONLOOPMODE_CONSTANT: number;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- interface IEasingFunction {
|
|
|
- ease(gradient: number): number;
|
|
|
- }
|
|
|
- class EasingFunction implements IEasingFunction {
|
|
|
- private static _EASINGMODE_EASEIN;
|
|
|
- private static _EASINGMODE_EASEOUT;
|
|
|
- private static _EASINGMODE_EASEINOUT;
|
|
|
- static EASINGMODE_EASEIN: number;
|
|
|
- static EASINGMODE_EASEOUT: number;
|
|
|
- static EASINGMODE_EASEINOUT: number;
|
|
|
- private _easingMode;
|
|
|
- setEasingMode(easingMode: number): void;
|
|
|
- getEasingMode(): number;
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- ease(gradient: number): number;
|
|
|
- }
|
|
|
- class CircleEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class BackEase extends EasingFunction implements IEasingFunction {
|
|
|
- amplitude: number;
|
|
|
- constructor(amplitude?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class BounceEase extends EasingFunction implements IEasingFunction {
|
|
|
- bounces: number;
|
|
|
- bounciness: number;
|
|
|
- constructor(bounces?: number, bounciness?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class CubicEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class ElasticEase extends EasingFunction implements IEasingFunction {
|
|
|
- oscillations: number;
|
|
|
- springiness: number;
|
|
|
- constructor(oscillations?: number, springiness?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class ExponentialEase extends EasingFunction implements IEasingFunction {
|
|
|
- exponent: number;
|
|
|
- constructor(exponent?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class PowerEase extends EasingFunction implements IEasingFunction {
|
|
|
- power: number;
|
|
|
- constructor(power?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class QuadraticEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class QuarticEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class QuinticEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class SineEase extends EasingFunction implements IEasingFunction {
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
- class BezierCurveEase extends EasingFunction implements IEasingFunction {
|
|
|
- x1: number;
|
|
|
- y1: number;
|
|
|
- x2: number;
|
|
|
- y2: number;
|
|
|
- constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
|
|
- easeInCore(gradient: number): number;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class Bone extends Node {
|
|
|
name: string;
|
|
|
children: Bone[];
|
|
@@ -2267,6 +2267,25 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class Layer {
|
|
|
+ name: string;
|
|
|
+ texture: Texture;
|
|
|
+ isBackground: boolean;
|
|
|
+ color: Color4;
|
|
|
+ onDispose: () => void;
|
|
|
+ private _scene;
|
|
|
+ private _vertexDeclaration;
|
|
|
+ private _vertexStrideSize;
|
|
|
+ private _vertexBuffer;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _effect;
|
|
|
+ constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
+ render(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class DebugLayer {
|
|
|
private _scene;
|
|
|
private _camera;
|
|
@@ -2324,25 +2343,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Layer {
|
|
|
- name: string;
|
|
|
- texture: Texture;
|
|
|
- isBackground: boolean;
|
|
|
- color: Color4;
|
|
|
- onDispose: () => void;
|
|
|
- private _scene;
|
|
|
- private _vertexDeclaration;
|
|
|
- private _vertexStrideSize;
|
|
|
- private _vertexBuffer;
|
|
|
- private _indexBuffer;
|
|
|
- private _effect;
|
|
|
- constructor(name: string, imgUrl: string, scene: Scene, isBackground?: boolean, color?: Color4);
|
|
|
- render(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class LensFlare {
|
|
|
size: number;
|
|
|
position: number;
|
|
@@ -2378,150 +2378,9 @@ declare module BABYLON {
|
|
|
setEmitter(newEmitter: any): void;
|
|
|
getEmitterPosition(): Vector3;
|
|
|
computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
- _isVisible(): boolean;
|
|
|
- render(): boolean;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class DirectionalLight extends Light implements IShadowLight {
|
|
|
- direction: Vector3;
|
|
|
- position: Vector3;
|
|
|
- private _transformedDirection;
|
|
|
- transformedPosition: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- shadowOrthoScale: number;
|
|
|
- autoUpdateExtends: boolean;
|
|
|
- private _orthoLeft;
|
|
|
- private _orthoRight;
|
|
|
- private _orthoTop;
|
|
|
- private _orthoBottom;
|
|
|
- constructor(name: string, direction: Vector3, scene: Scene);
|
|
|
- getAbsolutePosition(): Vector3;
|
|
|
- setDirectionToTarget(target: Vector3): Vector3;
|
|
|
- setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
- supportsVSM(): boolean;
|
|
|
- needRefreshPerFrame(): boolean;
|
|
|
- computeTransformedPosition(): boolean;
|
|
|
- transferToEffect(effect: Effect, directionUniformName: string): void;
|
|
|
- _getWorldMatrix(): Matrix;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class HemisphericLight extends Light {
|
|
|
- direction: Vector3;
|
|
|
- groundColor: Color3;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(name: string, direction: Vector3, scene: Scene);
|
|
|
- setDirectionToTarget(target: Vector3): Vector3;
|
|
|
- getShadowGenerator(): ShadowGenerator;
|
|
|
- transferToEffect(effect: Effect, directionUniformName: string, groundColorUniformName: string): void;
|
|
|
- _getWorldMatrix(): Matrix;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- interface IShadowLight {
|
|
|
- position: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- transformedPosition: Vector3;
|
|
|
- name: string;
|
|
|
- computeTransformedPosition(): boolean;
|
|
|
- getScene(): Scene;
|
|
|
- setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
- supportsVSM(): boolean;
|
|
|
- needRefreshPerFrame(): boolean;
|
|
|
- _shadowGenerator: ShadowGenerator;
|
|
|
- }
|
|
|
- class Light extends Node {
|
|
|
- diffuse: Color3;
|
|
|
- specular: Color3;
|
|
|
- intensity: number;
|
|
|
- range: number;
|
|
|
- includeOnlyWithLayerMask: number;
|
|
|
- includedOnlyMeshes: AbstractMesh[];
|
|
|
- excludedMeshes: AbstractMesh[];
|
|
|
- excludeWithLayerMask: number;
|
|
|
- _shadowGenerator: ShadowGenerator;
|
|
|
- private _parentedWorldMatrix;
|
|
|
- _excludedMeshesIds: string[];
|
|
|
- _includedOnlyMeshesIds: string[];
|
|
|
- constructor(name: string, scene: Scene);
|
|
|
- getShadowGenerator(): ShadowGenerator;
|
|
|
- getAbsolutePosition(): Vector3;
|
|
|
- transferToEffect(effect: Effect, uniformName0?: string, uniformName1?: string): void;
|
|
|
- _getWorldMatrix(): Matrix;
|
|
|
- canAffectMesh(mesh: AbstractMesh): boolean;
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class PointLight extends Light {
|
|
|
- position: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- private _transformedPosition;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene);
|
|
|
- getAbsolutePosition(): Vector3;
|
|
|
- transferToEffect(effect: Effect, positionUniformName: string): void;
|
|
|
- getShadowGenerator(): ShadowGenerator;
|
|
|
- _getWorldMatrix(): Matrix;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class SpotLight extends Light implements IShadowLight {
|
|
|
- position: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- angle: number;
|
|
|
- exponent: number;
|
|
|
- transformedPosition: Vector3;
|
|
|
- private _transformedDirection;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene: Scene);
|
|
|
- getAbsolutePosition(): Vector3;
|
|
|
- setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
- supportsVSM(): boolean;
|
|
|
- needRefreshPerFrame(): boolean;
|
|
|
- setDirectionToTarget(target: Vector3): Vector3;
|
|
|
- computeTransformedPosition(): boolean;
|
|
|
- transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
|
- _getWorldMatrix(): Matrix;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
- extensions: string;
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
- load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
- }
|
|
|
- class SceneLoader {
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
- private static _ShowLoadingScreen;
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
- private static _registeredPlugins;
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
- static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
- /**
|
|
|
- * Load a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
- */
|
|
|
- static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
- /**
|
|
|
- * Append a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param scene is the instance of BABYLON.Scene to append to
|
|
|
- */
|
|
|
- static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ _isVisible(): boolean;
|
|
|
+ render(): boolean;
|
|
|
+ dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2800,6 +2659,147 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
+ extensions: string;
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
+ }
|
|
|
+ class SceneLoader {
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
+ private static _registeredPlugins;
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
|
|
|
+ static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
|
|
|
+ /**
|
|
|
+ * Load a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
+ */
|
|
|
+ static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ /**
|
|
|
+ * Append a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param scene is the instance of BABYLON.Scene to append to
|
|
|
+ */
|
|
|
+ static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class DirectionalLight extends Light implements IShadowLight {
|
|
|
+ direction: Vector3;
|
|
|
+ position: Vector3;
|
|
|
+ private _transformedDirection;
|
|
|
+ transformedPosition: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ shadowOrthoScale: number;
|
|
|
+ autoUpdateExtends: boolean;
|
|
|
+ private _orthoLeft;
|
|
|
+ private _orthoRight;
|
|
|
+ private _orthoTop;
|
|
|
+ private _orthoBottom;
|
|
|
+ constructor(name: string, direction: Vector3, scene: Scene);
|
|
|
+ getAbsolutePosition(): Vector3;
|
|
|
+ setDirectionToTarget(target: Vector3): Vector3;
|
|
|
+ setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
+ supportsVSM(): boolean;
|
|
|
+ needRefreshPerFrame(): boolean;
|
|
|
+ computeTransformedPosition(): boolean;
|
|
|
+ transferToEffect(effect: Effect, directionUniformName: string): void;
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class HemisphericLight extends Light {
|
|
|
+ direction: Vector3;
|
|
|
+ groundColor: Color3;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(name: string, direction: Vector3, scene: Scene);
|
|
|
+ setDirectionToTarget(target: Vector3): Vector3;
|
|
|
+ getShadowGenerator(): ShadowGenerator;
|
|
|
+ transferToEffect(effect: Effect, directionUniformName: string, groundColorUniformName: string): void;
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ interface IShadowLight {
|
|
|
+ position: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ transformedPosition: Vector3;
|
|
|
+ name: string;
|
|
|
+ computeTransformedPosition(): boolean;
|
|
|
+ getScene(): Scene;
|
|
|
+ setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
+ supportsVSM(): boolean;
|
|
|
+ needRefreshPerFrame(): boolean;
|
|
|
+ _shadowGenerator: ShadowGenerator;
|
|
|
+ }
|
|
|
+ class Light extends Node {
|
|
|
+ diffuse: Color3;
|
|
|
+ specular: Color3;
|
|
|
+ intensity: number;
|
|
|
+ range: number;
|
|
|
+ includeOnlyWithLayerMask: number;
|
|
|
+ includedOnlyMeshes: AbstractMesh[];
|
|
|
+ excludedMeshes: AbstractMesh[];
|
|
|
+ excludeWithLayerMask: number;
|
|
|
+ _shadowGenerator: ShadowGenerator;
|
|
|
+ private _parentedWorldMatrix;
|
|
|
+ _excludedMeshesIds: string[];
|
|
|
+ _includedOnlyMeshesIds: string[];
|
|
|
+ constructor(name: string, scene: Scene);
|
|
|
+ getShadowGenerator(): ShadowGenerator;
|
|
|
+ getAbsolutePosition(): Vector3;
|
|
|
+ transferToEffect(effect: Effect, uniformName0?: string, uniformName1?: string): void;
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
+ canAffectMesh(mesh: AbstractMesh): boolean;
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class PointLight extends Light {
|
|
|
+ position: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ private _transformedPosition;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene);
|
|
|
+ getAbsolutePosition(): Vector3;
|
|
|
+ transferToEffect(effect: Effect, positionUniformName: string): void;
|
|
|
+ getShadowGenerator(): ShadowGenerator;
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class SpotLight extends Light implements IShadowLight {
|
|
|
+ position: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ angle: number;
|
|
|
+ exponent: number;
|
|
|
+ transformedPosition: Vector3;
|
|
|
+ private _transformedDirection;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene: Scene);
|
|
|
+ getAbsolutePosition(): Vector3;
|
|
|
+ setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void;
|
|
|
+ supportsVSM(): boolean;
|
|
|
+ needRefreshPerFrame(): boolean;
|
|
|
+ setDirectionToTarget(target: Vector3): Vector3;
|
|
|
+ computeTransformedPosition(): boolean;
|
|
|
+ transferToEffect(effect: Effect, positionUniformName: string, directionUniformName: string): void;
|
|
|
+ _getWorldMatrix(): Matrix;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class SIMDVector3 {
|
|
|
static TransformCoordinatesToRefSIMD(vector: Vector3, transformation: Matrix, result: Vector3): void;
|
|
|
static TransformCoordinatesFromFloatsToRefSIMD(x: number, y: number, z: number, transformation: Matrix, result: Vector3): void;
|
|
@@ -6322,62 +6322,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ShadowGenerator {
|
|
|
- private static _FILTER_NONE;
|
|
|
- private static _FILTER_VARIANCESHADOWMAP;
|
|
|
- private static _FILTER_POISSONSAMPLING;
|
|
|
- private static _FILTER_BLURVARIANCESHADOWMAP;
|
|
|
- static FILTER_NONE: number;
|
|
|
- static FILTER_VARIANCESHADOWMAP: number;
|
|
|
- static FILTER_POISSONSAMPLING: number;
|
|
|
- static FILTER_BLURVARIANCESHADOWMAP: number;
|
|
|
- private _filter;
|
|
|
- blurScale: number;
|
|
|
- private _blurBoxOffset;
|
|
|
- private _bias;
|
|
|
- private _lightDirection;
|
|
|
- bias: number;
|
|
|
- blurBoxOffset: number;
|
|
|
- filter: number;
|
|
|
- useVarianceShadowMap: boolean;
|
|
|
- usePoissonSampling: boolean;
|
|
|
- useBlurVarianceShadowMap: boolean;
|
|
|
- private _light;
|
|
|
- private _scene;
|
|
|
- private _shadowMap;
|
|
|
- private _shadowMap2;
|
|
|
- private _darkness;
|
|
|
- private _transparencyShadow;
|
|
|
- private _effect;
|
|
|
- private _viewMatrix;
|
|
|
- private _projectionMatrix;
|
|
|
- private _transformMatrix;
|
|
|
- private _worldViewProjection;
|
|
|
- private _cachedPosition;
|
|
|
- private _cachedDirection;
|
|
|
- private _cachedDefines;
|
|
|
- private _currentRenderID;
|
|
|
- private _downSamplePostprocess;
|
|
|
- private _boxBlurPostprocess;
|
|
|
- private _mapSize;
|
|
|
- constructor(mapSize: number, light: IShadowLight);
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
- getShadowMap(): RenderTargetTexture;
|
|
|
- getShadowMapForRendering(): RenderTargetTexture;
|
|
|
- getLight(): IShadowLight;
|
|
|
- getTransformMatrix(): Matrix;
|
|
|
- getDarkness(): number;
|
|
|
- setDarkness(darkness: number): void;
|
|
|
- setTransparencyShadow(hasShadow: boolean): void;
|
|
|
- private _packHalf(depth);
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Internals {
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class BaseTexture {
|
|
|
name: string;
|
|
|
delayLoadState: number;
|
|
@@ -6524,6 +6468,7 @@ declare module BABYLON {
|
|
|
static PROJECTION_MODE: number;
|
|
|
static SKYBOX_MODE: number;
|
|
|
static INVCUBIC_MODE: number;
|
|
|
+ static EQUIRECTANGULAR_MODE: number;
|
|
|
static CLAMP_ADDRESSMODE: number;
|
|
|
static WRAP_ADDRESSMODE: number;
|
|
|
static MIRROR_ADDRESSMODE: number;
|
|
@@ -6575,6 +6520,62 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Internals {
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class ShadowGenerator {
|
|
|
+ private static _FILTER_NONE;
|
|
|
+ private static _FILTER_VARIANCESHADOWMAP;
|
|
|
+ private static _FILTER_POISSONSAMPLING;
|
|
|
+ private static _FILTER_BLURVARIANCESHADOWMAP;
|
|
|
+ static FILTER_NONE: number;
|
|
|
+ static FILTER_VARIANCESHADOWMAP: number;
|
|
|
+ static FILTER_POISSONSAMPLING: number;
|
|
|
+ static FILTER_BLURVARIANCESHADOWMAP: number;
|
|
|
+ private _filter;
|
|
|
+ blurScale: number;
|
|
|
+ private _blurBoxOffset;
|
|
|
+ private _bias;
|
|
|
+ private _lightDirection;
|
|
|
+ bias: number;
|
|
|
+ blurBoxOffset: number;
|
|
|
+ filter: number;
|
|
|
+ useVarianceShadowMap: boolean;
|
|
|
+ usePoissonSampling: boolean;
|
|
|
+ useBlurVarianceShadowMap: boolean;
|
|
|
+ private _light;
|
|
|
+ private _scene;
|
|
|
+ private _shadowMap;
|
|
|
+ private _shadowMap2;
|
|
|
+ private _darkness;
|
|
|
+ private _transparencyShadow;
|
|
|
+ private _effect;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _transformMatrix;
|
|
|
+ private _worldViewProjection;
|
|
|
+ private _cachedPosition;
|
|
|
+ private _cachedDirection;
|
|
|
+ private _cachedDefines;
|
|
|
+ private _currentRenderID;
|
|
|
+ private _downSamplePostprocess;
|
|
|
+ private _boxBlurPostprocess;
|
|
|
+ private _mapSize;
|
|
|
+ constructor(mapSize: number, light: IShadowLight);
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
+ getShadowMap(): RenderTargetTexture;
|
|
|
+ getShadowMapForRendering(): RenderTargetTexture;
|
|
|
+ getLight(): IShadowLight;
|
|
|
+ getTransformMatrix(): Matrix;
|
|
|
+ getDarkness(): number;
|
|
|
+ setDarkness(darkness: number): void;
|
|
|
+ setTransparencyShadow(hasShadow: boolean): void;
|
|
|
+ private _packHalf(depth);
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
class CannonJSPlugin implements IPhysicsEnginePlugin {
|
|
|
private _world;
|