sevan 8 years ago
parent
commit
c704a1dc66

+ 126 - 127
dist/preview release/babylon.d.ts

@@ -5835,58 +5835,6 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
-    interface ISceneLoaderPluginExtensions {
-        [extension: string]: {
-            isBinary: boolean;
-        };
-    }
-    interface ISceneLoaderPlugin {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
-        load: (scene: Scene, data: string, rootUrl: string) => boolean;
-    }
-    interface ISceneLoaderPluginAsync {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
-        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
-    }
-    class SceneLoader {
-        private static _ForceFullSceneLoadingForIncremental;
-        private static _ShowLoadingScreen;
-        static readonly NO_LOGGING: number;
-        static readonly MINIMAL_LOGGING: number;
-        static readonly SUMMARY_LOGGING: number;
-        static readonly DETAILED_LOGGING: number;
-        private static _loggingLevel;
-        static ForceFullSceneLoadingForIncremental: boolean;
-        static ShowLoadingScreen: boolean;
-        static loggingLevel: number;
-        private static _registeredPlugins;
-        private static _getDefaultPlugin();
-        private static _getPluginForExtension(extension);
-        private static _getPluginForFilename(sceneFilename);
-        private static _getDirectLoad(sceneFilename);
-        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
-        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 {
     /**
     /**
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
@@ -7294,6 +7242,58 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
+    interface ISceneLoaderPluginExtensions {
+        [extension: string]: {
+            isBinary: boolean;
+        };
+    }
+    interface ISceneLoaderPlugin {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
+        load: (scene: Scene, data: string, rootUrl: string) => boolean;
+    }
+    interface ISceneLoaderPluginAsync {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
+        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
+    }
+    class SceneLoader {
+        private static _ForceFullSceneLoadingForIncremental;
+        private static _ShowLoadingScreen;
+        static readonly NO_LOGGING: number;
+        static readonly MINIMAL_LOGGING: number;
+        static readonly SUMMARY_LOGGING: number;
+        static readonly DETAILED_LOGGING: number;
+        private static _loggingLevel;
+        static ForceFullSceneLoadingForIncremental: boolean;
+        static ShowLoadingScreen: boolean;
+        static loggingLevel: number;
+        private static _registeredPlugins;
+        private static _getDefaultPlugin();
+        private static _getPluginForExtension(extension);
+        private static _getPluginForFilename(sceneFilename);
+        private static _getDirectLoad(sceneFilename);
+        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
+        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
+        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 SIMDHelper {
     class SIMDHelper {
         private static _isEnabled;
         private static _isEnabled;
         static readonly IsEnabled: boolean;
         static readonly IsEnabled: boolean;
@@ -10123,6 +10123,7 @@ declare module BABYLON {
         dispose(): void;
         dispose(): void;
         copy(id: string): Geometry;
         copy(id: string): Geometry;
         serialize(): any;
         serialize(): any;
+        private toNumberArray(origin);
         serializeVerticeData(): any;
         serializeVerticeData(): any;
         static ExtractFromMesh(mesh: Mesh, id: string): Geometry;
         static ExtractFromMesh(mesh: Mesh, id: string): Geometry;
         /**
         /**
@@ -14386,6 +14387,76 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
+declare module BABYLON {
+    class Sprite {
+        name: string;
+        position: Vector3;
+        color: Color4;
+        width: number;
+        height: number;
+        angle: number;
+        cellIndex: number;
+        invertU: number;
+        invertV: number;
+        disposeWhenFinishedAnimating: boolean;
+        animations: Animation[];
+        isPickable: boolean;
+        actionManager: ActionManager;
+        private _animationStarted;
+        private _loopAnimation;
+        private _fromIndex;
+        private _toIndex;
+        private _delay;
+        private _direction;
+        private _frameCount;
+        private _manager;
+        private _time;
+        private _onAnimationEnd;
+        size: number;
+        constructor(name: string, manager: SpriteManager);
+        playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
+        stopAnimation(): void;
+        _animate(deltaTime: number): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
+    class SpriteManager {
+        name: string;
+        sprites: Sprite[];
+        renderingGroupId: number;
+        layerMask: number;
+        fogEnabled: boolean;
+        isPickable: boolean;
+        cellWidth: number;
+        cellHeight: number;
+        /**
+        * An event triggered when the manager is disposed.
+        * @type {BABYLON.Observable}
+        */
+        onDisposeObservable: Observable<SpriteManager>;
+        private _onDisposeObserver;
+        onDispose: () => void;
+        private _capacity;
+        private _spriteTexture;
+        private _epsilon;
+        private _scene;
+        private _vertexData;
+        private _buffer;
+        private _vertexBuffers;
+        private _indexBuffer;
+        private _effectBase;
+        private _effectFog;
+        texture: Texture;
+        constructor(name: string, imgUrl: string, capacity: number, cellSize: any, scene: Scene, epsilon?: number, samplingMode?: number);
+        private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
+        intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
+        render(): void;
+        dispose(): void;
+    }
+}
+
 declare module BABYLON.Internals {
 declare module BABYLON.Internals {
     class _AlphaState {
     class _AlphaState {
         private _isAlphaBlendDirty;
         private _isAlphaBlendDirty;
@@ -15781,76 +15852,6 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
-    class Sprite {
-        name: string;
-        position: Vector3;
-        color: Color4;
-        width: number;
-        height: number;
-        angle: number;
-        cellIndex: number;
-        invertU: number;
-        invertV: number;
-        disposeWhenFinishedAnimating: boolean;
-        animations: Animation[];
-        isPickable: boolean;
-        actionManager: ActionManager;
-        private _animationStarted;
-        private _loopAnimation;
-        private _fromIndex;
-        private _toIndex;
-        private _delay;
-        private _direction;
-        private _frameCount;
-        private _manager;
-        private _time;
-        private _onAnimationEnd;
-        size: number;
-        constructor(name: string, manager: SpriteManager);
-        playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
-        stopAnimation(): void;
-        _animate(deltaTime: number): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
-    class SpriteManager {
-        name: string;
-        sprites: Sprite[];
-        renderingGroupId: number;
-        layerMask: number;
-        fogEnabled: boolean;
-        isPickable: boolean;
-        cellWidth: number;
-        cellHeight: number;
-        /**
-        * An event triggered when the manager is disposed.
-        * @type {BABYLON.Observable}
-        */
-        onDisposeObservable: Observable<SpriteManager>;
-        private _onDisposeObserver;
-        onDispose: () => void;
-        private _capacity;
-        private _spriteTexture;
-        private _epsilon;
-        private _scene;
-        private _vertexData;
-        private _buffer;
-        private _vertexBuffers;
-        private _indexBuffer;
-        private _effectBase;
-        private _effectFog;
-        texture: Texture;
-        constructor(name: string, imgUrl: string, capacity: number, cellSize: any, scene: Scene, epsilon?: number, samplingMode?: number);
-        private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
-        intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
-        render(): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class VRCameraMetrics {
     class VRCameraMetrics {
         hResolution: number;
         hResolution: number;
         vResolution: number;
         vResolution: number;
@@ -16040,8 +16041,6 @@ declare module BABYLON {
         pinchInwards: boolean;
         pinchInwards: boolean;
         private _pointerInput;
         private _pointerInput;
         private _observer;
         private _observer;
-        private _onKeyDown;
-        private _onKeyUp;
         private _onMouseMove;
         private _onMouseMove;
         private _onGestureStart;
         private _onGestureStart;
         private _onGesture;
         private _onGesture;
@@ -16350,9 +16349,6 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
-declare module BABYLON.Internals {
-}
-
 declare module BABYLON {
 declare module BABYLON {
     class BaseTexture {
     class BaseTexture {
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;
@@ -16898,6 +16894,9 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
+declare module BABYLON.Internals {
+}
+
 declare module BABYLON {
 declare module BABYLON {
     class CannonJSPlugin implements IPhysicsEnginePlugin {
     class CannonJSPlugin implements IPhysicsEnginePlugin {
         private _useDeltaForWorldStep;
         private _useDeltaForWorldStep;

File diff suppressed because it is too large
+ 24 - 24
dist/preview release/babylon.js


+ 24 - 22
dist/preview release/babylon.max.js

@@ -26499,76 +26499,84 @@ var BABYLON;
             }
             }
             return serializationObject;
             return serializationObject;
         };
         };
+        Geometry.prototype.toNumberArray = function (origin) {
+            if (Array.isArray(origin)) {
+                return origin;
+            }
+            else {
+                return Array.prototype.slice.call(origin);
+            }
+        };
         Geometry.prototype.serializeVerticeData = function () {
         Geometry.prototype.serializeVerticeData = function () {
             var serializationObject = this.serialize();
             var serializationObject = this.serialize();
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.PositionKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.PositionKind)) {
-                serializationObject.positions = this.getVerticesData(BABYLON.VertexBuffer.PositionKind);
+                serializationObject.positions = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.PositionKind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.PositionKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.PositionKind).isUpdatable) {
                     serializationObject.positions._updatable = true;
                     serializationObject.positions._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
-                serializationObject.normals = this.getVerticesData(BABYLON.VertexBuffer.NormalKind);
+                serializationObject.normals = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.NormalKind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.NormalKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.NormalKind).isUpdatable) {
                     serializationObject.normals._updatable = true;
                     serializationObject.normals._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind)) {
-                serializationObject.uvs = this.getVerticesData(BABYLON.VertexBuffer.UVKind);
+                serializationObject.uvs = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UVKind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UVKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UVKind).isUpdatable) {
                     serializationObject.uvs._updatable = true;
                     serializationObject.uvs._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV2Kind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV2Kind)) {
-                serializationObject.uv2s = this.getVerticesData(BABYLON.VertexBuffer.UV2Kind);
+                serializationObject.uv2s = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UV2Kind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV2Kind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV2Kind).isUpdatable) {
                     serializationObject.uv2s._updatable = true;
                     serializationObject.uv2s._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV3Kind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV3Kind)) {
-                serializationObject.uv3s = this.getVerticesData(BABYLON.VertexBuffer.UV3Kind);
+                serializationObject.uv3s = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UV3Kind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV3Kind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV3Kind).isUpdatable) {
                     serializationObject.uv3s._updatable = true;
                     serializationObject.uv3s._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV4Kind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV4Kind)) {
-                serializationObject.uv4s = this.getVerticesData(BABYLON.VertexBuffer.UV4Kind);
+                serializationObject.uv4s = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UV4Kind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV4Kind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV4Kind).isUpdatable) {
                     serializationObject.uv4s._updatable = true;
                     serializationObject.uv4s._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV5Kind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV5Kind)) {
-                serializationObject.uv5s = this.getVerticesData(BABYLON.VertexBuffer.UV5Kind);
+                serializationObject.uv5s = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UV5Kind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV5Kind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV5Kind).isUpdatable) {
                     serializationObject.uv5s._updatable = true;
                     serializationObject.uv5s._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV6Kind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.UV6Kind)) {
-                serializationObject.uv6s = this.getVerticesData(BABYLON.VertexBuffer.UV6Kind);
+                serializationObject.uv6s = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.UV6Kind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV6Kind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.UV6Kind).isUpdatable) {
                     serializationObject.uv6s._updatable = true;
                     serializationObject.uv6s._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
-                serializationObject.colors = this.getVerticesData(BABYLON.VertexBuffer.ColorKind);
+                serializationObject.colors = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.ColorKind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.ColorKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.ColorKind).isUpdatable) {
                     serializationObject.colors._updatable = true;
                     serializationObject.colors._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesIndicesKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesIndicesKind)) {
-                serializationObject.matricesIndices = this.getVerticesData(BABYLON.VertexBuffer.MatricesIndicesKind);
+                serializationObject.matricesIndices = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.MatricesIndicesKind));
                 serializationObject.matricesIndices._isExpanded = true;
                 serializationObject.matricesIndices._isExpanded = true;
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.MatricesIndicesKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.MatricesIndicesKind).isUpdatable) {
                     serializationObject.matricesIndices._updatable = true;
                     serializationObject.matricesIndices._updatable = true;
                 }
                 }
             }
             }
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesWeightsKind)) {
             if (this.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesWeightsKind)) {
-                serializationObject.matricesWeights = this.getVerticesData(BABYLON.VertexBuffer.MatricesWeightsKind);
+                serializationObject.matricesWeights = this.toNumberArray(this.getVerticesData(BABYLON.VertexBuffer.MatricesWeightsKind));
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.MatricesWeightsKind).isUpdatable) {
                 if (this.getVertexBuffer(BABYLON.VertexBuffer.MatricesWeightsKind).isUpdatable) {
                     serializationObject.matricesWeights._updatable = true;
                     serializationObject.matricesWeights._updatable = true;
                 }
                 }
             }
             }
