Sebastien Vandenberghe %!s(int64=6) %!d(string=hai) anos
pai
achega
ea7e2e8206
Modificáronse 100 ficheiros con 5100 adicións e 1364 borrados
  1. 174 20
      Playground/babylon.d.txt
  2. BIN=BIN
      Playground/textures/houseWithAlpha.basis
  3. BIN=BIN
      Playground/textures/plane.basis
  4. 175 20
      dist/preview release/babylon.d.ts
  5. 1 1
      dist/preview release/babylon.js
  6. 454 67
      dist/preview release/babylon.max.js
  7. 1 1
      dist/preview release/babylon.max.js.map
  8. 356 40
      dist/preview release/babylon.module.d.ts
  9. 1 0
      dist/preview release/basisTranscoder/basis_transcoder.js
  10. BIN=BIN
      dist/preview release/basisTranscoder/basis_transcoder.wasm
  11. 175 20
      dist/preview release/documentation.d.ts
  12. 1 1
      dist/preview release/glTF2Interface/package.json
  13. 3 3
      dist/preview release/gui/babylon.gui.js
  14. 2 2
      dist/preview release/gui/package.json
  15. 7 7
      dist/preview release/inspector/babylon.inspector.bundle.js
  16. 1367 455
      dist/preview release/inspector/babylon.inspector.bundle.max.js
  17. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.max.js.map
  18. 12 8
      dist/preview release/inspector/babylon.inspector.d.ts
  19. 24 16
      dist/preview release/inspector/babylon.inspector.module.d.ts
  20. 6 6
      dist/preview release/inspector/package.json
  21. 3 3
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  22. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.js
  23. 3 3
      dist/preview release/loaders/babylonjs.loaders.js
  24. 3 3
      dist/preview release/loaders/package.json
  25. 3 3
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  26. 3 3
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  27. 3 3
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  28. 3 3
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  29. 3 3
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  30. 3 3
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  31. 3 3
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  32. 3 3
      dist/preview release/materialsLibrary/babylon.mixMaterial.js
  33. 3 3
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  34. 3 3
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  35. 3 3
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  36. 3 3
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  37. 3 3
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  38. 3 3
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  39. 3 3
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  40. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.js
  41. 2 2
      dist/preview release/materialsLibrary/package.json
  42. 7 7
      dist/preview release/nodeEditor/babylon.nodeEditor.js
  43. 1263 377
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js
  44. 1 1
      dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map
  45. 2 2
      dist/preview release/nodeEditor/package.json
  46. 1 1
      dist/preview release/package.json
  47. 1 1
      dist/preview release/packagesSizeBaseLine.json
  48. 3 3
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  49. 3 3
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  50. 3 3
      dist/preview release/postProcessesLibrary/babylon.oceanPostProcess.js
  51. 3 3
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  52. 2 2
      dist/preview release/postProcessesLibrary/package.json
  53. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js
  54. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js
  55. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js
  56. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js
  57. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js
  58. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.js
  59. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js
  60. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js
  61. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js
  62. 3 3
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js
  63. 3 3
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js
  64. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  65. 3 3
      dist/preview release/serializers/package.json
  66. 356 40
      dist/preview release/viewer/babylon.module.d.ts
  67. 31 23
      dist/preview release/viewer/babylon.viewer.js
  68. 4 4
      dist/preview release/viewer/babylon.viewer.max.js
  69. 7 1
      dist/preview release/what's new.md
  70. 47 38
      inspector/src/components/actionTabs/lines/textureLineComponent.tsx
  71. 8 0
      inspector/src/components/actionTabs/lines/textureLinkLineComponent.tsx
  72. 1 1
      inspector/src/components/actionTabs/tabs/propertyGrids/cameras/commonCameraPropertyGridComponent.tsx
  73. 28 19
      inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx
  74. 4 4
      inspector/src/components/actionTabs/tabs/propertyGrids/materials/texturePropertyGridComponent.tsx
  75. 1 1
      inspector/src/components/sceneExplorer/treeItemSpecializedComponent.tsx
  76. 1 7
      materialsLibrary/test/addpbr.js
  77. 1 1
      package.json
  78. 28 0
      src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts
  79. 1 1
      src/Cameras/VR/vrExperienceHelper.ts
  80. 3 3
      src/Cameras/VR/webVRCamera.ts
  81. 3 3
      src/Collisions/pickingInfo.ts
  82. 27 12
      src/Engines/engine.ts
  83. 1 1
      src/Gamepads/Controllers/webVRController.ts
  84. 1 1
      src/Gamepads/Controllers/windowsMotionController.ts
  85. 2 1
      src/Gizmos/gizmoManager.ts
  86. 8 8
      src/Materials/PBR/pbrClearCoatConfiguration.ts
  87. 1 1
      src/Materials/PBR/pbrSubSurfaceConfiguration.ts
  88. 111 0
      src/Materials/Textures/Loaders/basisTextureLoader.ts
  89. 2 1
      src/Materials/Textures/Loaders/index.ts
  90. 1 1
      src/Materials/Textures/Procedurals/proceduralTexture.ts
  91. 5 0
      src/Materials/Textures/internalTexture.ts
  92. 1 1
      src/Materials/Textures/texture.ts
  93. 17 14
      src/Materials/effect.ts
  94. 1 1
      src/Materials/standardMaterial.ts
  95. 1 1
      src/Meshes/instancedMesh.ts
  96. 2 1
      src/Meshes/mesh.ts
  97. 243 0
      src/Misc/basis.ts
  98. 1 1
      src/Misc/tools.ts
  99. 2 2
      src/PostProcesses/convolutionPostProcess.ts
  100. 0 0
      src/PostProcesses/postProcess.ts

+ 174 - 20
Playground/babylon.d.txt

