Browse Source

Merge remote-tracking branch 'origin/master' into gltf-fixes

Gary Hsu 5 years ago
parent
commit
5bc979275e
26 changed files with 492 additions and 712 deletions
  1. 30 57
      Playground/babylon.d.txt
  2. 31 57
      dist/preview release/babylon.d.ts
  3. 1 1
      dist/preview release/babylon.js
  4. 109 174
      dist/preview release/babylon.max.js
  5. 1 1
      dist/preview release/babylon.max.js.map
  6. 63 115
      dist/preview release/babylon.module.d.ts
  7. 31 57
      dist/preview release/documentation.d.ts
  8. 1 1
      dist/preview release/gui/babylon.gui.js.map
  9. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  10. 21 7
      dist/preview release/inspector/babylon.inspector.bundle.max.js
  11. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.max.js.map
  12. 1 0
      dist/preview release/inspector/babylon.inspector.d.ts
  13. 2 0
      dist/preview release/inspector/babylon.inspector.module.d.ts
  14. 1 1
      dist/preview release/packagesSizeBaseLine.json
  15. 63 115
      dist/preview release/viewer/babylon.module.d.ts
  16. 11 11
      dist/preview release/viewer/babylon.viewer.js
  17. 1 1
      dist/preview release/viewer/babylon.viewer.max.js
  18. 2 0
      gui/src/2D/advancedDynamicTexture.ts
  19. 3 3
      inspector/src/components/actionTabs/lines/textInputLineComponent.tsx
  20. 18 4
      inspector/src/components/actionTabs/tabs/propertyGrids/materials/texturePropertyGridComponent.tsx
  21. 41 81
      src/Animations/animation.ts
  22. 26 21
      src/Cameras/Inputs/arcRotateCameraMouseWheelInput.ts
  23. 2 0
      src/Materials/Node/Blocks/Dual/textureBlock.ts
  24. 28 1
      src/Materials/Node/nodeMaterialBlockConnectionPoint.ts
  25. 0 1
      src/Materials/Textures/cubeTexture.ts
  26. 3 1
      src/Materials/Textures/texture.ts

+ 30 - 57
Playground/babylon.d.txt