-            serializationObject.indices = this.getIndices();
+            serializationObject.indices = this.toNumberArray(this.getIndices());
             return serializationObject;
             return serializationObject;
         };
         };
         // Statics
         // Statics
@@ -27439,10 +27447,10 @@ var BABYLON;
             _this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
             _this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
             _this.getRenderTargetTextures = function () {
             _this.getRenderTargetTextures = function () {
                 _this._renderTargets.reset();
                 _this._renderTargets.reset();
-                if (_this._reflectionTexture && _this._reflectionTexture.isRenderTarget) {
+                if (StandardMaterial.ReflectionTextureEnabled && _this._reflectionTexture && _this._reflectionTexture.isRenderTarget) {
                     _this._renderTargets.push(_this._reflectionTexture);
                     _this._renderTargets.push(_this._reflectionTexture);
                 }
                 }
-                if (_this._refractionTexture && _this._refractionTexture.isRenderTarget) {
+                if (StandardMaterial.RefractionTextureEnabled && _this._refractionTexture && _this._refractionTexture.isRenderTarget) {
                     _this._renderTargets.push(_this._refractionTexture);
                     _this._renderTargets.push(_this._refractionTexture);
                 }
                 }
                 return _this._renderTargets;
                 return _this._renderTargets;
@@ -28892,10 +28900,10 @@ var BABYLON;
             _this._cachedDefines.BonesPerMesh = -1;
             _this._cachedDefines.BonesPerMesh = -1;
             _this.getRenderTargetTextures = function () {
             _this.getRenderTargetTextures = function () {
                 _this._renderTargets.reset();
                 _this._renderTargets.reset();
-                if (_this.reflectionTexture && _this.reflectionTexture.isRenderTarget) {
+                if (BABYLON.StandardMaterial.ReflectionTextureEnabled && _this.reflectionTexture && _this.reflectionTexture.isRenderTarget) {
                     _this._renderTargets.push(_this.reflectionTexture);
                     _this._renderTargets.push(_this.reflectionTexture);
                 }
                 }
-                if (_this.refractionTexture && _this.refractionTexture.isRenderTarget) {
+                if (BABYLON.StandardMaterial.RefractionTextureEnabled && _this.refractionTexture && _this.refractionTexture.isRenderTarget) {
                     _this._renderTargets.push(_this.refractionTexture);
                     _this._renderTargets.push(_this.refractionTexture);
                 }
                 }
                 return _this._renderTargets;
                 return _this._renderTargets;
@@ -31254,8 +31262,6 @@ var BABYLON;
             element.addEventListener("mousemove", this._onMouseMove, false);
             element.addEventListener("mousemove", this._onMouseMove, false);
             element.addEventListener("MSPointerDown", this._onGestureStart, false);
             element.addEventListener("MSPointerDown", this._onGestureStart, false);
             element.addEventListener("MSGestureChange", this._onGesture, false);
             element.addEventListener("MSGestureChange", this._onGesture, false);
-            element.addEventListener("keydown", this._onKeyDown, false);
-            element.addEventListener("keyup", this._onKeyUp, false);
             BABYLON.Tools.RegisterTopRootEvents([
             BABYLON.Tools.RegisterTopRootEvents([
                 { name: "blur", handler: this._onLostFocus }
                 { name: "blur", handler: this._onLostFocus }
             ]);
             ]);
@@ -31268,12 +31274,8 @@ var BABYLON;
                 element.removeEventListener("mousemove", this._onMouseMove);
                 element.removeEventListener("mousemove", this._onMouseMove);
                 element.removeEventListener("MSPointerDown", this._onGestureStart);
                 element.removeEventListener("MSPointerDown", this._onGestureStart);
                 element.removeEventListener("MSGestureChange", this._onGesture);
                 element.removeEventListener("MSGestureChange", this._onGesture);
-                element.removeEventListener("keydown", this._onKeyDown);
-                element.removeEventListener("keyup", this._onKeyUp);
                 this._isPanClick = false;
                 this._isPanClick = false;
                 this.pinchInwards = true;
                 this.pinchInwards = true;
-                this._onKeyDown = null;
-                this._onKeyUp = null;
                 this._onMouseMove = null;
                 this._onMouseMove = null;
                 this._onGestureStart = null;
                 this._onGestureStart = null;
                 this._onGesture = null;
                 this._onGesture = null;

+ 126 - 127
dist/preview release/babylon.module.d.ts

@@ -5835,58 +5835,6 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
-    interface ISceneLoaderPluginExtensions {
-        [extension: string]: {
-            isBinary: boolean;
-        };
-    }
-    interface ISceneLoaderPlugin {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
-        load: (scene: Scene, data: string, rootUrl: string) => boolean;
-    }
-    interface ISceneLoaderPluginAsync {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
-        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
-    }
-    class SceneLoader {
-        private static _ForceFullSceneLoadingForIncremental;
-        private static _ShowLoadingScreen;
-        static readonly NO_LOGGING: number;
-        static readonly MINIMAL_LOGGING: number;
-        static readonly SUMMARY_LOGGING: number;
-        static readonly DETAILED_LOGGING: number;
-        private static _loggingLevel;
-        static ForceFullSceneLoadingForIncremental: boolean;
-        static ShowLoadingScreen: boolean;
-        static loggingLevel: number;
-        private static _registeredPlugins;
-        private static _getDefaultPlugin();
-        private static _getPluginForExtension(extension);
-        private static _getPluginForFilename(sceneFilename);
-        private static _getDirectLoad(sceneFilename);
-        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
-        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 {
     /**
     /**
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
@@ -7294,6 +7242,58 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
+    interface ISceneLoaderPluginExtensions {
+        [extension: string]: {
+            isBinary: boolean;
+        };
+    }
+    interface ISceneLoaderPlugin {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
+        load: (scene: Scene, data: string, rootUrl: string) => boolean;
+    }
+    interface ISceneLoaderPluginAsync {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
+        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
+    }
+    class SceneLoader {
+        private static _ForceFullSceneLoadingForIncremental;
+        private static _ShowLoadingScreen;
+        static readonly NO_LOGGING: number;
+        static readonly MINIMAL_LOGGING: number;
+        static readonly SUMMARY_LOGGING: number;
+        static readonly DETAILED_LOGGING: number;
+        private static _loggingLevel;
+        static ForceFullSceneLoadingForIncremental: boolean;
+        static ShowLoadingScreen: boolean;
+        static loggingLevel: number;
+        private static _registeredPlugins;
+        private static _getDefaultPlugin();
+        private static _getPluginForExtension(extension);
+        private static _getPluginForFilename(sceneFilename);
+        private static _getDirectLoad(sceneFilename);
+        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
+        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
+        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: 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 SIMDHelper {
     class SIMDHelper {
         private static _isEnabled;
         private static _isEnabled;
         static readonly IsEnabled: boolean;
         static readonly IsEnabled: boolean;
@@ -10123,6 +10123,7 @@ declare module BABYLON {
         dispose(): void;
         dispose(): void;
         copy(id: string): Geometry;
         copy(id: string): Geometry;
         serialize(): any;
         serialize(): any;
+        private toNumberArray(origin);
         serializeVerticeData(): any;
         serializeVerticeData(): any;
         static ExtractFromMesh(mesh: Mesh, id: string): Geometry;
         static ExtractFromMesh(mesh: Mesh, id: string): Geometry;
         /**
         /**
@@ -14386,6 +14387,76 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
+declare module BABYLON {
+    class Sprite {
+        name: string;
+        position: Vector3;
+        color: Color4;
+        width: number;
+        height: number;
+        angle: number;
+        cellIndex: number;
+        invertU: number;
+        invertV: number;
+        disposeWhenFinishedAnimating: boolean;
+        animations: Animation[];
+        isPickable: boolean;
+        actionManager: ActionManager;
+        private _animationStarted;
+        private _loopAnimation;
+        private _fromIndex;
+        private _toIndex;
+        private _delay;
+        private _direction;
+        private _frameCount;
+        private _manager;
+        private _time;
+        private _onAnimationEnd;
+        size: number;
+        constructor(name: string, manager: SpriteManager);
+        playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
+        stopAnimation(): void;
+        _animate(deltaTime: number): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
+    class SpriteManager {
+        name: string;
+        sprites: Sprite[];
+        renderingGroupId: number;
+        layerMask: number;
+        fogEnabled: boolean;
+        isPickable: boolean;
+        cellWidth: number;
+        cellHeight: number;
+        /**
+        * An event triggered when the manager is disposed.
+        * @type {BABYLON.Observable}
+        */
+        onDisposeObservable: Observable<SpriteManager>;
+        private _onDisposeObserver;
+        onDispose: () => void;
+        private _capacity;
+        private _spriteTexture;
+        private _epsilon;
+        private _scene;
+        private _vertexData;
+        private _buffer;
+        private _vertexBuffers;
+        private _indexBuffer;
+        private _effectBase;
+        private _effectFog;
+        texture: Texture;
+        constructor(name: string, imgUrl: string, capacity: number, cellSize: any, scene: Scene, epsilon?: number, samplingMode?: number);
+        private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
+        intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
+        render(): void;
+        dispose(): void;
+    }
+}
+
 declare module BABYLON.Internals {
 declare module BABYLON.Internals {
     class _AlphaState {
     class _AlphaState {
         private _isAlphaBlendDirty;
         private _isAlphaBlendDirty;
@@ -15781,76 +15852,6 @@ declare module BABYLON {
 }
 }
 
 
 declare module BABYLON {
 declare module BABYLON {
-    class Sprite {
-        name: string;
-        position: Vector3;
-        color: Color4;
-        width: number;
-        height: number;
-        angle: number;
-        cellIndex: number;
-        invertU: number;
-        invertV: number;
-        disposeWhenFinishedAnimating: boolean;
-        animations: Animation[];
-        isPickable: boolean;
-        actionManager: ActionManager;
-        private _animationStarted;
-        private _loopAnimation;
-        private _fromIndex;
-        private _toIndex;
-        private _delay;
-        private _direction;
-        private _frameCount;
-        private _manager;
-        private _time;
-        private _onAnimationEnd;
-        size: number;
-        constructor(name: string, manager: SpriteManager);
-        playAnimation(from: number, to: number, loop: boolean, delay: number, onAnimationEnd: () => void): void;
-        stopAnimation(): void;
-        _animate(deltaTime: number): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
-    class SpriteManager {
-        name: string;
-        sprites: Sprite[];
-        renderingGroupId: number;
-        layerMask: number;
-        fogEnabled: boolean;
-        isPickable: boolean;
-        cellWidth: number;
-        cellHeight: number;
-        /**
-        * An event triggered when the manager is disposed.
-        * @type {BABYLON.Observable}
-        */
-        onDisposeObservable: Observable<SpriteManager>;
-        private _onDisposeObserver;
-        onDispose: () => void;
-        private _capacity;
-        private _spriteTexture;
-        private _epsilon;
-        private _scene;
-        private _vertexData;
-        private _buffer;
-        private _vertexBuffers;
-        private _indexBuffer;
-        private _effectBase;
-        private _effectFog;
-        texture: Texture;
-        constructor(name: string, imgUrl: string, capacity: number, cellSize: any, scene: Scene, epsilon?: number, samplingMode?: number);
-        private _appendSpriteVertex(index, sprite, offsetX, offsetY, rowSize);
-        intersects(ray: Ray, camera: Camera, predicate?: (sprite: Sprite) => boolean, fastCheck?: boolean): PickingInfo;
-        render(): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class VRCameraMetrics {
     class VRCameraMetrics {
         hResolution: number;
         hResolution: number;
         vResolution: number;
         vResolution: number;
@@ -16040,8 +16041,6 @@ declare module BABYLON {
         pinchInwards: boolean;
         pinchInwards: boolean;
         private _pointerInput;
         private _pointerInput;
         private _observer;
         private _observer;
-        private _onKeyDown;
-        private _onKeyUp;
         private _onMouseMove;
         private _onMouseMove;
         private _onGestureStart;
         private _onGestureStart;
         private _onGesture;
         private _onGesture;
@@ -16350,9 +16349,6 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
-declare module BABYLON.Internals {
-}
-
 declare module BABYLON {
 declare module BABYLON {
     class BaseTexture {
     class BaseTexture {
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;
@@ -16898,6 +16894,9 @@ declare module BABYLON {
     }
     }
 }
 }
 
 
+declare module BABYLON.Internals {
+}
+
 declare module BABYLON {
 declare module BABYLON {
     class CannonJSPlugin implements IPhysicsEnginePlugin {
     class CannonJSPlugin implements IPhysicsEnginePlugin {
         private _useDeltaForWorldStep;
         private _useDeltaForWorldStep;

File diff suppressed because it is too large
+ 24 - 24
dist/preview release/babylon.worker.js


+ 7 - 7
dist/preview release/materialsLibrary/babylon.customMaterial.d.ts

@@ -8,13 +8,13 @@ declare module BABYLON {
     class ShaderSpecialParts {
     class ShaderSpecialParts {
         constructor();
         constructor();
         Fragment_Begin: string;
         Fragment_Begin: string;
-        Fragment_Definations: string;
+        Fragment_Definitions: string;
         Fragment_MainBegin: string;
         Fragment_MainBegin: string;
         Fragment_Custom_Diffuse: string;
         Fragment_Custom_Diffuse: string;
         Fragment_Custom_Alpha: string;
         Fragment_Custom_Alpha: string;
         Fragment_Before_FragColor: string;
         Fragment_Before_FragColor: string;
         Vertex_Begin: string;
         Vertex_Begin: string;
-        Vertex_Definations: string;
+        Vertex_Definitions: string;
         Vertex_MainBegin: string;
         Vertex_MainBegin: string;
         Vertex_Before_PositionUpdated: string;
         Vertex_Before_PositionUpdated: string;
         Vertex_Before_NormalUpdated: string;
         Vertex_Before_NormalUpdated: string;
@@ -29,9 +29,9 @@ declare module BABYLON {
         static ShaderIndexer: number;
         static ShaderIndexer: number;
         CustomParts: ShaderSpecialParts;
         CustomParts: ShaderSpecialParts;
         ShaderVersion: CustomShaderStructure;
         ShaderVersion: CustomShaderStructure;
-        _customUnifrom: string[];
-        _newUnifroms: string[];
-        _newUnifromInstances: any[];
+        _customUniform: string[];
+        _newUniforms: string[];
+        _newUniformInstances: any[];
         _newSamplerInstances: Texture[];
         _newSamplerInstances: Texture[];
         AttachAfterBind(mesh: Mesh, effect: Effect): void;
         AttachAfterBind(mesh: Mesh, effect: Effect): void;
         ReviewUniform(name: string, arr: string[]): string[];
         ReviewUniform(name: string, arr: string[]): string[];
@@ -40,13 +40,13 @@ declare module BABYLON {
         constructor(name: string, scene: Scene);
         constructor(name: string, scene: Scene);
         AddUniform(name: string, kind: string, param: any): CustomMaterial;
         AddUniform(name: string, kind: string, param: any): CustomMaterial;
         Fragment_Begin(shaderPart: string): CustomMaterial;
         Fragment_Begin(shaderPart: string): CustomMaterial;
-        Fragment_Definations(shaderPart: string): CustomMaterial;
+        Fragment_Definitions(shaderPart: string): CustomMaterial;
         Fragment_MainBegin(shaderPart: string): CustomMaterial;
         Fragment_MainBegin(shaderPart: string): CustomMaterial;
         Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
         Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
         Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
         Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
         Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
         Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
         Vertex_Begin(shaderPart: string): CustomMaterial;
         Vertex_Begin(shaderPart: string): CustomMaterial;
-        Vertex_Definations(shaderPart: string): CustomMaterial;
+        Vertex_Definitions(shaderPart: string): CustomMaterial;
         Vertex_MainBegin(shaderPart: string): CustomMaterial;
         Vertex_MainBegin(shaderPart: string): CustomMaterial;
         Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
         Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
         Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
         Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;

+ 27 - 27
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -117,7 +117,7 @@ varying vec3 vDirectionW;\n\
 #include<logDepthDeclaration>\n\
 #include<logDepthDeclaration>\n\
 #include<fogFragmentDeclaration>\n\
 #include<fogFragmentDeclaration>\n\
 \n\
 \n\
-#[Fragment_Definations]\n\
+#[Fragment_Definitions]\n\
 \n\
 \n\
 void main(void) {\n\
 void main(void) {\n\
 \n\
 \n\
@@ -390,7 +390,7 @@ varying vec3 vDirectionW;\n\
 #endif\n\
 #endif\n\
 #include<logDepthDeclaration>\n\
 #include<logDepthDeclaration>\n\
 \n\
 \n\
-#[Vertex_Definations]\n\
+#[Vertex_Definitions]\n\
 \n\
 \n\
 void main(void) {\n\
 void main(void) {\n\
     \n\
     \n\
@@ -533,18 +533,18 @@ vColor=color;\n\
             return _this;
             return _this;
         }
         }
         CustomMaterial.prototype.AttachAfterBind = function (mesh, effect) {
         CustomMaterial.prototype.AttachAfterBind = function (mesh, effect) {
-            for (var el in this._newUnifromInstances) {
+            for (var el in this._newUniformInstances) {
                 var ea = el.toString().split('-');
                 var ea = el.toString().split('-');
                 if (ea[0] == 'vec2')
                 if (ea[0] == 'vec2')
-                    effect.setVector2(ea[1], this._newUnifromInstances[el]);
+                    effect.setVector2(ea[1], this._newUniformInstances[el]);
                 else if (ea[0] == 'vec3')
                 else if (ea[0] == 'vec3')
-                    effect.setVector3(ea[1], this._newUnifromInstances[el]);
+                    effect.setVector3(ea[1], this._newUniformInstances[el]);
                 else if (ea[0] == 'vec4')
                 else if (ea[0] == 'vec4')
-                    effect.setVector4(ea[1], this._newUnifromInstances[el]);
+                    effect.setVector4(ea[1], this._newUniformInstances[el]);
                 else if (ea[0] == 'mat4')
                 else if (ea[0] == 'mat4')
-                    effect.setMatrix(ea[1], this._newUnifromInstances[el]);
+                    effect.setMatrix(ea[1], this._newUniformInstances[el]);
                 else if (ea[0] == 'float')
                 else if (ea[0] == 'float')
-                    effect.setFloat(ea[1], this._newUnifromInstances[el]);
+                    effect.setFloat(ea[1], this._newUniformInstances[el]);
             }
             }
             for (var el in this._newSamplerInstances) {
             for (var el in this._newSamplerInstances) {
                 var ea = el.toString().split('-');
                 var ea = el.toString().split('-');
@@ -554,14 +554,14 @@ vColor=color;\n\
         };
         };
         CustomMaterial.prototype.ReviewUniform = function (name, arr) {
         CustomMaterial.prototype.ReviewUniform = function (name, arr) {
             if (name == "uniform") {
             if (name == "uniform") {
-                for (var ind in this._newUnifroms)
-                    if (this._customUnifrom[ind].indexOf('sampler') == -1)
-                        arr.push(this._newUnifroms[ind]);
+                for (var ind in this._newUniforms)
+                    if (this._customUniform[ind].indexOf('sampler') == -1)
+                        arr.push(this._newUniforms[ind]);
             }
             }
             if (name == "sampler") {
             if (name == "sampler") {
-                for (var ind in this._newUnifroms)
-                    if (this._customUnifrom[ind].indexOf('sampler') != -1)
-                        arr.push(this._newUnifroms[ind]);
+                for (var ind in this._newUniforms)
+                    if (this._customUniform[ind].indexOf('sampler') != -1)
+                        arr.push(this._newUniforms[ind]);
             }
             }
             return arr;
             return arr;
         };
         };
@@ -581,14 +581,14 @@ vColor=color;\n\
             };
             };
             BABYLON.Effect.ShadersStore[name + "VertexShader"] = this.ShaderVersion.VertexStore
             BABYLON.Effect.ShadersStore[name + "VertexShader"] = this.ShaderVersion.VertexStore
                 .replace('#[Vertex_Begin]', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : ""))
                 .replace('#[Vertex_Begin]', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : ""))
-                .replace('#[Vertex_Definations]', (this._customUnifrom ? this._customUnifrom.join("\n") : "") + (this.CustomParts.Vertex_Definations ? this.CustomParts.Vertex_Definations : ""))
+                .replace('#[Vertex_Definitions]', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : ""))
                 .replace('#[Vertex_MainBegin]', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : ""))
                 .replace('#[Vertex_MainBegin]', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : ""))
                 .replace('#[Vertex_Before_PositionUpdated]', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : ""))
                 .replace('#[Vertex_Before_PositionUpdated]', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : ""))
                 .replace('#[Vertex_Before_NormalUpdated]', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : ""));
                 .replace('#[Vertex_Before_NormalUpdated]', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : ""));
             BABYLON.Effect.ShadersStore[name + "PixelShader"] = this.ShaderVersion.FragmentStore
             BABYLON.Effect.ShadersStore[name + "PixelShader"] = this.ShaderVersion.FragmentStore
                 .replace('#[Fragment_Begin]', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : ""))
                 .replace('#[Fragment_Begin]', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : ""))
                 .replace('#[Fragment_MainBegin]', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : ""))
                 .replace('#[Fragment_MainBegin]', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : ""))
-                .replace('#[Fragment_Definations]', (this._customUnifrom ? this._customUnifrom.join("\n") : "") + (this.CustomParts.Fragment_Definations ? this.CustomParts.Fragment_Definations : ""))
+                .replace('#[Fragment_Definitions]', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : ""))
                 .replace('#[Fragment_Custom_Diffuse]', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : ""))
                 .replace('#[Fragment_Custom_Diffuse]', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : ""))
                 .replace('#[Fragment_Custom_Alpha]', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : ""))
                 .replace('#[Fragment_Custom_Alpha]', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : ""))
                 .replace('#[Fragment_Before_FragColor]', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : ""));
                 .replace('#[Fragment_Before_FragColor]', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : ""));
@@ -602,30 +602,30 @@ vColor=color;\n\
             }
             }
         };
         };
         CustomMaterial.prototype.AddUniform = function (name, kind, param) {
         CustomMaterial.prototype.AddUniform = function (name, kind, param) {
-            if (!this._customUnifrom) {
-                this._customUnifrom = new Array();
-                this._newUnifroms = new Array();
+            if (!this._customUniform) {
+                this._customUniform = new Array();
+                this._newUniforms = new Array();
                 this._newSamplerInstances = new Array();
                 this._newSamplerInstances = new Array();
-                this._newUnifromInstances = new Array();
+                this._newUniformInstances = new Array();
             }
             }
             if (param) {
             if (param) {
                 if (kind.indexOf("sampler") == -1) {
                 if (kind.indexOf("sampler") == -1) {
-                    this._newUnifromInstances[kind + "-" + name] = param;
+                    this._newUniformInstances[kind + "-" + name] = param;
                 }
                 }
                 else {
                 else {
                     this._newSamplerInstances[kind + "-" + name] = param;
                     this._newSamplerInstances[kind + "-" + name] = param;
                 }
                 }
             }
             }
-            this._customUnifrom.push("uniform " + kind + " " + name + ";");
-            this._newUnifroms.push(name);
+            this._customUniform.push("uniform " + kind + " " + name + ";");
+            this._newUniforms.push(name);
             return this;
             return this;
         };
         };
         CustomMaterial.prototype.Fragment_Begin = function (shaderPart) {
         CustomMaterial.prototype.Fragment_Begin = function (shaderPart) {
             this.CustomParts.Fragment_Begin = shaderPart;
             this.CustomParts.Fragment_Begin = shaderPart;
             return this;
             return this;
         };
         };
-        CustomMaterial.prototype.Fragment_Definations = function (shaderPart) {
-            this.CustomParts.Fragment_Definations = shaderPart;
+        CustomMaterial.prototype.Fragment_Definitions = function (shaderPart) {
+            this.CustomParts.Fragment_Definitions = shaderPart;
             return this;
             return this;
         };
         };
         CustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) {
         CustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) {
@@ -648,8 +648,8 @@ vColor=color;\n\
             this.CustomParts.Vertex_Begin = shaderPart;
             this.CustomParts.Vertex_Begin = shaderPart;
             return this;
             return this;
         };
         };
