浏览代码

Added Animatable.reset()

David Catuhe 10 年之前
父节点
当前提交
d05defb436
共有 73 个文件被更改,包括 343 次插入204 次删除
  1. 173 33
      dist/preview release - alpha/babylon.2.2.d.ts
  2. 18 19
      dist/preview release - alpha/babylon.2.2.js
  3. 25 63
      dist/preview release - alpha/babylon.2.2.max.js
  4. 21 22
      dist/preview release - alpha/babylon.2.2.noworker.js
  5. 1 0
      dist/preview release - alpha/what's new.md
  6. 1 1
      src/Actions/babylon.condition.js
  7. 1 1
      src/Actions/babylon.directActions.js
  8. 1 1
      src/Actions/babylon.interpolateValueAction.js
  9. 8 0
      src/Animations/babylon.animatable.js
  10. 12 0
      src/Animations/babylon.animatable.ts
  11. 5 0
      src/Animations/babylon.animation.js
  12. 6 0
      src/Animations/babylon.animation.ts
  13. 1 1
      src/Animations/babylon.easing.js
  14. 1 1
      src/Bones/babylon.bone.js
  15. 1 1
      src/Cameras/VR/babylon.vrDeviceOrientationCamera.js
  16. 1 1
      src/Cameras/VR/babylon.webVRCamera.js
  17. 1 1
      src/Cameras/babylon.arcRotateCamera.js
  18. 1 1
      src/Cameras/babylon.camera.js
  19. 1 1
      src/Cameras/babylon.deviceOrientationCamera.js
  20. 1 1
      src/Cameras/babylon.followCamera.js
  21. 1 1
      src/Cameras/babylon.freeCamera.js
  22. 1 1
      src/Cameras/babylon.gamepadCamera.js
  23. 1 1
      src/Cameras/babylon.stereoscopicCameras.js
  24. 1 1
      src/Cameras/babylon.targetCamera.js
  25. 1 1
      src/Cameras/babylon.touchCamera.js
  26. 1 1
      src/Cameras/babylon.virtualJoysticksCamera.js
  27. 1 1
      src/Lights/babylon.directionalLight.js
  28. 1 1
      src/Lights/babylon.hemisphericLight.js
  29. 1 1
      src/Lights/babylon.light.js
  30. 1 1
      src/Lights/babylon.pointLight.js
  31. 1 1
      src/Lights/babylon.spotLight.js
  32. 1 1
      src/Materials/Textures/Procedurals/babylon.customProceduralTexture.js
  33. 1 1
      src/Materials/Textures/Procedurals/babylon.proceduralTexture.js
  34. 5 5
      src/Materials/Textures/Procedurals/babylon.standardProceduralTexture.js
  35. 1 0
      src/Materials/Textures/Procedurals/babylon.standardProceduralTexture.ts
  36. 1 1
      src/Materials/Textures/babylon.cubeTexture.js
  37. 1 1
      src/Materials/Textures/babylon.dynamicTexture.js
  38. 1 1
      src/Materials/Textures/babylon.mirrorTexture.js
  39. 1 1
      src/Materials/Textures/babylon.renderTargetTexture.js
  40. 1 1
      src/Materials/Textures/babylon.texture.js
  41. 1 1
      src/Materials/Textures/babylon.videoTexture.js
  42. 1 1
      src/Materials/babylon.multiMaterial.js
  43. 1 1
      src/Materials/babylon.shaderMaterial.js
  44. 1 1
      src/Materials/babylon.standardMaterial.js
  45. 7 5
      src/Mesh/babylon.abstractMesh.js
  46. 1 0
      src/Mesh/babylon.abstractMesh.ts
  47. 1 1
      src/Mesh/babylon.geometry.js
  48. 1 1
      src/Mesh/babylon.groundMesh.js
  49. 1 1
      src/Mesh/babylon.instancedMesh.js
  50. 1 1
      src/Mesh/babylon.linesMesh.js
  51. 1 1
      src/Mesh/babylon.mesh.js
  52. 1 1
      src/Mesh/babylon.polygonMesh.js
  53. 1 1
      src/PostProcess/babylon.anaglyphPostProcess.js
  54. 1 1
      src/PostProcess/babylon.blackAndWhitePostProcess.js
  55. 1 1
      src/PostProcess/babylon.blurPostProcess.js
  56. 1 1
      src/PostProcess/babylon.colorCorrectionPostProcess.js
  57. 1 1
      src/PostProcess/babylon.convolutionPostProcess.js
  58. 1 1
      src/PostProcess/babylon.displayPassPostProcess.js
  59. 1 1
      src/PostProcess/babylon.filterPostProcess.js
  60. 1 1
      src/PostProcess/babylon.fxaaPostProcess.js
  61. 1 1
      src/PostProcess/babylon.hdrRenderingPipeline.js
  62. 1 1
      src/PostProcess/babylon.lensRenderingPipeline.js
  63. 1 1
      src/PostProcess/babylon.passPostProcess.js
  64. 1 1
      src/PostProcess/babylon.refractionPostProcess.js
  65. 1 1
      src/PostProcess/babylon.ssaoRenderingPipeline.js
  66. 1 1
      src/PostProcess/babylon.stereoscopicInterlacePostProcess.js
  67. 1 1
      src/PostProcess/babylon.volumetricLightScatteringPostProcess.js
  68. 1 1
      src/PostProcess/babylon.vrDistortionCorrectionPostProcess.js
  69. 1 0
      src/Shaders/cloud.fragment.fx
  70. 1 1
      src/Tools/babylon.gamepads.js
  71. 1 1
      src/Tools/babylon.sceneOptimizer.js
  72. 1 0
      src/Tools/babylon.sceneSerializer.js
  73. 1 0
      src/Tools/babylon.sceneSerializer.ts