@@ -1379,7 +1379,12 @@ declare module BABYLON {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -27013,6 +27018,14 @@ declare module BABYLON {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
private _getKeyValue(value: any): any;
         /**
@@ -27045,83 +27058,47 @@ declare module BABYLON {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
private static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
          * Parses an animation object and creates an animation
@@ -31499,12 +31476,6 @@ declare module BABYLON {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -53140,6 +53111,8 @@ declare module BABYLON {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
private _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**

+ 31 - 57
dist/preview release/babylon.d.ts

@@ -1385,7 +1385,12 @@ declare module BABYLON {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -27508,6 +27513,14 @@ declare module BABYLON {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -27542,83 +27555,47 @@ declare module BABYLON {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -32131,12 +32108,6 @@ declare module BABYLON {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -53988,6 +53959,9 @@ declare module BABYLON {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**

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


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


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


+ 63 - 115
dist/preview release/babylon.module.d.ts

@@ -1408,7 +1408,12 @@ declare module "babylonjs/Misc/fileTools" {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -27999,7 +28004,7 @@ declare module "babylonjs/node" {
 declare module "babylonjs/Animations/animation" {
     import { IEasingFunction, EasingFunction } from "babylonjs/Animations/easing";
     import { Vector3, Quaternion, Vector2, Matrix } from "babylonjs/Maths/math.vector";
-    import { Color3 } from "babylonjs/Maths/math.color";
+    import { Color3, Color4 } from "babylonjs/Maths/math.color";
     import { Nullable } from "babylonjs/types";
     import { Scene } from "babylonjs/scene";
     import { IAnimationKey } from "babylonjs/Animations/animationKey";
@@ -28325,6 +28330,14 @@ declare module "babylonjs/Animations/animation" {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -28359,83 +28372,47 @@ declare module "babylonjs/Animations/animation" {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -33051,12 +33028,6 @@ declare module "babylonjs/Misc/tools" {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -56556,6 +56527,9 @@ declare module "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint" {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**
@@ -68841,7 +68815,12 @@ declare module BABYLON {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -94964,6 +94943,14 @@ declare module BABYLON {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -94998,83 +94985,47 @@ declare module BABYLON {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -99587,12 +99538,6 @@ declare module BABYLON {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -121444,6 +121389,9 @@ declare module BABYLON {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**

+ 31 - 57
dist/preview release/documentation.d.ts

@@ -1385,7 +1385,12 @@ declare module BABYLON {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -27508,6 +27513,14 @@ declare module BABYLON {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -27542,83 +27555,47 @@ declare module BABYLON {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -32131,12 +32108,6 @@ declare module BABYLON {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -53988,6 +53959,9 @@ declare module BABYLON {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**

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


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


+ 21 - 7
dist/preview release/inspector/babylon.inspector.bundle.max.js

@@ -41716,7 +41716,7 @@ var TextInputLineComponent = /** @class */ (function (_super) {
     function TextInputLineComponent(props) {
         var _this = _super.call(this, props) || this;
         _this._localChange = false;
-        _this.state = { value: _this.props.value || _this.props.target[_this.props.propertyName] || "" };
+        _this.state = { value: (_this.props.value !== undefined ? _this.props.value : _this.props.target[_this.props.propertyName]) || "" };
         return _this;
     }
     TextInputLineComponent.prototype.componentWillUnmount = function () {
@@ -41727,7 +41727,7 @@ var TextInputLineComponent = /** @class */ (function (_super) {
             this._localChange = false;
             return true;
         }
-        var newValue = nextProps.value || nextProps.target[nextProps.propertyName];
+        var newValue = nextProps.value !== undefined ? nextProps.value : nextProps.target[nextProps.propertyName];
         if (newValue !== nextState.value) {
             nextState.value = newValue || "";
             return true;
@@ -41751,7 +41751,7 @@ var TextInputLineComponent = /** @class */ (function (_super) {
     };
     TextInputLineComponent.prototype.updateValue = function (value) {
         this._localChange = true;
-        var store = this.props.value || this.props.target[this.props.propertyName];
+        var store = this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName];
         this.setState({ value: value });
         this.raiseOnPropertyChanged(value, store);
         if (this.props.propertyName) {
@@ -45669,6 +45669,8 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(babylonjs_gui_2D_adtInstrumentation__WEBPACK_IMPORTED_MODULE_12__);
 /* harmony import */ var _customPropertyGridComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../customPropertyGridComponent */ "./components/actionTabs/tabs/propertyGrids/customPropertyGridComponent.tsx");
 /* harmony import */ var _lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../lines/buttonLineComponent */ "./components/actionTabs/lines/buttonLineComponent.tsx");
+/* harmony import */ var _lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../lines/textInputLineComponent */ "./components/actionTabs/lines/textInputLineComponent.tsx");
+
 
 
 
@@ -45719,13 +45721,17 @@ var TexturePropertyGridComponent = /** @class */ (function (_super) {
                 else if (file.name.toLowerCase().indexOf(".env") > 0) {
                     extension = ".env";
                 }
-                texture.updateURL(url, extension, function () { return _this.forceUpdate(); });
+                texture.updateURL(url, extension, function () { return _this.foreceRefresh(); });
             }
             else {
-                texture.updateURL(url, null, function () { return _this.forceUpdate(); });
+                texture.updateURL(url, null, function () { return _this.foreceRefresh(); });
             }
         }, undefined, true);
     };
+    TexturePropertyGridComponent.prototype.foreceRefresh = function () {
+        this.forceUpdate();
+        this.refs["textureLine"].updatePreview();
+    };
     TexturePropertyGridComponent.prototype.render = function () {
         var _this = this;
         var texture = this.props.texture;
@@ -45756,10 +45762,18 @@ var TexturePropertyGridComponent = /** @class */ (function (_super) {
                 extension = url[index] + extension;
             }
         }
+        else {
+            url = "";
+        }
+        var textureUrl = (url.substring(0, 4) === "data" || url.substring(0, 4) === "blob") ? "" : url;
         return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "pane" },
             react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__["LineContainerComponent"], { globalState: this.props.globalState, title: "PREVIEW" },
-                react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textureLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextureLineComponent"], { texture: texture, width: 256, height: 256, globalState: this.props.globalState }),
-                react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_10__["FileButtonLineComponent"], { label: "Replace texture", onClick: function (file) { return _this.updateTexture(file); }, accept: ".jpg, .png, .tga, .dds, .env" })),
+                react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textureLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextureLineComponent"], { ref: "textureLine", texture: texture, width: 256, height: 256, globalState: this.props.globalState }),
+                react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_10__["FileButtonLineComponent"], { label: "Load texture from file", onClick: function (file) { return _this.updateTexture(file); }, accept: ".jpg, .png, .tga, .dds, .env" }),
+                react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_15__["TextInputLineComponent"], { label: "URL", value: textureUrl, lockObject: this.props.lockObject, onChange: function (url) {
+                        texture.updateURL(url);
+                        _this.foreceRefresh();
+                    } })),
             react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_customPropertyGridComponent__WEBPACK_IMPORTED_MODULE_13__["CustomPropertyGridComponent"], { globalState: this.props.globalState, target: texture, lockObject: this.props.lockObject, onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
             react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__["LineContainerComponent"], { globalState: this.props.globalState, title: "GENERAL" },
                 react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_5__["TextLineComponent"], { label: "Width", value: texture.getSize().width.toString() }),

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.max.js.map