-        CustomMaterial.prototype.Vertex_Definations = function (shaderPart) {
-            this.CustomParts.Vertex_Definations = shaderPart;
+        CustomMaterial.prototype.Vertex_Definitions = function (shaderPart) {
+            this.CustomParts.Vertex_Definitions = shaderPart;
             return this;
             return this;
         };
         };
         CustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) {
         CustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) {

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


+ 0 - 10
src/Cameras/Inputs/babylon.arcRotateCameraPointersInput.ts

@@ -24,8 +24,6 @@ module BABYLON {
 
 
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _observer: Observer<PointerInfo>;
         private _observer: Observer<PointerInfo>;
-        private _onKeyDown: (e: KeyboardEvent) => any;
-        private _onKeyUp: (e: KeyboardEvent) => any;
         private _onMouseMove: (e: MouseEvent) => any;
         private _onMouseMove: (e: MouseEvent) => any;
         private _onGestureStart: (e: PointerEvent) => void;
         private _onGestureStart: (e: PointerEvent) => void;
         private _onGesture: (e: MSGestureEvent) => void;
         private _onGesture: (e: MSGestureEvent) => void;
@@ -202,9 +200,6 @@ module BABYLON {
             element.addEventListener("MSPointerDown", this._onGestureStart, false);
             element.addEventListener("MSPointerDown", this._onGestureStart, false);
             element.addEventListener("MSGestureChange", this._onGesture, false);
             element.addEventListener("MSGestureChange", this._onGesture, false);
 
 
-            element.addEventListener("keydown", this._onKeyDown, false);
-            element.addEventListener("keyup", this._onKeyUp, false);
-
             Tools.RegisterTopRootEvents([
             Tools.RegisterTopRootEvents([
                 { name: "blur", handler: this._onLostFocus }
                 { name: "blur", handler: this._onLostFocus }
             ]);
             ]);
@@ -220,14 +215,9 @@ module BABYLON {
                 element.removeEventListener("MSPointerDown", this._onGestureStart);
                 element.removeEventListener("MSPointerDown", this._onGestureStart);
                 element.removeEventListener("MSGestureChange", this._onGesture);
                 element.removeEventListener("MSGestureChange", this._onGesture);
 
 
-                element.removeEventListener("keydown", this._onKeyDown);
-                element.removeEventListener("keyup", this._onKeyUp);
-
                 this._isPanClick = false;
                 this._isPanClick = false;
                 this.pinchInwards = true;
                 this.pinchInwards = true;
 
 
-                this._onKeyDown = null;
-                this._onKeyUp = null;
                 this._onMouseMove = null;
                 this._onMouseMove = null;
                 this._onGestureStart = null;
                 this._onGestureStart = null;
                 this._onGesture = null;
                 this._onGesture = null;