+ 173 - 33
dist/preview release - alpha/babylon.2.2.d.ts

@@ -257,6 +257,7 @@ declare module BABYLON {
         wipeCaches(): void;
         setSamplingMode(texture: WebGLTexture, samplingMode: number): void;
         createTexture(url: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode?: number, onLoad?: () => void, onError?: () => void, buffer?: any): WebGLTexture;
+        updateRawTexture(texture: WebGLTexture, data: ArrayBufferView, format: number, invertY: boolean): void;
         createRawTexture(data: ArrayBufferView, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number): WebGLTexture;
         createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number, forceExponantOfTwo?: boolean): WebGLTexture;
         updateTextureSamplingMode(samplingMode: number, texture: WebGLTexture): void;
@@ -1158,6 +1159,7 @@ declare module BABYLON {
         constructor(scene: Scene, target: any, fromFrame?: number, toFrame?: number, loopAnimation?: boolean, speedRatio?: number, onAnimationEnd?: any, animations?: any);
         appendAnimations(target: any, animations: Animation[]): void;
         getAnimationByTargetProperty(property: string): Animation;
+        reset(): void;
         pause(): void;
         restart(): void;
         stop(): void;
@@ -1179,8 +1181,9 @@ declare module BABYLON {
         private _easingFunction;
         targetPropertyPath: string[];
         currentFrame: number;
-        static CreateAndStartAnimation(name: string, mesh: AbstractMesh, tartgetProperty: string, framePerSecond: number, totalFrame: number, from: any, to: any, loopMode?: number): Animatable;
+        static CreateAndStartAnimation(name: string, mesh: AbstractMesh, targetProperty: string, framePerSecond: number, totalFrame: number, from: any, to: any, loopMode?: number): Animatable;
         constructor(name: string, targetProperty: string, framePerSecond: number, dataType: number, loopMode?: number);
+        reset(): void;
         isStopped(): boolean;
         getKeys(): any[];
         getEasingFunction(): IEasingFunction;
@@ -1447,7 +1450,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class Bone {
+    class Bone extends Node {
         name: string;
         children: Bone[];
         animations: Animation[];
@@ -1482,6 +1485,7 @@ declare module BABYLON {
         private _identity;
         constructor(name: string, id: string, scene: Scene);
         getTransformMatrices(): Float32Array;
+        getScene(): Scene;
         _markAsDirty(): void;
         prepare(): void;
         getAnimatables(): IAnimatable[];
@@ -1489,7 +1493,7 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class ArcRotateCamera extends Camera {
+    class ArcRotateCamera extends TargetCamera {
         alpha: number;
         beta: number;
         radius: number;
@@ -1506,6 +1510,9 @@ declare module BABYLON {
         angularSensibility: number;
         wheelPrecision: number;
         pinchPrecision: number;
+        panningSensibility: number;
+        inertialPanningX: number;
+        inertialPanningY: number;
         keysUp: number[];
         keysDown: number[];
         keysLeft: number[];
@@ -1515,8 +1522,9 @@ declare module BABYLON {
         pinchInwards: boolean;
         allowUpsideDown: boolean;
         private _keys;
-        private _viewMatrix;
+        _viewMatrix: Matrix;
         private _attachedElement;
+        private _onContextMenu;
         private _onPointerDown;
         private _onPointerUp;
         private _onPointerMove;
@@ -1525,10 +1533,14 @@ declare module BABYLON {
         private _onKeyDown;
         private _onKeyUp;
         private _onLostFocus;
-        private _reset;
+        _reset: () => void;
         private _onGestureStart;
         private _onGesture;
         private _MSGestureHandler;
+        private _localDirection;
+        private _transformedDirection;
+        private _isRightClick;
+        private _isCtrlPushed;
         onCollide: (collidedMesh: AbstractMesh) => void;
         checkCollisions: boolean;
         collisionRadius: Vector3;
@@ -1545,15 +1557,15 @@ declare module BABYLON {
         _initCache(): void;
         _updateCache(ignoreParentClass?: boolean): void;
         _isSynchronizedViewMatrix(): boolean;
-        attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
+        attachControl(element: HTMLElement, noPreventDefault?: boolean, useCtrlForPanning?: boolean): void;
         detachControl(element: HTMLElement): void;
         _checkInputs(): void;
         private _checkLimits();
         setPosition(position: Vector3): void;
         _getViewMatrix(): Matrix;
         private _onCollisionPositionChange;
-        zoomOn(meshes?: AbstractMesh[]): void;
-        focusOn(meshesOrMinMaxVectorAndDistance: any): void;
+        zoomOn(meshes?: AbstractMesh[], doNotUpdateMaxZ?: boolean): void;
+        focusOn(meshesOrMinMaxVectorAndDistance: any, doNotUpdateMaxZ?: boolean): void;
         /**
          * @override
          * Override Camera.createRigCamera
@@ -2105,7 +2117,7 @@ declare module BABYLON {
         bv: number;
         faceId: number;
         subMeshId: number;
-        getNormal(useWorldCoordinates?: boolean): Vector3;
+        getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Vector3;
         getTextureCoordinates(): Vector2;
     }
 }
@@ -2435,6 +2447,7 @@ declare module BABYLON {
         blurScale: number;
         private _blurBoxOffset;
         private _bias;
+        private _lightDirection;
         bias: number;
         blurBoxOffset: number;
         filter: number;
@@ -2610,6 +2623,7 @@ declare module BABYLON {
         bind(world: Matrix, mesh?: Mesh): void;
         bindOnlyWorldMatrix(world: Matrix): void;
         unbind(): void;
+        clone(name: string): Material;
         dispose(forceDisposeEffect?: boolean): void;
     }
 }
@@ -2651,6 +2665,7 @@ declare module BABYLON {
         isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
         bindOnlyWorldMatrix(world: Matrix): void;
         bind(world: Matrix, mesh?: Mesh): void;
+        clone(name: string): ShaderMaterial;
         dispose(forceDisposeEffect?: boolean): void;
     }
 }
@@ -2682,13 +2697,14 @@ declare module BABYLON {
         opacityFresnelParameters: FresnelParameters;
         reflectionFresnelParameters: FresnelParameters;
         emissiveFresnelParameters: FresnelParameters;
-        private _cachedDefines;
         private _renderTargets;
         private _worldViewProjectionMatrix;
         private _globalAmbientColor;
         private _scaledDiffuse;
         private _scaledSpecular;
         private _renderId;
+        private _defines;
+        private _cachedDefines;
         constructor(name: string, scene: Scene);
         needAlphaBlending(): boolean;
         needAlphaTesting(): boolean;
@@ -2787,16 +2803,6 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class RawTexture extends Texture {
-        constructor(data: ArrayBufferView, width: number, height: number, format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
-        static CreateLuminanceTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
-        static CreateLuminanceAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
-        static CreateAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
-        static CreateRGBTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
-        static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
-    }
-}
-declare module BABYLON {
     class RenderTargetTexture extends Texture {
         renderList: AbstractMesh[];
         renderParticles: boolean;
@@ -2983,8 +2989,8 @@ declare module BABYLON {
         private _cloudColor;
         constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
         updateShaderUniforms(): void;
-        skyColor: Color3;
-        cloudColor: Color3;
+        skyColor: Color4;
+        cloudColor: Color4;
     }
     class GrassProceduralTexture extends ProceduralTexture {
         private _grassColors;
@@ -3043,6 +3049,7 @@ declare module BABYLON {
         multiply(otherColor: Color3): Color3;
         multiplyToRef(otherColor: Color3, result: Color3): Color3;
         equals(otherColor: Color3): boolean;
+        equalsFloats(r: number, g: number, b: number): boolean;
         scale(scale: number): Color3;
         scaleToRef(scale: number, result: Color3): Color3;
         add(otherColor: Color3): Color3;
@@ -3110,7 +3117,7 @@ declare module BABYLON {
         scaleInPlace(scale: number): Vector2;
         scale(scale: number): Vector2;
         equals(otherVector: Vector2): boolean;
-        equalsWithEpsilon(otherVector: Vector2): boolean;
+        equalsWithEpsilon(otherVector: Vector2, epsilon?: number): boolean;
         length(): number;
         lengthSquared(): number;
         normalize(): Vector2;
@@ -3152,7 +3159,7 @@ declare module BABYLON {
         scale(scale: number): Vector3;
         scaleToRef(scale: number, result: Vector3): void;
         equals(otherVector: Vector3): boolean;
-        equalsWithEpsilon(otherVector: Vector3): boolean;
+        equalsWithEpsilon(otherVector: Vector3, epsilon?: number): boolean;
         equalsToFloats(x: number, y: number, z: number): boolean;
         multiplyInPlace(otherVector: Vector3): Vector3;
         multiply(otherVector: Vector3): Vector3;
@@ -3229,7 +3236,7 @@ declare module BABYLON {
         scale(scale: number): Vector4;
         scaleToRef(scale: number, result: Vector4): void;
         equals(otherVector: Vector4): boolean;
-        equalsWithEpsilon(otherVector: Vector4): boolean;
+        equalsWithEpsilon(otherVector: Vector4, epsilon?: number): boolean;
         equalsToFloats(x: number, y: number, z: number, w: number): boolean;
         multiplyInPlace(otherVector: Vector4): Vector4;
         multiply(otherVector: Vector4): Vector4;
@@ -3579,12 +3586,15 @@ declare module BABYLON {
         private _oldPositionForCollisions;
         private _diffPositionForCollisions;
         private _newPositionForCollisions;
+        onCollide: (collidedMesh: AbstractMesh) => void;
+        private _meshToBoneReferal;
         private _localScaling;
         private _localRotation;
         private _localTranslation;
         private _localBillboard;
         private _localPivotScaling;
         private _localPivotScalingRotation;
+        private _localMeshReferalTransform;
         private _localWorld;
         _worldMatrix: Matrix;
         private _rotateYByPI;
@@ -3604,6 +3614,7 @@ declare module BABYLON {
         private _onAfterWorldMatrixUpdate;
         private _isWorldMatrixFrozen;
         _waitingActions: any;
+        _waitingFreezeWorldMatrix: boolean;
         constructor(name: string, scene: Scene);
         isBlocked: boolean;
         getLOD(camera: Camera): AbstractMesh;
@@ -3677,6 +3688,8 @@ declare module BABYLON {
         getPositionExpressedInLocalSpace(): Vector3;
         locallyTranslate(vector3: Vector3): void;
         lookAt(targetPoint: Vector3, yawCor: number, pitchCor: number, rollCor: number): void;
+        attachToBone(bone: Bone, affectedMesh: AbstractMesh): void;
+        detachFromBone(): void;
         isInFrustum(frustumPlanes: Plane[]): boolean;
         isCompletelyInFrustum(camera?: Camera): boolean;
         intersectsMesh(mesh: AbstractMesh, precise?: boolean): boolean;
@@ -4065,6 +4078,7 @@ declare module BABYLON {
         setMaterialByID(id: string): void;
         getAnimatables(): IAnimatable[];
         bakeTransformIntoVertices(transform: Matrix): void;
+        bakeCurrentTransformIntoVertices(): void;
         _resetPointsArrayCache(): void;
         _generatePointsArray(): boolean;
         clone(name: string, newParent?: Node, doNotCloneChildren?: boolean): Mesh;
@@ -4072,6 +4086,7 @@ declare module BABYLON {
         applyDisplacementMap(url: string, minHeight: number, maxHeight: number, onSuccess?: (mesh: Mesh) => void): void;
         applyDisplacementMapFromBuffer(buffer: Uint8Array, heightMapWidth: number, heightMapHeight: number, minHeight: number, maxHeight: number): void;
         convertToFlatShadedMesh(): void;
+        flipFaces(flipNormals?: boolean): void;
         createInstance(name: string): InstancedMesh;
         synchronizeInstances(): void;
         /**
@@ -4145,7 +4160,11 @@ declare module BABYLON {
         positions: number[];
         normals: number[];
         uvs: number[];
-        uv2s: number[];
+        uvs2: number[];
+        uvs3: number[];
+        uvs4: number[];
+        uvs5: number[];
+        uvs6: number[];
         colors: number[];
         matricesIndices: number[];
         matricesWeights: number[];
@@ -4399,6 +4418,10 @@ declare module BABYLON {
         private static _NormalKind;
         private static _UVKind;
         private static _UV2Kind;
+        private static _UV3Kind;
+        private static _UV4Kind;
+        private static _UV5Kind;
+        private static _UV6Kind;
         private static _ColorKind;
         private static _MatricesIndicesKind;
         private static _MatricesWeightsKind;
@@ -4406,6 +4429,10 @@ declare module BABYLON {
         static NormalKind: string;
         static UVKind: string;
         static UV2Kind: string;
+        static UV3Kind: string;
+        static UV4Kind: string;
+        static UV5Kind: string;
+        static UV6Kind: string;
         static ColorKind: string;
         static MatricesIndicesKind: string;
         static MatricesWeightsKind: string;
@@ -4657,6 +4684,123 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
+    class HDRRenderingPipeline extends PostProcessRenderPipeline implements IDisposable {
+        /**
+        * Public members
+        */
+        /**
+        * Gaussian blur coefficient
+        * @type {number}
+        */
+        gaussCoeff: number;
+        /**
+        * Gaussian blur mean
+        * @type {number}
+        */
+        gaussMean: number;
+        /**
+        * Gaussian blur standard deviation
+        * @type {number}
+        */
+        gaussStandDev: number;
+        /**
+        * Exposure, controls the overall intensity of the pipeline
+        * @type {number}
+        */
+        exposure: number;
+        /**
+        * Minimum luminance that the post-process can output. Luminance is >= 0
+        * @type {number}
+        */
+        minimumLuminance: number;
+        /**
+        * Maximum luminance that the post-process can output. Must be suprerior to minimumLuminance
+        * @type {number}
+        */
+        maximumLuminance: number;
+        /**
+        * Increase rate for luminance: eye adaptation speed to dark
+        * @type {number}
+        */
+        luminanceIncreaserate: number;
+        /**
+        * Decrease rate for luminance: eye adaptation speed to bright
+        * @type {number}
+        */
+        luminanceDecreaseRate: number;
+        /**
+        * Minimum luminance needed to compute HDR
+        * @type {number}
+        */
+        brightThreshold: number;
+        /**
+        * Private members
+        */
+        private _guassianBlurHPostProcess;
+        private _guassianBlurVPostProcess;
+        private _brightPassPostProcess;
+        private _textureAdderPostProcess;
+        private _downSampleX4PostProcess;
+        private _originalPostProcess;
+        private _hdrPostProcess;
+        private _hdrCurrentLuminance;
+        private _hdrOutputLuminance;
+        static LUM_STEPS: number;
+        private _downSamplePostProcesses;
+        private _scene;
+        private _needUpdate;
+        /**
+         * @constructor
+         * @param {string} name - The rendering pipeline name
+         * @param {BABYLON.Scene} scene - The scene linked to this pipeline
+         * @param {any} ratio - The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
+         * @param {BABYLON.PostProcess} originalPostProcess - the custom original color post-process. Must be "reusable". Can be null.
+         * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to
+         */
+        constructor(name: string, scene: Scene, ratio: number, originalPostProcess?: PostProcess, cameras?: Camera[]);
+        /**
+        * Tells the pipeline to update its post-processes
+        */
+        update(): void;
+        /**
+        * Returns the current calculated luminance
+        */
+        getCurrentLuminance(): number;
+        /**
+        * Returns the currently drawn luminance
+        */
+        getOutputLuminance(): number;
+        /**
+        * Releases the rendering pipeline and its internal effects. Detaches pipeline from cameras
+        */
+        dispose(): void;
+        /**
+        * Creates the HDR post-process and computes the luminance adaptation
+        */
+        private _createHDRPostProcess(scene, ratio);
+        /**
+        * Texture Adder post-process
+        */
+        private _createTextureAdderPostProcess(scene, ratio);
+        /**
+        * Down sample X4 post-process
+        */
+        private _createDownSampleX4PostProcess(scene, ratio);
+        /**
+        * Bright pass post-process
+        */
+        private _createBrightPassPostProcess(scene, ratio);
+        /**
+        * Luminance generator. Creates the luminance post-process and down sample post-processes
+        */
+        private _createLuminanceGeneratorPostProcess(scene);
+        /**
+        * Gaussian blur post-processes. Horizontal and Vertical
+        */
+        private _createGaussianBlurPostProcess(scene, ratio);
+    }
+}
+declare module BABYLON {
     class LensRenderingPipeline extends PostProcessRenderPipeline {
         /**
         * The chromatic aberration PostProcess id in the pipeline
@@ -4892,12 +5036,6 @@ declare module BABYLON {
     }
 }
 declare module BABYLON {
-    class StereogramInterlacePostProcess extends PostProcess {
-        private _stepSize;
-        constructor(name: string, camB: Camera, postProcessA: PostProcess, isStereogramHoriz: boolean, samplingMode?: number);
-    }
-}
-declare module BABYLON {
     class StereoscopicInterlacePostProcess extends PostProcess {
         private _stepSize;
         constructor(name: string, camB: Camera, postProcessA: PostProcess, isStereoscopicHoriz: boolean, samplingMode?: number);
@@ -4965,8 +5103,9 @@ declare module BABYLON {
          * @param {number} samplingMode - The post-process filtering mode
          * @param {BABYLON.Engine} engine - The babylon engine
          * @param {boolean} reusable - If the post-process is reusable
+         * @param {BABYLON.Scene} scene - The constructor needs a scene reference to initialize internal components. If "camera" is null (RenderPipelineà, "scene" must be provided
          */
-        constructor(name: string, ratio: any, camera: Camera, mesh?: Mesh, samples?: number, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, ratio: any, camera: Camera, mesh?: Mesh, samples?: number, samplingMode?: number, engine?: Engine, reusable?: boolean, scene?: Scene);
         isReady(subMesh: SubMesh, useInstances: boolean): boolean;
         /**
          * Sets the new light position for light scattering effect
@@ -5562,6 +5701,7 @@ declare module BABYLON {
 declare module BABYLON {
     class SceneSerializer {
         static Serialize(scene: Scene): any;
+        static SerializeMesh(mesh: Mesh): any;
     }
 }
 declare module BABYLON {

文件差异内容过多而无法显示
+ 18 - 19
dist/preview release - alpha/babylon.2.2.js


文件差异内容过多而无法显示
+ 25 - 63
dist/preview release - alpha/babylon.2.2.max.js


文件差异内容过多而无法显示
+ 21 - 22
dist/preview release - alpha/babylon.2.2.noworker.js


+ 1 - 0
dist/preview release - alpha/what's new.md

@@ -4,6 +4,7 @@
     - HDR Rendering pipeline. See [demo here]() [julien-moreau](https://github.com/julien-moreau)
     - New rewored StandardMaterial.isReady for better memory usage and performance [deltakosh](https://github.com/deltakosh)
   - **Updates**
+    - Added Animatable.reset() function [deltakosh](https://github.com/deltakosh)
     - New parameter for ArcRotateCamera.zoomOn to preserve maxZ [deltakosh](https://github.com/deltakosh)
     - PickingInfo.getNormal can now use either vertices normals or vertices positions [deltakosh](https://github.com/deltakosh)
     - Meshes can now support uv2, uv4, uv5 and uv6 for ShaderMaterials [deltakosh](https://github.com/deltakosh)

+ 1 - 1
src/Actions/babylon.condition.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Actions/babylon.directActions.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Actions/babylon.interpolateValueAction.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 8 - 0
src/Animations/babylon.animatable.js

@@ -38,6 +38,14 @@ var BABYLON;
             }
             return null;
         };
+        Animatable.prototype.reset = function () {
+            var animations = this._animations;
+            for (var index = 0; index < animations.length; index++) {
+                animations[index].reset();
+            }
+            this._localDelayOffset = null;
+            this._pausedDelay = null;
+        };
         Animatable.prototype.pause = function () {
             if (this._paused) {
                 return;

+ 12 - 0
src/Animations/babylon.animatable.ts

@@ -39,6 +39,18 @@
             return null;
         }
 
+        public reset(): void {
+            var animations = this._animations;
+
+            for (var index = 0; index < animations.length; index++) {
+                animations[index].reset();
+            }
+
+            this._localDelayOffset = null;
+            this._pausedDelay = null;
+
+        }
+
         public pause(): void {
             if (this._paused) {
                 return;

+ 5 - 0
src/Animations/babylon.animation.js

@@ -43,6 +43,11 @@ var BABYLON;
             return mesh.getScene().beginAnimation(mesh, 0, totalFrame, (animation.loopMode === 1));
         };
         // Methods   
+        Animation.prototype.reset = function () {
+            this._offsetsCache = {};
+            this._highLimitsCache = {};
+            this.currentFrame = 0;
+        };
         Animation.prototype.isStopped = function () {
             return this._stopped;
         };

+ 6 - 0
src/Animations/babylon.animation.ts

@@ -52,6 +52,12 @@
         }
 
         // Methods   
+        public reset(): void {
+            this._offsetsCache = {};
+            this._highLimitsCache = {};
+            this.currentFrame = 0;
+        }
+
         public isStopped(): boolean {
             return this._stopped;
         }

+ 1 - 1
src/Animations/babylon.easing.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Bones/babylon.bone.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/VR/babylon.vrDeviceOrientationCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/VR/babylon.webVRCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.arcRotateCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.camera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.deviceOrientationCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.followCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.freeCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.gamepadCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.stereoscopicCameras.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.targetCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.touchCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Cameras/babylon.virtualJoysticksCamera.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Lights/babylon.directionalLight.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Lights/babylon.hemisphericLight.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Lights/babylon.light.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Lights/babylon.pointLight.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Lights/babylon.spotLight.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/Procedurals/babylon.customProceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/Procedurals/babylon.proceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 5 - 5
src/Materials/Textures/Procedurals/babylon.standardProceduralTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -181,14 +181,14 @@ var BABYLON;
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             _super.call(this, name, size, "cloud", scene, fallbackTexture, generateMipMaps);
-            this._skyColor = new BABYLON.Color3(0.15, 0.68, 1.0);
-            this._cloudColor = new BABYLON.Color3(1, 1, 1);
+            this._skyColor = new BABYLON.Color4(0.15, 0.68, 1.0, 1.0);
+            this._cloudColor = new BABYLON.Color4(1, 1, 1, 1.0);
             this.updateShaderUniforms();
             this.refreshRate = 0;
         }
         CloudProceduralTexture.prototype.updateShaderUniforms = function () {
-            this.setColor3("skyColor", this._skyColor);
-            this.setColor3("cloudColor", this._cloudColor);
+            this.setColor4("skyColor", this._skyColor);
+            this.setColor4("cloudColor", this._cloudColor);
         };
         Object.defineProperty(CloudProceduralTexture.prototype, "skyColor", {
             get: function () {

+ 1 - 0
src/Materials/Textures/Procedurals/babylon.standardProceduralTexture.ts

@@ -365,3 +365,4 @@
         }
     }
 }
+

+ 1 - 1
src/Materials/Textures/babylon.cubeTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/babylon.dynamicTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/babylon.mirrorTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/babylon.renderTargetTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/babylon.texture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/Textures/babylon.videoTexture.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/babylon.multiMaterial.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/babylon.shaderMaterial.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Materials/babylon.standardMaterial.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 7 - 5
src/Mesh/babylon.abstractMesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;
@@ -410,9 +410,11 @@ var BABYLON;
             // Translation
             if (this.infiniteDistance && !this.parent) {
                 var camera = this.getScene().activeCamera;
-                var cameraWorldMatrix = camera.getWorldMatrix();
-                var cameraGlobalPosition = new BABYLON.Vector3(cameraWorldMatrix.m[12], cameraWorldMatrix.m[13], cameraWorldMatrix.m[14]);
-                BABYLON.Matrix.TranslationToRef(this.position.x + cameraGlobalPosition.x, this.position.y + cameraGlobalPosition.y, this.position.z + cameraGlobalPosition.z, this._localTranslation);
+                if (camera) {
+                    var cameraWorldMatrix = camera.getWorldMatrix();
+                    var cameraGlobalPosition = new BABYLON.Vector3(cameraWorldMatrix.m[12], cameraWorldMatrix.m[13], cameraWorldMatrix.m[14]);
+                    BABYLON.Matrix.TranslationToRef(this.position.x + cameraGlobalPosition.x, this.position.y + cameraGlobalPosition.y, this.position.z + cameraGlobalPosition.z, this._localTranslation);
+                }
             }
             else {
                 BABYLON.Matrix.TranslationToRef(this.position.x, this.position.y, this.position.z, this._localTranslation);
@@ -505,7 +507,7 @@ var BABYLON;
             /// <param name="pitchCor" type="Number">optional pitch (x-axis) correction in radians</param>
             /// <param name="rollCor" type="Number">optional roll (z-axis) correction in radians</param>
             /// <returns>Mesh oriented towards targetMesh</returns>
-            yawCor = yawCor || 0; // default to zero if undefined 
+            yawCor = yawCor || 0; // default to zero if undefined
             pitchCor = pitchCor || 0;
             rollCor = rollCor || 0;
             var dv = targetPoint.subtract(this.position);

+ 1 - 0
src/Mesh/babylon.abstractMesh.ts

@@ -1011,3 +1011,4 @@
     }
 }
 
+

+ 1 - 1
src/Mesh/babylon.geometry.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Mesh/babylon.groundMesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Mesh/babylon.instancedMesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Mesh/babylon.linesMesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Mesh/babylon.mesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Mesh/babylon.polygonMesh.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.anaglyphPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.blackAndWhitePostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.blurPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.colorCorrectionPostProcess.js

@@ -11,7 +11,7 @@
 //  For explanations on color grading, see here:
 //      http://udn.epicgames.com/Three/ColorGrading.html
 //
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.convolutionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.displayPassPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.filterPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.fxaaPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.hdrRenderingPipeline.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.lensRenderingPipeline.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.passPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.refractionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.ssaoRenderingPipeline.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.stereoscopicInterlacePostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.volumetricLightScatteringPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/PostProcess/babylon.vrDistortionCorrectionPostProcess.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 0
src/Shaders/cloud.fragment.fx

@@ -34,3 +34,4 @@ void main() {
 	gl_FragColor = c;
 
 }
+

+ 1 - 1
src/Tools/babylon.gamepads.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 1
src/Tools/babylon.sceneOptimizer.js

@@ -1,4 +1,4 @@
-var __extends = (this && this.__extends) || function (d, b) {
+var __extends = this.__extends || function (d, b) {
     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
     function __() { this.constructor = d; }
     __.prototype = b.prototype;

+ 1 - 0
src/Tools/babylon.sceneSerializer.js

@@ -251,6 +251,7 @@ var BABYLON;
         if (texture instanceof BABYLON.CubeTexture) {
             serializationObject.name = texture.name;
             serializationObject.hasAlpha = texture.hasAlpha;
+            serializationObject.isCube = true;
             serializationObject.level = texture.level;
             serializationObject.coordinatesMode = texture.coordinatesMode;
             return serializationObject;

+ 1 - 0
src/Tools/babylon.sceneSerializer.ts

@@ -906,3 +906,4 @@
         }
     }
 }
+