+ 1 - 0
dist/preview release/inspector/babylon.inspector.d.ts

@@ -581,6 +581,7 @@ declare module INSPECTOR {
         constructor(props: ITexturePropertyGridComponentProps);
         componentWillUnmount(): void;
         updateTexture(file: File): void;
+        foreceRefresh(): void;
         render(): JSX.Element;
     }
 }

+ 2 - 0
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -679,6 +679,7 @@ declare module "babylonjs-inspector/components/actionTabs/tabs/propertyGrids/mat
         constructor(props: ITexturePropertyGridComponentProps);
         componentWillUnmount(): void;
         updateTexture(file: File): void;
+        foreceRefresh(): void;
         render(): JSX.Element;
     }
 }
@@ -2900,6 +2901,7 @@ declare module INSPECTOR {
         constructor(props: ITexturePropertyGridComponentProps);
         componentWillUnmount(): void;
         updateTexture(file: File): void;
+        foreceRefresh(): void;
         render(): JSX.Element;
     }
 }

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

@@ -1 +1 @@
-{"thinEngineOnly":119628,"engineOnly":153812,"sceneOnly":497268,"minGridMaterial":626993,"minStandardMaterial":750360}
+{"thinEngineOnly":119626,"engineOnly":153810,"sceneOnly":496857,"minGridMaterial":626582,"minStandardMaterial":750108}

+ 63 - 115
dist/preview release/viewer/babylon.module.d.ts

@@ -1408,7 +1408,12 @@ declare module "babylonjs/Misc/fileTools" {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -27999,7 +28004,7 @@ declare module "babylonjs/node" {
 declare module "babylonjs/Animations/animation" {
     import { IEasingFunction, EasingFunction } from "babylonjs/Animations/easing";
     import { Vector3, Quaternion, Vector2, Matrix } from "babylonjs/Maths/math.vector";
-    import { Color3 } from "babylonjs/Maths/math.color";
+    import { Color3, Color4 } from "babylonjs/Maths/math.color";
     import { Nullable } from "babylonjs/types";
     import { Scene } from "babylonjs/scene";
     import { IAnimationKey } from "babylonjs/Animations/animationKey";
@@ -28325,6 +28330,14 @@ declare module "babylonjs/Animations/animation" {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -28359,83 +28372,47 @@ declare module "babylonjs/Animations/animation" {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -33051,12 +33028,6 @@ declare module "babylonjs/Misc/tools" {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -56556,6 +56527,9 @@ declare module "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint" {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**
@@ -68841,7 +68815,12 @@ declare module BABYLON {
         static SetCorsBehavior(url: string | string[], element: {
             crossOrigin: string | null;
         }): void;
-        private static _ArrayBufferToBase64;
+        /**
+         * Encode an array buffer into a base64 string
+         * @param buffer defines the buffer to encode
+         * @returns a string containing the base64 version of the buffer
+         */
+        static ArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
         /**
          * Loads an image as an HTMLImageElement.
          * @param input url string, ArrayBuffer, or Blob to load
@@ -94964,6 +94943,14 @@ declare module BABYLON {
          */
         color3InterpolateFunction(startValue: Color3, endValue: Color3, gradient: number): Color3;
         /**
+         * Interpolates a Color4 linearly
+         * @param startValue Start value of the animation curve
+         * @param endValue End value of the animation curve
+         * @param gradient Scalar amount to interpolate
+         * @returns Interpolated Color3 value
+         */
+        color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4;
+        /**
          * @hidden Internal use only
          */
         _getKeyValue(value: any): any;
@@ -94998,83 +94985,47 @@ declare module BABYLON {
         /**
          * Float animation type
          */
-        private static _ANIMATIONTYPE_FLOAT;
+        static readonly ANIMATIONTYPE_FLOAT: number;
         /**
          * Vector3 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR3;
+        static readonly ANIMATIONTYPE_VECTOR3: number;
         /**
          * Quaternion animation type
          */
-        private static _ANIMATIONTYPE_QUATERNION;
+        static readonly ANIMATIONTYPE_QUATERNION: number;
         /**
          * Matrix animation type
          */
-        private static _ANIMATIONTYPE_MATRIX;
+        static readonly ANIMATIONTYPE_MATRIX: number;
         /**
          * Color3 animation type
          */
-        private static _ANIMATIONTYPE_COLOR3;
+        static readonly ANIMATIONTYPE_COLOR3: number;
+        /**
+         * Color3 animation type
+         */
+        static readonly ANIMATIONTYPE_COLOR4: number;
         /**
          * Vector2 animation type
          */
-        private static _ANIMATIONTYPE_VECTOR2;
+        static readonly ANIMATIONTYPE_VECTOR2: number;
         /**
          * Size animation type
          */
-        private static _ANIMATIONTYPE_SIZE;
+        static readonly ANIMATIONTYPE_SIZE: number;
         /**
          * Relative Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_RELATIVE;
+        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
         /**
          * Cycle Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CYCLE;
+        static readonly ANIMATIONLOOPMODE_CYCLE: number;
         /**
          * Constant Loop Mode
          */
-        private static _ANIMATIONLOOPMODE_CONSTANT;
-        /**
-         * Get the float animation type
-         */
-        static readonly ANIMATIONTYPE_FLOAT: number;
-        /**
-         * Get the Vector3 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR3: number;
-        /**
-         * Get the Vector2 animation type
-         */
-        static readonly ANIMATIONTYPE_VECTOR2: number;
-        /**
-         * Get the Size animation type
-         */
-        static readonly ANIMATIONTYPE_SIZE: number;
-        /**
-         * Get the Quaternion animation type
-         */
-        static readonly ANIMATIONTYPE_QUATERNION: number;
-        /**
-         * Get the Matrix animation type
-         */
-        static readonly ANIMATIONTYPE_MATRIX: number;
-        /**
-         * Get the Color3 animation type
-         */
-        static readonly ANIMATIONTYPE_COLOR3: number;
-        /**
-         * Get the Relative Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_RELATIVE: number;
-        /**
-         * Get the Cycle Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CYCLE: number;
-        /**
-         * Get the Constant Loop Mode
-         */
-        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
+        static readonly ANIMATIONLOOPMODE_CONSTANT: number;
         /** @hidden */
         static _UniversalLerp(left: any, right: any, amount: number): any;
         /**
@@ -99587,12 +99538,6 @@ declare module BABYLON {
          */
         static ToRadians(angle: number): number;
         /**
-         * Encode a buffer to a base64 string
-         * @param buffer defines the buffer to encode
-         * @returns the encoded string
-         */
-        static EncodeArrayBufferTobase64(buffer: ArrayBuffer): string;
-        /**
          * Returns an array if obj is not an array
          * @param obj defines the object to evaluate as an array
          * @param allowsNullUndefined defines a boolean indicating if obj is allowed to be null or undefined
@@ -121444,6 +121389,9 @@ declare module BABYLON {
          * Gets or sets a string indicating that this uniform must be defined under a #ifdef
          */
         define: string;
+        /** @hidden */
+        _prioritizeVertex: boolean;
+        private _target;
         /** Gets or sets the target of that connection point */
         target: NodeMaterialBlockTargets;
         /**

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


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


+ 2 - 0
gui/src/2D/advancedDynamicTexture.ts

@@ -535,7 +535,9 @@ export class AdvancedDynamicTexture extends DynamicTexture {
         this._render();
         this.update(true, this.premulAlpha);
     }
+
     private _clearMeasure = new Measure(0, 0, 0, 0);
+
     private _render(): void {
         var textureSize = this.getSize();
         var renderWidth = textureSize.width;

+ 3 - 3
inspector/src/components/actionTabs/lines/textInputLineComponent.tsx

@@ -19,7 +19,7 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
     constructor(props: ITextInputLineComponentProps) {
         super(props);
 
-        this.state = { value: this.props.value || this.props.target[this.props.propertyName!] || "" }
+        this.state = { value: (this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName!]) || "" }
     }
 
     componentWillUnmount() {
@@ -32,7 +32,7 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
             return true;
         }
 
-        const newValue = nextProps.value || nextProps.target[nextProps.propertyName!];
+        const newValue = nextProps.value  !== undefined  ? nextProps.value : nextProps.target[nextProps.propertyName!];
         if (newValue !== nextState.value) {
             nextState.value = newValue || "";
             return true;
@@ -61,7 +61,7 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
     updateValue(value: string) {
 
         this._localChange = true;
-        const store = this.props.value || this.props.target[this.props.propertyName!];
+        const store = this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName!];
         this.setState({ value: value });
 
         this.raiseOnPropertyChanged(value, store);

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

@@ -24,6 +24,7 @@ import { AdvancedDynamicTextureInstrumentation } from "babylonjs-gui/2D/adtInstr
 import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
 import { CustomPropertyGridComponent } from '../customPropertyGridComponent';
 import { ButtonLineComponent } from '../../../lines/buttonLineComponent';
+import { TextInputLineComponent } from '../../../lines/textInputLineComponent';
 
 interface ITexturePropertyGridComponentProps {
     texture: BaseTexture,
@@ -73,12 +74,17 @@ export class TexturePropertyGridComponent extends React.Component<ITextureProper
                     extension = ".env";
                 }
 
-                (texture as CubeTexture).updateURL(url, extension, () => this.forceUpdate());
+                (texture as CubeTexture).updateURL(url, extension, () => this.foreceRefresh());
             } else {
-                (texture as Texture).updateURL(url, null, () => this.forceUpdate());
+                (texture as Texture).updateURL(url, null, () => this.foreceRefresh());
             }
 
         }, undefined, true);
+    }    
+
+    foreceRefresh() {
+        this.forceUpdate();
+        (this.refs["textureLine"] as TextureLineComponent).updatePreview();
     }
 
     render() {
@@ -113,13 +119,21 @@ export class TexturePropertyGridComponent extends React.Component<ITextureProper
                 }
                 extension = url[index] + extension;
             }
+        } else {
+            url = "";
         }
 
+        let textureUrl = (url.substring(0, 4) === "data" || url.substring(0, 4) === "blob") ? "" : url;
+
         return (
             <div className="pane">
                 <LineContainerComponent globalState={this.props.globalState} title="PREVIEW">
-                    <TextureLineComponent texture={texture} width={256} height={256} globalState={this.props.globalState} />
-                    <FileButtonLineComponent label="Replace texture" onClick={(file) => this.updateTexture(file)} accept=".jpg, .png, .tga, .dds, .env" />
+                    <TextureLineComponent ref="textureLine" texture={texture} width={256} height={256} globalState={this.props.globalState} />
+                    <FileButtonLineComponent label="Load texture from file" onClick={(file) => this.updateTexture(file)} accept=".jpg, .png, .tga, .dds, .env" />
+                    <TextInputLineComponent label="URL" value={textureUrl} lockObject={this.props.lockObject} onChange={url => {
+                        (texture as Texture).updateURL(url);
+                        this.foreceRefresh();
+                    }} />
                 </LineContainerComponent>
                 <CustomPropertyGridComponent globalState={this.props.globalState} target={texture}
                     lockObject={this.props.lockObject}

+ 41 - 81
src/Animations/animation.ts

@@ -1,6 +1,6 @@
 import { IEasingFunction, EasingFunction } from "./easing";
 import { Vector3, Quaternion, Vector2, Matrix } from "../Maths/math.vector";
-import { Color3 } from '../Maths/math.color';
+import { Color3, Color4 } from '../Maths/math.color';
 import { Scalar } from "../Maths/math.scalar";
 
 import { Nullable } from "../types";
@@ -95,6 +95,8 @@ export class Animation {
             dataType = Animation.ANIMATIONTYPE_VECTOR2;
         } else if (from instanceof Color3) {
             dataType = Animation.ANIMATIONTYPE_COLOR3;
+        } else if (from instanceof Color4) {
+            dataType = Animation.ANIMATIONTYPE_COLOR4;
         } else if (from instanceof Size) {
             dataType = Animation.ANIMATIONTYPE_SIZE;
         }
@@ -572,6 +574,17 @@ export class Animation {
     }
 
     /**
+     * Interpolates a Color4 linearly
+     * @param startValue Start value of the animation curve
+     * @param endValue End value of the animation curve
+     * @param gradient Scalar amount to interpolate
+     * @returns Interpolated Color3 value
+     */
+    public color4InterpolateFunction(startValue: Color4, endValue: Color4, gradient: number): Color4 {
+        return Color4.Lerp(startValue, endValue, gradient);
+    }
+
+    /**
      * @hidden Internal use only
      */
     public _getKeyValue(value: any): any {
@@ -690,6 +703,15 @@ export class Animation {
                             case Animation.ANIMATIONLOOPMODE_RELATIVE:
                                 return this.color3InterpolateFunction(startValue, endValue, gradient).add(state.offsetValue.scale(state.repeatCount));
                         }
+                    // Color4
+                    case Animation.ANIMATIONTYPE_COLOR4:
+                        switch (state.loopMode) {
+                            case Animation.ANIMATIONLOOPMODE_CYCLE:
+                            case Animation.ANIMATIONLOOPMODE_CONSTANT:
+                                return this.color4InterpolateFunction(startValue, endValue, gradient);
+                            case Animation.ANIMATIONLOOPMODE_RELATIVE:
+                                return this.color4InterpolateFunction(startValue, endValue, gradient).add(state.offsetValue.scale(state.repeatCount));
+                        }
                     // Matrix
                     case Animation.ANIMATIONTYPE_MATRIX:
                         switch (state.loopMode) {
@@ -803,6 +825,7 @@ export class Animation {
                 case Animation.ANIMATIONTYPE_MATRIX:
                 case Animation.ANIMATIONTYPE_VECTOR3:
                 case Animation.ANIMATIONTYPE_COLOR3:
+                case Animation.ANIMATIONTYPE_COLOR4:
                     key.values = animationKey.value.asArray();
                     break;
             }
@@ -831,113 +854,47 @@ export class Animation {
     /**
      * Float animation type
      */
-    private static _ANIMATIONTYPE_FLOAT = 0;
+    public static readonly ANIMATIONTYPE_FLOAT = 0;
     /**
      * Vector3 animation type
      */
-    private static _ANIMATIONTYPE_VECTOR3 = 1;
+    public static readonly ANIMATIONTYPE_VECTOR3 = 1;
     /**
      * Quaternion animation type
      */
-    private static _ANIMATIONTYPE_QUATERNION = 2;
+    public static readonly ANIMATIONTYPE_QUATERNION = 2;
     /**
      * Matrix animation type
      */
-    private static _ANIMATIONTYPE_MATRIX = 3;
+    public static readonly ANIMATIONTYPE_MATRIX = 3;
     /**
      * Color3 animation type
      */
-    private static _ANIMATIONTYPE_COLOR3 = 4;
+    public static readonly ANIMATIONTYPE_COLOR3 = 4;
+    /**
+     * Color3 animation type
+     */
+    public static readonly ANIMATIONTYPE_COLOR4 = 7;
     /**
      * Vector2 animation type
      */
-    private static _ANIMATIONTYPE_VECTOR2 = 5;
+    public static readonly ANIMATIONTYPE_VECTOR2 = 5;
     /**
      * Size animation type
      */
-    private static _ANIMATIONTYPE_SIZE = 6;
+    public static readonly ANIMATIONTYPE_SIZE = 6;
     /**
      * Relative Loop Mode
      */
-    private static _ANIMATIONLOOPMODE_RELATIVE = 0;
+    public static readonly ANIMATIONLOOPMODE_RELATIVE = 0;
     /**
      * Cycle Loop Mode
      */
-    private static _ANIMATIONLOOPMODE_CYCLE = 1;
+    public static readonly ANIMATIONLOOPMODE_CYCLE = 1;
     /**
      * Constant Loop Mode
      */
-    private static _ANIMATIONLOOPMODE_CONSTANT = 2;
-
-    /**
-     * Get the float animation type
-     */
-    public static get ANIMATIONTYPE_FLOAT(): number {
-        return Animation._ANIMATIONTYPE_FLOAT;
-    }
-
-    /**
-     * Get the Vector3 animation type
-     */
-    public static get ANIMATIONTYPE_VECTOR3(): number {
-        return Animation._ANIMATIONTYPE_VECTOR3;
-    }
-
-    /**
-     * Get the Vector2 animation type
-     */
-    public static get ANIMATIONTYPE_VECTOR2(): number {
-        return Animation._ANIMATIONTYPE_VECTOR2;
-    }
-
-    /**
-     * Get the Size animation type
-     */
-    public static get ANIMATIONTYPE_SIZE(): number {
-        return Animation._ANIMATIONTYPE_SIZE;
-    }
-
-    /**
-     * Get the Quaternion animation type
-     */
-    public static get ANIMATIONTYPE_QUATERNION(): number {
-        return Animation._ANIMATIONTYPE_QUATERNION;
-    }
-
-    /**
-     * Get the Matrix animation type
-     */
-    public static get ANIMATIONTYPE_MATRIX(): number {
-        return Animation._ANIMATIONTYPE_MATRIX;
-    }
-
-    /**
-     * Get the Color3 animation type
-     */
-    public static get ANIMATIONTYPE_COLOR3(): number {
-        return Animation._ANIMATIONTYPE_COLOR3;
-    }
-
-    /**
-     * Get the Relative Loop Mode
-     */
-    public static get ANIMATIONLOOPMODE_RELATIVE(): number {
-        return Animation._ANIMATIONLOOPMODE_RELATIVE;
-    }
-
-    /**
-     * Get the Cycle Loop Mode
-     */
-    public static get ANIMATIONLOOPMODE_CYCLE(): number {
-        return Animation._ANIMATIONLOOPMODE_CYCLE;
-    }
-
-    /**
-     * Get the Constant Loop Mode
-     */
-    public static get ANIMATIONLOOPMODE_CONSTANT(): number {
-        return Animation._ANIMATIONLOOPMODE_CONSTANT;
-    }
+    public static readonly ANIMATIONLOOPMODE_CONSTANT = 2;
 
     /** @hidden */
     public static _UniversalLerp(left: any, right: any, amount: number): any {
@@ -1010,6 +967,9 @@ export class Animation {
                 case Animation.ANIMATIONTYPE_COLOR3:
                     data = Color3.FromArray(key.values);
                     break;
+                case Animation.ANIMATIONTYPE_COLOR4:
+                    data = Color4.FromArray(key.values);
+                    break;
                 case Animation.ANIMATIONTYPE_VECTOR3:
                 default:
                     data = Vector3.FromArray(key.values);

+ 26 - 21
src/Cameras/Inputs/arcRotateCameraMouseWheelInput.ts

@@ -32,10 +32,10 @@ export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCam
     private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;
     private _observer: Nullable<Observer<PointerInfo>>;
 
-    private computeDeltaFromMouseWheelLegacyEvent(mouseWheelLegacyEvent: any, radius: number) {
+    private computeDeltaFromMouseWheelLegacyEvent(mouseWheelDelta: number, radius: number) {
         var delta = 0;
-        var wheelDelta = (mouseWheelLegacyEvent.wheelDelta * 0.01 * this.wheelDeltaPercentage) * radius;
-        if (mouseWheelLegacyEvent.wheelDelta > 0) {
+        var wheelDelta = (mouseWheelDelta * 0.01 * this.wheelDeltaPercentage) * radius;
+        if (mouseWheelDelta > 0) {
             delta = wheelDelta / (1.0 + this.wheelDeltaPercentage);
         } else {
             delta = wheelDelta * (1.0 + this.wheelDeltaPercentage);
@@ -55,28 +55,33 @@ export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCam
             var delta = 0;
 
             let mouseWheelLegacyEvent = event as any;
+            let wheelDelta = 0;
+
             if (mouseWheelLegacyEvent.wheelDelta) {
-                if (this.wheelDeltaPercentage) {
-                    delta = this.computeDeltaFromMouseWheelLegacyEvent(mouseWheelLegacyEvent, this.camera.radius);
-
-                    // If zooming in, estimate the target radius and use that to compute the delta for inertia
-                    // this will stop multiple scroll events zooming in from adding too much inertia
-                    if (delta > 0) {
-                        var estimatedTargetRadius = this.camera.radius;
-                        var targetInertia = this.camera.inertialRadiusOffset + delta;
-                        for (var i = 0; i < 20 && Math.abs(targetInertia) > 0.001; i++) {
-                            estimatedTargetRadius -= targetInertia;
-                            targetInertia *= this.camera.inertia;
-                        }
-                        estimatedTargetRadius = Scalar.Clamp(estimatedTargetRadius, 0, Number.MAX_VALUE);
-                        delta = this.computeDeltaFromMouseWheelLegacyEvent(mouseWheelLegacyEvent, estimatedTargetRadius);
+                wheelDelta = mouseWheelLegacyEvent.wheelDelta;
+            } else {
+                wheelDelta = -(event.deltaY || event.detail) * 60;
+            }
+
+            console.log(wheelDelta);
+
+            if (this.wheelDeltaPercentage) {
+                delta = this.computeDeltaFromMouseWheelLegacyEvent(wheelDelta, this.camera.radius);
+
+                // If zooming in, estimate the target radius and use that to compute the delta for inertia
+                // this will stop multiple scroll events zooming in from adding too much inertia
+                if (delta > 0) {
+                    var estimatedTargetRadius = this.camera.radius;
+                    var targetInertia = this.camera.inertialRadiusOffset + delta;
+                    for (var i = 0; i < 20 && Math.abs(targetInertia) > 0.001; i++) {
+                        estimatedTargetRadius -= targetInertia;
+                        targetInertia *= this.camera.inertia;
                     }
-                } else {
-                    delta = mouseWheelLegacyEvent.wheelDelta / (this.wheelPrecision * 40);
+                    estimatedTargetRadius = Scalar.Clamp(estimatedTargetRadius, 0, Number.MAX_VALUE);
+                    delta = this.computeDeltaFromMouseWheelLegacyEvent(wheelDelta, estimatedTargetRadius);
                 }
             } else {
-                let deltaValue = event.deltaY || event.detail;
-                delta = -deltaValue / this.wheelPrecision;
+                delta = wheelDelta / (this.wheelPrecision * 40);
             }
 
             if (delta) {

+ 2 - 0
src/Materials/Node/Blocks/Dual/textureBlock.ts

@@ -51,6 +51,8 @@ export class TextureBlock extends NodeMaterialBlock {
 
         this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
         this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector4);
+
+        this._inputs[0]._prioritizeVertex = true;
     }
 
     /**

+ 28 - 1
src/Materials/Node/nodeMaterialBlockConnectionPoint.ts

@@ -101,8 +101,31 @@ export class NodeMaterialConnectionPoint {
      */
     public define: string;
 
+    /** @hidden */
+    public _prioritizeVertex = false;
+
+    private _target: NodeMaterialBlockTargets = NodeMaterialBlockTargets.VertexAndFragment;
+
     /** Gets or sets the target of that connection point */
-    public target: NodeMaterialBlockTargets = NodeMaterialBlockTargets.VertexAndFragment;
+    public get target(): NodeMaterialBlockTargets {
+        if (!this._prioritizeVertex || !this._ownerBlock) {
+            return this._target;
+        }
+
+        if (this._target !== NodeMaterialBlockTargets.VertexAndFragment) {
+            return this._target;
+        }
+
+        if (this._ownerBlock.target === NodeMaterialBlockTargets.Fragment) {
+            return NodeMaterialBlockTargets.Fragment;
+        }
+
+        return NodeMaterialBlockTargets.Vertex;
+    }
+
+    public set target(value: NodeMaterialBlockTargets) {
+        this._target = value;
+    }
 
     /**
      * Gets a boolean indicating that the current point is connected
@@ -182,6 +205,10 @@ export class NodeMaterialConnectionPoint {
                 return true;
             }
 
+            if (endpoint.target === NodeMaterialBlockTargets.Vertex) {
+                return true;
+            }
+
             if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {
                 if (endpoint.ownerBlock.outputs.some((o) => o.isConnectedInVertexShader)) {
                     return true;

+ 0 - 1
src/Materials/Textures/cubeTexture.ts

@@ -250,7 +250,6 @@ export class CubeTexture extends BaseTexture {
             this.getScene()!.markAllMaterialsAsDirty(Constants.MATERIAL_TextureDirtyFlag);
         }
 
-        this.name = url;
         this.url = url;
         this.delayLoadState = Constants.DELAYLOADSTATE_NOTLOADED;
         this._prefiltered = false;

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

@@ -12,6 +12,7 @@ import { TimingTools } from '../../Misc/timingTools';
 import { InstantiationTools } from '../../Misc/instantiationTools';
 import { Plane } from '../../Maths/math.plane';
 import { StringTools } from '../../Misc/stringTools';
+import { FileTools } from '../../Misc/fileTools';
 
 declare type CubeTexture = import("../../Materials/Textures/cubeTexture").CubeTexture;
 declare type MirrorTexture = import("../../Materials/Textures/mirrorTexture").MirrorTexture;
@@ -376,7 +377,6 @@ export class Texture extends BaseTexture {
             this.getScene()!.markAllMaterialsAsDirty(Constants.MATERIAL_TextureDirtyFlag);
         }
 
-        this.name = url;
         this.url = url;
         this._buffer = buffer;
         this.delayLoadState = Constants.DELAYLOADSTATE_NOTLOADED;
@@ -606,6 +606,8 @@ export class Texture extends BaseTexture {
             if (typeof this._buffer === "string" && (this._buffer as string).substr(0, 5) === "data:") {
                 serializationObject.base64String = this._buffer;
                 serializationObject.name = serializationObject.name.replace("data:", "");
+            } else if (this.url && StringTools.StartsWith(this.url, "data:") && this._buffer instanceof Uint8Array) {
+                serializationObject.base64String = "data:image/png;base64," + FileTools.ArrayBufferToBase64(this._buffer);
             }
         }