@@ -13653,7 +13653,7 @@ declare module BABYLON {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -16980,7 +16980,7 @@ declare module BABYLON {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -17443,18 +17443,18 @@ declare module BABYLON {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -17752,7 +17752,7 @@ declare module BABYLON {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -17807,7 +17807,7 @@ declare module BABYLON {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -18477,7 +18477,7 @@ declare module BABYLON {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -28348,7 +28348,15 @@ declare module BABYLON {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
private _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -28446,7 +28454,7 @@ declare module BABYLON {
          */
         updateRenderTargetTextureSampleCount(texture: Nullable<InternalTexture>, samples: number): number;
         /** @hidden */
private _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
-        /** @hidden */
private _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        /** @hidden */
private _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
private _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
private _uploadImageToTexture(texture: InternalTexture, image: HTMLImageElement, faceIndex?: number, lod?: number): void;
         /**
@@ -30698,7 +30706,7 @@ declare module BABYLON {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -38466,7 +38474,7 @@ declare module BABYLON {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -43709,7 +43717,7 @@ declare module BABYLON {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -43723,14 +43731,14 @@ declare module BABYLON {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -44292,7 +44300,7 @@ declare module BABYLON {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -49264,6 +49272,152 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module BABYLON {
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
+declare module BABYLON {
+    /**
      * Procedural texturing is a way to programmatically create a texture. There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.
      * Custom Procedural textures are the easiest way to create your own procedural in your application.
      * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures#creating-custom-procedural-textures
@@ -53998,12 +54152,12 @@ declare module BABYLON {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -54012,7 +54166,7 @@ declare module BABYLON {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)

BIN=BIN
Playground/textures/houseWithAlpha.basis


BIN=BIN
Playground/textures/plane.basis


+ 175 - 20
dist/preview release/babylon.d.ts

@@ -13828,7 +13828,7 @@ declare module BABYLON {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -17239,7 +17239,7 @@ declare module BABYLON {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -17726,18 +17726,18 @@ declare module BABYLON {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -18045,7 +18045,7 @@ declare module BABYLON {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -18100,7 +18100,7 @@ declare module BABYLON {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -18781,7 +18781,7 @@ declare module BABYLON {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -28886,7 +28886,16 @@ declare module BABYLON {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -28990,7 +28999,7 @@ declare module BABYLON {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -31307,7 +31316,7 @@ declare module BABYLON {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -39175,7 +39184,7 @@ declare module BABYLON {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -44458,7 +44467,7 @@ declare module BABYLON {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -44472,14 +44481,14 @@ declare module BABYLON {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -45050,7 +45059,7 @@ declare module BABYLON {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -50038,6 +50047,152 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module BABYLON {
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
+declare module BABYLON {
+    /**
      * Procedural texturing is a way to programmatically create a texture. There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.
      * Custom Procedural textures are the easiest way to create your own procedural in your application.
      * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures#creating-custom-procedural-textures
@@ -54815,12 +54970,12 @@ declare module BABYLON {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -54829,7 +54984,7 @@ declare module BABYLON {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/preview release/babylon.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 454 - 67
dist/preview release/babylon.max.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 356 - 40
dist/preview release/babylon.module.d.ts

@@ -14105,7 +14105,7 @@ declare module "babylonjs/Meshes/mesh" {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -17608,7 +17608,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -18135,18 +18135,18 @@ declare module "babylonjs/Cameras/VR/webVRCamera" {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -18464,7 +18464,7 @@ declare module "babylonjs/PostProcesses/postProcess" {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -18519,7 +18519,7 @@ declare module "babylonjs/PostProcesses/postProcess" {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -19243,7 +19243,7 @@ declare module "babylonjs/Materials/Textures/Procedurals/proceduralTexture" {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -29648,7 +29648,16 @@ declare module "babylonjs/Engines/engine" {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -29752,7 +29761,7 @@ declare module "babylonjs/Engines/engine" {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -32116,7 +32125,7 @@ declare module "babylonjs/Misc/tools" {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -40468,7 +40477,7 @@ declare module "babylonjs/Materials/standardMaterial" {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -46265,7 +46274,7 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -46279,14 +46288,14 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -46882,7 +46891,7 @@ declare module "babylonjs/Materials/PBR/pbrSubSurfaceConfiguration" {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -52222,11 +52231,163 @@ declare module "babylonjs/Materials/Textures/Loaders/tgaTextureLoader" {
         loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
     }
 }
+declare module "babylonjs/Misc/basis" {
+    import { Nullable } from "babylonjs/types";
+    import { Engine } from "babylonjs/Engines/engine";
+    /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module "babylonjs/Materials/Textures/Loaders/basisTextureLoader" {
+    import { Nullable } from "babylonjs/types";
+    import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
+    import { IInternalTextureLoader } from "babylonjs/Materials/Textures/internalTextureLoader";
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
 declare module "babylonjs/Materials/Textures/Loaders/index" {
     export * from "babylonjs/Materials/Textures/Loaders/ddsTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/envTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/ktxTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/tgaTextureLoader";
+    export * from "babylonjs/Materials/Textures/Loaders/basisTextureLoader";
 }
 declare module "babylonjs/Materials/Textures/Procedurals/customProceduralTexture" {
     import { Scene } from "babylonjs/scene";
@@ -57490,12 +57651,12 @@ declare module "babylonjs/PostProcesses/convolutionPostProcess" {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -57504,7 +57665,7 @@ declare module "babylonjs/PostProcesses/convolutionPostProcess" {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)
@@ -76288,7 +76449,7 @@ declare module BABYLON {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -79699,7 +79860,7 @@ declare module BABYLON {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -80186,18 +80347,18 @@ declare module BABYLON {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -80505,7 +80666,7 @@ declare module BABYLON {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -80560,7 +80721,7 @@ declare module BABYLON {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -81241,7 +81402,7 @@ declare module BABYLON {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -91346,7 +91507,16 @@ declare module BABYLON {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -91450,7 +91620,7 @@ declare module BABYLON {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -93767,7 +93937,7 @@ declare module BABYLON {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -101635,7 +101805,7 @@ declare module BABYLON {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -106918,7 +107088,7 @@ declare module BABYLON {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -106932,14 +107102,14 @@ declare module BABYLON {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -107510,7 +107680,7 @@ declare module BABYLON {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -112498,6 +112668,152 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module BABYLON {
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
+declare module BABYLON {
+    /**
      * Procedural texturing is a way to programmatically create a texture. There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.
      * Custom Procedural textures are the easiest way to create your own procedural in your application.
      * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures#creating-custom-procedural-textures
@@ -117275,12 +117591,12 @@ declare module BABYLON {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -117289,7 +117605,7 @@ declare module BABYLON {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
dist/preview release/basisTranscoder/basis_transcoder.js


BIN=BIN
dist/preview release/basisTranscoder/basis_transcoder.wasm


+ 175 - 20
dist/preview release/documentation.d.ts

@@ -13828,7 +13828,7 @@ declare module BABYLON {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -17239,7 +17239,7 @@ declare module BABYLON {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -17726,18 +17726,18 @@ declare module BABYLON {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -18045,7 +18045,7 @@ declare module BABYLON {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -18100,7 +18100,7 @@ declare module BABYLON {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -18781,7 +18781,7 @@ declare module BABYLON {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -28886,7 +28886,16 @@ declare module BABYLON {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -28990,7 +28999,7 @@ declare module BABYLON {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -31307,7 +31316,7 @@ declare module BABYLON {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -39175,7 +39184,7 @@ declare module BABYLON {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -44458,7 +44467,7 @@ declare module BABYLON {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -44472,14 +44481,14 @@ declare module BABYLON {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -45050,7 +45059,7 @@ declare module BABYLON {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -50038,6 +50047,152 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module BABYLON {
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
+declare module BABYLON {
+    /**
      * Procedural texturing is a way to programmatically create a texture. There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.
      * Custom Procedural textures are the easiest way to create your own procedural in your application.
      * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures#creating-custom-procedural-textures
@@ -54815,12 +54970,12 @@ declare module BABYLON {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -54829,7 +54984,7 @@ declare module BABYLON {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)

+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 3 - 3
dist/preview release/gui/babylon.gui.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 2 - 2
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 7 - 7
dist/preview release/inspector/babylon.inspector.bundle.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1367 - 455
dist/preview release/inspector/babylon.inspector.bundle.max.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.max.js.map


+ 12 - 8
dist/preview release/inspector/babylon.inspector.d.ts

@@ -442,6 +442,7 @@ declare module INSPECTOR {
         onSelectionChangedObservable?: BABYLON.Observable<any>;
         onDebugSelectionChangeObservable?: BABYLON.Observable<BABYLON.BaseTexture>;
         propertyName?: string;
+        customDebugAction?: (state: boolean) => void;
     }
     export class TextureLinkLineComponent extends React.Component<ITextureLinkLineComponentProps, {
         isDebugSelected: boolean;
@@ -479,19 +480,20 @@ declare module INSPECTOR {
         globalState?: GlobalState;
         hideChannelSelect?: boolean;
     }
+    enum ChannelToDisplay {
+        R = 0,
+        G = 1,
+        B = 2,
+        A = 3,
+        All = 4
+    }
     export class TextureLineComponent extends React.Component<ITextureLineComponentProps, {
-        displayRed: boolean;
-        displayGreen: boolean;
-        displayBlue: boolean;
-        displayAlpha: boolean;
+        channel: ChannelToDisplay;
         face: number;
     }> {
         constructor(props: ITextureLineComponentProps);
         shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: {
-            displayRed: boolean;
-            displayGreen: boolean;
-            displayBlue: boolean;
-            displayAlpha: boolean;
+            channel: ChannelToDisplay;
             face: number;
         }): boolean;
         componentDidMount(): void;
@@ -587,6 +589,8 @@ declare module INSPECTOR {
     export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMaterialPropertyGridComponentProps> {
         private _onDebugSelectionChangeObservable;
         constructor(props: IPBRMaterialPropertyGridComponentProps);
+        switchAmbientMode(state: boolean): void;
+        switchMetallicMode(state: boolean): void;
         renderTextures(onDebugSelectionChangeObservable: BABYLON.Observable<BABYLON.BaseTexture>): JSX.Element;
         render(): JSX.Element;
     }

+ 24 - 16
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -515,6 +515,7 @@ declare module "babylonjs-inspector/components/actionTabs/lines/textureLinkLineC
         onSelectionChangedObservable?: Observable<any>;
         onDebugSelectionChangeObservable?: Observable<BaseTexture>;
         propertyName?: string;
+        customDebugAction?: (state: boolean) => void;
     }
     export class TextureLinkLineComponent extends React.Component<ITextureLinkLineComponentProps, {
         isDebugSelected: boolean;
@@ -561,19 +562,20 @@ declare module "babylonjs-inspector/components/actionTabs/lines/textureLineCompo
         globalState?: GlobalState;
         hideChannelSelect?: boolean;
     }
+    enum ChannelToDisplay {
+        R = 0,
+        G = 1,
+        B = 2,
+        A = 3,
+        All = 4
+    }
     export class TextureLineComponent extends React.Component<ITextureLineComponentProps, {
-        displayRed: boolean;
-        displayGreen: boolean;
-        displayBlue: boolean;
-        displayAlpha: boolean;
+        channel: ChannelToDisplay;
         face: number;
     }> {
         constructor(props: ITextureLineComponentProps);
         shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: {
-            displayRed: boolean;
-            displayGreen: boolean;
-            displayBlue: boolean;
-            displayAlpha: boolean;
+            channel: ChannelToDisplay;
             face: number;
         }): boolean;
         componentDidMount(): void;
@@ -690,6 +692,8 @@ declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/mat
     export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMaterialPropertyGridComponentProps> {
         private _onDebugSelectionChangeObservable;
         constructor(props: IPBRMaterialPropertyGridComponentProps);
+        switchAmbientMode(state: boolean): void;
+        switchMetallicMode(state: boolean): void;
         renderTextures(onDebugSelectionChangeObservable: Observable<BaseTexture>): JSX.Element;
         render(): JSX.Element;
     }
@@ -2688,6 +2692,7 @@ declare module INSPECTOR {
         onSelectionChangedObservable?: BABYLON.Observable<any>;
         onDebugSelectionChangeObservable?: BABYLON.Observable<BABYLON.BaseTexture>;
         propertyName?: string;
+        customDebugAction?: (state: boolean) => void;
     }
     export class TextureLinkLineComponent extends React.Component<ITextureLinkLineComponentProps, {
         isDebugSelected: boolean;
@@ -2725,19 +2730,20 @@ declare module INSPECTOR {
         globalState?: GlobalState;
         hideChannelSelect?: boolean;
     }
+    enum ChannelToDisplay {
+        R = 0,
+        G = 1,
+        B = 2,
+        A = 3,
+        All = 4
+    }
     export class TextureLineComponent extends React.Component<ITextureLineComponentProps, {
-        displayRed: boolean;
-        displayGreen: boolean;
-        displayBlue: boolean;
-        displayAlpha: boolean;
+        channel: ChannelToDisplay;
         face: number;
     }> {
         constructor(props: ITextureLineComponentProps);
         shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: {
-            displayRed: boolean;
-            displayGreen: boolean;
-            displayBlue: boolean;
-            displayAlpha: boolean;
+            channel: ChannelToDisplay;
             face: number;
         }): boolean;
         componentDidMount(): void;
@@ -2833,6 +2839,8 @@ declare module INSPECTOR {
     export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMaterialPropertyGridComponentProps> {
         private _onDebugSelectionChangeObservable;
         constructor(props: IPBRMaterialPropertyGridComponentProps);
+        switchAmbientMode(state: boolean): void;
+        switchMetallicMode(state: boolean): void;
         renderTextures(onDebugSelectionChangeObservable: BABYLON.Observable<BABYLON.BaseTexture>): JSX.Element;
         render(): JSX.Element;
     }

+ 6 - 6
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -29,11 +29,11 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2",
-        "babylonjs-gui": "4.1.0-alpha.2",
-        "babylonjs-loaders": "4.1.0-alpha.2",
-        "babylonjs-serializers": "4.1.0-alpha.2",
-        "babylonjs-gltf2interface": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3",
+        "babylonjs-gui": "4.1.0-alpha.3",
+        "babylonjs-loaders": "4.1.0-alpha.3",
+        "babylonjs-serializers": "4.1.0-alpha.3",
+        "babylonjs-gltf2interface": "4.1.0-alpha.3"
     },
     "devDependencies": {
         "@types/react": "~16.7.3",

+ 3 - 3
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.1.0-alpha.2",
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs-gltf2interface": "4.1.0-alpha.3",
+        "babylonjs": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

+ 3 - 3
dist/preview release/materialsLibrary/babylon.cellMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

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

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.fireMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.mixMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 2 - 2
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 7 - 7
dist/preview release/nodeEditor/babylon.nodeEditor.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1263 - 377
dist/preview release/nodeEditor/babylon.nodeEditor.max.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


+ 2 - 2
dist/preview release/nodeEditor/package.json

@@ -4,14 +4,14 @@
     },
     "name": "babylonjs-node-editor",
     "description": "The Babylon.js node material editor.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3"
     },
     "files": [
         "babylon.nodeEditor.max.js.map",

+ 1 - 1
dist/preview release/package.json

@@ -7,7 +7,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"engineOnly":251146,"sceneOnly":508675,"minGridMaterial":636126,"minStandardMaterial":761524}
+{"engineOnly":251647,"sceneOnly":509176,"minGridMaterial":636672,"minStandardMaterial":762070}

+ 3 - 3
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/postProcessesLibrary/babylon.oceanPostProcess.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 2 - 2
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 3 - 3
dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js

@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
 /******/ ({
 
 /***/ "../../node_modules/tslib/tslib.es6.js":
-/*!*****************************************************************!*\
-  !*** c:/Dev/Babylon/Babylon.js/node_modules/tslib/tslib.es6.js ***!
-  \*****************************************************************/
+/*!***********************************************************!*\
+  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
+  \***********************************************************/
 /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 

+ 2 - 2
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

+ 3 - 3
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.1.0-alpha.2",
-        "babylonjs-gltf2interface": "4.1.0-alpha.2"
+        "babylonjs": "4.1.0-alpha.3",
+        "babylonjs-gltf2interface": "4.1.0-alpha.3"
     },
     "engines": {
         "node": "*"

+ 356 - 40
dist/preview release/viewer/babylon.module.d.ts

@@ -14105,7 +14105,7 @@ declare module "babylonjs/Meshes/mesh" {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -17608,7 +17608,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -18135,18 +18135,18 @@ declare module "babylonjs/Cameras/VR/webVRCamera" {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -18464,7 +18464,7 @@ declare module "babylonjs/PostProcesses/postProcess" {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -18519,7 +18519,7 @@ declare module "babylonjs/PostProcesses/postProcess" {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -19243,7 +19243,7 @@ declare module "babylonjs/Materials/Textures/Procedurals/proceduralTexture" {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -29648,7 +29648,16 @@ declare module "babylonjs/Engines/engine" {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -29752,7 +29761,7 @@ declare module "babylonjs/Engines/engine" {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -32116,7 +32125,7 @@ declare module "babylonjs/Misc/tools" {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -40468,7 +40477,7 @@ declare module "babylonjs/Materials/standardMaterial" {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -46265,7 +46274,7 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -46279,14 +46288,14 @@ declare module "babylonjs/Materials/PBR/pbrClearCoatConfiguration" {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -46882,7 +46891,7 @@ declare module "babylonjs/Materials/PBR/pbrSubSurfaceConfiguration" {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -52222,11 +52231,163 @@ declare module "babylonjs/Materials/Textures/Loaders/tgaTextureLoader" {
         loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
     }
 }
+declare module "babylonjs/Misc/basis" {
+    import { Nullable } from "babylonjs/types";
+    import { Engine } from "babylonjs/Engines/engine";
+    /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module "babylonjs/Materials/Textures/Loaders/basisTextureLoader" {
+    import { Nullable } from "babylonjs/types";
+    import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
+    import { IInternalTextureLoader } from "babylonjs/Materials/Textures/internalTextureLoader";
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
 declare module "babylonjs/Materials/Textures/Loaders/index" {
     export * from "babylonjs/Materials/Textures/Loaders/ddsTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/envTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/ktxTextureLoader";
     export * from "babylonjs/Materials/Textures/Loaders/tgaTextureLoader";
+    export * from "babylonjs/Materials/Textures/Loaders/basisTextureLoader";
 }
 declare module "babylonjs/Materials/Textures/Procedurals/customProceduralTexture" {
     import { Scene } from "babylonjs/scene";
@@ -57490,12 +57651,12 @@ declare module "babylonjs/PostProcesses/convolutionPostProcess" {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -57504,7 +57665,7 @@ declare module "babylonjs/PostProcesses/convolutionPostProcess" {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)
@@ -76288,7 +76449,7 @@ declare module BABYLON {
         instancesData: Float32Array;
         overridenInstanceCount: number;
         isFrozen: boolean;
-        previousBatch: _InstancesBatch;
+        previousBatch: Nullable<_InstancesBatch>;
         hardwareInstancedRendering: boolean;
         sideOrientation: number;
     }
@@ -79699,7 +79860,7 @@ declare module BABYLON {
          */
         onButtonStateChange(callback: (controlledIndex: number, buttonIndex: number, state: ExtendedGamepadButton) => void): void;
         /**
-         * X and Y axis corrisponding to the controllers joystick
+         * X and Y axis corresponding to the controllers joystick
          */
         pad: StickValues;
         /**
@@ -80186,18 +80347,18 @@ declare module BABYLON {
         getControllerByName(name: string): Nullable<WebVRController>;
         private _leftController;
         /**
-         * The controller corrisponding to the users left hand.
+         * The controller corresponding to the users left hand.
          */
         readonly leftController: Nullable<WebVRController>;
         private _rightController;
         /**
-         * The controller corrisponding to the users right hand.
+         * The controller corresponding to the users right hand.
          */
         readonly rightController: Nullable<WebVRController>;
         /**
          * Casts a ray forward from the vrCamera's gaze.
          * @param length Length of the ray (default: 100)
-         * @returns the ray corrisponding to the gaze
+         * @returns the ray corresponding to the gaze
          */
         getForwardRay(length?: number): Ray;
         /**
@@ -80505,7 +80666,7 @@ declare module BABYLON {
         getEngine(): Engine;
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -80560,7 +80721,7 @@ declare module BABYLON {
         isReady(): boolean;
         /**
          * Binds all textures and uniforms to the shader, this will be run on every pass.
-         * @returns the effect corrisponding to this post process. Null if not compiled or not ready.
+         * @returns the effect corresponding to this post process. Null if not compiled or not ready.
          */
         apply(): Nullable<Effect>;
         private _disposeTextures;
@@ -81241,7 +81402,7 @@ declare module BABYLON {
         constructor(name: string, size: any, fragment: any, scene: Nullable<Scene>, fallbackTexture?: Nullable<Texture>, generateMipMaps?: boolean, isCube?: boolean);
         /**
          * The effect that is created when initializing the post process.
-         * @returns The created effect corrisponding the the postprocess.
+         * @returns The created effect corresponding the the postprocess.
          */
         getEffect(): Effect;
         /**
@@ -91346,7 +91507,16 @@ declare module BABYLON {
          * @returns a InternalTexture for assignment back into BABYLON.Texture
          */
         createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, excludeLoaders?: Array<IInternalTextureLoader>): InternalTexture;
-        private _rescaleTexture;
+        /**
+         * @hidden
+         * Rescales a texture
+         * @param source input texutre
+         * @param destination destination texture
+         * @param scene scene to use to render the resize
+         * @param internalFormat format to use when resizing
+         * @param onComplete callback to be called when resize has completed
+         */
+        _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void;
         private _unpackFlipYCached;
         /**
          * In case you are sharing the context with other applications, it might
@@ -91450,7 +91620,7 @@ declare module BABYLON {
         /** @hidden */
         _uploadCompressedDataToTextureDirectly(texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
-        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
+        _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
         /** @hidden */
         _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
         /** @hidden */
@@ -93767,7 +93937,7 @@ declare module BABYLON {
          * @param scriptId defines the id of the script element
          * @returns a promise request object
          */
-        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>>;
+        static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean>;
         /**
          * Loads a file from a blob
          * @param fileToLoad defines the blob to use
@@ -101635,7 +101805,7 @@ declare module BABYLON {
          */
         roughness: number;
         /**
-         * In case of refraction, define the value of the indice of refraction.
+         * In case of refraction, define the value of the index of refraction.
          * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
          */
         indexOfRefraction: number;
@@ -106918,7 +107088,7 @@ declare module BABYLON {
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          */
-        private static readonly _DefaultIndiceOfRefraction;
+        private static readonly _DefaultIndexOfRefraction;
         private _isEnabled;
         /**
          * Defines if the clear coat is enabled in the material.
@@ -106932,14 +107102,14 @@ declare module BABYLON {
          * Defines the clear coat layer roughness.
          */
         roughness: number;
-        private _indiceOfRefraction;
+        private _indexOfRefraction;
         /**
-         * Defines the indice of refraction of the clear coat.
+         * Defines the index of refraction of the clear coat.
          * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
          * The default fits with a polyurethane material.
          * Changing the default value is more performance intensive.
          */
-        indiceOfRefraction: number;
+        indexOfRefraction: number;
         private _texture;
         /**
          * Stores the clear coat values in a texture.
@@ -107510,7 +107680,7 @@ declare module BABYLON {
         refractionTexture: Nullable<BaseTexture>;
         private _indexOfRefraction;
         /**
-         * Defines the indice of refraction used in the material.
+         * Defines the index of refraction used in the material.
          * https://en.wikipedia.org/wiki/List_of_refractive_indices
          */
         indexOfRefraction: number;
@@ -112498,6 +112668,152 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * Info about the .basis files
+     */
+    class BasisFileInfo {
+        /**
+         * If the file has alpha
+         */
+        hasAlpha: boolean;
+        /**
+         * Width of the image
+         */
+        width: number;
+        /**
+         * Height of the image
+         */
+        height: number;
+        /**
+         * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+         */
+        alignedWidth: number;
+        /**
+         * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+         */
+        alignedHeight: number;
+    }
+    /**
+     * Used to load .Basis files
+     * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     */
+    export class BasisTools {
+        private static _IgnoreSupportedFormats;
+        private static _LoadScriptPromise;
+        private static _FallbackURL;
+        private static _BASIS_FORMAT;
+        /**
+         * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+         * This should be set prior to loading a .basis texture
+         */
+        static BasisModule: Nullable<any>;
+        /**
+         * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+         * @returns promise which will resolve if the basis module was loaded
+         */
+        static VerifyBasisModuleAsync(): any;
+        /**
+         * Verifies that the basis module has been populated and creates a bsis file from the image data
+         * @param data array buffer of the .basis file
+         * @returns the Basis file
+         */
+        static LoadBasisFile(data: ArrayBuffer): any;
+        /**
+         * Detects the supported transcode format for the file
+         * @param engine Babylon engine
+         * @param fileInfo info about the file
+         * @returns the chosed format or null if none are supported
+         */
+        static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number>;
+        /**
+         * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+         * @param basisFormat format chosen from GetSupportedTranscodeFormat
+         * @returns internal format corresponding to the Basis format
+         */
+        static GetInternalFormatFromBasisFormat(basisFormat: number): number;
+        /**
+         * Retreives information about the basis file eg. dimensions
+         * @param basisFile the basis file to get the info from
+         * @returns information about the basis file
+         */
+        static GetFileInfo(basisFile: any): BasisFileInfo;
+        /**
+         * Transcodes the basis file to the requested format to be transferred to the gpu
+         * @param format fromat to be transferred to
+         * @param fileInfo information about the loaded file
+         * @param loadedFile the loaded basis file
+         * @returns the resulting pixels and if the transcode fell back to using Rgb565
+         */
+        static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any): {
+            fallbackToRgb565: boolean;
+            pixels: Uint8Array;
+        };
+        /**
+         * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+         * An unoptimized version of dxtToRgb565.  Also, the floating
+         * point math used to compute the colors actually results in
+         * slightly different colors compared to hardware DXT decoders.
+         * @param src dxt src pixels
+         * @param srcByteOffset offset for the start of src
+         * @param  width aligned width of the image
+         * @param  height aligned height of the image
+         * @return the converted pixels
+         */
+        static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array;
+    }
+}
+declare module BABYLON {
+    /**
+     * Loader for .basis file format
+     */
+    export class _BasisTextureLoader implements IInternalTextureLoader {
+        /**
+         * Defines whether the loader supports cascade loading the different faces.
+         */
+        readonly supportCascades: boolean;
+        /**
+         * This returns if the loader support the current file information.
+         * @param extension defines the file extension of the file being loaded
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @param fallback defines the fallback internal texture if any
+         * @param isBase64 defines whether the texture is encoded as a base64
+         * @param isBuffer defines whether the texture data are stored as a buffer
+         * @returns true if the loader can load the specified file
+         */
+        canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean;
+        /**
+         * Transform the url before loading if required.
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the transformed texture
+         */
+        transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string;
+        /**
+         * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+         * @param rootUrl the url of the texture
+         * @param textureFormatInUse defines the current compressed format in use iun the engine
+         * @returns the fallback texture
+         */
+        getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string>;
+        /**
+         * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param createPolynomials will be true if polynomials have been requested
+         * @param onLoad defines the callback to trigger once the texture is ready
+         * @param onError defines the callback to trigger in case of error
+         */
+        loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void;
+        /**
+         * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+         * @param data contains the texture data
+         * @param texture defines the BabylonJS internal texture
+         * @param callback defines the method to call once ready to upload
+         */
+        loadData(data: ArrayBuffer, texture: InternalTexture, callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void;
+    }
+}
+declare module BABYLON {
+    /**
      * Procedural texturing is a way to programmatically create a texture. There are 2 types of procedural textures: code-only, and code that references some classic 2D images, sometimes called 'refMaps' or 'sampler' images.
      * Custom Procedural textures are the easiest way to create your own procedural in your application.
      * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures#creating-custom-procedural-textures
@@ -117275,12 +117591,12 @@ declare module BABYLON {
      * See http://en.wikipedia.org/wiki/Kernel_(image_processing)
      */
     export class ConvolutionPostProcess extends PostProcess {
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[];
         /**
          * Creates a new instance ConvolutionPostProcess
          * @param name The name of the effect.
-         * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+         * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
          * @param options The required width/height ratio to downsize to before computing the render pass.
          * @param camera The camera to apply the render pass to.
          * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -117289,7 +117605,7 @@ declare module BABYLON {
          * @param textureType Type of textures used when performing the post process. (default: 0)
          */
         constructor(name: string, 
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         kernel: number[], options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         /**
          * Edge detection 0 see https://en.wikipedia.org/wiki/Kernel_(image_processing)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 31 - 23
dist/preview release/viewer/babylon.viewer.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 4 - 4
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -4,7 +4,7 @@
 - WIP: Node Material (NEED DOC AND SAMPLES) ([Deltakosh](https://github.com/deltakosh/))
 - WIP: Node material editor (NEED DOC AND VIDEOS) ([Deltakosh](https://github.com/deltakosh/)/[TrevorDev](https://github.com/TrevorDev))
 - WIP: WebGPU support (NEED DOC AND SAMPLES) ([Sebavan](https://github.com/sebavan/)
-- WIP: .basis texture file format support (NEED DEMO) ([TrevorDev](https://github.com/TrevorDev))
+- WIP: .basis texture file format support [Demo](https://www.babylonjs-playground.com/#4RN0VF) ([TrevorDev](https://github.com/TrevorDev))
 
 ## Optimizations
 
@@ -17,6 +17,7 @@
 - Unify preparation of instance attributes. Added `MaterialHelper.PushAttributesForInstances` ([MarkusBillharz](https://github.com/MarkusBillharz))
 - Added support for PBR [irradiance map](https://doc.babylonjs.com/how_to/physically_based_rendering_master#irradiance-map)
 - Ability to set render camera on utility layer instead of using the latest active camera ([TrevorDev](https://github.com/TrevorDev))
+- Method to check if device orientation is available ([TrevorDev](https://github.com/TrevorDev))
 
 ### Engine
 - Added preprocessors for shaders to improve how shaders are compiled for WebGL1/2 or WebGPU ([Deltakosh](https://github.com/deltakosh/))
@@ -30,6 +31,8 @@
 - Added context menu to add `SSAORenderingPipeline` and `SSAO2RenderingPipeline` ([Deltakosh](https://github.com/deltakosh/))
 - Added support for texture creation and assignments per material ([Deltakosh](https://github.com/deltakosh/))
 - Added support for occlusion properties ([Deltakosh](https://github.com/deltakosh/))
+- Texture channels are now displayed in grayscale ([Deltakosh](https://github.com/deltakosh/))
+- Ambiant and metallic maps are displayed correctly on PBR material even when using ORM packed texture ([Deltakosh](https://github.com/deltakosh/))
 
 ### Tools
 - Added `Color3.toHSV()`, `Color3.toHSVToRef()` and `Color3.HSVtoRGBToRef()` ([Deltakosh](https://github.com/deltakosh/))
@@ -50,5 +53,8 @@
 - Runtime animation `goToFrame` when going back in time now correctly triggers future events when reached ([zakhenry](https://github.com/zakhenry))
 - Fixed bug in Ray.intersectsTriangle where the barycentric coordinates `bu` and `bv` being returned is actually `bv` and `bw`. ([bghgary](https://github.com/bghgary))
 - Do not call onError when creating a texture when falling back to another loader ([TrevorDev](https://github.com/TrevorDev))
+- Context loss should not cause PBR materials to render black ([TrevorDev](https://github.com/TrevorDev))
+- Only cast pointer ray input when pointer is locked in webVR ([TrevorDev](https://github.com/TrevorDev))
+- Avoid using default utility layer in gizmo manager to support multiple scenes ([TrevorDev](https://github.com/TrevorDev))
 
 ## Breaking changes

+ 47 - 38
inspector/src/components/actionTabs/lines/textureLineComponent.tsx

@@ -14,24 +14,29 @@ interface ITextureLineComponentProps {
     width: number;
     height: number;
     globalState?: GlobalState;
-    hideChannelSelect?:boolean;
+    hideChannelSelect?: boolean;
 }
 
-export class TextureLineComponent extends React.Component<ITextureLineComponentProps, { displayRed: boolean, displayGreen: boolean, displayBlue: boolean, displayAlpha: boolean, face: number }> {
+enum ChannelToDisplay {
+    R,
+    G,
+    B,
+    A,
+    All
+}
+
+export class TextureLineComponent extends React.Component<ITextureLineComponentProps, { channel: ChannelToDisplay, face: number }> {
     constructor(props: ITextureLineComponentProps) {
         super(props);
 
         this.state = {
-            displayRed: true,
-            displayGreen: true,
-            displayBlue: true,
-            displayAlpha: true,
+            channel: ChannelToDisplay.All,
             face: 0
         };
     }
 
-    shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: { displayRed: boolean, displayGreen: boolean, displayBlue: boolean, displayAlpha: boolean, face: number }): boolean {
-        return (nextProps.texture !== this.props.texture || nextState.displayRed !== this.state.displayRed || nextState.displayGreen !== this.state.displayGreen || nextState.displayBlue !== this.state.displayBlue || nextState.displayAlpha !== this.state.displayAlpha || nextState.face !== this.state.face);
+    shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: { channel: ChannelToDisplay, face: number }): boolean {
+        return (nextProps.texture !== this.props.texture || nextState.channel !== this.state.channel || nextState.face !== this.state.face);
     }
 
     componentDidMount() {
@@ -44,8 +49,8 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
 
     updatePreview() {
         var texture = this.props.texture;
-        if(!texture.isReady() && texture._texture){
-            texture._texture.onLoadedObservable.addOnce(()=>{
+        if (!texture.isReady() && texture._texture) {
+            texture._texture.onLoadedObservable.addOnce(() => {
                 this.updatePreview();
             })
         }
@@ -78,10 +83,10 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
 
         const previewCanvas = this.refs.canvas as HTMLCanvasElement;
 
-        if(this.props.globalState){
+        if (this.props.globalState) {
             this.props.globalState.blockMutationUpdates = true;
         }
-        
+
         let rtt = new RenderTargetTexture(
             "temp",
             { width: width, height: height },
@@ -104,27 +109,31 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
             var data = engine.readPixels(0, 0, width, height);
 
             if (!texture.isCube) {
-                if (!this.state.displayRed || !this.state.displayGreen || !this.state.displayBlue) {
+                if (this.state.channel != ChannelToDisplay.All) {
                     for (var i = 0; i < width * height * 4; i += 4) {
 
-                        if (!this.state.displayRed) {
-                            data[i] = 0;
-                        }
-
-                        if (!this.state.displayGreen) {
-                            data[i + 1] = 0;
-                        }
-
-                        if (!this.state.displayBlue) {
-                            data[i + 2] = 0;
-                        }
-
-                        if (this.state.displayAlpha) {
-                            var alpha = data[i + 2];
-                            data[i] = alpha;
-                            data[i + 1] = alpha;
-                            data[i + 2] = alpha;
-                            data[i + 2] = 0;
+                        switch (this.state.channel) {
+                            case ChannelToDisplay.R:
+                                data[i + 1] = data[i];
+                                data[i + 2] = data[i];
+                                data[i + 3] = 255;
+                                break;
+                            case ChannelToDisplay.G:
+                                data[i] = data[i + 1];
+                                data[i + 2] = data[i];
+                                data[i + 3] = 255;
+                                break;
+                            case ChannelToDisplay.B:
+                                data[i] = data[i + 2];
+                                data[i + 1] = data[i + 2];
+                                data[i + 3] = 255;
+                                break;
+                            case ChannelToDisplay.A:
+                                data[i] = data[i + 3];
+                                data[i + 1] = data[i + 3];
+                                data[i + 2] = data[i + 3];
+                                data[i + 3] = 255;
+                                break;
                         }
                     }
                 }
@@ -165,10 +174,10 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
         passPostProcess.dispose();
 
         previewCanvas.style.height = height + "px";
-        if(this.props.globalState){
+        if (this.props.globalState) {
             this.props.globalState.blockMutationUpdates = false;
         }
-        
+
     }
 
     render() {
@@ -190,11 +199,11 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
                 {
                     !this.props.hideChannelSelect && !texture.isCube &&
                     <div className="control">
-                        <button className={this.state.displayRed && !this.state.displayGreen ? "red command selected" : "red command"} onClick={() => this.setState({ displayRed: true, displayGreen: false, displayBlue: false, displayAlpha: false })}>R</button>
-                        <button className={this.state.displayGreen && !this.state.displayBlue ? "green command selected" : "green command"} onClick={() => this.setState({ displayRed: false, displayGreen: true, displayBlue: false, displayAlpha: false })}>G</button>
-                        <button className={this.state.displayBlue && !this.state.displayAlpha ? "blue command selected" : "blue command"} onClick={() => this.setState({ displayRed: false, displayGreen: false, displayBlue: true, displayAlpha: false })}>B</button>
-                        <button className={this.state.displayAlpha && !this.state.displayRed ? "alpha command selected" : "alpha command"} onClick={() => this.setState({ displayRed: false, displayGreen: false, displayBlue: false, displayAlpha: true })}>A</button>
-                        <button className={this.state.displayRed && this.state.displayGreen ? "all command selected" : "all command"} onClick={() => this.setState({ displayRed: true, displayGreen: true, displayBlue: true, displayAlpha: true })}>ALL</button>
+                        <button className={this.state.channel === ChannelToDisplay.R ? "red command selected" : "red command"} onClick={() => this.setState({ channel: ChannelToDisplay.R })}>R</button>
+                        <button className={this.state.channel === ChannelToDisplay.G ? "green command selected" : "green command"} onClick={() => this.setState({ channel: ChannelToDisplay.G })}>G</button>
+                        <button className={this.state.channel === ChannelToDisplay.B ? "blue command selected" : "blue command"} onClick={() => this.setState({ channel: ChannelToDisplay.B })}>B</button>
+                        <button className={this.state.channel === ChannelToDisplay.A ? "alpha command selected" : "alpha command"} onClick={() => this.setState({ channel: ChannelToDisplay.A })}>A</button>
+                        <button className={this.state.channel === ChannelToDisplay.All ? "all command selected" : "all command"} onClick={() => this.setState({ channel: ChannelToDisplay.All })}>ALL</button>
                     </div>
                 }
                 <canvas ref="canvas" className="preview" />

+ 8 - 0
inspector/src/components/actionTabs/lines/textureLinkLineComponent.tsx

@@ -20,6 +20,7 @@ export interface ITextureLinkLineComponentProps {
     onSelectionChangedObservable?: Observable<any>;
     onDebugSelectionChangeObservable?: Observable<BaseTexture>;
     propertyName?: string;
+    customDebugAction?: (state: boolean) => void
 }
 
 export class TextureLinkLineComponent extends React.Component<ITextureLinkLineComponentProps, { isDebugSelected: boolean }> {
@@ -52,6 +53,13 @@ export class TextureLinkLineComponent extends React.Component<ITextureLinkLineCo
     }
 
     debugTexture() {
+        if (this.props.customDebugAction) {
+            let newState = !this.state.isDebugSelected;
+            this.props.customDebugAction(newState);
+            this.setState({ isDebugSelected: newState });
+            return;
+        }
+
         const texture = this.props.texture;
         const material = this.props.material;
 

+ 1 - 1
inspector/src/components/actionTabs/tabs/propertyGrids/cameras/commonCameraPropertyGridComponent.tsx

@@ -47,7 +47,7 @@ export class CommonCameraPropertyGridComponent extends React.Component<ICommonCa
                     <OptionsLineComponent label="Mode" options={modeOptions} target={camera} propertyName="mode" onPropertyChangedObservable={this.props.onPropertyChangedObservable} onSelect={(value) => this.setState({ mode: value })} />
                     {
                         camera.mode === Camera.PERSPECTIVE_CAMERA &&
-                        <SliderLineComponent label="Field of view" target={camera} propertyName="fov" minimum={0.1} maximum={Math.PI} step={0.1} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
+                        <SliderLineComponent label="Field of view" target={camera} useEuler={this.props.globalState.onlyUseEulers} propertyName="fov" minimum={0.1} maximum={Math.PI} step={0.1} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                     }
                     {
                         camera.mode === Camera.ORTHOGRAPHIC_CAMERA &&

+ 28 - 19
inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx

@@ -30,20 +30,28 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
         super(props);
     }
 
+    switchAmbientMode(state: boolean) {
+        this.props.material.debugMode = state ? 21 : 0;
+    }
+
+    switchMetallicMode(state: boolean) {
+        this.props.material.debugMode = state ? 62 : 0;
+    }
+
     renderTextures(onDebugSelectionChangeObservable: Observable<BaseTexture>) {
         const material = this.props.material;
 
         return (
             <LineContainerComponent globalState={this.props.globalState} title="TEXTURES">
                 <TextureLinkLineComponent label="Albedo" texture={material.albedoTexture} propertyName="albedoTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
-                <TextureLinkLineComponent label="Metallic" texture={material.metallicTexture} propertyName="metallicTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
+                <TextureLinkLineComponent customDebugAction={state => this.switchMetallicMode(state)} label="Metallic" texture={material.metallicTexture} propertyName="metallicTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Reflection" texture={material.reflectionTexture} propertyName="reflectionTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Refraction" texture={material.refractionTexture} propertyName="refractionTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Micro-surface" texture={material.microSurfaceTexture} propertyName="microSurfaceTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Bump" texture={material.bumpTexture} propertyName="bumpTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Emissive" texture={material.emissiveTexture} propertyName="emissiveTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Opacity" texture={material.opacityTexture} propertyName="opacityTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
-                <TextureLinkLineComponent label="Ambient" texture={material.ambientTexture} propertyName="ambientTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
+                <TextureLinkLineComponent customDebugAction={state => this.switchAmbientMode(state)} label="Ambient" texture={material.ambientTexture} propertyName="ambientTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <TextureLinkLineComponent label="Lightmap" texture={material.lightmapTexture} propertyName="lightmapTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
                 <CheckBoxLineComponent label="Use lightmap as shadowmap" target={material} propertyName="useLightmapAsShadowmap " onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
             </LineContainerComponent>
@@ -95,23 +103,24 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
             // Lighting Params
             { label: "Surface Albedo", value: 60 },
             { label: "Reflectance 0", value: 61 },
-            { label: "Roughness", value: 62 },
-            { label: "AlphaG", value: 63 },
-            { label: "NdotV", value: 64 },
-            { label: "ClearCoat Color", value: 65 },
-            { label: "ClearCoat Roughness", value: 66 },
-            { label: "ClearCoat NdotV", value: 67 },
-            { label: "Transmittance", value: 68 },
-            { label: "Refraction Transmittance", value: 69 },
+            { label: "Metallic", value: 62 },
+            { label: "Roughness", value: 63 },
+            { label: "AlphaG", value: 64 },
+            { label: "NdotV", value: 65 },
+            { label: "ClearCoat Color", value: 66 },
+            { label: "ClearCoat Roughness", value: 67 },
+            { label: "ClearCoat NdotV", value: 68 },
+            { label: "Transmittance", value: 69 },
+            { label: "Refraction Transmittance", value: 70 },
             // Misc
-            { label: "SEO", value: 70 },
-            { label: "EHO", value: 71 },
-            { label: "Energy Factor", value: 72 },
-            { label: "Specular Reflectance", value: 73 },
-            { label: "Clear Coat Reflectance", value: 74 },
-            { label: "Sheen Reflectance", value: 75 },
-            { label: "Luminance Over Alpha", value: 76 },
-            { label: "Alpha", value: 77 },
+            { label: "SEO", value: 80 },
+            { label: "EHO", value: 81 },
+            { label: "Energy Factor", value: 82 },
+            { label: "Specular Reflectance", value: 83 },
+            { label: "Clear Coat Reflectance", value: 84 },
+            { label: "Sheen Reflectance", value: 85 },
+            { label: "Luminance Over Alpha", value: 86 },
+            { label: "Alpha", value: 87 },
         ];
 
         return (
@@ -139,7 +148,7 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
                         <div className="fragment">
                             <SliderLineComponent label="Intensity" target={material.clearCoat} propertyName="intensity" minimum={0} maximum={1} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                             <SliderLineComponent label="Roughness" target={material.clearCoat} propertyName="roughness" minimum={0} maximum={1} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
-                            <SliderLineComponent label="IOR" target={material.clearCoat} propertyName="indiceOfRefraction" minimum={1.0} maximum={3} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
+                            <SliderLineComponent label="IOR" target={material.clearCoat} propertyName="indexOfRefraction" minimum={1.0} maximum={3} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                             <TextureLinkLineComponent label="Texture" texture={material.clearCoat.texture} material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={this._onDebugSelectionChangeObservable} />
                             <TextureLinkLineComponent label="Bump" texture={material.clearCoat.bumpTexture} material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={this._onDebugSelectionChangeObservable} />
                             {

+ 4 - 4
inspector/src/components/actionTabs/tabs/propertyGrids/materials/texturePropertyGridComponent.tsx

@@ -168,9 +168,9 @@ export class TexturePropertyGridComponent extends React.Component<ITextureProper
                             <FloatLineComponent lockObject={this.props.lockObject} label="V offset" target={texture} propertyName="vOffset" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                             <FloatLineComponent lockObject={this.props.lockObject} label="U scale" target={texture} propertyName="uScale" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                             <FloatLineComponent lockObject={this.props.lockObject} label="V scale" target={texture} propertyName="vScale" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
-                            <FloatLineComponent lockObject={this.props.lockObject} label="U angle" target={texture} propertyName="uAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
-                            <FloatLineComponent lockObject={this.props.lockObject} label="V angle" target={texture} propertyName="vAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
-                            <FloatLineComponent lockObject={this.props.lockObject} label="W angle" target={texture} propertyName="wAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
+                            <FloatLineComponent lockObject={this.props.lockObject} label="U angle" useEuler={this.props.globalState.onlyUseEulers} target={texture} propertyName="uAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
+                            <FloatLineComponent lockObject={this.props.lockObject} label="V angle" useEuler={this.props.globalState.onlyUseEulers} target={texture} propertyName="vAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
+                            <FloatLineComponent lockObject={this.props.lockObject} label="W angle" useEuler={this.props.globalState.onlyUseEulers} target={texture} propertyName="wAng" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
                             <CheckBoxLineComponent label="Clamp U" isSelected={() => texture.wrapU === Texture.CLAMP_ADDRESSMODE} onSelect={(value) => texture.wrapU = value ? Texture.CLAMP_ADDRESSMODE : Texture.WRAP_ADDRESSMODE} />
                             <CheckBoxLineComponent label="Clamp V" isSelected={() => texture.wrapV === Texture.CLAMP_ADDRESSMODE} onSelect={(value) => texture.wrapV = value ? Texture.CLAMP_ADDRESSMODE : Texture.WRAP_ADDRESSMODE} />
                         </div>
@@ -178,7 +178,7 @@ export class TexturePropertyGridComponent extends React.Component<ITextureProper
                     {
                         texture.isCube &&
                         <div>
-                            <SliderLineComponent label="Rotation Y" minimum={0} maximum={2 * Math.PI} step={0.1} target={texture} propertyName="rotationY" />
+                            <SliderLineComponent label="Rotation Y" useEuler={this.props.globalState.onlyUseEulers} minimum={0} maximum={2 * Math.PI} step={0.1} target={texture} propertyName="rotationY" />
                         </div>
                     }
                 </LineContainerComponent>

+ 1 - 1
inspector/src/components/sceneExplorer/treeItemSpecializedComponent.tsx

@@ -61,7 +61,7 @@ export class TreeItemSpecializedComponent extends React.Component<ITreeItemSpeci
 
             if (className.indexOf("Mesh") !== -1) {
                 const mesh = entity as AbstractMesh;
-                if (mesh.getTotalVertices() > 0) {
+                if (mesh.isAnInstance || mesh.getTotalVertices() > 0) {
                     return (<MeshTreeItemComponent extensibilityGroups={this.props.extensibilityGroups} mesh={mesh} onClick={() => this.onClick()} />);
                 } else {
                     return (<TransformNodeItemComponent extensibilityGroups={this.props.extensibilityGroups} transformNode={entity as TransformNode} onClick={() => this.onClick()} />);

+ 1 - 7
materialsLibrary/test/addpbr.js

@@ -120,13 +120,7 @@ window.preparePBR = function() {
 		  "albedoColorLevel": 1
 		});
 	});
-	
-    registerRangeUI("pbr", "indiceOfRefraction", 0, 2, function(value) {
-		pbr.indexOfRefraction = value;
-	}, function() {
-		return pbr.indexOfRefraction;
-	});
-    
+
     registerRangeUI("pbr", "alpha", 0, 1, function(value) {
 		pbr.alpha = value;
 	}, function() {

+ 1 - 1
package.json

@@ -7,7 +7,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.1.0-alpha.2",
+    "version": "4.1.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 28 - 0
src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts

@@ -52,6 +52,34 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera
     private _gamma: number = 0;
 
     /**
+     * Can be used to detect if a device orientation sensor is availible on a device
+     * @param timeout amount of time in milliseconds to wait for a response from the sensor (default: infinite)
+     * @returns a promise that will resolve on orientation change
+     */
+    public static WaitForOrientationChangeAsync(timeout?: number) {
+        return new Promise((res, rej) => {
+            var gotValue = false;
+            var eventHandler = () => {
+                window.removeEventListener("deviceorientation", eventHandler);
+                gotValue = true;
+                res();
+            };
+
+            // If timeout is pupulated reject the promise
+            if (timeout) {
+                setTimeout(() => {
+                    if (!gotValue) {
+                        window.removeEventListener("deviceorientation", eventHandler);
+                        rej("WaitForOrientationChangeAsync timed out");
+                    }
+                }, timeout);
+            }
+
+            window.addEventListener("deviceorientation", eventHandler);
+        });
+    }
+
+    /**
      * @hidden
      */
     public _onDeviceOrientationChangedObservable = new Observable<void>();

+ 1 - 1
src/Cameras/VR/vrExperienceHelper.ts

@@ -1203,7 +1203,7 @@ export class VRExperienceHelper {
             this._castRayAndSelectObject(this._rightController);
         }
 
-        if (this._noControllerIsActive) {
+        if (this._noControllerIsActive && this._scene.getEngine().isPointerLock) {
             this._castRayAndSelectObject(this._cameraGazer);
         } else {
             this._cameraGazer._gazeTracker.isVisible = false;

+ 3 - 3
src/Cameras/VR/webVRCamera.ts

@@ -407,7 +407,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
 
     private _leftController: Nullable<WebVRController>;
     /**
-     * The controller corrisponding to the users left hand.
+     * The controller corresponding to the users left hand.
      */
     public get leftController(): Nullable<WebVRController> {
         if (!this._leftController) {
@@ -419,7 +419,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
 
     private _rightController: Nullable<WebVRController>;
     /**
-     * The controller corrisponding to the users right hand.
+     * The controller corresponding to the users right hand.
      */
     public get rightController(): Nullable<WebVRController> {
         if (!this._rightController) {
@@ -432,7 +432,7 @@ export class WebVRFreeCamera extends FreeCamera implements PoseControlled {
     /**
      * Casts a ray forward from the vrCamera's gaze.
      * @param length Length of the ray (default: 100)
-     * @returns the ray corrisponding to the gaze
+     * @returns the ray corresponding to the gaze
      */
     public getForwardRay(length = 100): Ray {
         if (this.leftCamera) {

+ 3 - 3
src/Collisions/pickingInfo.ts

@@ -137,9 +137,9 @@ export class PickingInfo {
         var uv1 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 1] * 2);
         var uv2 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 2] * 2);
 
-        uv0 = uv0.scale(1.0 - this.bu - this.bv);
-        uv1 = uv1.scale(this.bu);
-        uv2 = uv2.scale(this.bv);
+        uv0 = uv0.scale(this.bu);
+        uv1 = uv1.scale(this.bv);
+        uv2 = uv2.scale(1.0 - this.bu - this.bv);
 
         return new Vector2(uv0.x + uv1.x + uv2.x, uv0.y + uv1.y + uv2.y);
     }

+ 27 - 12
src/Engines/engine.ts

@@ -500,14 +500,14 @@ export class Engine {
      */
     // Not mixed with Version for tooling purpose.
     public static get NpmPackage(): string {
-        return "babylonjs@4.1.0-alpha.2";
+        return "babylonjs@4.1.0-alpha.3";
     }
 
     /**
      * Returns the current version of the framework
      */
     public static get Version(): string {
-        return "4.1.0-alpha.2";
+        return "4.1.0-alpha.3";
     }
 
     /**
@@ -4344,11 +4344,6 @@ export class Engine {
                         this._bindTextureDirectly(gl.TEXTURE_2D, source, true);
                         gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img);
 
-                        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
-                        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-                        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
-                        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
-
                         this._rescaleTexture(source, texture, scene, internalFormat, () => {
                             this._releaseTexture(source);
                             this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);
@@ -4379,7 +4374,21 @@ export class Engine {
         return texture;
     }
 
-    private _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void {
+    /**
+     * @hidden
+     * Rescales a texture
+     * @param source input texutre
+     * @param destination destination texture
+     * @param scene scene to use to render the resize
+     * @param internalFormat format to use when resizing
+     * @param onComplete callback to be called when resize has completed
+     */
+    public _rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<Scene>, internalFormat: number, onComplete: () => void): void {
+        this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR);
+        this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, this._gl.LINEAR);
+        this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._gl.CLAMP_TO_EDGE);
+        this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE);
+
         let rtt = this.createRenderTargetTexture({
             width: destination.width,
             height: destination.height,
@@ -5007,12 +5016,12 @@ export class Engine {
     }
 
     /** @hidden */
-    public _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0): void {
+    public _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0, babylonInternalFormat?: number, useTextureWidthAndHeight = false): void {
         var gl = this._gl;
 
         var textureType = this._getWebGLTextureType(texture.type);
         var format = this._getInternalFormat(texture.format);
-        var internalFormat = this._getRGBABufferInternalSizedFormat(texture.type, format);
+        var internalFormat = babylonInternalFormat === undefined ? this._getRGBABufferInternalSizedFormat(texture.type, format) : this._getInternalFormat(babylonInternalFormat);
 
         this._unpackFlipY(texture.invertY);
 
@@ -5023,8 +5032,8 @@ export class Engine {
 
         const lodMaxWidth = Math.round(Scalar.Log2(texture.width));
         const lodMaxHeight = Math.round(Scalar.Log2(texture.height));
-        const width = Math.pow(2, Math.max(lodMaxWidth - lod, 0));
-        const height = Math.pow(2, Math.max(lodMaxHeight - lod, 0));
+        const width = useTextureWidthAndHeight ? texture.width : Math.pow(2, Math.max(lodMaxWidth - lod, 0));
+        const height = useTextureWidthAndHeight ? texture.height : Math.pow(2, Math.max(lodMaxHeight - lod, 0));
 
         gl.texImage2D(target, lod, internalFormat, width, height, 0, format, textureType, imageData);
     }
@@ -6121,6 +6130,12 @@ export class Engine {
                     return this._gl.HALF_FLOAT_OES;
                 case Engine.TEXTURETYPE_UNSIGNED_BYTE:
                     return this._gl.UNSIGNED_BYTE;
+                case Engine.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:
+                    return this._gl.UNSIGNED_SHORT_4_4_4_4;
+                case Engine.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:
+                    return this._gl.UNSIGNED_SHORT_5_5_5_1;
+                case Engine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:
+                    return this._gl.UNSIGNED_SHORT_5_6_5;
             }
             return this._gl.UNSIGNED_BYTE;
         }

+ 1 - 1
src/Gamepads/Controllers/webVRController.ts

@@ -52,7 +52,7 @@ export abstract class WebVRController extends PoseEnabledController {
     }
 
     /**
-     * X and Y axis corrisponding to the controllers joystick
+     * X and Y axis corresponding to the controllers joystick
      */
     public pad: StickValues = { x: 0, y: 0 };
 

+ 1 - 1
src/Gamepads/Controllers/windowsMotionController.ts

@@ -26,7 +26,7 @@ class LoadedMeshInfo {
      */
     public rootNode: AbstractMesh;
     /**
-     * Node of the mesh corrisponding to the direction the ray should be cast from the controller
+     * Node of the mesh corresponding to the direction the ray should be cast from the controller
      */
     public pointingPoseNode: TransformNode;
     /**

+ 2 - 1
src/Gizmos/gizmoManager.ts

@@ -68,7 +68,7 @@ export class GizmoManager implements IDisposable {
     constructor(private scene: Scene) {
         this._defaultKeepDepthUtilityLayer = new UtilityLayerRenderer(scene);
         this._defaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil = false;
-        this._defaultUtilityLayer = UtilityLayerRenderer.DefaultUtilityLayer;
+        this._defaultUtilityLayer = new UtilityLayerRenderer(scene);
 
         this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null };
 
@@ -221,6 +221,7 @@ export class GizmoManager implements IDisposable {
             }
         }
         this._defaultKeepDepthUtilityLayer.dispose();
+        this._defaultUtilityLayer.dispose();
         this.boundingBoxDragBehavior.detach();
         this.onAttachedToMeshObservable.clear();
     }

+ 8 - 8
src/Materials/PBR/pbrClearCoatConfiguration.ts

@@ -38,7 +38,7 @@ export class PBRClearCoatConfiguration {
      * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
      * The default fits with a polyurethane material.
      */
-    private static readonly _DefaultIndiceOfRefraction = 1.5;
+    private static readonly _DefaultIndexOfRefraction = 1.5;
 
     @serialize()
     private _isEnabled = false;
@@ -61,15 +61,15 @@ export class PBRClearCoatConfiguration {
     public roughness: number = 0;
 
     @serialize()
-    private _indiceOfRefraction = PBRClearCoatConfiguration._DefaultIndiceOfRefraction;
+    private _indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction;
     /**
-     * Defines the indice of refraction of the clear coat.
+     * Defines the index of refraction of the clear coat.
      * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence
      * The default fits with a polyurethane material.
      * Changing the default value is more performance intensive.
      */
     @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    public indiceOfRefraction = PBRClearCoatConfiguration._DefaultIndiceOfRefraction;
+    public indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction;
 
     @serializeAsTexture()
     private _texture: Nullable<BaseTexture> = null;
@@ -201,7 +201,7 @@ export class PBRClearCoatConfiguration {
                         defines.CLEARCOAT_BUMP = false;
                     }
 
-                    defines.CLEARCOAT_DEFAULTIOR = this._indiceOfRefraction === PBRClearCoatConfiguration._DefaultIndiceOfRefraction;
+                    defines.CLEARCOAT_DEFAULTIOR = this._indexOfRefraction === PBRClearCoatConfiguration._DefaultIndexOfRefraction;
 
                     if (this._isTintEnabled) {
                         defines.CLEARCOAT_TINT = true;
@@ -265,10 +265,10 @@ export class PBRClearCoatConfiguration {
             uniformBuffer.updateFloat2("vClearCoatParams", this.intensity, this.roughness);
 
             // Clear Coat Refraction params
-            const a = 1 - this._indiceOfRefraction;
-            const b = 1 + this._indiceOfRefraction;
+            const a = 1 - this._indexOfRefraction;
+            const b = 1 + this._indexOfRefraction;
             const f0 = Math.pow((-a / b), 2); // Schlicks approx: (ior1 - ior2) / (ior1 + ior2) where ior2 for air is close to vacuum = 1.
-            const eta = 1 / this._indiceOfRefraction;
+            const eta = 1 / this._indexOfRefraction;
             uniformBuffer.updateFloat4("vClearCoatRefractionParams", f0, eta, a,  b);
 
             if (this._isTintEnabled) {

+ 1 - 1
src/Materials/PBR/pbrSubSurfaceConfiguration.ts

@@ -114,7 +114,7 @@ export class PBRSubSurfaceConfiguration {
 
     private _indexOfRefraction = 1;
     /**
-     * Defines the indice of refraction used in the material.
+     * Defines the index of refraction used in the material.
      * https://en.wikipedia.org/wiki/List_of_refractive_indices
      */
     @serialize()

+ 111 - 0
src/Materials/Textures/Loaders/basisTextureLoader.ts

@@ -0,0 +1,111 @@
+import { Nullable } from "../../../types";
+import { Engine } from "../../../Engines/engine";
+import { InternalTexture } from "../../../Materials/Textures/internalTexture";
+import { IInternalTextureLoader } from "../../../Materials/Textures/internalTextureLoader";
+import { _TimeToken } from "../../../Instrumentation/timeToken";
+import { _DepthCullingState, _StencilState, _AlphaState } from "../../../States/index";
+import { BasisTools } from "../../../Misc/basis";
+
+/**
+ * Loader for .basis file format
+ */
+export class _BasisTextureLoader implements IInternalTextureLoader {
+    /**
+     * Defines whether the loader supports cascade loading the different faces.
+     */
+    public readonly supportCascades = false;
+
+    /**
+     * This returns if the loader support the current file information.
+     * @param extension defines the file extension of the file being loaded
+     * @param textureFormatInUse defines the current compressed format in use iun the engine
+     * @param fallback defines the fallback internal texture if any
+     * @param isBase64 defines whether the texture is encoded as a base64
+     * @param isBuffer defines whether the texture data are stored as a buffer
+     * @returns true if the loader can load the specified file
+     */
+    public canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean {
+        return extension.indexOf(".basis") === 0;
+    }
+
+    /**
+     * Transform the url before loading if required.
+     * @param rootUrl the url of the texture
+     * @param textureFormatInUse defines the current compressed format in use iun the engine
+     * @returns the transformed texture
+     */
+    public transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string {
+        return rootUrl;
+    }
+
+    /**
+     * Gets the fallback url in case the load fail. This can return null to allow the default fallback mecanism to work
+     * @param rootUrl the url of the texture
+     * @param textureFormatInUse defines the current compressed format in use iun the engine
+     * @returns the fallback texture
+     */
+    public getFallbackTextureUrl(rootUrl: string, textureFormatInUse: Nullable<string>): Nullable<string> {
+        return null;
+    }
+
+    /**
+     * Uploads the cube texture data to the WebGl Texture. It has already been bound.
+     * @param data contains the texture data
+     * @param texture defines the BabylonJS internal texture
+     * @param createPolynomials will be true if polynomials have been requested
+     * @param onLoad defines the callback to trigger once the texture is ready
+     * @param onError defines the callback to trigger in case of error
+     */
+    public loadCubeData(data: string | ArrayBuffer | (string | ArrayBuffer)[], texture: InternalTexture, createPolynomials: boolean, onLoad: Nullable<(data?: any) => void>, onError: Nullable<(message?: string, exception?: any) => void>): void {
+        throw ".basis not supported in Cube.";
+    }
+
+    /**
+     * Uploads the 2D texture data to the WebGl Texture. It has alreday been bound once in the callback.
+     * @param data contains the texture data
+     * @param texture defines the BabylonJS internal texture
+     * @param callback defines the method to call once ready to upload
+     */
+    public loadData(data: ArrayBuffer, texture: InternalTexture,
+        callback: (width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: () => void) => void): void {
+        // Verify Basis Module is loaded and detect file info and format
+        BasisTools.VerifyBasisModuleAsync().then(() => {
+            var loadedFile = BasisTools.LoadBasisFile(data);
+            var fileInfo = BasisTools.GetFileInfo(loadedFile);
+            var format = BasisTools.GetSupportedTranscodeFormat(texture.getEngine(), fileInfo);
+            texture._invertVScale = true;
+
+            // TODO this should be done in web worker
+            var transcodeResult = BasisTools.TranscodeFile(format, fileInfo, loadedFile);
+
+            // Upload data to texture
+            callback(fileInfo.width, fileInfo.height, false, true, () => {
+                if (transcodeResult.fallbackToRgb565) {
+                    texture.type = Engine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
+                    texture.format = Engine.TEXTUREFORMAT_RGB;
+
+                    // Create non power of two texture
+                    let source = new InternalTexture(texture.getEngine(), InternalTexture.DATASOURCE_TEMP);
+
+                    source.type = Engine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
+                    source.format = Engine.TEXTUREFORMAT_RGB;
+                    source.width = fileInfo.alignedWidth;
+                    source.height = fileInfo.alignedHeight;
+                    texture.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, source, true);
+                    texture.getEngine()._uploadDataToTextureDirectly(source, transcodeResult.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
+
+                    // Resize to power of two
+                    source.getEngine()._rescaleTexture(source, texture, texture.getEngine().scenes[0], source.getEngine()._getInternalFormat(Engine.TEXTUREFORMAT_RGB), () => {
+                        source.getEngine()._releaseTexture(source);
+                        source.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, texture, true);
+                    });
+                }else {
+                    texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(format!), fileInfo.width, fileInfo.height, transcodeResult.pixels, 0, 0);
+                }
+            });
+        });
+    }
+}
+
+// Register the loader.
+Engine._TextureLoaders.push(new _BasisTextureLoader());

+ 2 - 1
src/Materials/Textures/Loaders/index.ts

@@ -1,4 +1,5 @@
 export * from "./ddsTextureLoader";
 export * from "./envTextureLoader";
 export * from "./ktxTextureLoader";
-export * from "./tgaTextureLoader";
+export * from "./tgaTextureLoader";
+export * from "./basisTextureLoader";

+ 1 - 1
src/Materials/Textures/Procedurals/proceduralTexture.ts

@@ -143,7 +143,7 @@ export class ProceduralTexture extends Texture {
 
     /**
      * The effect that is created when initializing the post process.
-     * @returns The created effect corrisponding the the postprocess.
+     * @returns The created effect corresponding the the postprocess.
      */
     public getEffect(): Effect {
         return this._effect;

+ 5 - 0
src/Materials/Textures/internalTexture.ts

@@ -461,6 +461,11 @@ export class InternalTexture {
         if (index !== -1) {
             cache.splice(index, 1);
         }
+
+        var index = cache.indexOf(target);
+        if (index === -1) {
+            cache.push(target);
+        }
     }
 
     /**

+ 1 - 1
src/Materials/Textures/texture.ts

@@ -730,4 +730,4 @@ export class Texture extends BaseTexture {
 }
 
 // References the dependencies.
-SerializationHelper._TextureParser = Texture.Parse;
+SerializationHelper._TextureParser = Texture.Parse;

+ 17 - 14
src/Materials/effect.ts

@@ -973,21 +973,24 @@ export class Effect implements IDisposable {
                 this.onErrorObservable.notifyObservers(this);
             }
 
-            if (fallbacks && fallbacks.isMoreFallbacks) {
-                Logger.Error("Trying next fallback.");
-                this.defines = fallbacks.reduce(this.defines, this);
-                this._prepareEffect();
-            } else { // Sorry we did everything we can
-
-                if (this.onError) {
-                    this.onError(this, this._compilationError);
-                }
-                this.onErrorObservable.notifyObservers(this);
-                this.onErrorObservable.clear();
+            if (fallbacks) {
+                this._pipelineContext = null;
+                if (fallbacks.isMoreFallbacks) {
+                    Logger.Error("Trying next fallback.");
+                    this.defines = fallbacks.reduce(this.defines, this);
+                    this._prepareEffect();
+                } else { // Sorry we did everything we can
+
+                    if (this.onError) {
+                        this.onError(this, this._compilationError);
+                    }
+                    this.onErrorObservable.notifyObservers(this);
+                    this.onErrorObservable.clear();
 
-                // Unbind mesh reference in fallbacks
-                if (this._fallbacks) {
-                    this._fallbacks.unBindMesh();
+                    // Unbind mesh reference in fallbacks
+                    if (this._fallbacks) {
+                        this._fallbacks.unBindMesh();
+                    }
                 }
             }
         }

+ 1 - 1
src/Materials/standardMaterial.ts

@@ -371,7 +371,7 @@ export class StandardMaterial extends PushMaterial {
     public roughness: number;
 
     /**
-     * In case of refraction, define the value of the indice of refraction.
+     * In case of refraction, define the value of the index of refraction.
      * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions
      */
     @serialize()

+ 1 - 1
src/Meshes/instancedMesh.ts

@@ -123,7 +123,7 @@ export class InstancedMesh extends AbstractMesh {
      * Returns the total number of vertices (integer).
      */
     public getTotalVertices(): number {
-        return this._sourceMesh.getTotalVertices();
+        return this._sourceMesh ? this._sourceMesh.getTotalVertices() : 0;
     }
 
     /**

+ 2 - 1
src/Meshes/mesh.ts

@@ -66,7 +66,7 @@ class _InstanceDataStorage {
     public instancesData: Float32Array;
     public overridenInstanceCount: number;
     public isFrozen: boolean;
-    public previousBatch: _InstancesBatch;
+    public previousBatch: Nullable<_InstancesBatch>;
     public hardwareInstancedRendering: boolean;
     public sideOrientation: number;
 }
@@ -1563,6 +1563,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
     /** @hidden */
     public _unFreeze() {
         this._instanceDataStorage.isFrozen = false;
+        this._instanceDataStorage.previousBatch = null;
     }
 
     /**

+ 243 - 0
src/Misc/basis.ts

@@ -0,0 +1,243 @@
+import { Nullable } from '../types';
+import { Engine } from '../Engines/engine';
+import { Tools } from './tools';
+
+/**
+ * Info about the .basis files
+ */
+class BasisFileInfo {
+    /**
+     * If the file has alpha
+     */
+    public hasAlpha: boolean;
+    /**
+     * Width of the image
+     */
+    public width: number;
+    /**
+     * Height of the image
+     */
+    public height: number;
+    /**
+     * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
+     */
+    public alignedWidth: number;
+    /**
+     * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
+     */
+    public alignedHeight: number;
+}
+
+/**
+ * Used to load .Basis files
+ * See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+ */
+export class BasisTools {
+    private static _IgnoreSupportedFormats = false;
+    private static _LoadScriptPromise: any = null;
+    private static _FallbackURL = "https://preview.babylonjs.com/basisTranscoder/basis_transcoder.js";
+    private static _BASIS_FORMAT = {
+        cTFETC1: 0,
+        cTFBC1: 1,
+        cTFBC4: 2,
+        cTFPVRTC1_4_OPAQUE_ONLY: 3,
+        cTFBC7_M6_OPAQUE_ONLY: 4,
+        cTFETC2: 5,
+        cTFBC3: 6,
+        cTFBC5: 7,
+    };
+    /**
+     * Basis module can be aquired from https://github.com/BinomialLLC/basis_universal/tree/master/webgl
+     * This should be set prior to loading a .basis texture
+     */
+    public static BasisModule: Nullable<any> = null;
+
+    /**
+     * Verifies that the BasisModule has been populated and falls back to loading from the web if not availible
+     * @returns promise which will resolve if the basis module was loaded
+     */
+    public static VerifyBasisModuleAsync() {
+        // Complete if module has been populated
+        if (BasisTools.BasisModule) {
+            return Promise.resolve();
+        }
+
+        // Otherwise load script from fallback url
+        if (!this._LoadScriptPromise) {
+            this._LoadScriptPromise = Tools.LoadScriptAsync(BasisTools._FallbackURL, "basis_transcoder").then((success) => {
+                return new Promise((res, rej) => {
+                    if ((window as any).Module) {
+                        (window as any).Module.onRuntimeInitialized = () => {
+                            BasisTools.BasisModule = (window as any).Module;
+                            BasisTools.BasisModule.initializeBasis();
+                            res();
+                        };
+                    }else {
+                        rej("Unable to load .basis texture, BasisTools.BasisModule should be populated");
+                    }
+                });
+            });
+        }
+        return this._LoadScriptPromise;
+    }
+
+    /**
+     * Verifies that the basis module has been populated and creates a bsis file from the image data
+     * @param data array buffer of the .basis file
+     * @returns the Basis file
+     */
+    public static LoadBasisFile(data: ArrayBuffer) {
+        return new BasisTools.BasisModule.BasisFile(new Uint8Array(data));
+    }
+
+    /**
+     * Detects the supported transcode format for the file
+     * @param engine Babylon engine
+     * @param fileInfo info about the file
+     * @returns the chosed format or null if none are supported
+     */
+    public static GetSupportedTranscodeFormat(engine: Engine, fileInfo: BasisFileInfo): Nullable<number> {
+        var caps = engine.getCaps();
+        var format = null;
+        if (caps.etc1) {
+            format = BasisTools._BASIS_FORMAT.cTFETC1;
+        }else if (caps.s3tc) {
+            format = fileInfo.hasAlpha ? BasisTools._BASIS_FORMAT.cTFBC3 : BasisTools._BASIS_FORMAT.cTFBC1;
+        }else if (caps.pvrtc) {
+            format = BasisTools._BASIS_FORMAT.cTFPVRTC1_4_OPAQUE_ONLY;
+        }else if (caps.etc2) {
+            format = BasisTools._BASIS_FORMAT.cTFETC2;
+        }
+        return format;
+    }
+
+    /**
+     * Get the internal format to be passed to texImage2D corresponding to the .basis format value
+     * @param basisFormat format chosen from GetSupportedTranscodeFormat
+     * @returns internal format corresponding to the Basis format
+     */
+    public static GetInternalFormatFromBasisFormat(basisFormat: number) {
+        // TODO more formats need to be added here and validated
+        var COMPRESSED_RGB_S3TC_DXT1_EXT  = 0x83F0;
+        var COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
+        var RGB_ETC1_Format = 36196;
+
+        // var COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+        // var COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
+
+        if (basisFormat === this._BASIS_FORMAT.cTFETC1) {
+            return RGB_ETC1_Format;
+        }else if (basisFormat === this._BASIS_FORMAT.cTFBC1) {
+            return COMPRESSED_RGB_S3TC_DXT1_EXT;
+        }else if (basisFormat === this._BASIS_FORMAT.cTFBC3) {
+            return COMPRESSED_RGBA_S3TC_DXT5_EXT;
+        }else {
+            // TODO find value for these formats
+            // else if(basisFormat === this.BASIS_FORMAT.cTFBC4){
+            // }else if(basisFormat === this.BASIS_FORMAT.cTFPVRTC1_4_OPAQUE_ONLY){
+            // }else if(basisFormat === this.BASIS_FORMAT.cTFBC7_M6_OPAQUE_ONLY){
+            // }else if(basisFormat === this.BASIS_FORMAT.cTFETC2){
+            // }else if(basisFormat === this.BASIS_FORMAT.cTFBC5){
+            // }
+            throw "Basis format not found or supported";
+        }
+    }
+
+    /**
+     * Retreives information about the basis file eg. dimensions
+     * @param basisFile the basis file to get the info from
+     * @returns information about the basis file
+     */
+    public static GetFileInfo(basisFile: any): BasisFileInfo {
+        var hasAlpha = basisFile.getHasAlpha();
+        var width = basisFile.getImageWidth(0, 0);
+        var height = basisFile.getImageHeight(0, 0);
+        var alignedWidth = (width + 3) & ~3;
+        var alignedHeight = (height + 3) & ~3;
+        var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
+        return info;
+    }
+
+    /**
+     * Transcodes the basis file to the requested format to be transferred to the gpu
+     * @param format fromat to be transferred to
+     * @param fileInfo information about the loaded file
+     * @param loadedFile the loaded basis file
+     * @returns the resulting pixels and if the transcode fell back to using Rgb565
+     */
+    public static TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
+        if (BasisTools._IgnoreSupportedFormats) {
+            format = null;
+        }
+        var needsConversion = false;
+        if (format === null) {
+            needsConversion = true;
+            format = fileInfo.hasAlpha ? BasisTools._BASIS_FORMAT.cTFBC3 : BasisTools._BASIS_FORMAT.cTFBC1;
+        }
+
+        if (!loadedFile.startTranscoding()) {
+            loadedFile.close();
+            loadedFile.delete();
+            throw "transcode failed";
+        }
+        var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
+        var dst = new Uint8Array(dstSize);
+        if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
+            loadedFile.close();
+            loadedFile.delete();
+            throw "transcode failed";
+        }
+        loadedFile.close();
+        loadedFile.delete();
+
+        // If no supported format is found, load as dxt and convert to rgb565
+        if (needsConversion) {
+            dst = BasisTools.ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
+        }
+
+        return {
+            fallbackToRgb565: needsConversion, pixels: dst
+        };
+    }
+
+    /**
+     * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
+     * An unoptimized version of dxtToRgb565.  Also, the floating
+     * point math used to compute the colors actually results in
+     * slightly different colors compared to hardware DXT decoders.
+     * @param src dxt src pixels
+     * @param srcByteOffset offset for the start of src
+     * @param  width aligned width of the image
+     * @param  height aligned height of the image
+     * @return the converted pixels
+     */
+    public static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array {
+        var c = new Uint16Array(4);
+        var dst = new Uint16Array(width * height);
+
+        var blockWidth = width / 4;
+        var blockHeight = height / 4;
+        for (var blockY = 0; blockY < blockHeight; blockY++) {
+            for (var blockX = 0; blockX < blockWidth; blockX++) {
+            var i = srcByteOffset + 8 * (blockY * blockWidth + blockX);
+            c[0] = src[i] | (src[i + 1] << 8);
+            c[1] = src[i + 2] | (src[i + 3] << 8);
+            c[2] = (2 * (c[0] & 0x1f) + 1 * (c[1] & 0x1f)) / 3
+                    | (((2 * (c[0] & 0x7e0) + 1 * (c[1] & 0x7e0)) / 3) & 0x7e0)
+                    | (((2 * (c[0] & 0xf800) + 1 * (c[1] & 0xf800)) / 3) & 0xf800);
+            c[3] = (2 * (c[1] & 0x1f) + 1 * (c[0] & 0x1f)) / 3
+                    | (((2 * (c[1] & 0x7e0) + 1 * (c[0] & 0x7e0)) / 3) & 0x7e0)
+                    | (((2 * (c[1] & 0xf800) + 1 * (c[0] & 0xf800)) / 3) & 0xf800);
+            for (var row = 0; row < 4; row++) {
+                var m = src[i + 4 + row];
+                var dstI = (blockY * 4 + row) * width + blockX * 4;
+                dst[dstI++] = c[m & 0x3];
+                dst[dstI++] = c[(m >> 2) & 0x3];
+                dst[dstI++] = c[(m >> 4) & 0x3];
+                dst[dstI++] = c[(m >> 6) & 0x3];
+            }
+            }
+        }
+        return dst;
+    }
+}

+ 1 - 1
src/Misc/tools.ts

@@ -1054,7 +1054,7 @@ export class Tools {
      * @param scriptId defines the id of the script element
      * @returns a promise request object
      */
-    public static LoadScriptAsync(scriptUrl: string, scriptId?: string): Nullable<Promise<boolean>> {
+    public static LoadScriptAsync(scriptUrl: string, scriptId?: string): Promise<boolean> {
         return new Promise<boolean>((resolve, reject) => {
             if (!DomManagement.IsWindowObjectExist()) {
                 resolve(false);

+ 2 - 2
src/PostProcesses/convolutionPostProcess.ts

@@ -16,7 +16,7 @@ export class ConvolutionPostProcess extends PostProcess {
     /**
      * Creates a new instance ConvolutionPostProcess
      * @param name The name of the effect.
-     * @param kernel Array of 9 values corrisponding to the 3x3 kernel to be applied
+     * @param kernel Array of 9 values corresponding to the 3x3 kernel to be applied
      * @param options The required width/height ratio to downsize to before computing the render pass.
      * @param camera The camera to apply the render pass to.
      * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
@@ -25,7 +25,7 @@ export class ConvolutionPostProcess extends PostProcess {
      * @param textureType Type of textures used when performing the post process. (default: 0)
      */
     constructor(name: string,
-        /** Array of 9 values corrisponding to the 3x3 kernel to be applied */
+        /** Array of 9 values corresponding to the 3x3 kernel to be applied */
         public kernel: number[],
         options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT) {
         super(name, "convolution", ["kernel", "screenSize"], null, options, camera, samplingMode, engine, reusable, null, textureType);

+ 0 - 0
src/PostProcesses/postProcess.ts


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio