소스 검색

Merge pull request #2909 from BabylonJS/master

Nightly3
David Catuhe 8 년 전
부모
커밋
0f93e1f583
100개의 변경된 파일36207개의 추가작업 그리고 34727개의 파일을 삭제
  1. 11 2
      Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs
  2. 2 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonExport.Entities.csproj
  3. 3 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonMesh.cs
  4. 23 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonMorphTarget.cs
  5. 26 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonMorphTargetManager.cs
  6. 9 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonScene.cs
  7. 12 0
      Exporters/3ds Max/GltfExport.Entities/GLTF.cs
  8. 3 0
      Exporters/3ds Max/GltfExport.Entities/GLTFAccessor.cs
  9. 22 0
      Exporters/3ds Max/GltfExport.Entities/GLTFAnimation.cs
  10. 49 0
      Exporters/3ds Max/GltfExport.Entities/GLTFAnimationSampler.cs
  11. 2 1
      Exporters/3ds Max/GltfExport.Entities/GLTFBuffer.cs
  12. 2 1
      Exporters/3ds Max/GltfExport.Entities/GLTFBufferView.cs
  13. 21 0
      Exporters/3ds Max/GltfExport.Entities/GLTFChannel.cs
  14. 20 0
      Exporters/3ds Max/GltfExport.Entities/GLTFChannelTarget.cs
  15. 5 0
      Exporters/3ds Max/GltfExport.Entities/GLTFExport.Entities.csproj
  16. 2 2
      Exporters/3ds Max/GltfExport.Entities/GLTFMeshPrimitive.cs
  17. 16 0
      Exporters/3ds Max/GltfExport.Entities/GLTFMorphTarget.cs
  18. BIN
      Exporters/3ds Max/Max2Babylon-0.17.0.zip
  19. 6 0
      Exporters/3ds Max/Max2Babylon/2015/Max2Babylon2015.csproj
  20. 6 0
      Exporters/3ds Max/Max2Babylon/2017/Max2Babylon2017.csproj
  21. 102 30
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Animation.cs
  22. 4 1
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.AbstractMesh.cs
  23. 416 0
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Animation.cs
  24. 2 0
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Camera.cs
  25. 3 0
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Light.cs
  26. 221 305
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Mesh.cs
  27. 29 9
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.cs
  28. 203 84
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs
  29. 7 0
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs
  30. 158 0
      Exporters/3ds Max/Max2Babylon/Exporter/GLTFBufferService.cs
  31. 18 1
      Exporters/3ds Max/Max2Babylon/Tools/Tools.cs
  32. BIN
      Exporters/Blender/Blender2Babylon-5.4.zip
  33. 1 1
      Exporters/Blender/src/babylon-js/__init__.py
  34. 14 10
      Exporters/Blender/src/babylon-js/mesh.py
  35. 1 1
      Tools/Gulp/gulpfile.js
  36. 4399 4392
      dist/preview release/babylon.d.ts
  37. 45 45
      dist/preview release/babylon.js
  38. 2121 2071
      dist/preview release/babylon.max.js
  39. 4399 4392
      dist/preview release/babylon.module.d.ts
  40. 46 46
      dist/preview release/babylon.worker.js
  41. 8620 8613
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  42. 48 48
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  43. 2577 2497
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  44. 8620 8613
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts
  45. 31 31
      dist/preview release/gui/babylon.gui.js
  46. 3 3
      dist/preview release/gui/babylon.gui.min.js
  47. 265 265
      dist/preview release/inspector/babylon.inspector.bundle.js
  48. 76 0
      dist/preview release/inspector/babylon.inspector.css
  49. 69 2
      dist/preview release/inspector/babylon.inspector.d.ts
  50. 122 31
      dist/preview release/inspector/babylon.inspector.js
  51. 4 4
      dist/preview release/inspector/babylon.inspector.min.js
  52. 6 6
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  53. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  54. 54 45
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  55. 429 399
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  56. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  57. 54 45
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  58. 431 401
      dist/preview release/loaders/babylon.glTFFileLoader.js
  59. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  60. 1 1
      dist/preview release/loaders/babylon.objFileLoader.js
  61. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  62. 432 402
      dist/preview release/loaders/babylonjs.loaders.js
  63. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  64. 54 45
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  65. 27 27
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  66. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  67. 220 220
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  68. 2 2
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  69. 24 24
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  70. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  71. 57 57
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  72. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  73. 27 27
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  74. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  75. 24 24
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  76. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  77. 39 39
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  78. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  79. 220 220
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js
  80. 1 1
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.min.js
  81. 21 21
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  82. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  83. 3 3
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  84. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  85. 21 21
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  86. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  87. 30 30
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  88. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  89. 63 63
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  90. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  91. 63 63
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  92. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  93. 78 78
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  94. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  95. 917 917
      dist/preview release/materialsLibrary/babylonjs.materials.js
  96. 8 8
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  97. 6 6
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  98. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  99. 6 6
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  100. 0 0
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js

+ 11 - 2
Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs

@@ -1,14 +1,23 @@
-using System.Runtime.Serialization;
+using System;
+using System.Runtime.Serialization;
 
 namespace BabylonExport.Entities
 {
     [DataContract]
-    public class BabylonAnimationKey
+    public class BabylonAnimationKey : IComparable<BabylonAnimationKey>
     {
         [DataMember]
         public int frame { get; set; }
 
         [DataMember]
         public float[] values { get; set; }
+        
+        public int CompareTo(BabylonAnimationKey other)
+        {
+            if (other == null)
+                return 1;
+            else
+                return this.frame.CompareTo(other.frame);
+        }
     }
 }

+ 2 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonExport.Entities.csproj

@@ -56,6 +56,8 @@
   <ItemGroup>
     <Compile Include="BabylonActions.cs" />
     <Compile Include="BabylonAnimation.cs" />
+    <Compile Include="BabylonMorphTarget.cs" />
+    <Compile Include="BabylonMorphTargetManager.cs" />
     <Compile Include="BabylonPBRMetallicRoughnessMaterial.cs" />
     <Compile Include="BabylonAnimationKey.cs" />
     <Compile Include="BabylonBone.cs" />

+ 3 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonMesh.cs

@@ -110,6 +110,9 @@ namespace BabylonExport.Entities
         [DataMember]
         public string tags { get; set; }
 
+        [DataMember(EmitDefaultValue = false)]
+        public int? morphTargetManagerId { get; set; }
+
         public bool isDummy = false;
 
         public BabylonMesh()

+ 23 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonMorphTarget.cs

@@ -0,0 +1,23 @@
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonMorphTarget
+    {
+        [DataMember(EmitDefaultValue = false)]
+        public string name { get; set; }
+
+        [DataMember(IsRequired = true)]
+        public float influence { get; set; }
+
+        [DataMember(IsRequired = true)]
+        public float[] positions { get; set; }
+
+        [DataMember(IsRequired = true)]
+        public float[] normals { get; set; }
+
+        [DataMember(EmitDefaultValue = false)]
+        public BabylonAnimation[] animations { get; set; }
+    }
+}

+ 26 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonMorphTargetManager.cs

@@ -0,0 +1,26 @@
+using System.Runtime.Serialization;
+
+namespace BabylonExport.Entities
+{
+    [DataContract]
+    public class BabylonMorphTargetManager
+    {
+        private static int NB_BABYLON_MORPH_TARGET_MANAGER;
+
+        [DataMember(IsRequired = true)]
+        public int id { get; set; }
+
+        [DataMember(IsRequired = true)]
+        public BabylonMorphTarget[] targets { get; set; }
+
+        public static void Reset()
+        {
+            NB_BABYLON_MORPH_TARGET_MANAGER = 0;
+        }
+
+        public BabylonMorphTargetManager()
+        {
+            id = NB_BABYLON_MORPH_TARGET_MANAGER++;
+        }
+    }
+}

+ 9 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonScene.cs

@@ -89,6 +89,9 @@ namespace BabylonExport.Entities
         [DataMember]
         public bool workerCollisions { get; set; }
 
+        [DataMember]
+        public BabylonMorphTargetManager[] morphTargetManagers { get; set; }
+
         public BabylonVector3 MaxVector { get; set; }
         public BabylonVector3 MinVector { get; set; }
 
@@ -102,6 +105,7 @@ namespace BabylonExport.Entities
         public List<BabylonMultiMaterial> MultiMaterialsList { get; private set; }
         public List<BabylonShadowGenerator> ShadowGeneratorsList { get; private set; }
         public List<BabylonSkeleton> SkeletonsList { get; private set; }
+        public List<BabylonMorphTargetManager> MorphTargetManagersList { get; private set; }
 
         readonly List<string> exportedTextures = new List<string>();
 
@@ -117,6 +121,7 @@ namespace BabylonExport.Entities
             ShadowGeneratorsList = new List<BabylonShadowGenerator>();
             SkeletonsList = new List<BabylonSkeleton>();
             SoundsList = new List<BabylonSound>();
+            MorphTargetManagersList = new List<BabylonMorphTargetManager>();
 
             // Default values
             autoClear = true;
@@ -137,6 +142,10 @@ namespace BabylonExport.Entities
             multiMaterials = MultiMaterialsList.ToArray();
             shadowGenerators = ShadowGeneratorsList.ToArray();
             skeletons = SkeletonsList.ToArray();
+            if (MorphTargetManagersList.Count > 0)
+            {
+                morphTargetManagers = MorphTargetManagersList.ToArray();
+            }
 
             if (CamerasList.Count == 0 && generateDefaultCamera)
             {

+ 12 - 0
Exporters/3ds Max/GltfExport.Entities/GLTF.cs

@@ -46,6 +46,9 @@ namespace GLTFExport.Entities
         [DataMember(EmitDefaultValue = false)]
         public GLTFSampler[] samplers { get; set; }
 
+        [DataMember(EmitDefaultValue = false)]
+        public GLTFAnimation[] animations { get; set; }
+
         public string OutputFolder { get; private set; }
         public string OutputFile { get; private set; }
 
@@ -59,6 +62,7 @@ namespace GLTFExport.Entities
         public List<GLTFTexture> TexturesList { get; private set; }
         public List<GLTFImage> ImagesList { get; private set; }
         public List<GLTFSampler> SamplersList { get; private set; }
+        public List<GLTFAnimation> AnimationsList { get; private set; }
 
         public GLTFBuffer buffer;
         public GLTFBufferView bufferViewScalar;
@@ -66,6 +70,9 @@ namespace GLTFExport.Entities
         public GLTFBufferView bufferViewFloatVec4;
         public GLTFBufferView bufferViewFloatVec2;
         public GLTFBufferView bufferViewImage;
+        public GLTFBufferView bufferViewAnimationFloatScalar;
+        public GLTFBufferView bufferViewAnimationFloatVec3;
+        public GLTFBufferView bufferViewAnimationFloatVec4;
 
         public GLTF(string outputPath)
         {
@@ -82,6 +89,7 @@ namespace GLTFExport.Entities
             TexturesList = new List<GLTFTexture>();
             ImagesList = new List<GLTFImage>();
             SamplersList = new List<GLTFSampler>();
+            AnimationsList = new List<GLTFAnimation>();
         }
 
         public void Prepare()
@@ -130,6 +138,10 @@ namespace GLTFExport.Entities
             {
                 samplers = SamplersList.ToArray();
             }
+            if (AnimationsList.Count > 0)
+            {
+                animations = AnimationsList.ToArray();
+            }
         }
     }
 }

+ 3 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFAccessor.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Runtime.Serialization;
 
 namespace GLTFExport.Entities
@@ -56,6 +57,8 @@ namespace GLTFExport.Entities
 
         public GLTFBufferView BufferView;
 
+        public List<byte> bytesList = new List<byte>();
+
         public int getByteLength()
         {
             return count * getElementSize();

+ 22 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFAnimation.cs

@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+
+namespace GLTFExport.Entities
+{
+    [DataContract]
+    public class GLTFAnimation : GLTFChildRootProperty
+    {
+        /// <summary>
+        /// An array of channels, each of which targets an animation's sampler at a node's property.
+        /// Different channels of the same animation can't have equal targets.
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public GLTFChannel[] channels { get; set; }
+
+        /// <summary>
+        /// An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public GLTFAnimationSampler[] samplers { get; set; }
+    }
+}

+ 49 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFAnimationSampler.cs

@@ -0,0 +1,49 @@
+using System.Runtime.Serialization;
+
+namespace GLTFExport.Entities
+{
+    [DataContract]
+    public class GLTFAnimationSampler : GLTFProperty
+    {
+        public enum Interpolation
+        {
+            LINEAR,
+            STEP,
+            CATMULLROMSPLINE,
+            CUBICSPLINE
+        }
+
+        /// <summary>
+        /// The index of an accessor containing keyframe input values, e.g., time. That accessor must have componentType FLOAT.
+        /// The values represent time in seconds with time[0] >= 0.0, and strictly increasing values, i.e., time[n + 1] > time[n].
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public int input { get; set; }
+
+        [DataMember(EmitDefaultValue = false)]
+        public string interpolation { get; private set; }
+
+        /// <summary>
+        /// The index of an accessor containing keyframe output values.
+        /// When targeting TRS target, the accessor.componentType of the output values must be FLOAT.
+        /// When targeting morph weights, the accessor.componentType of the output values must be FLOAT
+        /// or normalized integer where each output element stores values with a count equal to the number of morph targets.
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public int output { get; set; }
+
+        public int index;
+
+        public void SetInterpolation(Interpolation interpolation)
+        {
+            this.interpolation = interpolation.ToString();
+        }
+
+        public GLTFAnimationSampler()
+        {
+            // For GLTF, default value is LINEAR
+            // but gltf loader of BABYLON doesn't handle missing interpolation value
+            SetInterpolation(Interpolation.LINEAR);
+        }
+    }
+}

+ 2 - 1
Exporters/3ds Max/GltfExport.Entities/GLTFBuffer.cs

@@ -12,6 +12,7 @@ namespace GLTFExport.Entities
         [DataMember(IsRequired = true)]
         public int byteLength { get; set; }
 
-        public List<byte> bytesList;
+        public List<byte> bytesList = new List<byte>();
+        public List<GLTFBufferView> BufferViews = new List<GLTFBufferView>();
     }
 }

+ 2 - 1
Exporters/3ds Max/GltfExport.Entities/GLTFBufferView.cs

@@ -16,9 +16,10 @@ namespace GLTFExport.Entities
         public int byteLength { get; set; }
 
         [DataMember(EmitDefaultValue = false)]
-        public int? byteStride { get; set; }
+        public int? byteStride { get; set; } // Field only defined for buffer views that contain vertex attributes.
 
         public GLTFBuffer Buffer;
+        public List<GLTFAccessor> Accessors = new List<GLTFAccessor>();
         public List<byte> bytesList = new List<byte>();
     }
 }

+ 21 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFChannel.cs

@@ -0,0 +1,21 @@
+using System.Runtime.Serialization;
+
+namespace GLTFExport.Entities
+{
+    [DataContract]
+    public class GLTFChannel : GLTFProperty
+    {
+        /// <summary>
+        /// The index of a sampler in this animation used to compute the value for the target,
+        /// e.g., a node's translation, rotation, or scale (TRS).
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public int sampler { get; set; }
+
+        /// <summary>
+        /// The index of the node and TRS property to target.
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public GLTFChannelTarget target { get; set; }
+    }
+}

+ 20 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFChannelTarget.cs

@@ -0,0 +1,20 @@
+using System.Runtime.Serialization;
+
+namespace GLTFExport.Entities
+{
+    [DataContract]
+    public class GLTFChannelTarget : GLTFProperty
+    {
+        /// <summary>
+        /// The index of the node to target.
+        /// </summary>
+        [DataMember(EmitDefaultValue = false)]
+        public int? node { get; set; }
+
+        /// <summary>
+        /// The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates.
+        /// </summary>
+        [DataMember(IsRequired = true)]
+        public string path { get; set; }
+    }
+}

+ 5 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFExport.Entities.csproj

@@ -42,11 +42,16 @@
   <ItemGroup>
     <Compile Include="GLTF.cs" />
     <Compile Include="GLTFAccessor.cs" />
+    <Compile Include="GLTFAnimationSampler.cs" />
+    <Compile Include="GLTFAnimation.cs" />
+    <Compile Include="GLTFChannelTarget.cs" />
+    <Compile Include="GLTFChannel.cs" />
     <Compile Include="GLTFBufferView.cs" />
     <Compile Include="GLTFBuffer.cs" />
     <Compile Include="GLTFCameraPerspective.cs" />
     <Compile Include="GLTFCameraOrthographic.cs" />
     <Compile Include="GLTFCamera.cs" />
+    <Compile Include="GLTFMorphTarget.cs" />
     <Compile Include="GLTFSampler.cs" />
     <Compile Include="GLTFIndexedChildRootProperty.cs" />
     <Compile Include="GLTFImage.cs" />

+ 2 - 2
Exporters/3ds Max/GltfExport.Entities/GLTFMeshPrimitive.cs

@@ -41,7 +41,7 @@ namespace GLTFExport.Entities
         [DataMember(EmitDefaultValue = false)]
         public int? material { get; set; }
 
-        //[DataMember]
-        //public Dictionary<string, int>[] targets { get; set; }
+        [DataMember(EmitDefaultValue = false)]
+        public GLTFMorphTarget[] targets { get; set; }
     }
 }

+ 16 - 0
Exporters/3ds Max/GltfExport.Entities/GLTFMorphTarget.cs

@@ -0,0 +1,16 @@
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+
+namespace GLTFExport.Entities
+{
+    [DataContract]
+    public class GLTFMorphTarget : Dictionary<string, int>
+    {
+        public enum Attribute
+        {
+            POSITION,
+            NORMAL,
+            TANGENT
+        }
+    }
+}

BIN
Exporters/3ds Max/Max2Babylon-0.17.0.zip


+ 6 - 0
Exporters/3ds Max/Max2Babylon/2015/Max2Babylon2015.csproj

@@ -218,6 +218,12 @@
     <Compile Include="..\Tools\WebServer.cs">
       <Link>Tools\WebServer.cs</Link>
     </Compile>
+    <Compile Include="..\Exporter\GLTFBufferService.cs">
+      <Link>Exporter\GLTFBufferService.cs</Link>
+    </Compile>
+    <Compile Include="..\Exporter\BabylonExporter.GLTFExporter.Animation.cs">
+      <Link>Exporter\BabylonExporter.GLTFExporter.Animation.cs</Link>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>

+ 6 - 0
Exporters/3ds Max/Max2Babylon/2017/Max2Babylon2017.csproj

@@ -218,6 +218,12 @@
     <Compile Include="..\Tools\WebServer.cs">
       <Link>Tools\WebServer.cs</Link>
     </Compile>
+    <Compile Include="..\Exporter\GLTFBufferService.cs">
+      <Link>Exporter\GLTFBufferService.cs</Link>
+    </Compile>
+    <Compile Include="..\Exporter\BabylonExporter.GLTFExporter.Animation.cs">
+      <Link>Exporter\BabylonExporter.GLTFExporter.Animation.cs</Link>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>

+ 102 - 30
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Animation.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using Autodesk.Max;
 using BabylonExport.Entities;
+using System.Runtime.InteropServices;
 
 namespace Max2Babylon
 {
@@ -9,6 +10,101 @@ namespace Max2Babylon
     {
         const int Ticks = 160;
 
+        private static bool ExportBabylonKeys(List<BabylonAnimationKey> keys, string property, List<BabylonAnimation> animations, BabylonAnimation.DataType dataType, BabylonAnimation.LoopBehavior loopBehavior)
+        {
+            if (keys.Count == 0)
+            {
+                return false;
+            }
+
+            var end = Loader.Core.AnimRange.End;
+            if (keys[keys.Count - 1].frame != end / Ticks)
+            {
+                keys.Add(new BabylonAnimationKey()
+                {
+                    frame = end / Ticks,
+                    values = keys[keys.Count - 1].values
+                });
+            }
+
+            var babylonAnimation = new BabylonAnimation
+            {
+                dataType = (int)dataType,
+                name = property + " animation",
+                keys = keys.ToArray(),
+                framePerSecond = Loader.Global.FrameRate,
+                loopBehavior = (int)loopBehavior,
+                property = property
+            };
+
+            animations.Add(babylonAnimation);
+
+            return true;
+        }
+
+        // -----------------------
+        // -- From GameControl ---
+        // -----------------------
+
+        private bool ExportFloatGameController(IIGameControl control, string property, List<BabylonAnimation> animations)
+        {
+            return ExportGameController(control, property, animations, IGameControlType.Float, BabylonAnimation.DataType.Float, gameKey => new float[] { gameKey.SampleKey.Fval / 100.0f });
+        }
+
+        private bool ExportGameController(IIGameControl control, string property, List<BabylonAnimation> animations, IGameControlType type, BabylonAnimation.DataType dataType, Func<IIGameKey, float[]> extractValueFunc)
+        {
+            var keys = ExportBabylonKeysFromGameController(control, type, extractValueFunc);
+
+            if (keys == null)
+            {
+                return false;
+            }
+
+            var loopBehavior = BabylonAnimation.LoopBehavior.Cycle;
+            return ExportBabylonKeys(keys, property, animations, dataType, loopBehavior);
+        }
+
+        private List<BabylonAnimationKey> ExportBabylonKeysFromGameController(IIGameControl control, IGameControlType type, Func<IIGameKey, float[]> extractValueFunc)
+        {
+            if (control == null)
+            {
+                return null;
+            }
+
+            ITab<IIGameKey> gameKeyTab = GlobalInterface.Instance.Tab.Create<IIGameKey>();
+            control.GetQuickSampledKeys(gameKeyTab, type);
+
+            if (gameKeyTab == null)
+            {
+                return null;
+            }
+
+            var keys = new List<BabylonAnimationKey>();
+            for (int indexKey = 0; indexKey < gameKeyTab.Count; indexKey++)
+            {
+#if MAX2017
+                var indexer = indexKey;
+#else
+                    var indexer = new IntPtr(indexKey);
+                    Marshal.FreeHGlobal(indexer);
+#endif
+                var gameKey = gameKeyTab[indexer];
+
+                var key = new BabylonAnimationKey()
+                {
+                    frame = gameKey.T / Ticks,
+                    values = extractValueFunc(gameKey)
+                };
+                keys.Add(key);
+            }
+
+            return keys;
+        }
+
+        // -----------------------
+        // ---- From Control -----
+        // -----------------------
+
         private static BabylonAnimationKey GenerateFloatFunc(int index, IIKeyControl keyControl)
         {
             var key = Loader.Global.ILinFloatKey.Create();
@@ -119,9 +215,7 @@ namespace Max2Babylon
                 return false;
             }
 
-            var keys = new List<BabylonAnimationKey>();
             BabylonAnimation.LoopBehavior loopBehavior;
-
             switch (control.GetORT(2))
             {
                 case 2:
@@ -132,41 +226,19 @@ namespace Max2Babylon
                     break;
             }
 
+            var keys = new List<BabylonAnimationKey>();
             for (var index = 0; index < keyControl.NumKeys; index++)
             {
                 keys.Add(generateFunc(index, keyControl));
             }
 
-            if (keys.Count == 0)
-            {
-                return false;
-            }
-
-            var end = Loader.Core.AnimRange.End;
-            if (keys[keys.Count - 1].frame != end / Ticks)
-            {
-                keys.Add(new BabylonAnimationKey()
-                {
-                    frame = end / Ticks,
-                    values = keys[keys.Count - 1].values
-                });
-            }
-
-            var babylonAnimation = new BabylonAnimation
-            {
-                dataType = (int)dataType,
-                name = property + " animation",
-                keys = keys.ToArray(),
-                framePerSecond = Loader.Global.FrameRate,
-                loopBehavior = (int)loopBehavior,
-                property = property
-            };
-
-            animations.Add(babylonAnimation);
-
-            return true;
+            return ExportBabylonKeys(keys, property, animations, dataType, loopBehavior);
         }
 
+        // -----------------------
+        // ---- From ext func ----
+        // -----------------------
+
         private static void ExportColor3Animation(string property, List<BabylonAnimation> animations,
             Func<int, float[]> extractValueFunc)
         {

+ 4 - 1
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.AbstractMesh.cs

@@ -5,7 +5,7 @@ namespace Max2Babylon
 {
     partial class BabylonExporter
     {
-        private GLTFNode ExportAbstractMesh(BabylonAbstractMesh babylonAbstractMesh, GLTF gltf, GLTFNode gltfParentNode)
+        private GLTFNode ExportAbstractMesh(BabylonAbstractMesh babylonAbstractMesh, GLTF gltf, GLTFNode gltfParentNode, BabylonScene babylonScene)
         {
             RaiseMessage("GLTFExporter.AbstractMesh | Export abstract mesh named: " + babylonAbstractMesh.name, 1);
 
@@ -55,6 +55,9 @@ namespace Max2Babylon
                 gltfNode.mesh = gltfMesh.index;
             }
 
+            // Animations
+            ExportNodeAnimation(babylonAbstractMesh, gltf, gltfNode, babylonScene);
+
             return gltfNode;
         }
     }

+ 416 - 0
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Animation.cs

@@ -0,0 +1,416 @@
+using BabylonExport.Entities;
+using GLTFExport.Entities;
+using System;
+using System.Collections.Generic;
+
+namespace Max2Babylon
+{
+    partial class BabylonExporter
+    {
+        private static float FPS_FACTOR = 60.0f; // TODO - Which FPS factor ?
+
+        private GLTFAnimation ExportNodeAnimation(BabylonNode babylonNode, GLTF gltf, GLTFNode gltfNode, BabylonScene babylonScene = null)
+        {
+            var channelList = new List<GLTFChannel>();
+            var samplerList = new List<GLTFAnimationSampler>();
+
+            if (babylonNode.animations != null && babylonNode.animations.Length > 0)
+            {
+                RaiseMessage("GLTFExporter.Animation | Export animation of node named: " + babylonNode.name, 2);
+
+                foreach (BabylonAnimation babylonAnimation in babylonNode.animations)
+                {
+                    // Target
+                    var gltfTarget = new GLTFChannelTarget
+                    {
+                        node = gltfNode.index
+                    };
+                    gltfTarget.path = _getTargetPath(babylonAnimation.property);
+                    if (gltfTarget.path == null)
+                    {
+                        // Unkown babylon animation property
+                        RaiseWarning("GLTFExporter.Animation | Unkown animation property '" + babylonAnimation.property + "'", 3);
+                        // Ignore this babylon animation
+                        continue;
+                    }
+
+                    // Buffer
+                    var buffer = GLTFBufferService.Instance.GetBuffer(gltf);
+
+                    // --- Input ---
+                    var accessorInput = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewAnimationFloatScalar(gltf, buffer),
+                        "accessorAnimationInput",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.SCALAR
+                    );
+                    // Populate accessor
+                    accessorInput.min = new float[] { float.MaxValue };
+                    accessorInput.max = new float[] { float.MinValue };
+                    foreach (var babylonAnimationKey in babylonAnimation.keys)
+                    {
+                        var inputValue = babylonAnimationKey.frame / FPS_FACTOR;
+                        // Store values as bytes
+                        accessorInput.bytesList.AddRange(BitConverter.GetBytes(inputValue));
+                        // Update min and max values
+                        GLTFBufferService.UpdateMinMaxAccessor(accessorInput, inputValue);
+                    };
+                    accessorInput.count = babylonAnimation.keys.Length;
+
+                    // --- Output ---
+                    GLTFAccessor accessorOutput = null;
+                    switch (gltfTarget.path)
+                    {
+                        case "translation":
+                            accessorOutput = GLTFBufferService.Instance.CreateAccessor(
+                                gltf,
+                                GLTFBufferService.Instance.GetBufferViewAnimationFloatVec3(gltf, buffer),
+                                "accessorAnimationPositions",
+                                GLTFAccessor.ComponentType.FLOAT,
+                                GLTFAccessor.TypeEnum.VEC3
+                            );
+                            break;
+                        case "rotation":
+                            accessorOutput = GLTFBufferService.Instance.CreateAccessor(
+                                gltf,
+                                GLTFBufferService.Instance.GetBufferViewAnimationFloatVec4(gltf, buffer),
+                                "accessorAnimationRotations",
+                                GLTFAccessor.ComponentType.FLOAT,
+                                GLTFAccessor.TypeEnum.VEC4
+                            );
+                            break;
+                        case "scale":
+                            accessorOutput = GLTFBufferService.Instance.CreateAccessor(
+                                gltf,
+                                GLTFBufferService.Instance.GetBufferViewAnimationFloatVec3(gltf, buffer),
+                                "accessorAnimationScales",
+                                GLTFAccessor.ComponentType.FLOAT,
+                                GLTFAccessor.TypeEnum.VEC3
+                            );
+                            break;
+                    }
+                    // Populate accessor
+                    foreach (var babylonAnimationKey in babylonAnimation.keys)
+                    {
+                        var outputValues = babylonAnimationKey.values;
+                        // Store values as bytes
+                        foreach (var outputValue in outputValues)
+                        {
+                            accessorOutput.bytesList.AddRange(BitConverter.GetBytes(outputValue));
+                        }
+                    };
+                    accessorOutput.count = babylonAnimation.keys.Length;
+
+                    // Animation sampler
+                    var gltfAnimationSampler = new GLTFAnimationSampler
+                    {
+                        input = accessorInput.index,
+                        output = accessorOutput.index
+                    };
+                    gltfAnimationSampler.index = samplerList.Count;
+                    samplerList.Add(gltfAnimationSampler);
+
+                    // Channel
+                    var gltfChannel = new GLTFChannel
+                    {
+                        sampler = gltfAnimationSampler.index,
+                        target = gltfTarget
+                    };
+                    channelList.Add(gltfChannel);
+                }
+            }
+
+            if (babylonNode.GetType() == typeof(BabylonMesh))
+            {
+                var babylonMesh = babylonNode as BabylonMesh;
+
+                // Morph targets
+                var babylonMorphTargetManager = GetBabylonMorphTargetManager(babylonScene, babylonMesh);
+                if (babylonMorphTargetManager != null)
+                {
+                    ExportMorphTargetWeightAnimation(babylonMorphTargetManager, gltf, gltfNode, channelList, samplerList);
+                }
+            }
+
+            // Do not export empty arrays
+            if (channelList.Count > 0)
+            {
+                // Animation
+                var gltfAnimation = new GLTFAnimation
+                {
+                    channels = channelList.ToArray(),
+                    samplers = samplerList.ToArray()
+                };
+                gltf.AnimationsList.Add(gltfAnimation);
+                return gltfAnimation;
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        private bool ExportMorphTargetWeightAnimation(BabylonMorphTargetManager babylonMorphTargetManager, GLTF gltf, GLTFNode gltfNode, List<GLTFChannel> channelList, List<GLTFAnimationSampler> samplerList)
+        {
+            if (!_isBabylonMorphTargetManagerAnimationValid(babylonMorphTargetManager))
+            {
+                return false;
+            }
+
+            RaiseMessage("GLTFExporter.Animation | Export animation of morph target manager with id: " + babylonMorphTargetManager.id, 2);
+
+            var influencesPerFrame = _getTargetManagerAnimationsData(babylonMorphTargetManager);
+            var frames = new List<int>(influencesPerFrame.Keys);
+            frames.Sort(); // Mandatory otherwise gltf loader of babylon doesn't understand
+
+            // Target
+            var gltfTarget = new GLTFChannelTarget
+            {
+                node = gltfNode.index
+            };
+            gltfTarget.path = "weights";
+
+            // Buffer
+            var buffer = GLTFBufferService.Instance.GetBuffer(gltf);
+
+            // --- Input ---
+            var accessorInput = GLTFBufferService.Instance.CreateAccessor(
+                gltf,
+                GLTFBufferService.Instance.GetBufferViewAnimationFloatScalar(gltf, buffer),
+                "accessorAnimationInput",
+                GLTFAccessor.ComponentType.FLOAT,
+                GLTFAccessor.TypeEnum.SCALAR
+            );
+            // Populate accessor
+            accessorInput.min = new float[] { float.MaxValue };
+            accessorInput.max = new float[] { float.MinValue };
+
+            foreach (var frame in frames)
+            {
+                var inputValue = frame / FPS_FACTOR;
+                // Store values as bytes
+                accessorInput.bytesList.AddRange(BitConverter.GetBytes(inputValue));
+                // Update min and max values
+                GLTFBufferService.UpdateMinMaxAccessor(accessorInput, inputValue);
+            }
+            accessorInput.count = influencesPerFrame.Count;
+
+            // --- Output ---
+            GLTFAccessor accessorOutput = GLTFBufferService.Instance.CreateAccessor(
+                gltf,
+                GLTFBufferService.Instance.GetBufferViewAnimationFloatScalar(gltf, buffer),
+                "accessorAnimationWeights",
+                GLTFAccessor.ComponentType.FLOAT,
+                GLTFAccessor.TypeEnum.SCALAR
+            );
+            // Populate accessor
+            foreach (var frame in frames)
+            {
+                var outputValues = influencesPerFrame[frame];
+                // Store values as bytes
+                foreach (var outputValue in outputValues)
+                {
+                    accessorOutput.count++;
+                    accessorOutput.bytesList.AddRange(BitConverter.GetBytes(outputValue));
+                }
+            }
+
+            // Animation sampler
+            var gltfAnimationSampler = new GLTFAnimationSampler
+            {
+                input = accessorInput.index,
+                output = accessorOutput.index
+            };
+            gltfAnimationSampler.index = samplerList.Count;
+            samplerList.Add(gltfAnimationSampler);
+
+            // Channel
+            var gltfChannel = new GLTFChannel
+            {
+                sampler = gltfAnimationSampler.index,
+                target = gltfTarget
+            };
+            channelList.Add(gltfChannel);
+
+            return true;
+        }
+
+        private bool _isBabylonMorphTargetManagerAnimationValid(BabylonMorphTargetManager babylonMorphTargetManager)
+        {
+            bool hasAnimation = false;
+            bool areAnimationsValid = true;
+            foreach (var babylonMorphTarget in babylonMorphTargetManager.targets)
+            {
+                if (babylonMorphTarget.animations != null && babylonMorphTarget.animations.Length > 0)
+                {
+                    hasAnimation = true;
+
+                    // Ensure target has only one animation
+                    if (babylonMorphTarget.animations.Length > 1)
+                    {
+                        areAnimationsValid = false;
+                        RaiseWarning("GLTFExporter.Animation | Only one animation is supported for morph targets", 3);
+                        continue;
+                    }
+
+                    // Ensure the target animation property is 'influence'
+                    bool targetHasInfluence = false;
+                    foreach (BabylonAnimation babylonAnimation in babylonMorphTarget.animations)
+                    {
+                        if (babylonAnimation.property == "influence")
+                        {
+                            targetHasInfluence = true;
+                        }
+                    }
+                    if (targetHasInfluence == false)
+                    {
+                        areAnimationsValid = false;
+                        RaiseWarning("GLTFExporter.Animation | Only 'influence' animation is supported for morph targets", 3);
+                        continue;
+                    }
+                }
+            }
+
+            return hasAnimation && areAnimationsValid;
+        }
+
+        /// <summary>
+        /// The keys of each BabylonMorphTarget animation ARE NOT assumed to be identical.
+        /// This function merges together all keys and binds to each an influence value for all targets.
+        /// A target influence value is automatically computed when necessary.
+        /// Computation rules are:
+        /// - linear interpolation between target key range
+        /// - constant value outside target key range
+        /// </summary>
+        /// <example>
+        /// When:
+        /// animation1.keys = {0, 25, 50, 100}
+        /// animation2.keys = {50, 75, 100}
+        /// 
+        /// Gives:
+        /// mergedKeys = {0, 25, 50, 100, 75}
+        /// range1=[0, 100]
+        /// range2=[50, 100]
+        /// for animation1, the value associated to key=75 is the interpolation of its values between 50 and 100
+        /// for animation2, the value associated to key=0 is equal to the one at key=50 since 0 is out of range [50, 100] (same for key=25)</example>
+        /// <param name="babylonMorphTargetManager"></param>
+        /// <returns>A map which for each frame, gives the influence value of all targets</returns>
+        private Dictionary<int, List<float>> _getTargetManagerAnimationsData(BabylonMorphTargetManager babylonMorphTargetManager)
+        {
+            // Merge all keys into a single set (no duplicated frame)
+            var mergedFrames = new HashSet<int>();
+            foreach (var babylonMorphTarget in babylonMorphTargetManager.targets)
+            {
+                if (babylonMorphTarget.animations != null)
+                {
+                    var animation = babylonMorphTarget.animations[0];
+                    foreach (BabylonAnimationKey animationKey in animation.keys)
+                    {
+                        mergedFrames.Add(animationKey.frame);
+                    }
+                }
+            }
+
+            // For each frame, gives the influence value of all targets (gltf structure)
+            var influencesPerFrame = new Dictionary<int, List<float>>();
+            foreach (var frame in mergedFrames)
+            {
+                influencesPerFrame.Add(frame, new List<float>());
+            }
+            foreach (var babylonMorphTarget in babylonMorphTargetManager.targets)
+            {
+                // For a given target, for each frame, gives the influence value of the target (babylon structure)
+                var influencePerFrameForTarget = new Dictionary<int, float>();
+
+                if (babylonMorphTarget.animations != null && babylonMorphTarget.animations.Length > 0)
+                {
+                    var animation = babylonMorphTarget.animations[0];
+
+                    if (animation.keys.Length == 1)
+                    {
+                        // Same influence for all frames
+                        var influence = animation.keys[0].values[0];
+                        foreach (var frame in mergedFrames)
+                        {
+                            influencePerFrameForTarget.Add(frame, influence);
+                        }
+                    }
+                    else
+                    {
+                        // Retreive target animation key range [min, max]
+                        var babylonAnimationKeys = new List<BabylonAnimationKey>(animation.keys);
+                        babylonAnimationKeys.Sort();
+                        var minAnimationKey = babylonAnimationKeys[0];
+                        var maxAnimationKey = babylonAnimationKeys[babylonAnimationKeys.Count - 1];
+                        
+                        foreach (var frame in mergedFrames)
+                        {
+                            // Surround the current frame with closest keys available for the target
+                            BabylonAnimationKey lowerAnimationKey = minAnimationKey;
+                            BabylonAnimationKey upperAnimationKey = maxAnimationKey;
+                            foreach (BabylonAnimationKey animationKey in animation.keys)
+                            {
+                                if (lowerAnimationKey.frame < animationKey.frame && animationKey.frame <= frame)
+                                {
+                                    lowerAnimationKey = animationKey;
+                                }
+                                if (frame <= animationKey.frame && animationKey.frame < upperAnimationKey.frame)
+                                {
+                                    upperAnimationKey = animationKey;
+                                }
+                            }
+
+                            // In case the target has a key for this frame
+                            // or the current frame is out of target animation key range
+                            if (lowerAnimationKey.frame == upperAnimationKey.frame)
+                            {
+                                influencePerFrameForTarget.Add(frame, lowerAnimationKey.values[0]);
+                            }
+                            else
+                            {
+                                // Interpolate influence values
+                                var t = 1.0f * (frame - lowerAnimationKey.frame) / (upperAnimationKey.frame - lowerAnimationKey.frame);
+                                var influence = Tools.Lerp(lowerAnimationKey.values[0], upperAnimationKey.values[0], t);
+                                influencePerFrameForTarget.Add(frame, influence);
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    // Target is not animated
+                    // Fill all frames with 0
+                    foreach (var frame in mergedFrames)
+                    {
+                        influencePerFrameForTarget.Add(frame, 0);
+                    }
+                }
+
+                // Switch from babylon to gltf storage representation
+                foreach (var frame in mergedFrames)
+                {
+                    List<float> influences = influencesPerFrame[frame];
+                    influences.Add(influencePerFrameForTarget[frame]);
+                }
+            }
+
+            return influencesPerFrame;
+        }
+
+        private string _getTargetPath(string babylonProperty)
+        {
+            switch (babylonProperty)
+            {
+                case "position":
+                    return "translation";
+                case "rotationQuaternion":
+                    return "rotation";
+                case "scaling":
+                    return "scale";
+                default:
+                    return null;
+            }
+        }
+    }
+}

+ 2 - 0
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Camera.cs

@@ -54,6 +54,8 @@ namespace Max2Babylon
             // No scaling defined for babylon camera. Use identity instead.
             gltfNode.scale = new float[3] { 1, 1, 1 };
 
+            // Animations
+            ExportNodeAnimation(babylonCamera, gltf, gltfNode);
 
             // --- prints ---
 

+ 3 - 0
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Light.cs

@@ -41,6 +41,9 @@ namespace Max2Babylon
             // No scaling defined for babylon light. Use identity instead.
             gltfNode.scale = new float[3] { 1, 1, 1 };
 
+            // Animations
+            ExportNodeAnimation(babylonLight, gltf, gltfNode);
+
             return gltfNode;
         }
     }

+ 221 - 305
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.Mesh.cs

@@ -3,7 +3,6 @@ using BabylonExport.Entities;
 using GLTFExport.Entities;
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
 
 namespace Max2Babylon
@@ -70,14 +69,6 @@ namespace Max2Babylon
             // Retreive indices from babylon mesh
             List<ushort> babylonIndices = new List<ushort>();
             babylonIndices = babylonMesh.indices.ToList().ConvertAll(new Converter<int, ushort>(n => (ushort)n));
-            // For triangle primitives in gltf, the front face has a counter-clockwise (CCW) winding order
-            // Swap face side
-            //for (int i = 0; i < babylonIndices.Count; i += 3)
-            //{
-            //    var tmp = babylonIndices[i];
-            //    babylonIndices[i] = babylonIndices[i + 2];
-            //    babylonIndices[i + 2] = tmp;
-            //}
 
 
             // --------------------------
@@ -90,92 +81,7 @@ namespace Max2Babylon
             gltfMesh.index = gltf.MeshesList.Count;
             gltf.MeshesList.Add(gltfMesh);
             gltfMesh.idGroupInstance = babylonMesh.idGroupInstance;
-
-            // Buffer
-            var buffer = gltf.buffer;
-            if (buffer == null)
-            {
-                buffer = new GLTFBuffer
-                {
-                    uri = gltf.OutputFile + ".bin"
-                };
-                buffer.index = gltf.BuffersList.Count;
-                gltf.BuffersList.Add(buffer);
-                gltf.buffer = buffer;
-            }
-
-            // BufferView - Scalar
-            var bufferViewScalar = gltf.bufferViewScalar;
-            if (bufferViewScalar == null)
-            {
-                bufferViewScalar = new GLTFBufferView
-                {
-                    name = "bufferViewScalar",
-                    buffer = buffer.index,
-                    Buffer = buffer
-                };
-                bufferViewScalar.index = gltf.BufferViewsList.Count;
-                gltf.BufferViewsList.Add(bufferViewScalar);
-                gltf.bufferViewScalar = bufferViewScalar;
-            }
-
-            // BufferView - Vector3
-            var bufferViewFloatVec3 = gltf.bufferViewFloatVec3;
-            if (bufferViewFloatVec3 == null)
-            {
-                bufferViewFloatVec3 = new GLTFBufferView
-                {
-                    name = "bufferViewFloatVec3",
-                    buffer = buffer.index,
-                    Buffer = buffer,
-                    byteOffset = 0,
-                    byteStride = 12 // Field only defined for buffer views that contain vertex attributes. A vertex needs 3 * 4 bytes
-                };
-                bufferViewFloatVec3.index = gltf.BufferViewsList.Count;
-                gltf.BufferViewsList.Add(bufferViewFloatVec3);
-                gltf.bufferViewFloatVec3 = bufferViewFloatVec3;
-            }
-
-            // BufferView - Vector4
-            GLTFBufferView bufferViewFloatVec4 = null;
-            if (hasColor)
-            {
-                bufferViewFloatVec4 = gltf.bufferViewFloatVec4;
-                if (bufferViewFloatVec4 == null)
-                {
-                    bufferViewFloatVec4 = new GLTFBufferView
-                    {
-                        name = "bufferViewFloatVec4",
-                        buffer = buffer.index,
-                        Buffer = buffer,
-                        byteOffset = 0,
-                        byteStride = 16 // Field only defined for buffer views that contain vertex attributes. A vertex needs 4 * 4 bytes
-                    };
-                    bufferViewFloatVec4.index = gltf.BufferViewsList.Count;
-                    gltf.BufferViewsList.Add(bufferViewFloatVec4);
-                    gltf.bufferViewFloatVec4 = bufferViewFloatVec4;
-                }
-            }
-
-            // BufferView - Vector2
-            GLTFBufferView bufferViewFloatVec2 = null;
-            if (hasUV || hasUV2)
-            {
-                bufferViewFloatVec2 = gltf.bufferViewFloatVec2;
-                if (bufferViewFloatVec2 == null)
-                {
-                    bufferViewFloatVec2 = new GLTFBufferView
-                    {
-                        name = "bufferViewFloatVec2",
-                        buffer = buffer.index,
-                        Buffer = buffer,
-                        byteStride = 8 // Field only defined for buffer views that contain vertex attributes. A vertex needs 2 * 4 bytes
-                    };
-                    bufferViewFloatVec2.index = gltf.BufferViewsList.Count;
-                    gltf.BufferViewsList.Add(bufferViewFloatVec2);
-                    gltf.bufferViewFloatVec2 = bufferViewFloatVec2;
-                }
-            }
+            var weights = new List<float>();
 
             // --------------------------
             // ---- glTF primitives -----
@@ -183,15 +89,6 @@ namespace Max2Babylon
 
             RaiseMessage("GLTFExporter.Mesh | glTF primitives", 2);
             var meshPrimitives = new List<GLTFMeshPrimitive>();
-
-            // Global vertices are sorted per submesh
-            var globalVerticesSubMeshes = new List<List<GLTFGlobalVertex>>();
-
-            // In gltf, indices of each mesh primitive are 0-based (ie: min value is 0)
-            // Thus, the gltf indices list is a concatenation of sub lists all 0-based
-            // Example for 2 triangles, each being a submesh:
-            //      babylonIndices = {0,1,2, 3,4,5} gives as result gltfIndicies = {0,1,2, 0,1,2}
-            var gltfIndices = new List<ushort>();
             
             foreach (BabylonSubMesh babylonSubMesh in babylonMesh.subMeshes)
             {
@@ -200,19 +97,20 @@ namespace Max2Babylon
                 // --------------------------
 
                 List<GLTFGlobalVertex> globalVerticesSubMesh = globalVertices.GetRange(babylonSubMesh.verticesStart, babylonSubMesh.verticesCount);
-                globalVerticesSubMeshes.Add(globalVerticesSubMesh);
 
-                List<ushort> _indices = babylonIndices.GetRange(babylonSubMesh.indexStart, babylonSubMesh.indexCount);
-                // Indices of this submesh / primitive are updated to be 0-based
-                var minIndiceValue = _indices.Min(); // Should be equal to babylonSubMesh.indexStart
-                for (int indexIndice = 0; indexIndice < _indices.Count; indexIndice++)
+                List<ushort> gltfIndices = babylonIndices.GetRange(babylonSubMesh.indexStart, babylonSubMesh.indexCount);
+                // In gltf, indices of each mesh primitive are 0-based (ie: min value is 0)
+                // Thus, the gltf indices list is a concatenation of sub lists all 0-based
+                // Example for 2 triangles, each being a submesh:
+                //      babylonIndices = {0,1,2, 3,4,5} gives as result gltfIndicies = {0,1,2, 0,1,2}
+                var minIndiceValue = gltfIndices.Min(); // Should be equal to babylonSubMesh.indexStart
+                for (int indexIndice = 0; indexIndice < gltfIndices.Count; indexIndice++)
                 {
-                    _indices[indexIndice] -= minIndiceValue;
+                    gltfIndices[indexIndice] -= minIndiceValue;
                 }
-                gltfIndices.AddRange(_indices);
 
                 // --------------------------
-                // -- Init glTF primitive ---
+                // ----- Mesh primitive -----
                 // --------------------------
 
                 // MeshPrimitive
@@ -222,105 +120,6 @@ namespace Max2Babylon
                 };
                 meshPrimitives.Add(meshPrimitive);
 
-                // Accessor - Indices
-                var accessorIndices = new GLTFAccessor
-                {
-                    name = "accessorIndices",
-                    bufferView = bufferViewScalar.index,
-                    BufferView = bufferViewScalar,
-                    componentType = GLTFAccessor.ComponentType.UNSIGNED_SHORT,
-                    type = GLTFAccessor.TypeEnum.SCALAR.ToString()
-                };
-                accessorIndices.index = gltf.AccessorsList.Count;
-                gltf.AccessorsList.Add(accessorIndices);
-                meshPrimitive.indices = accessorIndices.index;
-
-                // Accessor - Positions
-                var accessorPositions = new GLTFAccessor
-                {
-                    name = "accessorPositions",
-                    bufferView = bufferViewFloatVec3.index,
-                    BufferView = bufferViewFloatVec3,
-                    componentType = GLTFAccessor.ComponentType.FLOAT,
-                    type = GLTFAccessor.TypeEnum.VEC3.ToString(),
-                    min = new float[] { float.MaxValue, float.MaxValue, float.MaxValue },
-                    max = new float[] { float.MinValue, float.MinValue, float.MinValue }
-                };
-                accessorPositions.index = gltf.AccessorsList.Count;
-                gltf.AccessorsList.Add(accessorPositions);
-                meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.POSITION.ToString(), accessorPositions.index);
-
-                // Accessor - Normals
-                var accessorNormals = new GLTFAccessor
-                {
-                    name = "accessorNormals",
-                    bufferView = bufferViewFloatVec3.index,
-                    BufferView = bufferViewFloatVec3,
-                    componentType = GLTFAccessor.ComponentType.FLOAT,
-                    type = GLTFAccessor.TypeEnum.VEC3.ToString()
-                };
-                accessorNormals.index = gltf.AccessorsList.Count;
-                gltf.AccessorsList.Add(accessorNormals);
-                meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.NORMAL.ToString(), accessorNormals.index);
-
-                // Accessor - Colors
-                GLTFAccessor accessorColors = null;
-                if (hasColor)
-                {
-                    accessorColors = new GLTFAccessor
-                    {
-                        name = "accessorColors",
-                        bufferView = bufferViewFloatVec4.index,
-                        BufferView = bufferViewFloatVec4,
-                        componentType = GLTFAccessor.ComponentType.FLOAT,
-                        type = GLTFAccessor.TypeEnum.VEC4.ToString()
-                    };
-                    accessorColors.index = gltf.AccessorsList.Count;
-                    gltf.AccessorsList.Add(accessorColors);
-                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.COLOR_0.ToString(), accessorColors.index);
-                }
-
-                // Accessor - UV
-                GLTFAccessor accessorUVs = null;
-                if (hasUV)
-                {
-                    accessorUVs = new GLTFAccessor
-                    {
-                        name = "accessorUVs",
-                        bufferView = bufferViewFloatVec2.index,
-                        BufferView = bufferViewFloatVec2,
-                        componentType = GLTFAccessor.ComponentType.FLOAT,
-                        type = GLTFAccessor.TypeEnum.VEC2.ToString()
-                    };
-                    accessorUVs.index = gltf.AccessorsList.Count;
-                    gltf.AccessorsList.Add(accessorUVs);
-                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.TEXCOORD_0.ToString(), accessorUVs.index);
-                }
-
-                // Accessor - UV2
-                GLTFAccessor accessorUV2s = null;
-                if (hasUV2)
-                {
-                    accessorUV2s = new GLTFAccessor
-                    {
-                        name = "accessorUV2s",
-                        bufferView = bufferViewFloatVec2.index,
-                        BufferView = bufferViewFloatVec2,
-                        componentType = GLTFAccessor.ComponentType.FLOAT,
-                        type = GLTFAccessor.TypeEnum.VEC2.ToString()
-                    };
-                    accessorUV2s.index = gltf.AccessorsList.Count;
-                    gltf.AccessorsList.Add(accessorUV2s);
-                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.TEXCOORD_1.ToString(), accessorUV2s.index);
-                }
-
-                
-                // --------------------------
-                // - Update glTF primitive --
-                // --------------------------
-
-                RaiseMessage("GLTFExporter.Mesh | Mesh as glTF", 3);
-
                 // Material
                 if (babylonMesh.materialId != null)
                 {
@@ -351,121 +150,249 @@ namespace Max2Babylon
                     meshPrimitive.mode = GLTFMeshPrimitive.FillMode.TRIANGLES;
                 }
 
-                // Update min and max vertex position for each component (X, Y, Z)
+                // --------------------------
+                // ------- Accessors --------
+                // --------------------------
+
+                // Buffer
+                var buffer = GLTFBufferService.Instance.GetBuffer(gltf);
+
+                // --- Indices ---
+                var accessorIndices = GLTFBufferService.Instance.CreateAccessor(
+                    gltf,
+                    GLTFBufferService.Instance.GetBufferViewScalar(gltf, buffer),
+                    "accessorIndices",
+                    GLTFAccessor.ComponentType.UNSIGNED_SHORT,
+                    GLTFAccessor.TypeEnum.SCALAR
+                );
+                meshPrimitive.indices = accessorIndices.index;
+                // Populate accessor
+                gltfIndices.ForEach(n => accessorIndices.bytesList.AddRange(BitConverter.GetBytes(n)));
+                accessorIndices.count = gltfIndices.Count;
+                
+                // --- Positions ---
+                var accessorPositions = GLTFBufferService.Instance.CreateAccessor(
+                    gltf,
+                    GLTFBufferService.Instance.GetBufferViewFloatVec3(gltf, buffer),
+                    "accessorPositions",
+                    GLTFAccessor.ComponentType.FLOAT,
+                    GLTFAccessor.TypeEnum.VEC3
+                );
+                meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.POSITION.ToString(), accessorPositions.index);
+                // Populate accessor
+                accessorPositions.min = new float[] { float.MaxValue, float.MaxValue, float.MaxValue };
+                accessorPositions.max = new float[] { float.MinValue, float.MinValue, float.MinValue };
                 globalVerticesSubMesh.ForEach((globalVertex) =>
                 {
-                    var positionArray = new float[] { globalVertex.Position.X, globalVertex.Position.Y, globalVertex.Position.Z };
-                    for (int indexComponent = 0; indexComponent < positionArray.Length; indexComponent++)
+                    var positions = new float[] { globalVertex.Position.X, globalVertex.Position.Y, globalVertex.Position.Z };
+                    // Store values as bytes
+                    foreach (var position in positions)
                     {
-                        if (positionArray[indexComponent] < accessorPositions.min[indexComponent])
-                        {
-                            accessorPositions.min[indexComponent] = positionArray[indexComponent];
-                        }
-                        if (positionArray[indexComponent] > accessorPositions.max[indexComponent])
-                        {
-                            accessorPositions.max[indexComponent] = positionArray[indexComponent];
-                        }
+                        accessorPositions.bytesList.AddRange(BitConverter.GetBytes(position));
                     }
+                    // Update min and max values
+                    GLTFBufferService.UpdateMinMaxAccessor(accessorPositions, positions);
                 });
-
-                // Update byte length and count of accessors, bufferViews and buffers
-                // Scalar
-                AddElementsToAccessor(accessorIndices, _indices.Count);
-                // Ensure the byteoffset is a multiple of 4
-                // Indices accessor element size if 2
-                // So the count needs to be even
-                if (gltfIndices.Count % 2 != 0)
-                {
-                    gltfIndices.Add(0);
-                    bufferViewScalar.byteLength += 2;
-                    buffer.byteLength += 2;
-                }
-                // Vector3
-                AddElementsToAccessor(accessorPositions, globalVerticesSubMesh.Count);
-                AddElementsToAccessor(accessorNormals, globalVerticesSubMesh.Count);
-                // Vector4
+                accessorPositions.count = globalVerticesSubMesh.Count;
+                
+                // --- Normals ---
+                var accessorNormals = GLTFBufferService.Instance.CreateAccessor(
+                    gltf,
+                    GLTFBufferService.Instance.GetBufferViewFloatVec3(gltf, buffer),
+                    "accessorNormals",
+                    GLTFAccessor.ComponentType.FLOAT,
+                    GLTFAccessor.TypeEnum.VEC3
+                );
+                meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.NORMAL.ToString(), accessorNormals.index);
+                // Populate accessor
+                List<float> normals = globalVerticesSubMesh.SelectMany(v => new[] { v.Normal.X, v.Normal.Y, v.Normal.Z }).ToList();
+                normals.ForEach(n => accessorNormals.bytesList.AddRange(BitConverter.GetBytes(n)));
+                accessorNormals.count = globalVerticesSubMesh.Count;
+                
+                // --- Colors ---
                 if (hasColor)
                 {
-                    AddElementsToAccessor(accessorColors, globalVerticesSubMesh.Count);
+                    var accessorColors = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewFloatVec4(gltf, buffer),
+                        "accessorColors",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.VEC4
+                    );
+                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.COLOR_0.ToString(), accessorColors.index);
+                    // Populate accessor
+                    List<float> colors = globalVerticesSubMesh.SelectMany(v => new[] { v.Color[0], v.Color[1], v.Color[2], v.Color[3] }).ToList();
+                    colors.ForEach(n => accessorColors.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    accessorColors.count = globalVerticesSubMesh.Count;
                 }
-                // Vector2
+                
+                // --- UV ---
                 if (hasUV)
                 {
-                    AddElementsToAccessor(accessorUVs, globalVerticesSubMesh.Count);
+                    var accessorUVs = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewFloatVec2(gltf, buffer),
+                        "accessorUVs",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.VEC2
+                    );
+                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.TEXCOORD_0.ToString(), accessorUVs.index);
+                    // Populate accessor
+                    List<float> uvs = globalVerticesSubMesh.SelectMany(v => new[] { v.UV.X, v.UV.Y }).ToList();
+                    uvs.ForEach(n => accessorUVs.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    accessorUVs.count = globalVerticesSubMesh.Count;
                 }
+                
+                // --- UV2 ---
                 if (hasUV2)
                 {
-                    AddElementsToAccessor(accessorUV2s, globalVerticesSubMesh.Count);
+                    var accessorUV2s = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewFloatVec2(gltf, buffer),
+                        "accessorUV2s",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.VEC2
+                    );
+                    meshPrimitive.attributes.Add(GLTFMeshPrimitive.Attribute.TEXCOORD_1.ToString(), accessorUV2s.index);
+                    // Populate accessor
+                    List<float> uvs2 = globalVerticesSubMesh.SelectMany(v => new[] { v.UV2.X, v.UV2.Y }).ToList();
+                    uvs2.ForEach(n => accessorUV2s.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    accessorUV2s.count = globalVerticesSubMesh.Count;
+                }
+
+                // Morph targets
+                var babylonMorphTargetManager = GetBabylonMorphTargetManager(babylonScene, babylonMesh);
+                if (babylonMorphTargetManager != null)
+                {
+                    _exportMorphTargets(babylonMesh, babylonMorphTargetManager, gltf, buffer, meshPrimitive, weights);
                 }
             }
             gltfMesh.primitives = meshPrimitives.ToArray();
-            
-            // Update byte offset of bufferViews
-            GLTFBufferView lastBufferView = null;
-            gltf.BufferViewsList.FindAll(bufferView => bufferView.buffer == buffer.index).ForEach(bufferView =>
+            if (weights.Count > 0)
             {
-                if (lastBufferView != null)
-                {
-                    bufferView.byteOffset = lastBufferView.byteOffset + lastBufferView.byteLength;
-                }
-                lastBufferView = bufferView;
-            });
-
-
-            // --------------------------
-            // --------- Saving ---------
-            // --------------------------
-
-            RaiseMessage("GLTFExporter.Mesh | saving", 2);
+                gltfMesh.weights = weights.ToArray();
+            }
 
-            // BufferView - Scalar
-            gltfIndices.ForEach(n => bufferViewScalar.bytesList.AddRange(BitConverter.GetBytes(n)));
+            return gltfMesh;
+        }
 
-            // BufferView - Vector3
-            globalVerticesSubMeshes.ForEach(globalVerticesSubMesh =>
+        private BabylonMorphTargetManager GetBabylonMorphTargetManager(BabylonScene babylonScene, BabylonMesh babylonMesh)
+        {
+            if (babylonMesh.morphTargetManagerId.HasValue)
             {
-                List<float> vertices = globalVerticesSubMesh.SelectMany(v => new[] { v.Position.X, v.Position.Y, v.Position.Z }).ToList();
-                vertices.ForEach(n => bufferViewFloatVec3.bytesList.AddRange(BitConverter.GetBytes(n)));
+                if (babylonScene.morphTargetManagers == null)
+                {
+                    RaiseWarning("GLTFExporter.Mesh | morphTargetManagers is not defined", 3);
+                }
+                else
+                {
+                    var babylonMorphTargetManager = babylonScene.morphTargetManagers.ElementAtOrDefault(babylonMesh.morphTargetManagerId.Value);
 
-                List<float> normals = globalVerticesSubMesh.SelectMany(v => new[] { v.Normal.X, v.Normal.Y, v.Normal.Z }).ToList();
-                normals.ForEach(n => bufferViewFloatVec3.bytesList.AddRange(BitConverter.GetBytes(n)));
-            });
+                    if (babylonMorphTargetManager == null)
+                    {
+                        RaiseWarning($"GLTFExporter.Mesh | morphTargetManager with index {babylonMesh.morphTargetManagerId.Value} not found", 3);
+                    }
+                    return babylonMorphTargetManager;
+                }
+            }
+            return null;
+        }
 
-            // BufferView - Vector4
-            globalVerticesSubMeshes.ForEach(globalVerticesSubMesh =>
+        private void _exportMorphTargets(BabylonMesh babylonMesh, BabylonMorphTargetManager babylonMorphTargetManager, GLTF gltf, GLTFBuffer buffer, GLTFMeshPrimitive meshPrimitive, List<float> weights)
+        {
+            var gltfMorphTargets = new List<GLTFMorphTarget>();
+            foreach (var babylonMorphTarget in babylonMorphTargetManager.targets)
             {
-                if (hasColor)
+                var gltfMorphTarget = new GLTFMorphTarget();
+
+                // Positions
+                if (babylonMorphTarget.positions != null)
                 {
-                    List<float> colors = globalVerticesSubMesh.SelectMany(v => new[] { v.Color[0], v.Color[1], v.Color[2], v.Color[3] }).ToList();
-                    colors.ForEach(n => bufferViewFloatVec4.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    var accessorTargetPositions = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewFloatVec3(gltf, buffer),
+                        "accessorTargetPositions",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.VEC3
+                    );
+                    gltfMorphTarget.Add(GLTFMorphTarget.Attribute.POSITION.ToString(), accessorTargetPositions.index);
+                    // Populate accessor
+                    accessorTargetPositions.min = new float[] { float.MaxValue, float.MaxValue, float.MaxValue };
+                    accessorTargetPositions.max = new float[] { float.MinValue, float.MinValue, float.MinValue };
+                    for (int indexPosition = 0; indexPosition < babylonMorphTarget.positions.Length; indexPosition += 3)
+                    {
+                        var positionTarget = _subArray(babylonMorphTarget.positions, indexPosition, 3);
+
+                        // Babylon stores morph target information as final data while glTF expects deltas from mesh primitive
+                        var positionMesh = _subArray(babylonMesh.positions, indexPosition, 3);
+                        for (int indexCoordinate = 0; indexCoordinate < positionTarget.Length; indexCoordinate++)
+                        {
+                            positionTarget[indexCoordinate] = positionTarget[indexCoordinate] - positionMesh[indexCoordinate];
+                        }
+
+                        // Store values as bytes
+                        foreach (var coordinate in positionTarget)
+                        {
+                            accessorTargetPositions.bytesList.AddRange(BitConverter.GetBytes(coordinate));
+                        }
+                        // Update min and max values
+                        GLTFBufferService.UpdateMinMaxAccessor(accessorTargetPositions, positionTarget);
+                    }
+                    accessorTargetPositions.count = babylonMorphTarget.positions.Length / 3;
                 }
-            });
 
-            // BufferView - Vector2
-            globalVerticesSubMeshes.ForEach(globalVerticesSubMesh =>
-            {
-                if (hasUV)
+                // Normals
+                if (babylonMorphTarget.normals != null)
                 {
-                    List<float> uvs = globalVerticesSubMesh.SelectMany(v => new[] { v.UV.X, v.UV.Y }).ToList();
-                    uvs.ForEach(n => bufferViewFloatVec2.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    var accessorTargetNormals = GLTFBufferService.Instance.CreateAccessor(
+                        gltf,
+                        GLTFBufferService.Instance.GetBufferViewFloatVec3(gltf, buffer),
+                        "accessorTargetNormals",
+                        GLTFAccessor.ComponentType.FLOAT,
+                        GLTFAccessor.TypeEnum.VEC3
+                    );
+                    gltfMorphTarget.Add(GLTFMorphTarget.Attribute.NORMAL.ToString(), accessorTargetNormals.index);
+                    // Populate accessor
+                    for (int indexNormal = 0; indexNormal < babylonMorphTarget.positions.Length; indexNormal += 3)
+                    {
+                        var normalTarget = _subArray(babylonMorphTarget.normals, indexNormal, 3);
+
+                        // Babylon stores morph target information as final data while glTF expects deltas from mesh primitive
+                        var normalMesh = _subArray(babylonMesh.normals, indexNormal, 3);
+                        for (int indexCoordinate = 0; indexCoordinate < normalTarget.Length; indexCoordinate++)
+                        {
+                            normalTarget[indexCoordinate] = normalTarget[indexCoordinate] - normalMesh[indexCoordinate];
+                        }
+
+                        // Store values as bytes
+                        foreach (var coordinate in normalTarget)
+                        {
+                            accessorTargetNormals.bytesList.AddRange(BitConverter.GetBytes(coordinate));
+                        }
+                    }
+                    accessorTargetNormals.count = babylonMorphTarget.normals.Length / 3;
                 }
 
-                if (hasUV2)
+                if (gltfMorphTarget.Count > 0)
                 {
-                    List<float> uvs2 = globalVerticesSubMesh.SelectMany(v => new[] { v.UV2.X, v.UV2.Y }).ToList();
-                    uvs2.ForEach(n => bufferViewFloatVec2.bytesList.AddRange(BitConverter.GetBytes(n)));
+                    gltfMorphTargets.Add(gltfMorphTarget);
+                    weights.Add(babylonMorphTarget.influence);
                 }
-            });
-
-            //// Write data to binary file
-            //string outputBinaryFile = Path.Combine(gltf.OutputPath, gltfMesh.name + ".bin");
-            //RaiseMessage("GLTFExporter.Mesh | Saving " + outputBinaryFile, 2);
-            //using (BinaryWriter writer = new BinaryWriter(File.Open(outputBinaryFile, FileMode.Create)))
-            //{
-            //    bytesList.ForEach(b => writer.Write(b));
-            //}
+            }
+            if (gltfMorphTargets.Count > 0)
+            {
+                meshPrimitive.targets = gltfMorphTargets.ToArray();
+            }
+        }
 
-            return gltfMesh;
+        private float[] _subArray(float[] array, int startIndex, int count)
+        {
+            var result = new float[count];
+            for (int i = 0; i < count; i++)
+            {
+                result[i] = array[startIndex + i];
+            }
+            return result;
         }
 
         private IPoint2 createIPoint2(float[] array, int index)
@@ -485,16 +412,5 @@ namespace Max2Babylon
             var startIndex = index * 4;
             return Loader.Global.Point4.Create(array[startIndex], array[startIndex + 1], array[startIndex + 2], array[startIndex + 3]);
         }
-
-        private void AddElementsToAccessor(GLTFAccessor accessor, int count)
-        {
-            GLTFBufferView bufferView = accessor.BufferView;
-            GLTFBuffer buffer = bufferView.Buffer;
-
-            accessor.byteOffset = bufferView.byteLength;
-            accessor.count += count;
-            bufferView.byteLength += accessor.getByteLength();
-            buffer.byteLength += accessor.getByteLength();
-        }
     }
 }

+ 29 - 9
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.cs

@@ -84,7 +84,7 @@ namespace Max2Babylon
                 idGroupInstance = -1
             };
             scene.NodesList.Clear(); // Only root node is listed in node list
-            GLTFNode gltfRootNode = ExportAbstractMesh(rootNode, gltf, null);
+            GLTFNode gltfRootNode = ExportAbstractMesh(rootNode, gltf, null, null);
             gltfRootNode.ChildrenList.AddRange(tmpNodesList);
 
             // Materials
@@ -96,27 +96,47 @@ namespace Max2Babylon
             };
             RaiseMessage(string.Format("GLTFExporter | Nb materials exported: {0}", gltf.MaterialsList.Count), Color.Gray, 1);
 
+            // Prepare buffers
+            gltf.BuffersList.ForEach(buffer =>
+            {
+                buffer.BufferViews.ForEach(bufferView =>
+                {
+                    bufferView.Accessors.ForEach(accessor =>
+                    {
+                        // Chunk must be padded with trailing zeros (0x00) to satisfy alignment requirements
+                        accessor.bytesList = new List<byte>(padChunk(accessor.bytesList.ToArray(), 4, 0x00));
+
+                        // Update byte properties
+                        accessor.byteOffset = bufferView.byteLength;
+                        bufferView.byteLength += accessor.bytesList.Count;
+                        // Merge bytes
+                        bufferView.bytesList.AddRange(accessor.bytesList);
+                    });
+                    // Update byte properties
+                    bufferView.byteOffset = buffer.byteLength;
+                    buffer.byteLength += bufferView.bytesList.Count;
+                    // Merge bytes
+                    buffer.bytesList.AddRange(bufferView.bytesList);
+                });
+            });
+
             // Cast lists to arrays
             gltf.Prepare();
 
             // Output
             RaiseMessage("GLTFExporter | Saving to output file");
             
+            // Write .gltf file
             string outputGltfFile = Path.ChangeExtension(outputFile, "gltf");
             File.WriteAllText(outputGltfFile, gltfToJson(gltf));
 
-            // Write data to binary file
+            // Write .bin file
             string outputBinaryFile = Path.ChangeExtension(outputFile, "bin");
             using (BinaryWriter writer = new BinaryWriter(File.Open(outputBinaryFile, FileMode.Create)))
             {
                 gltf.BuffersList.ForEach(buffer =>
                 {
-                    buffer.bytesList = new List<byte>();
-                    gltf.BufferViewsList.FindAll(bufferView => bufferView.buffer == buffer.index).ForEach(bufferView =>
-                    {
-                        bufferView.bytesList.ForEach(b => writer.Write(b));
-                        buffer.bytesList.AddRange(bufferView.bytesList);
-                    });
+                    buffer.bytesList.ForEach(b => writer.Write(b));
                 });
             }
 
@@ -234,7 +254,7 @@ namespace Max2Babylon
             if (type == typeof(BabylonAbstractMesh) ||
                 type.IsSubclassOf(typeof(BabylonAbstractMesh)))
             {
-                gltfNode = ExportAbstractMesh(babylonNode as BabylonAbstractMesh, gltf, gltfParentNode);
+                gltfNode = ExportAbstractMesh(babylonNode as BabylonAbstractMesh, gltf, gltfParentNode, babylonScene);
             }
             else if (type == typeof(BabylonCamera))
             {

+ 203 - 84
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs

@@ -43,6 +43,9 @@ namespace Max2Babylon
             // Position / rotation / scaling / hierarchy
             exportNode(babylonMesh, meshNode, scene, babylonScene);
 
+            // Animations
+            exportAnimation(babylonMesh, meshNode);
+
             babylonScene.MeshesList.Add(babylonMesh);
 
             return babylonMesh;
@@ -306,64 +309,8 @@ namespace Max2Babylon
                 var optimizeVertices = meshNode.MaxNode.GetBoolProperty("babylonjs_optimizevertices");
 
                 // Compute normals
-                List<GlobalVertex>[] verticesAlreadyExported = null;
-
-                if (optimizeVertices)
-                {
-                    verticesAlreadyExported = new List<GlobalVertex>[unskinnedMesh.NumberOfVerts];
-                }
-
                 var subMeshes = new List<BabylonSubMesh>();
-                var indexStart = 0;
-
-
-                for (int i = 0; i < multiMatsCount; ++i)
-                {
-                    int materialId = meshNode.NodeMaterial?.GetMaterialID(i) ?? 0;
-                    var indexCount = 0;
-                    var minVertexIndex = int.MaxValue;
-                    var maxVertexIndex = int.MinValue;
-                    var subMesh = new BabylonSubMesh { indexStart = indexStart, materialIndex = i };
-
-                    if (multiMatsCount == 1)
-                    {
-                        for (int j = 0; j < unskinnedMesh.NumberOfFaces; ++j)
-                        {
-                            var face = unskinnedMesh.GetFace(j);
-                            ExtractFace(skin, unskinnedMesh, vertices, indices, hasUV, hasUV2, hasColor, hasAlpha, verticesAlreadyExported, ref indexCount, ref minVertexIndex, ref maxVertexIndex, face, boneIds);
-                        }
-                    }
-                    else
-                    {
-                        ITab<IFaceEx> materialFaces = unskinnedMesh.GetFacesFromMatID(materialId);
-                        for (int j = 0; j < materialFaces.Count; ++j)
-                        {
-#if MAX2017
-                            var faceIndexer = j;
-#else
-                            var faceIndexer = new IntPtr(j);
-#endif
-                            var face = materialFaces[faceIndexer];
-
-#if !MAX2017
-                            Marshal.FreeHGlobal(faceIndexer);
-#endif
-                            ExtractFace(skin, unskinnedMesh, vertices, indices, hasUV, hasUV2, hasColor, hasAlpha, verticesAlreadyExported, ref indexCount, ref minVertexIndex, ref maxVertexIndex, face, boneIds);
-                        }
-                    }
-
-                    if (indexCount != 0)
-                    {
-
-                        subMesh.indexCount = indexCount;
-                        subMesh.verticesStart = minVertexIndex;
-                        subMesh.verticesCount = maxVertexIndex - minVertexIndex + 1;
-
-                        indexStart += indexCount;
-
-                        subMeshes.Add(subMesh);
-                    }
-                }
+                ExtractGeometry(vertices, indices, subMeshes, boneIds, skin, unskinnedMesh, hasUV, hasUV2, hasColor, hasAlpha, optimizeVertices, multiMatsCount, meshNode);
 
                 if (vertices.Count >= 65536)
                 {
@@ -412,6 +359,80 @@ namespace Max2Babylon
 
                 // Buffers - Indices
                 babylonMesh.indices = indices.ToArray();
+
+                // ------------------------
+                // ---- Morph targets -----
+                // ------------------------
+
+                // Retreive modifiers with morpher flag
+                List<IIGameModifier> modifiers = new List<IIGameModifier>();
+                for (int i = 0; i < meshNode.IGameObject.NumModifiers; i++)
+                {
+                    var modifier = meshNode.IGameObject.GetIGameModifier(i);
+                    if (modifier.ModifierType == Autodesk.Max.IGameModifier.ModType.Morpher)
+                    {
+                        modifiers.Add(modifier);
+                    }
+                }
+
+                // Cast modifiers to morphers
+                List<IIGameMorpher> morphers = modifiers.ConvertAll(new Converter<IIGameModifier, IIGameMorpher>(modifier => modifier.AsGameMorpher()));
+
+                var hasMorphTarget = false;
+                morphers.ForEach(morpher =>
+                {
+                    if (morpher.NumberOfMorphTargets > 0)
+                    {
+                        hasMorphTarget = true;
+                    }
+                });
+
+                if (hasMorphTarget)
+                {
+                    RaiseMessage("Export morph targets", 2);
+
+                    // Morph Target Manager
+                    var babylonMorphTargetManager = new BabylonMorphTargetManager();
+                    babylonScene.MorphTargetManagersList.Add(babylonMorphTargetManager);
+                    babylonMesh.morphTargetManagerId = babylonMorphTargetManager.id;
+
+                    // Morph Targets
+                    var babylonMorphTargets = new List<BabylonMorphTarget>();
+                    // All morphers are considered identical
+                    // Their targets are concatenated
+                    morphers.ForEach(morpher =>
+                    {
+                        for (int i = 0; i < morpher.NumberOfMorphTargets; i++)
+                        {
+                            // Morph target
+                            var maxMorphTarget = morpher.GetMorphTarget(i);
+                            var babylonMorphTarget = new BabylonMorphTarget
+                            {
+                                name = maxMorphTarget.Name
+                            };
+                            babylonMorphTargets.Add(babylonMorphTarget);
+
+                            // TODO - Influence
+                            babylonMorphTarget.influence = 0f;
+
+                            // Target geometry
+                            var targetVertices = ExtractVertices(maxMorphTarget, optimizeVertices);
+                            babylonMorphTarget.positions = targetVertices.SelectMany(v => new[] { v.Position.X, v.Position.Y, v.Position.Z }).ToArray();
+                            babylonMorphTarget.normals = targetVertices.SelectMany(v => new[] { v.Normal.X, v.Normal.Y, v.Normal.Z }).ToArray();
+
+                            // Animations
+                            var animations = new List<BabylonAnimation>();
+                            var morphWeight = morpher.GetMorphWeight(i);
+                            ExportFloatGameController(morphWeight, "influence", animations);
+                            if (animations.Count > 0)
+                            {
+                                babylonMorphTarget.animations = animations.ToArray();
+                            }
+                        }
+                    });
+
+                    babylonMorphTargetManager.targets = babylonMorphTargets.ToArray();
+                }
             }
 
             babylonScene.MeshesList.Add(babylonMesh);
@@ -419,6 +440,86 @@ namespace Max2Babylon
             return babylonMesh;
         }
 
+        private List<GlobalVertex> ExtractVertices(IIGameNode maxMorphTarget, bool optimizeVertices)
+        {
+            var gameMesh = maxMorphTarget.IGameObject.AsGameMesh();
+            bool initialized = gameMesh.InitializeData; // needed, the property is in fact a method initializing the exporter that has wrongly been auto 
+                                                        // translated into a property because it has no parameters
+
+            var mtl = maxMorphTarget.NodeMaterial;
+            var multiMatsCount = 1;
+
+            if (mtl != null)
+            {
+                multiMatsCount = Math.Max(mtl.SubMaterialCount, 1);
+            }
+
+            var vertices = new List<GlobalVertex>();
+            ExtractGeometry(vertices, new List<int>(), new List<BabylonSubMesh>(), null, null, gameMesh, false, false, false, false, optimizeVertices, multiMatsCount, maxMorphTarget);
+            return vertices;
+        }
+
+        private void ExtractGeometry(List<GlobalVertex> vertices, List<int> indices, List<BabylonSubMesh> subMeshes, List<int> boneIds, IIGameSkin skin, IIGameMesh unskinnedMesh, bool hasUV, bool hasUV2, bool hasColor, bool hasAlpha, bool optimizeVertices, int multiMatsCount, IIGameNode meshNode)
+        {
+            List<GlobalVertex>[] verticesAlreadyExported = null;
+
+            if (optimizeVertices)
+            {
+                verticesAlreadyExported = new List<GlobalVertex>[unskinnedMesh.NumberOfVerts];
+            }
+
+            var indexStart = 0;
+
+
+            for (int i = 0; i < multiMatsCount; ++i)
+            {
+                int materialId = meshNode.NodeMaterial?.GetMaterialID(i) ?? 0;
+                var indexCount = 0;
+                var minVertexIndex = int.MaxValue;
+                var maxVertexIndex = int.MinValue;
+                var subMesh = new BabylonSubMesh { indexStart = indexStart, materialIndex = i };
+
+                if (multiMatsCount == 1)
+                {
+                    for (int j = 0; j < unskinnedMesh.NumberOfFaces; ++j)
+                    {
+                        var face = unskinnedMesh.GetFace(j);
+                        ExtractFace(skin, unskinnedMesh, vertices, indices, hasUV, hasUV2, hasColor, hasAlpha, verticesAlreadyExported, ref indexCount, ref minVertexIndex, ref maxVertexIndex, face, boneIds);
+                    }
+                }
+                else
+                {
+                    ITab<IFaceEx> materialFaces = unskinnedMesh.GetFacesFromMatID(materialId);
+                    for (int j = 0; j < materialFaces.Count; ++j)
+                    {
+#if MAX2017
+                        var faceIndexer = j;
+#else
+                            var faceIndexer = new IntPtr(j);
+#endif
+                        var face = materialFaces[faceIndexer];
+
+#if !MAX2017
+                            Marshal.FreeHGlobal(faceIndexer);
+#endif
+                        ExtractFace(skin, unskinnedMesh, vertices, indices, hasUV, hasUV2, hasColor, hasAlpha, verticesAlreadyExported, ref indexCount, ref minVertexIndex, ref maxVertexIndex, face, boneIds);
+                    }
+                }
+
+                if (indexCount != 0)
+                {
+
+                    subMesh.indexCount = indexCount;
+                    subMesh.verticesStart = minVertexIndex;
+                    subMesh.verticesCount = maxVertexIndex - minVertexIndex + 1;
+
+                    indexStart += indexCount;
+
+                    subMeshes.Add(subMesh);
+                }
+            }
+        }
+
         private void ExtractFace(IIGameSkin skin, IIGameMesh unskinnedMesh, List<GlobalVertex> vertices, List<int> indices, bool hasUV, bool hasUV2, bool hasColor, bool hasAlpha, List<GlobalVertex>[] verticesAlreadyExported, ref int indexCount, ref int minVertexIndex, ref int maxVertexIndex, IFaceEx face, List<int> boneIds)
         {
             var a = CreateGlobalVertex(unskinnedMesh, face, 0, vertices, hasUV, hasUV2, hasColor, hasAlpha, verticesAlreadyExported, skin, boneIds);
@@ -749,41 +850,59 @@ namespace Max2Babylon
 
         public void GenerateCoordinatesAnimations(IIGameNode meshNode, List<BabylonAnimation> animations)
         {
-            ExportVector3Animation("position", animations, key =>
+            if (meshNode.IGameControl.IsAnimated(IGameControlType.Pos) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.PosX) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.PosY) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.PosZ))
             {
-                var worldMatrix = meshNode.GetObjectTM(key);
-                if (meshNode.NodeParent != null)
+                ExportVector3Animation("position", animations, key =>
                 {
-                    var parentWorld = meshNode.NodeParent.GetObjectTM(key);
-                    worldMatrix.MultiplyBy(parentWorld.Inverse);
-                }
-                var trans = worldMatrix.Translation;
-                return new[] { trans.X, trans.Y, trans.Z };
-            });
+                    var worldMatrix = meshNode.GetObjectTM(key);
+                    if (meshNode.NodeParent != null)
+                    {
+                        var parentWorld = meshNode.NodeParent.GetObjectTM(key);
+                        worldMatrix.MultiplyBy(parentWorld.Inverse);
+                    }
+                    var trans = worldMatrix.Translation;
+                    return new[] { trans.X, trans.Y, trans.Z };
+                });
+            }
 
-            ExportQuaternionAnimation("rotationQuaternion", animations, key =>
+            if (meshNode.IGameControl.IsAnimated(IGameControlType.Rot) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.EulerX) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.EulerY) ||
+                meshNode.IGameControl.IsAnimated(IGameControlType.EulerZ))
             {
-                var worldMatrix = meshNode.GetObjectTM(key);
-                if (meshNode.NodeParent != null)
+                ExportQuaternionAnimation("rotationQuaternion", animations, key =>
                 {
-                    var parentWorld = meshNode.NodeParent.GetObjectTM(key);
-                    worldMatrix.MultiplyBy(parentWorld.Inverse);
-                }
-                var rot = worldMatrix.Rotation;
-                return new[] { rot.X, rot.Y, rot.Z, -rot.W };
-            });
+                    var worldMatrix = meshNode.GetObjectTM(key);
+                    if (meshNode.NodeParent != null)
+                    {
+                        var parentWorld = meshNode.NodeParent.GetObjectTM(key);
+                        worldMatrix.MultiplyBy(parentWorld.Inverse);
+                    }
+
 
-            ExportVector3Animation("scaling", animations, key =>
+                    var rot = worldMatrix.Rotation;
+                    return new[] { rot.X, rot.Y, rot.Z, -rot.W };
+                });
+            }
+
+            if (meshNode.IGameControl.IsAnimated(IGameControlType.Scale))
             {
-                var worldMatrix = meshNode.GetObjectTM(key);
-                if (meshNode.NodeParent != null)
+                ExportVector3Animation("scaling", animations, key =>
                 {
-                    var parentWorld = meshNode.NodeParent.GetObjectTM(key);
-                    worldMatrix.MultiplyBy(parentWorld.Inverse);
-                }
-                var scale = worldMatrix.Scaling;
-                return new[] { scale.X, scale.Y, scale.Z };
-            });
+                    var worldMatrix = meshNode.GetObjectTM(key);
+                    if (meshNode.NodeParent != null)
+                    {
+                        var parentWorld = meshNode.NodeParent.GetObjectTM(key);
+                        worldMatrix.MultiplyBy(parentWorld.Inverse);
+                    }
+                    var scale = worldMatrix.Scaling;
+
+                    return new[] { scale.X, scale.Y, scale.Z };
+                });
+            }
         }
     }
 }

+ 7 - 0
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs

@@ -167,6 +167,8 @@ namespace Max2Babylon
             var progression = 10.0f;
             ReportProgressChanged((int)progression);
             referencedMaterials.Clear();
+            // Reseting is optionnal. It makes each morph target manager export starts from id = 0.
+            BabylonMorphTargetManager.Reset();
             foreach (var maxRootNode in maxRootNodes)
             {
                 exportNodeRec(maxRootNode, babylonScene, gameScene);
@@ -320,6 +322,11 @@ namespace Max2Babylon
                 case Autodesk.Max.IGameObject.ObjectTypes.Light:
                     babylonNode = ExportLight(maxGameScene, maxGameNode, babylonScene);
                     break;
+                case Autodesk.Max.IGameObject.ObjectTypes.Unknown:
+                    // Create a dummy (empty mesh) when type is unknown
+                    // An example of unknown type object is the target of target light or camera
+                    babylonNode = ExportDummy(maxGameScene, maxGameNode, babylonScene);
+                    break;
                 default:
                     // The type of node is not exportable (helper, spline, xref...)
                     hasExporter = false;

+ 158 - 0
Exporters/3ds Max/Max2Babylon/Exporter/GLTFBufferService.cs

@@ -0,0 +1,158 @@
+using GLTFExport.Entities;
+
+namespace Max2Babylon
+{
+    public class GLTFBufferService
+    {
+        private static GLTFBufferService _instance;
+
+        public static GLTFBufferService Instance
+        {
+            get
+            {
+                if (_instance == null)
+                {
+                    _instance = new GLTFBufferService();
+                }
+                return _instance;
+            }
+        }
+
+        public GLTFBuffer GetBuffer(GLTF gltf)
+        {
+            var buffer = gltf.buffer;
+            if (buffer == null)
+            {
+                buffer = new GLTFBuffer
+                {
+                    uri = gltf.OutputFile + ".bin"
+                };
+                buffer.index = gltf.BuffersList.Count;
+                gltf.BuffersList.Add(buffer);
+                gltf.buffer = buffer;
+            }
+            return buffer;
+        }
+
+        public GLTFBufferView GetBufferViewScalar(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewScalar == null)
+            {
+                gltf.bufferViewScalar = CreateBufferView(gltf, buffer, "bufferViewScalar");
+            }
+            return gltf.bufferViewScalar;
+        }
+
+        public GLTFBufferView GetBufferViewFloatVec2(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewFloatVec2 == null)
+            {
+                var bufferView = CreateBufferView(gltf, buffer, "bufferViewFloatVec2");
+                bufferView.byteStride = 8;
+                gltf.bufferViewFloatVec2 = bufferView;
+            }
+            return gltf.bufferViewFloatVec2;
+        }
+
+        public GLTFBufferView GetBufferViewFloatVec3(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewFloatVec3 == null)
+            {
+                var bufferView = CreateBufferView(gltf, buffer, "bufferViewFloatVec3");
+                bufferView.byteStride = 12;
+                gltf.bufferViewFloatVec3 = bufferView;
+            }
+            return gltf.bufferViewFloatVec3;
+        }
+
+        public GLTFBufferView GetBufferViewFloatVec4(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewFloatVec4 == null)
+            {
+                var bufferView = CreateBufferView(gltf, buffer, "bufferViewFloatVec4");
+                bufferView.byteStride = 16;
+                gltf.bufferViewFloatVec4 = bufferView;
+            }
+            return gltf.bufferViewFloatVec4;
+        }
+
+        public GLTFBufferView GetBufferViewAnimationFloatScalar(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewAnimationFloatScalar == null)
+            {
+                gltf.bufferViewAnimationFloatScalar = CreateBufferView(gltf, buffer, "bufferViewAnimationFloatScalar");
+            }
+            return gltf.bufferViewAnimationFloatScalar;
+        }
+
+        public GLTFBufferView GetBufferViewAnimationFloatVec3(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewAnimationFloatVec3 == null)
+            {
+                var bufferView = CreateBufferView(gltf, buffer, "bufferViewAnimationFloatVec3");
+                gltf.bufferViewAnimationFloatVec3 = bufferView;
+            }
+            return gltf.bufferViewAnimationFloatVec3;
+        }
+
+        public GLTFBufferView GetBufferViewAnimationFloatVec4(GLTF gltf, GLTFBuffer buffer)
+        {
+            if (gltf.bufferViewAnimationFloatVec4 == null)
+            {
+                var bufferView = CreateBufferView(gltf, buffer, "bufferViewAnimationFloatVec4");
+                gltf.bufferViewAnimationFloatVec4 = bufferView;
+            }
+            return gltf.bufferViewAnimationFloatVec4;
+        }
+
+        private GLTFBufferView CreateBufferView(GLTF gltf, GLTFBuffer buffer, string name)
+        {
+            var bufferView = new GLTFBufferView
+            {
+                name = name,
+                buffer = buffer.index,
+                Buffer = buffer
+            };
+            bufferView.index = gltf.BufferViewsList.Count;
+            gltf.BufferViewsList.Add(bufferView);
+            buffer.BufferViews.Add(bufferView);
+            return bufferView;
+        }
+
+        public GLTFAccessor CreateAccessor(GLTF gltf, GLTFBufferView bufferView, string name, GLTFAccessor.ComponentType componentType, GLTFAccessor.TypeEnum type)
+        {
+            var accessor = new GLTFAccessor
+            {
+                name = name,
+                bufferView = bufferView.index,
+                BufferView = bufferView,
+                componentType = componentType,
+                type = type.ToString()
+            };
+            accessor.index = gltf.AccessorsList.Count;
+            gltf.AccessorsList.Add(accessor);
+            bufferView.Accessors.Add(accessor);
+            return accessor;
+        }
+
+        public static void UpdateMinMaxAccessor(GLTFAccessor accessor, float[] values)
+        {
+            for (int indexComponent = 0; indexComponent < values.Length; indexComponent++)
+            {
+                UpdateMinMaxAccessor(accessor, values[indexComponent], indexComponent);
+            }
+        }
+
+        public static void UpdateMinMaxAccessor(GLTFAccessor accessor, float value, int indexComponent = 0)
+        {
+            if (value < accessor.min[indexComponent])
+            {
+                accessor.min[indexComponent] = value;
+            }
+            if (value > accessor.max[indexComponent])
+            {
+                accessor.max[indexComponent] = value;
+            }
+        }
+    }
+}

+ 18 - 1
Exporters/3ds Max/Max2Babylon/Tools/Tools.cs

@@ -13,6 +13,11 @@ namespace Max2Babylon
 {
     public static class Tools
     {
+        public static float Lerp(float min, float max, float t)
+        {
+            return min + (max - min) * t;
+        }
+
         // -------------------------
         // -- IIPropertyContainer --
         // -------------------------
@@ -105,6 +110,18 @@ namespace Max2Babylon
             }
         }
 
+        public static IIGameMorpher AsGameMorpher(this IIGameModifier obj)
+        {
+            var type = GetWrappersAssembly().GetType("Autodesk.Max.Wrappers.IGameMorpher");
+            var constructor = type.GetConstructors()[0];
+            // var pointerType = GetWrappersAssembly().GetType("IGameCamera");
+            unsafe
+            {
+                var voidPtr = obj.GetNativeHandle().ToPointer();
+                return (IIGameMorpher)constructor.Invoke(new object[] { obj.GetNativeHandle(), false });
+            }
+        }
+
         public const float Epsilon = 0.001f;
 
         public static IPoint3 XAxis { get { return Loader.Global.Point3.Create(1, 0, 0); } }
@@ -118,7 +135,7 @@ namespace Max2Babylon
         }
 
         public static IMatrix3 Identity { get { return Loader.Global.Matrix3.Create(XAxis, YAxis, ZAxis, Origin); } }
-        
+
         public static Vector3 ToEulerAngles(this IQuat q)
         {
             // Store the Euler angles in radians

BIN
Exporters/Blender/Blender2Babylon-5.4.zip


+ 1 - 1
Exporters/Blender/src/babylon-js/__init__.py

@@ -1,7 +1,7 @@
 bl_info = {
     'name': 'Babylon.js',
     'author': 'David Catuhe, Jeff Palmer',
-    'version': (5, 4, 0),
+    'version': (5, 4, 1),
     'blender': (2, 76, 0),
     'location': 'File > Export > Babylon.js (.babylon)',
     'description': 'Export Babylon.js scenes (.babylon)',

+ 14 - 10
Exporters/Blender/src/babylon-js/mesh.py

@@ -58,17 +58,21 @@ class Mesh(FCurveAnimatable):
         if len(object.vertex_groups) > 0 and not object.data.ignoreSkeleton:
             objArmature = object.find_armature()
             if objArmature != None:
-                hasSkeleton = True
                 # used to get bone index, since could be skipping IK bones
                 skeleton = exporter.get_skeleton(objArmature.name)
-                i = 0
-                for obj in scene.objects:
-                    if obj.type == "ARMATURE":
-                        if obj == objArmature:
-                            self.skeletonId = i
-                            break
-                        else:
-                            i += 1
+                hasSkeleton = skeleton is not None
+                
+                if not hasSkeleton:
+                    Logger.warn('No skeleton with name "' + objArmature.name + '" found skeleton ignored.')
+                else:
+                    i = 0
+                    for obj in scene.objects:
+                        if obj.type == "ARMATURE":
+                            if obj == objArmature:
+                                self.skeletonId = i
+                                break
+                            else:
+                                i += 1
 
         # determine Position, rotation, & scaling
         if forcedParent is None:
@@ -627,7 +631,7 @@ class Mesh(FCurveAnimatable):
             write_float(file_handler, 'physicsRestitution', self.physicsRestitution)
 
         # Geometry
-        if hasattr(self, 'skeletonId'):
+        if self.hasSkeleton:
             write_int(file_handler, 'skeletonId', self.skeletonId)
             write_int(file_handler, 'numBoneInfluencers', self.numBoneInfluencers)
 

+ 1 - 1
Tools/Gulp/gulpfile.js

@@ -513,7 +513,7 @@ gulp.task('run', ['watch', 'webserver'], function () {
 
 gulp.task("zip-blender", function () {
     return gulp.src('../../Exporters/Blender/src/**')
-        .pipe(zip('Blender2Babylon-5.3.zip'))
+        .pipe(zip('Blender2Babylon-5.4.zip'))
         .pipe(gulp.dest('../../Exporters/Blender'));
 });
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4399 - 4392
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 45 - 45
dist/preview release/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2121 - 2071
dist/preview release/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4399 - 4392
dist/preview release/babylon.module.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 46 - 46
dist/preview release/babylon.worker.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 8620 - 8613
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 48 - 48
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2577 - 2497
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 8620 - 8613
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


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

@@ -564,15 +564,15 @@ var BABYLON;
                     Matrix2D._TempCompose1.multiplyToRef(Matrix2D._TempPostTranslationMatrix, result);
                 }
             };
+            Matrix2D._TempPreTranslationMatrix = Matrix2D.Identity();
+            Matrix2D._TempPostTranslationMatrix = Matrix2D.Identity();
+            Matrix2D._TempRotationMatrix = Matrix2D.Identity();
+            Matrix2D._TempScalingMatrix = Matrix2D.Identity();
+            Matrix2D._TempCompose0 = Matrix2D.Identity();
+            Matrix2D._TempCompose1 = Matrix2D.Identity();
+            Matrix2D._TempCompose2 = Matrix2D.Identity();
             return Matrix2D;
         }());
-        Matrix2D._TempPreTranslationMatrix = Matrix2D.Identity();
-        Matrix2D._TempPostTranslationMatrix = Matrix2D.Identity();
-        Matrix2D._TempRotationMatrix = Matrix2D.Identity();
-        Matrix2D._TempScalingMatrix = Matrix2D.Identity();
-        Matrix2D._TempCompose0 = Matrix2D.Identity();
-        Matrix2D._TempCompose1 = Matrix2D.Identity();
-        Matrix2D._TempCompose2 = Matrix2D.Identity();
         GUI.Matrix2D = Matrix2D;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
@@ -685,12 +685,12 @@ var BABYLON;
                 enumerable: true,
                 configurable: true
             });
+            // Static
+            ValueAndUnit._Regex = /(^-?\d*(\.\d+)?)(%|px)?/;
+            ValueAndUnit._UNITMODE_PERCENTAGE = 0;
+            ValueAndUnit._UNITMODE_PIXEL = 1;
             return ValueAndUnit;
         }());
-        // Static
-        ValueAndUnit._Regex = /(^-?\d*(\.\d+)?)(%|px)?/;
-        ValueAndUnit._UNITMODE_PERCENTAGE = 0;
-        ValueAndUnit._UNITMODE_PIXEL = 1;
         GUI.ValueAndUnit = ValueAndUnit;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
@@ -1630,16 +1630,16 @@ var BABYLON;
                 context.scale(1 / width, 1 / height);
                 context.translate(-x, -y);
             };
+            // Statics
+            Control._HORIZONTAL_ALIGNMENT_LEFT = 0;
+            Control._HORIZONTAL_ALIGNMENT_RIGHT = 1;
+            Control._HORIZONTAL_ALIGNMENT_CENTER = 2;
+            Control._VERTICAL_ALIGNMENT_TOP = 0;
+            Control._VERTICAL_ALIGNMENT_BOTTOM = 1;
+            Control._VERTICAL_ALIGNMENT_CENTER = 2;
+            Control._FontHeightSizes = {};
             return Control;
         }());
-        // Statics
-        Control._HORIZONTAL_ALIGNMENT_LEFT = 0;
-        Control._HORIZONTAL_ALIGNMENT_RIGHT = 1;
-        Control._HORIZONTAL_ALIGNMENT_CENTER = 2;
-        Control._VERTICAL_ALIGNMENT_TOP = 0;
-        Control._VERTICAL_ALIGNMENT_BOTTOM = 1;
-        Control._VERTICAL_ALIGNMENT_CENTER = 2;
-        Control._FontHeightSizes = {};
         GUI.Control = Control;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
@@ -3196,13 +3196,13 @@ var BABYLON;
                 enumerable: true,
                 configurable: true
             });
+            // Static
+            Image._STRETCH_NONE = 0;
+            Image._STRETCH_FILL = 1;
+            Image._STRETCH_UNIFORM = 2;
+            Image._STRETCH_EXTEND = 3;
             return Image;
         }(GUI.Control));
-        // Static
-        Image._STRETCH_NONE = 0;
-        Image._STRETCH_FILL = 1;
-        Image._STRETCH_UNIFORM = 2;
-        Image._STRETCH_EXTEND = 3;
         GUI.Image = Image;
     })(GUI = BABYLON.GUI || (BABYLON.GUI = {}));
 })(BABYLON || (BABYLON = {}));
@@ -3858,7 +3858,7 @@ var BABYLON;
             InputText.prototype.processKey = function (keyCode, key) {
                 // Specific cases
                 switch (keyCode) {
-                    case 8:
+                    case 8:// BACKSPACE
                         if (this._text && this._text.length > 0) {
                             if (this._cursorOffset === 0) {
                                 this.text = this._text.substr(0, this._text.length - 1);
@@ -3871,27 +3871,27 @@ var BABYLON;
                             }
                         }
                         return;
-                    case 46:
+                    case 46:// DELETE
                         if (this._text && this._text.length > 0) {
                             var deletePosition = this._text.length - this._cursorOffset;
                             this.text = this._text.slice(0, deletePosition) + this._text.slice(deletePosition + 1);
                             this._cursorOffset--;
                         }
                         return;
-                    case 13:
+                    case 13:// RETURN
                         this._host.focusedControl = null;
                         return;
-                    case 35:
+                    case 35:// END
                         this._cursorOffset = 0;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 36:
+                    case 36:// HOME
                         this._cursorOffset = this._text.length;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 37:
+                    case 37:// LEFT
                         this._cursorOffset++;
                         if (this._cursorOffset > this._text.length) {
                             this._cursorOffset = this._text.length;
@@ -3899,7 +3899,7 @@ var BABYLON;
                         this._blinkIsEven = false;
                         this._markAsDirty();
                         return;
-                    case 39:
+                    case 39:// RIGHT
                         this._cursorOffset--;
                         if (this._cursorOffset < 0) {
                             this._cursorOffset = 0;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 265 - 265
dist/preview release/inspector/babylon.inspector.bundle.js


+ 76 - 0
dist/preview release/inspector/babylon.inspector.css

@@ -430,3 +430,79 @@
       color: #b3b3b3;
       padding: 3px 0 3px 10px;
       margin: 6px 0 6px 0; }
+  .insp-wrapper [type='range'] {
+    -webkit-appearance: none;
+    margin: 7px 0;
+    width: 50%; }
+    .insp-wrapper [type='range']:focus {
+      outline: 0; }
+      .insp-wrapper [type='range']:focus::-webkit-slider-runnable-track {
+        background: #54b3f3; }
+      .insp-wrapper [type='range']:focus::-ms-fill-lower {
+        background: #3ca9f1; }
+      .insp-wrapper [type='range']:focus::-ms-fill-upper {
+        background: #54b3f3; }
+    .insp-wrapper [type='range']::-webkit-slider-runnable-track {
+      cursor: pointer;
+      height: 5px;
+      transition: all .2s ease;
+      width: 50%;
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #3ca9f1;
+      border: 1px solid #5db0d7;
+      border-radius: 5px; }
+    .insp-wrapper [type='range']::-webkit-slider-thumb {
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #5db0d7;
+      border: 1px solid #5db0d7;
+      border-radius: 0px;
+      cursor: pointer;
+      height: 14px;
+      width: 7px;
+      -webkit-appearance: none;
+      margin-top: -5.5px; }
+    .insp-wrapper [type='range']::-moz-range-track {
+      cursor: pointer;
+      height: 5px;
+      transition: all .2s ease;
+      width: 50%;
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #3ca9f1;
+      border: 1px solid #5db0d7;
+      border-radius: 5px; }
+    .insp-wrapper [type='range']::-moz-range-thumb {
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #5db0d7;
+      border: 1px solid #5db0d7;
+      border-radius: 0px;
+      cursor: pointer;
+      height: 14px;
+      width: 7px; }
+    .insp-wrapper [type='range']::-ms-track {
+      cursor: pointer;
+      height: 5px;
+      transition: all .2s ease;
+      width: 50%;
+      background: transparent;
+      border-color: transparent;
+      border-width: 7px 0;
+      color: transparent; }
+    .insp-wrapper [type='range']::-ms-fill-lower {
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #249fef;
+      border: 1px solid #5db0d7;
+      border-radius: 10px; }
+    .insp-wrapper [type='range']::-ms-fill-upper {
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #3ca9f1;
+      border: 1px solid #5db0d7;
+      border-radius: 10px; }
+    .insp-wrapper [type='range']::-ms-thumb {
+      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2), 0 0 1px rgba(13, 13, 13, 0.2);
+      background: #5db0d7;
+      border: 1px solid #5db0d7;
+      border-radius: 0px;
+      cursor: pointer;
+      height: 14px;
+      width: 7px;
+      margin-top: 0; }

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

@@ -86,6 +86,45 @@ declare module INSPECTOR {
             type: typeof BABYLON.Color3;
             properties: string[];
             format: (color: BABYLON.Color3) => string;
+            slider: {
+                r: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+                g: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+                b: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+            };
+        };
+        'Color4': {
+            type: typeof BABYLON.Color4;
+            properties: string[];
+            format: (color: BABYLON.Color4) => string;
+            slider: {
+                r: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+                g: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+                b: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+            };
         };
         'Quaternion': {
             type: typeof BABYLON.Quaternion;
@@ -129,6 +168,13 @@ declare module INSPECTOR {
         'ArcRotateCamera': {
             type: typeof BABYLON.ArcRotateCamera;
             properties: string[];
+            slider: {
+                alpha: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+            };
         };
         'FreeCamera': {
             type: typeof BABYLON.FreeCamera;
@@ -147,6 +193,13 @@ declare module INSPECTOR {
             type: typeof BABYLON.StandardMaterial;
             properties: string[];
             format: (mat: BABYLON.StandardMaterial) => string;
+            slider: {
+                alpha: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+            };
         };
         'PrimitiveAlignment': {
             type: typeof BABYLON.PrimitiveAlignment;
@@ -171,6 +224,13 @@ declare module INSPECTOR {
         'PBRMaterial': {
             type: typeof BABYLON.PBRMaterial;
             properties: string[];
+            slider: {
+                alpha: {
+                    min: number;
+                    max: number;
+                    step: number;
+                };
+            };
         };
         'Canvas2D': {
             type: typeof BABYLON.Canvas2D;
@@ -542,11 +602,11 @@ declare module INSPECTOR {
         private _escapeInputHandler;
         /** Handler used on focus out */
         private _focusOutInputHandler;
-        private _input_checkbox;
         /** Handler used to get mouse position */
         private _onMouseDownHandler;
         private _onMouseDragHandler;
         private _onMouseUpHandler;
+        private _textValue;
         /** Save previous Y mouse position */
         private _prevY;
         /**Save value while slider is on */
@@ -563,7 +623,7 @@ declare module INSPECTOR {
          * On escape : removes the input
          */
         private _validateInput(e);
-        validateInput(value: any): void;
+        validateInput(value: any, forceupdate?: boolean): void;
         /**
          * On escape : removes the input
          */
@@ -612,6 +672,7 @@ declare module INSPECTOR {
          */
         private _isSimple();
         toHtml(): HTMLElement;
+        closeDetails(): void;
         /**
          * Add sub properties in case of a complex type
          */
@@ -635,6 +696,10 @@ declare module INSPECTOR {
          * Create input entry
          */
         private _checkboxInput();
+        private _rangeInput();
+        private _rangeHandler();
+        private _isSliderType();
+        private _getSliderProperty();
     }
 }
 
@@ -797,6 +862,7 @@ declare module INSPECTOR {
          * @param obj
          */
         static GetAllLinesProperties(obj: any): Array<PropertyLine>;
+        static Capitalize(str: string): string;
     }
 }
 
@@ -1210,6 +1276,7 @@ declare module INSPECTOR {
         private _isFolded();
         /** Set this item as active (background lighter) in the tree panel */
         active(b: boolean): void;
+        getDiv(): HTMLElement;
     }
 }
 

+ 122 - 31
dist/preview release/inspector/babylon.inspector.js

@@ -362,7 +362,22 @@ var INSPECTOR;
         'Color3': {
             type: BABYLON.Color3,
             properties: ['r', 'g', 'b'],
-            format: function (color) { return "R:" + color.r + ", G:" + color.g + ", B:" + color.b; }
+            format: function (color) { return "R:" + color.r + ", G:" + color.g + ", B:" + color.b; },
+            slider: {
+                r: { min: 0, max: 1, step: 0.01 },
+                g: { min: 0, max: 1, step: 0.01 },
+                b: { min: 0, max: 1, step: 0.01 }
+            }
+        },
+        'Color4': {
+            type: BABYLON.Color4,
+            properties: ['r', 'g', 'b'],
+            format: function (color) { return "R:" + color.r + ", G:" + color.g + ", B:" + color.b; },
+            slider: {
+                r: { min: 0, max: 1, step: 0.01 },
+                g: { min: 0, max: 1, step: 0.01 },
+                b: { min: 0, max: 1, step: 0.01 }
+            }
         },
         'Quaternion': {
             type: BABYLON.Quaternion,
@@ -449,7 +464,10 @@ var INSPECTOR;
                 'wheelPrecision',
                 'allowUpsideDown',
                 'checkCollisions'
-            ]
+            ],
+            slider: {
+                alpha: { min: 0, max: 1, step: 0.01 }
+            }
         },
         'FreeCamera': {
             type: BABYLON.FreeCamera,
@@ -575,7 +593,10 @@ var INSPECTOR;
                 'reflectionTexture',
                 'refractionTexture'
             ],
-            format: function (mat) { return mat.name; }
+            format: function (mat) { return mat.name; },
+            slider: {
+                alpha: { min: 0, max: 1, step: 0.01 }
+            }
         },
         'PrimitiveAlignment': {
             type: BABYLON.PrimitiveAlignment,
@@ -633,7 +654,10 @@ var INSPECTOR;
                 'cameraContrast',
                 'cameraColorGradingTexture',
                 'cameraColorCurves'
-            ]
+            ],
+            slider: {
+                alpha: { min: 0, max: 1, step: 0.01 }
+            }
         },
         'Canvas2D': {
             type: BABYLON.Canvas2D
@@ -924,10 +948,10 @@ var INSPECTOR;
             enumerable: true,
             configurable: true
         });
+        // a unique name for this adapter, to retrieve its own key in the local storage
+        Adapter._name = BABYLON.Geometry.RandomId();
         return Adapter;
     }());
-    // a unique name for this adapter, to retrieve its own key in the local storage
-    Adapter._name = BABYLON.Geometry.RandomId();
     INSPECTOR.Adapter = Adapter;
 })(INSPECTOR || (INSPECTOR = {}));
 
@@ -1491,6 +1515,9 @@ var INSPECTOR;
             var isString = function (s) {
                 return typeof (s) === 'string' || s instanceof String;
             };
+            this._detailRows.forEach(function (property) {
+                property.closeDetails();
+            });
             this._detailRows.sort(function (detail1, detail2) {
                 var str1 = String(detail1[property]);
                 var str2 = String(detail2[property]);
@@ -1683,7 +1710,7 @@ var INSPECTOR;
             propName.textContent = "" + this.name;
             // Value
             this._valueDiv = INSPECTOR.Helpers.CreateDiv('prop-value', this._div);
-            if (typeof this.value !== 'boolean') {
+            if (typeof this.value !== 'boolean' && !this._isSliderType()) {
                 this._valueDiv.textContent = this._displayValueContent() || '-'; // Init value text node
             }
             this._createElements();
@@ -1696,6 +1723,9 @@ var INSPECTOR;
             if (typeof this.value === 'boolean') {
                 this._checkboxInput();
             }
+            else if (this._isSliderType()) {
+                this._rangeInput();
+            }
             else if (!this._isSimple()) {
                 this._valueDiv.classList.add('clickable');
                 this._valueDiv.addEventListener('click', this._addDetails.bind(this));
@@ -1746,7 +1776,8 @@ var INSPECTOR;
                 this.update();
             }
         };
-        PropertyLine.prototype.validateInput = function (value) {
+        PropertyLine.prototype.validateInput = function (value, forceupdate) {
+            if (forceupdate === void 0) { forceupdate = true; }
             this.updateObject();
             if (typeof this._property.value === 'number') {
                 this._property.value = parseFloat(value);
@@ -1755,9 +1786,11 @@ var INSPECTOR;
                 this._property.value = value;
             }
             // Remove input
-            this.update();
-            // resume scheduler
-            INSPECTOR.Scheduler.getInstance().pause = false;
+            if (forceupdate) {
+                this.update();
+                // resume scheduler
+                INSPECTOR.Scheduler.getInstance().pause = false;
+            }
         };
         /**
          * On escape : removes the input
@@ -1773,7 +1806,7 @@ var INSPECTOR;
         /** Removes the input without validating the new value */
         PropertyLine.prototype._removeInputWithoutValidating = function () {
             INSPECTOR.Helpers.CleanDiv(this._valueDiv);
-            if (typeof this.value !== 'boolean') {
+            if (typeof this.value !== 'boolean' && !this._isSliderType()) {
                 this._valueDiv.textContent = "-";
             }
             // restore elements
@@ -1781,7 +1814,9 @@ var INSPECTOR;
                 var elem = _a[_i];
                 this._valueDiv.appendChild(elem.toHtml());
             }
-            this._valueDiv.addEventListener('click', this._displayInputHandler);
+            if (typeof this.value !== 'boolean' && !this._isSliderType()) {
+                this._valueDiv.addEventListener('click', this._displayInputHandler);
+            }
         };
         /** Replaces the default display with an input */
         PropertyLine.prototype._displayInput = function (e) {
@@ -1793,15 +1828,12 @@ var INSPECTOR;
             this._input.value = valueTxt;
             this._valueDiv.appendChild(this._input);
             this._input.focus();
-            if (typeof this.value === 'number') {
-                // Slider
-                // let slider = Helpers.CreateDiv('slider-number', this._valueDiv);
-                // slider.style.background = '#303030';
-                // slider.style.cursor = 'ew-resize';
-                // slider.innerHTML = 'HELLO'
+            if (typeof this.value !== 'boolean' && !this._isSliderType()) {
+                this._input.addEventListener('focusout', this._focusOutInputHandler);
+            }
+            else if (typeof this.value === 'number') {
                 this._input.addEventListener('mousedown', this._onMouseDownHandler);
             }
-            this._input.addEventListener('focusout', this._focusOutInputHandler);
             // Pause the scheduler
             INSPECTOR.Scheduler.getInstance().pause = true;
         };
@@ -1819,6 +1851,10 @@ var INSPECTOR;
         Object.defineProperty(PropertyLine.prototype, "name", {
             // Returns the property name
             get: function () {
+                // let arrayName = Helpers.Capitalize(this._property.name).match(/[A-Z][a-z]+|[0-9]+/g)
+                // if (arrayName) {
+                //     return arrayName.join(" ");
+                // }
                 return this._property.name;
             },
             enumerable: true,
@@ -1908,6 +1944,9 @@ var INSPECTOR;
             if (typeof this.value === 'boolean') {
                 this._checkboxInput();
             }
+            else if (this._isSliderType()) {
+                this._rangeInput();
+            }
             else {
                 this._valueDiv.childNodes[0].nodeValue = this._displayValueContent();
             }
@@ -1953,6 +1992,17 @@ var INSPECTOR;
         PropertyLine.prototype.toHtml = function () {
             return this._div;
         };
+        PropertyLine.prototype.closeDetails = function () {
+            if (this._div.classList.contains('unfolded')) {
+                // Remove class unfolded
+                this._div.classList.remove('unfolded');
+                // remove html children
+                for (var _i = 0, _a = this._children; _i < _a.length; _i++) {
+                    var child = _a[_i];
+                    this._div.parentNode.removeChild(child.toHtml());
+                }
+            }
+        };
         /**
          * Add sub properties in case of a complex type
          */
@@ -1971,7 +2021,7 @@ var INSPECTOR;
                 this._div.classList.toggle('unfolded');
                 if (this._children.length == 0) {
                     var objToDetail = this.value;
-                    var propToDisplay = INSPECTOR.PROPERTIES[INSPECTOR.Helpers.GET_TYPE(objToDetail)].properties.reverse();
+                    var propToDisplay = INSPECTOR.PROPERTIES[INSPECTOR.Helpers.GET_TYPE(objToDetail)].properties.slice().reverse();
                     var propertyLine = null;
                     for (var _b = 0, propToDisplay_1 = propToDisplay; _b < propToDisplay_1.length; _b++) {
                         var prop = propToDisplay_1[_b];
@@ -2020,21 +2070,55 @@ var INSPECTOR;
         PropertyLine.prototype._checkboxInput = function () {
             var _this = this;
             if (this._valueDiv.childElementCount < 1) {
-                this._input_checkbox = INSPECTOR.Helpers.CreateInput('checkbox-element', this._valueDiv);
-                this._input_checkbox.type = 'checkbox';
-                this._input_checkbox.checked = this.value;
-                this._input_checkbox.addEventListener('change', function () {
+                this._input = INSPECTOR.Helpers.CreateInput('checkbox-element', this._valueDiv);
+                this._input.type = 'checkbox';
+                this._input.checked = this.value;
+                this._input.addEventListener('change', function () {
                     INSPECTOR.Scheduler.getInstance().pause = true;
                     _this.validateInput(!_this.value);
                 });
             }
         };
+        PropertyLine.prototype._rangeInput = function () {
+            if (this._valueDiv.childElementCount < 1) {
+                this._input = INSPECTOR.Helpers.CreateInput('slider-element', this._valueDiv);
+                this._input.type = 'range';
+                this._input.style.display = 'inline-block';
+                this._input.min = this._getSliderProperty().min;
+                this._input.max = this._getSliderProperty().max;
+                this._input.step = this._getSliderProperty().step;
+                this._input.value = this.value;
+                this._validateInputHandler = this._rangeHandler.bind(this);
+                this._input.addEventListener('input', this._validateInputHandler);
+                this._input.addEventListener('change', function () {
+                    INSPECTOR.Scheduler.getInstance().pause = false;
+                });
+                this._textValue = INSPECTOR.Helpers.CreateDiv('value-text', this._valueDiv);
+                this._textValue.innerText = this.value;
+                this._textValue.style.paddingLeft = '10px';
+                this._textValue.style.display = 'inline-block';
+            }
+        };
+        PropertyLine.prototype._rangeHandler = function () {
+            INSPECTOR.Scheduler.getInstance().pause = true;
+            this._textValue.innerText = this._input.value;
+            this.validateInput(this._input.value, false);
+        };
+        PropertyLine.prototype._isSliderType = function () {
+            return this._property &&
+                INSPECTOR.PROPERTIES.hasOwnProperty(this._property.obj.constructor.name) &&
+                INSPECTOR.PROPERTIES[this._property.obj.constructor.name].hasOwnProperty('slider') &&
+                INSPECTOR.PROPERTIES[this._property.obj.constructor.name].slider.hasOwnProperty(this.name);
+        };
+        PropertyLine.prototype._getSliderProperty = function () {
+            return INSPECTOR.PROPERTIES[this._property.obj.constructor.name].slider[this.name];
+        };
+        // Array representing the simple type. All others are considered 'complex'
+        PropertyLine._SIMPLE_TYPE = ['number', 'string', 'boolean'];
+        // The number of pixel at each children step
+        PropertyLine._MARGIN_LEFT = 15;
         return PropertyLine;
     }());
-    // Array representing the simple type. All others are considered 'complex'
-    PropertyLine._SIMPLE_TYPE = ['number', 'string', 'boolean'];
-    // The number of pixel at each children step
-    PropertyLine._MARGIN_LEFT = 15;
     INSPECTOR.PropertyLine = PropertyLine;
 })(INSPECTOR || (INSPECTOR = {}));
 
@@ -2616,6 +2700,9 @@ var INSPECTOR;
             }
             return propertiesLines;
         };
+        Helpers.Capitalize = function (str) {
+            return str.charAt(0).toUpperCase() + str.slice(1);
+        };
         return Helpers;
     }());
     INSPECTOR.Helpers = Helpers;
@@ -2657,10 +2744,10 @@ var INSPECTOR;
                 }
             }
         };
+        /** All properties are refreshed every 250ms */
+        Scheduler.REFRESH_TIME = 250;
         return Scheduler;
     }());
-    /** All properties are refreshed every 250ms */
-    Scheduler.REFRESH_TIME = 250;
     INSPECTOR.Scheduler = Scheduler;
 })(INSPECTOR || (INSPECTOR = {}));
 
@@ -2830,6 +2917,7 @@ var INSPECTOR;
                     node.active(false);
                 }
             }
+            item.getDiv().scrollIntoView();
             item.active(true);
         };
         /** Returns the treeitem corersponding to the given obj, null if not found */
@@ -4730,6 +4818,9 @@ var INSPECTOR;
                 this._div.classList.add('active');
             }
         };
+        TreeItem.prototype.getDiv = function () {
+            return this._div;
+        };
         return TreeItem;
     }(INSPECTOR.BasicElement));
     INSPECTOR.TreeItem = TreeItem;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 4
dist/preview release/inspector/babylon.inspector.min.js


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

@@ -223,11 +223,11 @@ var BABYLON;
             }
             return result;
         };
+        // V1 options
+        GLTFFileLoader.HomogeneousCoordinates = false;
+        GLTFFileLoader.IncrementalLoading = true;
         return GLTFFileLoader;
     }());
-    // V1 options
-    GLTFFileLoader.HomogeneousCoordinates = false;
-    GLTFFileLoader.IncrementalLoading = true;
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
@@ -1789,9 +1789,9 @@ var BABYLON;
                     }
                 }
             };
+            GLTFLoader.Extensions = {};
             return GLTFLoader;
         }());
-        GLTFLoader.Extensions = {};
         GLTF1.GLTFLoader = GLTFLoader;
         ;
         BABYLON.GLTFFileLoader.CreateGLTFLoaderV1 = function () { return new GLTFLoader(); };
@@ -2043,10 +2043,10 @@ var BABYLON;
                 }
                 return GLTFUtils._DefaultMaterial;
             };
+            // The GLTF default material
+            GLTFUtils._DefaultMaterial = null;
             return GLTFUtils;
         }());
-        // The GLTF default material
-        GLTFUtils._DefaultMaterial = null;
         GLTF1.GLTFUtils = GLTFUtils;
     })(GLTF1 = BABYLON.GLTF1 || (BABYLON.GLTF1 = {}));
 })(BABYLON || (BABYLON = {}));

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 54 - 45
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -127,6 +127,7 @@ declare module BABYLON.GLTF2 {
         max: number[];
         min: number[];
         sparse?: IGLTFAccessorSparse;
+        index?: number;
     }
     interface IGLTFAnimationChannel extends IGLTFProperty {
         sampler: number;
@@ -144,6 +145,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+        index?: number;
         targets?: any[];
     }
     interface IGLTFAsset extends IGLTFChildRootProperty {
@@ -155,14 +157,16 @@ declare module BABYLON.GLTF2 {
     interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri?: string;
         byteLength: number;
-        loadedData: ArrayBufferView;
-        loadedObservable: Observable<IGLTFBuffer>;
+        index?: number;
+        loadedData?: ArrayBufferView;
+        loadedObservable?: Observable<IGLTFBuffer>;
     }
     interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: number;
         byteOffset?: number;
         byteLength: number;
         byteStride?: number;
+        index?: number;
     }
     interface IGLTFCameraOrthographic extends IGLTFProperty {
         xmag: number;
@@ -185,6 +189,7 @@ declare module BABYLON.GLTF2 {
         uri?: string;
         mimeType?: string;
         bufferView?: number;
+        index?: number;
     }
     interface IGLTFMaterialNormalTextureInfo extends IGLTFTextureInfo {
         scale: number;
@@ -225,6 +230,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
         weights?: number[];
+        index?: number;
     }
     interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: number;
@@ -252,6 +258,7 @@ declare module BABYLON.GLTF2 {
     }
     interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: number[];
+        index?: number;
     }
     interface IGLTFSkin extends IGLTFChildRootProperty {
         inverseBindMatrices?: number;
@@ -263,6 +270,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler?: number;
         source: number;
+        index?: number;
         url?: string;
         dataReadyObservable?: Observable<IGLTFTexture>;
     }
@@ -318,7 +326,7 @@ declare module BABYLON.GLTF2 {
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess, onProgress, onError);
-        _onError(message: string): void;
+        private _onError(message);
         private _onProgress(event);
         _executeWhenRenderReady(func: () => void): void;
         private _onRenderReady();
@@ -328,47 +336,43 @@ declare module BABYLON.GLTF2 {
         private _getSkeletons();
         private _getAnimationTargets();
         private _startAnimations();
-        private _loadScene(nodeNames);
-        _loadNode(node: IGLTFNode): void;
-        private _loadMesh(node, mesh);
-        private _loadVertexDataAsync(primitive, onSuccess);
-        private _createMorphTargets(node, mesh, primitive, babylonMesh);
-        private _loadMorphTargetsData(mesh, primitive, vertexData, babylonMesh);
+        private _loadDefaultScene(nodeNames);
+        private _loadScene(context, scene, nodeNames);
+        _loadNode(context: string, node: IGLTFNode): void;
+        private _loadMesh(context, node, mesh);
+        private _loadPrimitive(context, node, mesh, primitive, onSuccess);
+        private _loadVertexDataAsync(context, mesh, primitive, onSuccess);
+        private _createMorphTargets(node, mesh, primitive);
+        private _loadMorphTargetsData(context, mesh, primitive, vertexData, babylonMesh);
         private _loadTransform(node);
-        private _loadSkin(skin);
+        private _loadSkin(context, skin);
         private _createBone(node, skin, parent, localMatrix, baseMatrix, index);
-        private _loadBones(skin, inverseBindMatrixData);
+        private _loadBones(context, skin, inverseBindMatrixData);
         private _loadBone(node, skin, inverseBindMatrixData, babylonBones);
         private _getNodeMatrix(node);
-        private _traverseNodes(indices, action, parentNode?);
-        _traverseNode(index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
+        private _traverseNodes(context, indices, action, parentNode?);
+        _traverseNode(context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
         private _loadAnimations();
-        private _loadAnimationChannel(animation, animationIndex, channelIndex);
-        private _validateUri(uri);
-        private _loadBufferAsync(buffer, onSuccess);
-        private _buildInt8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildInt16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildFloat32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _extractInterleavedData(sourceBuffer, targetBuffer, bytePerComponent, stride, length);
-        private _loadBufferViewAsync(bufferView, byteOffset, byteLength, bytePerComponent, componentType, onSuccess);
-        private _loadAccessorAsync(accessor, onSuccess);
-        private _getByteStrideFromType(accessor);
+        private _loadAnimationChannel(animation, channelContext, channel, samplerContext, sampler);
+        private _loadBufferAsync(context, buffer, onSuccess);
+        private _loadBufferViewAsync(context, bufferView, onSuccess);
+        private _loadAccessorAsync(context, accessor, onSuccess);
+        private _getNumComponentsOfType(type);
+        private _buildArrayBuffer<T>(typedArray, context, data, byteOffset, count, numComponents, byteStride);
         _addPendingData(data: any): void;
         _removePendingData(data: any): void;
         _addLoaderPendingData(data: any): void;
         _removeLoaderPendingData(data: any): void;
         _whenAction(action: () => void, onComplete: () => void): void;
         private _getDefaultMaterial();
-        private _loadMaterialMetallicRoughnessProperties(material);
-        _loadMaterial(material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
+        private _loadMaterialMetallicRoughnessProperties(context, material);
+        _loadMaterial(context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
         _createPbrMaterial(material: IGLTFMaterial): void;
-        _loadMaterialBaseProperties(material: IGLTFMaterial): void;
-        _loadMaterialAlphaProperties(material: IGLTFMaterial, colorFactor?: number[]): void;
-        _loadTexture(textureInfo: IGLTFTextureInfo): Texture;
-        _getArrayItem<T>(array: ArrayLike<T>, index: number, name: string): T;
+        _loadMaterialBaseProperties(context: string, material: IGLTFMaterial): void;
+        _loadMaterialAlphaProperties(context: string, material: IGLTFMaterial, colorFactor: number[]): void;
+        _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture;
+        private _loadImage(context, image, onSuccess);
+        _tryCatchOnError(handler: () => void): void;
     }
 }
 
@@ -389,6 +393,11 @@ declare module BABYLON.GLTF2 {
         */
         static DecodeBase64(uri: string): ArrayBuffer;
         static ForEach(view: Uint16Array | Uint32Array | Float32Array, func: (nvalue: number, index: number) => void): void;
+        static ValidateUri(uri: string): boolean;
+        static AssignIndices(array: Array<{
+            index?: number;
+        }>): void;
+        static GetArrayItem<T>(array: ArrayLike<T>, index: number): T;
         static GetTextureWrapMode(mode: ETextureWrapMode): number;
         static GetTextureSamplingMode(magFilter: ETextureMagFilter, minFilter: ETextureMinFilter): number;
         /**
@@ -404,14 +413,14 @@ declare module BABYLON.GLTF2 {
     abstract class GLTFLoaderExtension {
         enabled: boolean;
         readonly abstract name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         protected _loadExtension<T>(property: IGLTFProperty, action: (extension: T, onComplete: () => void) => void): boolean;
         static _Extensions: GLTFLoaderExtension[];
-        static TraverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        static LoadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        static LoadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        static TraverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        static LoadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        static LoadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         private static _ApplyExtensions(action);
     }
 }
@@ -424,11 +433,11 @@ declare module BABYLON.GLTF2.Extensions {
          */
         static MinimalLODDelay: number;
         readonly name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        private _loadNodeLOD(loader, nodes, index, onComplete);
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadMaterialLOD(loader, materials, index, assign, onComplete);
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        private _loadNodeLOD(loader, context, nodes, index, onComplete);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadMaterialLOD(loader, context, materials, index, assign, onComplete);
     }
 }
 
@@ -436,7 +445,7 @@ declare module BABYLON.GLTF2.Extensions {
 declare module BABYLON.GLTF2.Extensions {
     class KHRMaterialsPbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadSpecularGlossinessProperties(loader, material, properties);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadSpecularGlossinessProperties(loader, context, material, properties);
     }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 429 - 399
dist/preview release/loaders/babylon.glTF2FileLoader.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 54 - 45
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -623,6 +623,7 @@ declare module BABYLON.GLTF2 {
         max: number[];
         min: number[];
         sparse?: IGLTFAccessorSparse;
+        index?: number;
     }
     interface IGLTFAnimationChannel extends IGLTFProperty {
         sampler: number;
@@ -640,6 +641,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+        index?: number;
         targets?: any[];
     }
     interface IGLTFAsset extends IGLTFChildRootProperty {
@@ -651,14 +653,16 @@ declare module BABYLON.GLTF2 {
     interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri?: string;
         byteLength: number;
-        loadedData: ArrayBufferView;
-        loadedObservable: Observable<IGLTFBuffer>;
+        index?: number;
+        loadedData?: ArrayBufferView;
+        loadedObservable?: Observable<IGLTFBuffer>;
     }
     interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: number;
         byteOffset?: number;
         byteLength: number;
         byteStride?: number;
+        index?: number;
     }
     interface IGLTFCameraOrthographic extends IGLTFProperty {
         xmag: number;
@@ -681,6 +685,7 @@ declare module BABYLON.GLTF2 {
         uri?: string;
         mimeType?: string;
         bufferView?: number;
+        index?: number;
     }
     interface IGLTFMaterialNormalTextureInfo extends IGLTFTextureInfo {
         scale: number;
@@ -721,6 +726,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
         weights?: number[];
+        index?: number;
     }
     interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: number;
@@ -748,6 +754,7 @@ declare module BABYLON.GLTF2 {
     }
     interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: number[];
+        index?: number;
     }
     interface IGLTFSkin extends IGLTFChildRootProperty {
         inverseBindMatrices?: number;
@@ -759,6 +766,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler?: number;
         source: number;
+        index?: number;
         url?: string;
         dataReadyObservable?: Observable<IGLTFTexture>;
     }
@@ -814,7 +822,7 @@ declare module BABYLON.GLTF2 {
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess, onProgress, onError);
-        _onError(message: string): void;
+        private _onError(message);
         private _onProgress(event);
         _executeWhenRenderReady(func: () => void): void;
         private _onRenderReady();
@@ -824,47 +832,43 @@ declare module BABYLON.GLTF2 {
         private _getSkeletons();
         private _getAnimationTargets();
         private _startAnimations();
-        private _loadScene(nodeNames);
-        _loadNode(node: IGLTFNode): void;
-        private _loadMesh(node, mesh);
-        private _loadVertexDataAsync(primitive, onSuccess);
-        private _createMorphTargets(node, mesh, primitive, babylonMesh);
-        private _loadMorphTargetsData(mesh, primitive, vertexData, babylonMesh);
+        private _loadDefaultScene(nodeNames);
+        private _loadScene(context, scene, nodeNames);
+        _loadNode(context: string, node: IGLTFNode): void;
+        private _loadMesh(context, node, mesh);
+        private _loadPrimitive(context, node, mesh, primitive, onSuccess);
+        private _loadVertexDataAsync(context, mesh, primitive, onSuccess);
+        private _createMorphTargets(node, mesh, primitive);
+        private _loadMorphTargetsData(context, mesh, primitive, vertexData, babylonMesh);
         private _loadTransform(node);
-        private _loadSkin(skin);
+        private _loadSkin(context, skin);
         private _createBone(node, skin, parent, localMatrix, baseMatrix, index);
-        private _loadBones(skin, inverseBindMatrixData);
+        private _loadBones(context, skin, inverseBindMatrixData);
         private _loadBone(node, skin, inverseBindMatrixData, babylonBones);
         private _getNodeMatrix(node);
-        private _traverseNodes(indices, action, parentNode?);
-        _traverseNode(index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
+        private _traverseNodes(context, indices, action, parentNode?);
+        _traverseNode(context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
         private _loadAnimations();
-        private _loadAnimationChannel(animation, animationIndex, channelIndex);
-        private _validateUri(uri);
-        private _loadBufferAsync(buffer, onSuccess);
-        private _buildInt8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildInt16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildFloat32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _extractInterleavedData(sourceBuffer, targetBuffer, bytePerComponent, stride, length);
-        private _loadBufferViewAsync(bufferView, byteOffset, byteLength, bytePerComponent, componentType, onSuccess);
-        private _loadAccessorAsync(accessor, onSuccess);
-        private _getByteStrideFromType(accessor);
+        private _loadAnimationChannel(animation, channelContext, channel, samplerContext, sampler);
+        private _loadBufferAsync(context, buffer, onSuccess);
+        private _loadBufferViewAsync(context, bufferView, onSuccess);
+        private _loadAccessorAsync(context, accessor, onSuccess);
+        private _getNumComponentsOfType(type);
+        private _buildArrayBuffer<T>(typedArray, context, data, byteOffset, count, numComponents, byteStride);
         _addPendingData(data: any): void;
         _removePendingData(data: any): void;
         _addLoaderPendingData(data: any): void;
         _removeLoaderPendingData(data: any): void;
         _whenAction(action: () => void, onComplete: () => void): void;
         private _getDefaultMaterial();
-        private _loadMaterialMetallicRoughnessProperties(material);
-        _loadMaterial(material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
+        private _loadMaterialMetallicRoughnessProperties(context, material);
+        _loadMaterial(context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
         _createPbrMaterial(material: IGLTFMaterial): void;
-        _loadMaterialBaseProperties(material: IGLTFMaterial): void;
-        _loadMaterialAlphaProperties(material: IGLTFMaterial, colorFactor?: number[]): void;
-        _loadTexture(textureInfo: IGLTFTextureInfo): Texture;
-        _getArrayItem<T>(array: ArrayLike<T>, index: number, name: string): T;
+        _loadMaterialBaseProperties(context: string, material: IGLTFMaterial): void;
+        _loadMaterialAlphaProperties(context: string, material: IGLTFMaterial, colorFactor: number[]): void;
+        _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture;
+        private _loadImage(context, image, onSuccess);
+        _tryCatchOnError(handler: () => void): void;
     }
 }
 
@@ -885,6 +889,11 @@ declare module BABYLON.GLTF2 {
         */
         static DecodeBase64(uri: string): ArrayBuffer;
         static ForEach(view: Uint16Array | Uint32Array | Float32Array, func: (nvalue: number, index: number) => void): void;
+        static ValidateUri(uri: string): boolean;
+        static AssignIndices(array: Array<{
+            index?: number;
+        }>): void;
+        static GetArrayItem<T>(array: ArrayLike<T>, index: number): T;
         static GetTextureWrapMode(mode: ETextureWrapMode): number;
         static GetTextureSamplingMode(magFilter: ETextureMagFilter, minFilter: ETextureMinFilter): number;
         /**
@@ -900,14 +909,14 @@ declare module BABYLON.GLTF2 {
     abstract class GLTFLoaderExtension {
         enabled: boolean;
         readonly abstract name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         protected _loadExtension<T>(property: IGLTFProperty, action: (extension: T, onComplete: () => void) => void): boolean;
         static _Extensions: GLTFLoaderExtension[];
-        static TraverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        static LoadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        static LoadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        static TraverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        static LoadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        static LoadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         private static _ApplyExtensions(action);
     }
 }
@@ -920,11 +929,11 @@ declare module BABYLON.GLTF2.Extensions {
          */
         static MinimalLODDelay: number;
         readonly name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        private _loadNodeLOD(loader, nodes, index, onComplete);
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadMaterialLOD(loader, materials, index, assign, onComplete);
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        private _loadNodeLOD(loader, context, nodes, index, onComplete);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadMaterialLOD(loader, context, materials, index, assign, onComplete);
     }
 }
 
@@ -932,7 +941,7 @@ declare module BABYLON.GLTF2.Extensions {
 declare module BABYLON.GLTF2.Extensions {
     class KHRMaterialsPbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadSpecularGlossinessProperties(loader, material, properties);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadSpecularGlossinessProperties(loader, context, material, properties);
     }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 431 - 401
dist/preview release/loaders/babylon.glTFFileLoader.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.js

@@ -774,9 +774,9 @@ var BABYLON;
             //Return an array with all BABYLON.Mesh
             return babylonMeshesArray;
         };
+        OBJFileLoader.OPTIMIZE_WITH_UV = false;
         return OBJFileLoader;
     }());
-    OBJFileLoader.OPTIMIZE_WITH_UV = false;
     BABYLON.OBJFileLoader = OBJFileLoader;
     if (BABYLON.SceneLoader) {
         //Add this loader into the register plugin

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 432 - 402
dist/preview release/loaders/babylonjs.loaders.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


+ 54 - 45
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -721,6 +721,7 @@ declare module BABYLON.GLTF2 {
         max: number[];
         min: number[];
         sparse?: IGLTFAccessorSparse;
+        index?: number;
     }
     interface IGLTFAnimationChannel extends IGLTFProperty {
         sampler: number;
@@ -738,6 +739,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+        index?: number;
         targets?: any[];
     }
     interface IGLTFAsset extends IGLTFChildRootProperty {
@@ -749,14 +751,16 @@ declare module BABYLON.GLTF2 {
     interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri?: string;
         byteLength: number;
-        loadedData: ArrayBufferView;
-        loadedObservable: Observable<IGLTFBuffer>;
+        index?: number;
+        loadedData?: ArrayBufferView;
+        loadedObservable?: Observable<IGLTFBuffer>;
     }
     interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: number;
         byteOffset?: number;
         byteLength: number;
         byteStride?: number;
+        index?: number;
     }
     interface IGLTFCameraOrthographic extends IGLTFProperty {
         xmag: number;
@@ -779,6 +783,7 @@ declare module BABYLON.GLTF2 {
         uri?: string;
         mimeType?: string;
         bufferView?: number;
+        index?: number;
     }
     interface IGLTFMaterialNormalTextureInfo extends IGLTFTextureInfo {
         scale: number;
@@ -819,6 +824,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFMesh extends IGLTFChildRootProperty {
         primitives: IGLTFMeshPrimitive[];
         weights?: number[];
+        index?: number;
     }
     interface IGLTFNode extends IGLTFChildRootProperty {
         camera?: number;
@@ -846,6 +852,7 @@ declare module BABYLON.GLTF2 {
     }
     interface IGLTFScene extends IGLTFChildRootProperty {
         nodes: number[];
+        index?: number;
     }
     interface IGLTFSkin extends IGLTFChildRootProperty {
         inverseBindMatrices?: number;
@@ -857,6 +864,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler?: number;
         source: number;
+        index?: number;
         url?: string;
         dataReadyObservable?: Observable<IGLTFTexture>;
     }
@@ -912,7 +920,7 @@ declare module BABYLON.GLTF2 {
         importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
         private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess, onProgress, onError);
-        _onError(message: string): void;
+        private _onError(message);
         private _onProgress(event);
         _executeWhenRenderReady(func: () => void): void;
         private _onRenderReady();
@@ -922,47 +930,43 @@ declare module BABYLON.GLTF2 {
         private _getSkeletons();
         private _getAnimationTargets();
         private _startAnimations();
-        private _loadScene(nodeNames);
-        _loadNode(node: IGLTFNode): void;
-        private _loadMesh(node, mesh);
-        private _loadVertexDataAsync(primitive, onSuccess);
-        private _createMorphTargets(node, mesh, primitive, babylonMesh);
-        private _loadMorphTargetsData(mesh, primitive, vertexData, babylonMesh);
+        private _loadDefaultScene(nodeNames);
+        private _loadScene(context, scene, nodeNames);
+        _loadNode(context: string, node: IGLTFNode): void;
+        private _loadMesh(context, node, mesh);
+        private _loadPrimitive(context, node, mesh, primitive, onSuccess);
+        private _loadVertexDataAsync(context, mesh, primitive, onSuccess);
+        private _createMorphTargets(node, mesh, primitive);
+        private _loadMorphTargetsData(context, mesh, primitive, vertexData, babylonMesh);
         private _loadTransform(node);
-        private _loadSkin(skin);
+        private _loadSkin(context, skin);
         private _createBone(node, skin, parent, localMatrix, baseMatrix, index);
-        private _loadBones(skin, inverseBindMatrixData);
+        private _loadBones(context, skin, inverseBindMatrixData);
         private _loadBone(node, skin, inverseBindMatrixData, babylonBones);
         private _getNodeMatrix(node);
-        private _traverseNodes(indices, action, parentNode?);
-        _traverseNode(index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
+        private _traverseNodes(context, indices, action, parentNode?);
+        _traverseNode(context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode?: IGLTFNode): void;
         private _loadAnimations();
-        private _loadAnimationChannel(animation, animationIndex, channelIndex);
-        private _validateUri(uri);
-        private _loadBufferAsync(buffer, onSuccess);
-        private _buildInt8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint8ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildInt16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint16ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildUint32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _buildFloat32ArrayBuffer(buffer, byteOffset, byteLength, byteStride, bytePerComponent);
-        private _extractInterleavedData(sourceBuffer, targetBuffer, bytePerComponent, stride, length);
-        private _loadBufferViewAsync(bufferView, byteOffset, byteLength, bytePerComponent, componentType, onSuccess);
-        private _loadAccessorAsync(accessor, onSuccess);
-        private _getByteStrideFromType(accessor);
+        private _loadAnimationChannel(animation, channelContext, channel, samplerContext, sampler);
+        private _loadBufferAsync(context, buffer, onSuccess);
+        private _loadBufferViewAsync(context, bufferView, onSuccess);
+        private _loadAccessorAsync(context, accessor, onSuccess);
+        private _getNumComponentsOfType(type);
+        private _buildArrayBuffer<T>(typedArray, context, data, byteOffset, count, numComponents, byteStride);
         _addPendingData(data: any): void;
         _removePendingData(data: any): void;
         _addLoaderPendingData(data: any): void;
         _removeLoaderPendingData(data: any): void;
         _whenAction(action: () => void, onComplete: () => void): void;
         private _getDefaultMaterial();
-        private _loadMaterialMetallicRoughnessProperties(material);
-        _loadMaterial(material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
+        private _loadMaterialMetallicRoughnessProperties(context, material);
+        _loadMaterial(context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void;
         _createPbrMaterial(material: IGLTFMaterial): void;
-        _loadMaterialBaseProperties(material: IGLTFMaterial): void;
-        _loadMaterialAlphaProperties(material: IGLTFMaterial, colorFactor?: number[]): void;
-        _loadTexture(textureInfo: IGLTFTextureInfo): Texture;
-        _getArrayItem<T>(array: ArrayLike<T>, index: number, name: string): T;
+        _loadMaterialBaseProperties(context: string, material: IGLTFMaterial): void;
+        _loadMaterialAlphaProperties(context: string, material: IGLTFMaterial, colorFactor: number[]): void;
+        _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture;
+        private _loadImage(context, image, onSuccess);
+        _tryCatchOnError(handler: () => void): void;
     }
 }
 
@@ -983,6 +987,11 @@ declare module BABYLON.GLTF2 {
         */
         static DecodeBase64(uri: string): ArrayBuffer;
         static ForEach(view: Uint16Array | Uint32Array | Float32Array, func: (nvalue: number, index: number) => void): void;
+        static ValidateUri(uri: string): boolean;
+        static AssignIndices(array: Array<{
+            index?: number;
+        }>): void;
+        static GetArrayItem<T>(array: ArrayLike<T>, index: number): T;
         static GetTextureWrapMode(mode: ETextureWrapMode): number;
         static GetTextureSamplingMode(magFilter: ETextureMagFilter, minFilter: ETextureMinFilter): number;
         /**
@@ -998,14 +1007,14 @@ declare module BABYLON.GLTF2 {
     abstract class GLTFLoaderExtension {
         enabled: boolean;
         readonly abstract name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         protected _loadExtension<T>(property: IGLTFProperty, action: (extension: T, onComplete: () => void) => void): boolean;
         static _Extensions: GLTFLoaderExtension[];
-        static TraverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        static LoadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        static LoadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        static TraverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        static LoadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        static LoadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
         private static _ApplyExtensions(action);
     }
 }
@@ -1018,11 +1027,11 @@ declare module BABYLON.GLTF2.Extensions {
          */
         static MinimalLODDelay: number;
         readonly name: string;
-        protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
-        protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean;
-        private _loadNodeLOD(loader, nodes, index, onComplete);
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadMaterialLOD(loader, materials, index, assign, onComplete);
+        protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean;
+        protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean;
+        private _loadNodeLOD(loader, context, nodes, index, onComplete);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadMaterialLOD(loader, context, materials, index, assign, onComplete);
     }
 }
 
@@ -1030,7 +1039,7 @@ declare module BABYLON.GLTF2.Extensions {
 declare module BABYLON.GLTF2.Extensions {
     class KHRMaterialsPbrSpecularGlossiness extends GLTFLoaderExtension {
         readonly name: string;
-        protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
-        private _loadSpecularGlossinessProperties(loader, material, properties);
+        protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean;
+        private _loadSpecularGlossinessProperties(loader, context, material, properties);
     }
 }

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

@@ -255,35 +255,35 @@ var BABYLON;
         CellMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new CellMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], CellMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], CellMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("diffuseColor")
+        ], CellMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize("computeHighLevel")
+        ], CellMaterial.prototype, "_computeHighLevel", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], CellMaterial.prototype, "computeHighLevel", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], CellMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], CellMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], CellMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], CellMaterial.prototype, "maxSimultaneousLights", void 0);
         return CellMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], CellMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], CellMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("diffuseColor")
-    ], CellMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize("computeHighLevel")
-    ], CellMaterial.prototype, "_computeHighLevel", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], CellMaterial.prototype, "computeHighLevel", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], CellMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], CellMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], CellMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], CellMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.CellMaterial = CellMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


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

@@ -1160,227 +1160,227 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        // Flags used to enable or disable a type of texture for all Standard Materials
+        StandardMaterial_OldVer._DiffuseTextureEnabled = true;
+        StandardMaterial_OldVer._AmbientTextureEnabled = true;
+        StandardMaterial_OldVer._OpacityTextureEnabled = true;
+        StandardMaterial_OldVer._ReflectionTextureEnabled = true;
+        StandardMaterial_OldVer._EmissiveTextureEnabled = true;
+        StandardMaterial_OldVer._SpecularTextureEnabled = true;
+        StandardMaterial_OldVer._BumpTextureEnabled = true;
+        StandardMaterial_OldVer._LightmapTextureEnabled = true;
+        StandardMaterial_OldVer._RefractionTextureEnabled = true;
+        StandardMaterial_OldVer._ColorGradingTextureEnabled = true;
+        StandardMaterial_OldVer._FresnelEnabled = true;
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], StandardMaterial_OldVer.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("ambientTexture")
+        ], StandardMaterial_OldVer.prototype, "_ambientTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "ambientTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("opacityTexture")
+        ], StandardMaterial_OldVer.prototype, "_opacityTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "opacityTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("reflectionTexture")
+        ], StandardMaterial_OldVer.prototype, "_reflectionTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "reflectionTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("emissiveTexture")
+        ], StandardMaterial_OldVer.prototype, "_emissiveTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "emissiveTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("specularTexture")
+        ], StandardMaterial_OldVer.prototype, "_specularTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "specularTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("bumpTexture")
+        ], StandardMaterial_OldVer.prototype, "_bumpTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "bumpTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("lightmapTexture")
+        ], StandardMaterial_OldVer.prototype, "_lightmapTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "lightmapTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("refractionTexture")
+        ], StandardMaterial_OldVer.prototype, "_refractionTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "refractionTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("ambient")
+        ], StandardMaterial_OldVer.prototype, "ambientColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("diffuse")
+        ], StandardMaterial_OldVer.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("specular")
+        ], StandardMaterial_OldVer.prototype, "specularColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("emissive")
+        ], StandardMaterial_OldVer.prototype, "emissiveColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], StandardMaterial_OldVer.prototype, "specularPower", void 0);
+        __decorate([
+            BABYLON.serialize("useAlphaFromDiffuseTexture")
+        ], StandardMaterial_OldVer.prototype, "_useAlphaFromDiffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useAlphaFromDiffuseTexture", void 0);
+        __decorate([
+            BABYLON.serialize("useEmissiveAsIllumination")
+        ], StandardMaterial_OldVer.prototype, "_useEmissiveAsIllumination", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useEmissiveAsIllumination", void 0);
+        __decorate([
+            BABYLON.serialize("linkEmissiveWithDiffuse")
+        ], StandardMaterial_OldVer.prototype, "_linkEmissiveWithDiffuse", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "linkEmissiveWithDiffuse", void 0);
+        __decorate([
+            BABYLON.serialize("useSpecularOverAlpha")
+        ], StandardMaterial_OldVer.prototype, "_useSpecularOverAlpha", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useSpecularOverAlpha", void 0);
+        __decorate([
+            BABYLON.serialize("useReflectionOverAlpha")
+        ], StandardMaterial_OldVer.prototype, "_useReflectionOverAlpha", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useReflectionOverAlpha", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], StandardMaterial_OldVer.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], StandardMaterial_OldVer.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("useParallax")
+        ], StandardMaterial_OldVer.prototype, "_useParallax", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useParallax", void 0);
+        __decorate([
+            BABYLON.serialize("useParallaxOcclusion")
+        ], StandardMaterial_OldVer.prototype, "_useParallaxOcclusion", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useParallaxOcclusion", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], StandardMaterial_OldVer.prototype, "parallaxScaleBias", void 0);
+        __decorate([
+            BABYLON.serialize("roughness")
+        ], StandardMaterial_OldVer.prototype, "_roughness", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "roughness", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], StandardMaterial_OldVer.prototype, "indexOfRefraction", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], StandardMaterial_OldVer.prototype, "invertRefractionY", void 0);
+        __decorate([
+            BABYLON.serialize("useLightmapAsShadowmap")
+        ], StandardMaterial_OldVer.prototype, "_useLightmapAsShadowmap", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useLightmapAsShadowmap", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters("diffuseFresnelParameters")
+        ], StandardMaterial_OldVer.prototype, "_diffuseFresnelParameters", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "diffuseFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters("opacityFresnelParameters")
+        ], StandardMaterial_OldVer.prototype, "_opacityFresnelParameters", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "opacityFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters("reflectionFresnelParameters")
+        ], StandardMaterial_OldVer.prototype, "_reflectionFresnelParameters", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "reflectionFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters("refractionFresnelParameters")
+        ], StandardMaterial_OldVer.prototype, "_refractionFresnelParameters", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "refractionFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters("emissiveFresnelParameters")
+        ], StandardMaterial_OldVer.prototype, "_emissiveFresnelParameters", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "emissiveFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serialize("useReflectionFresnelFromSpecular")
+        ], StandardMaterial_OldVer.prototype, "_useReflectionFresnelFromSpecular", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
+        ], StandardMaterial_OldVer.prototype, "useReflectionFresnelFromSpecular", void 0);
+        __decorate([
+            BABYLON.serialize("useGlossinessFromSpecularMapAlpha")
+        ], StandardMaterial_OldVer.prototype, "_useGlossinessFromSpecularMapAlpha", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "useGlossinessFromSpecularMapAlpha", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], StandardMaterial_OldVer.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], StandardMaterial_OldVer.prototype, "maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.serialize("invertNormalMapX")
+        ], StandardMaterial_OldVer.prototype, "_invertNormalMapX", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "invertNormalMapX", void 0);
+        __decorate([
+            BABYLON.serialize("invertNormalMapY")
+        ], StandardMaterial_OldVer.prototype, "_invertNormalMapY", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "invertNormalMapY", void 0);
+        __decorate([
+            BABYLON.serialize("twoSidedLighting")
+        ], StandardMaterial_OldVer.prototype, "_twoSidedLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], StandardMaterial_OldVer.prototype, "twoSidedLighting", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], StandardMaterial_OldVer.prototype, "useLogarithmicDepth", null);
         return StandardMaterial_OldVer;
     }(BABYLON.PushMaterial));
-    // Flags used to enable or disable a type of texture for all Standard Materials
-    StandardMaterial_OldVer._DiffuseTextureEnabled = true;
-    StandardMaterial_OldVer._AmbientTextureEnabled = true;
-    StandardMaterial_OldVer._OpacityTextureEnabled = true;
-    StandardMaterial_OldVer._ReflectionTextureEnabled = true;
-    StandardMaterial_OldVer._EmissiveTextureEnabled = true;
-    StandardMaterial_OldVer._SpecularTextureEnabled = true;
-    StandardMaterial_OldVer._BumpTextureEnabled = true;
-    StandardMaterial_OldVer._LightmapTextureEnabled = true;
-    StandardMaterial_OldVer._RefractionTextureEnabled = true;
-    StandardMaterial_OldVer._ColorGradingTextureEnabled = true;
-    StandardMaterial_OldVer._FresnelEnabled = true;
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], StandardMaterial_OldVer.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("ambientTexture")
-    ], StandardMaterial_OldVer.prototype, "_ambientTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "ambientTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("opacityTexture")
-    ], StandardMaterial_OldVer.prototype, "_opacityTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "opacityTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("reflectionTexture")
-    ], StandardMaterial_OldVer.prototype, "_reflectionTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "reflectionTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("emissiveTexture")
-    ], StandardMaterial_OldVer.prototype, "_emissiveTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "emissiveTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("specularTexture")
-    ], StandardMaterial_OldVer.prototype, "_specularTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "specularTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("bumpTexture")
-    ], StandardMaterial_OldVer.prototype, "_bumpTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "bumpTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("lightmapTexture")
-    ], StandardMaterial_OldVer.prototype, "_lightmapTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "lightmapTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("refractionTexture")
-    ], StandardMaterial_OldVer.prototype, "_refractionTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "refractionTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("ambient")
-    ], StandardMaterial_OldVer.prototype, "ambientColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("diffuse")
-    ], StandardMaterial_OldVer.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("specular")
-    ], StandardMaterial_OldVer.prototype, "specularColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("emissive")
-    ], StandardMaterial_OldVer.prototype, "emissiveColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardMaterial_OldVer.prototype, "specularPower", void 0);
-    __decorate([
-        BABYLON.serialize("useAlphaFromDiffuseTexture")
-    ], StandardMaterial_OldVer.prototype, "_useAlphaFromDiffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useAlphaFromDiffuseTexture", void 0);
-    __decorate([
-        BABYLON.serialize("useEmissiveAsIllumination")
-    ], StandardMaterial_OldVer.prototype, "_useEmissiveAsIllumination", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useEmissiveAsIllumination", void 0);
-    __decorate([
-        BABYLON.serialize("linkEmissiveWithDiffuse")
-    ], StandardMaterial_OldVer.prototype, "_linkEmissiveWithDiffuse", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "linkEmissiveWithDiffuse", void 0);
-    __decorate([
-        BABYLON.serialize("useSpecularOverAlpha")
-    ], StandardMaterial_OldVer.prototype, "_useSpecularOverAlpha", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useSpecularOverAlpha", void 0);
-    __decorate([
-        BABYLON.serialize("useReflectionOverAlpha")
-    ], StandardMaterial_OldVer.prototype, "_useReflectionOverAlpha", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useReflectionOverAlpha", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], StandardMaterial_OldVer.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], StandardMaterial_OldVer.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("useParallax")
-    ], StandardMaterial_OldVer.prototype, "_useParallax", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useParallax", void 0);
-    __decorate([
-        BABYLON.serialize("useParallaxOcclusion")
-    ], StandardMaterial_OldVer.prototype, "_useParallaxOcclusion", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useParallaxOcclusion", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardMaterial_OldVer.prototype, "parallaxScaleBias", void 0);
-    __decorate([
-        BABYLON.serialize("roughness")
-    ], StandardMaterial_OldVer.prototype, "_roughness", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "roughness", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardMaterial_OldVer.prototype, "indexOfRefraction", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardMaterial_OldVer.prototype, "invertRefractionY", void 0);
-    __decorate([
-        BABYLON.serialize("useLightmapAsShadowmap")
-    ], StandardMaterial_OldVer.prototype, "_useLightmapAsShadowmap", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useLightmapAsShadowmap", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters("diffuseFresnelParameters")
-    ], StandardMaterial_OldVer.prototype, "_diffuseFresnelParameters", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "diffuseFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters("opacityFresnelParameters")
-    ], StandardMaterial_OldVer.prototype, "_opacityFresnelParameters", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "opacityFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters("reflectionFresnelParameters")
-    ], StandardMaterial_OldVer.prototype, "_reflectionFresnelParameters", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "reflectionFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters("refractionFresnelParameters")
-    ], StandardMaterial_OldVer.prototype, "_refractionFresnelParameters", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "refractionFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters("emissiveFresnelParameters")
-    ], StandardMaterial_OldVer.prototype, "_emissiveFresnelParameters", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "emissiveFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serialize("useReflectionFresnelFromSpecular")
-    ], StandardMaterial_OldVer.prototype, "_useReflectionFresnelFromSpecular", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsFresnelDirty")
-    ], StandardMaterial_OldVer.prototype, "useReflectionFresnelFromSpecular", void 0);
-    __decorate([
-        BABYLON.serialize("useGlossinessFromSpecularMapAlpha")
-    ], StandardMaterial_OldVer.prototype, "_useGlossinessFromSpecularMapAlpha", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "useGlossinessFromSpecularMapAlpha", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], StandardMaterial_OldVer.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], StandardMaterial_OldVer.prototype, "maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.serialize("invertNormalMapX")
-    ], StandardMaterial_OldVer.prototype, "_invertNormalMapX", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "invertNormalMapX", void 0);
-    __decorate([
-        BABYLON.serialize("invertNormalMapY")
-    ], StandardMaterial_OldVer.prototype, "_invertNormalMapY", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "invertNormalMapY", void 0);
-    __decorate([
-        BABYLON.serialize("twoSidedLighting")
-    ], StandardMaterial_OldVer.prototype, "_twoSidedLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], StandardMaterial_OldVer.prototype, "twoSidedLighting", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardMaterial_OldVer.prototype, "useLogarithmicDepth", null);
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
     var CustomShaderStructure = (function () {
         function CustomShaderStructure() {
@@ -2047,9 +2047,9 @@ vColor=color;\n\
             this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated");
             return this;
         };
+        CustomMaterial.ShaderIndexer = 1;
         return CustomMaterial;
     }(StandardMaterial_OldVer));
-    CustomMaterial.ShaderIndexer = 1;
     BABYLON.CustomMaterial = CustomMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


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

@@ -293,32 +293,32 @@ var BABYLON;
             }
             return material;
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], FireMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], FireMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("distortionTexture")
+        ], FireMaterial.prototype, "_distortionTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], FireMaterial.prototype, "distortionTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("opacityTexture")
+        ], FireMaterial.prototype, "_opacityTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], FireMaterial.prototype, "opacityTexture", void 0);
+        __decorate([
+            BABYLON.serialize("diffuseColor")
+        ], FireMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FireMaterial.prototype, "speed", void 0);
         return FireMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], FireMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], FireMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("distortionTexture")
-    ], FireMaterial.prototype, "_distortionTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], FireMaterial.prototype, "distortionTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("opacityTexture")
-    ], FireMaterial.prototype, "_opacityTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], FireMaterial.prototype, "opacityTexture", void 0);
-    __decorate([
-        BABYLON.serialize("diffuseColor")
-    ], FireMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FireMaterial.prototype, "speed", void 0);
     BABYLON.FireMaterial = FireMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.fireMaterial.min.js


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

@@ -402,65 +402,65 @@ var BABYLON;
             sourceMesh.material._meshes = meshes;
             return meshes;
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], FurMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], FurMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("heightTexture")
+        ], FurMaterial.prototype, "_heightTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], FurMaterial.prototype, "heightTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], FurMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furLength", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furAngle", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], FurMaterial.prototype, "furColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furOffset", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furSpacing", void 0);
+        __decorate([
+            BABYLON.serializeAsVector3()
+        ], FurMaterial.prototype, "furGravity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furSpeed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furDensity", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], FurMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], FurMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], FurMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], FurMaterial.prototype, "maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "highLevelFur", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], FurMaterial.prototype, "furTime", null);
         return FurMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], FurMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], FurMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("heightTexture")
-    ], FurMaterial.prototype, "_heightTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], FurMaterial.prototype, "heightTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], FurMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furLength", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furAngle", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], FurMaterial.prototype, "furColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furOffset", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furSpacing", void 0);
-    __decorate([
-        BABYLON.serializeAsVector3()
-    ], FurMaterial.prototype, "furGravity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furSpeed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furDensity", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], FurMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], FurMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], FurMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], FurMaterial.prototype, "maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "highLevelFur", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], FurMaterial.prototype, "furTime", null);
     BABYLON.FurMaterial = FurMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


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

@@ -251,35 +251,35 @@ var BABYLON;
         GradientMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new GradientMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], GradientMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], GradientMaterial.prototype, "maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], GradientMaterial.prototype, "topColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GradientMaterial.prototype, "topColorAlpha", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], GradientMaterial.prototype, "bottomColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GradientMaterial.prototype, "bottomColorAlpha", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GradientMaterial.prototype, "offset", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GradientMaterial.prototype, "smoothness", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GradientMaterial.prototype, "disableLighting", void 0);
         return GradientMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], GradientMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], GradientMaterial.prototype, "maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], GradientMaterial.prototype, "topColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GradientMaterial.prototype, "topColorAlpha", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], GradientMaterial.prototype, "bottomColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GradientMaterial.prototype, "bottomColorAlpha", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GradientMaterial.prototype, "offset", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GradientMaterial.prototype, "smoothness", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GradientMaterial.prototype, "disableLighting", void 0);
     BABYLON.GradientMaterial = GradientMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


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

@@ -172,32 +172,32 @@ var BABYLON;
         GridMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new GridMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], GridMaterial.prototype, "mainColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], GridMaterial.prototype, "lineColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GridMaterial.prototype, "gridRatio", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], GridMaterial.prototype, "gridOffset", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GridMaterial.prototype, "majorUnitFrequency", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GridMaterial.prototype, "minorUnitVisibility", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GridMaterial.prototype, "opacity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], GridMaterial.prototype, "preMultiplyAlpha", void 0);
         return GridMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], GridMaterial.prototype, "mainColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], GridMaterial.prototype, "lineColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GridMaterial.prototype, "gridRatio", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], GridMaterial.prototype, "gridOffset", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GridMaterial.prototype, "majorUnitFrequency", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GridMaterial.prototype, "minorUnitVisibility", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GridMaterial.prototype, "opacity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], GridMaterial.prototype, "preMultiplyAlpha", void 0);
     BABYLON.GridMaterial = GridMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.min.js


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

@@ -312,47 +312,47 @@ var BABYLON;
         LavaMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new LavaMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], LavaMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], LavaMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LavaMaterial.prototype, "noiseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LavaMaterial.prototype, "fogColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LavaMaterial.prototype, "speed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LavaMaterial.prototype, "movingSpeed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LavaMaterial.prototype, "lowFrequencySpeed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LavaMaterial.prototype, "fogDensity", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LavaMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], LavaMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], LavaMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], LavaMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], LavaMaterial.prototype, "maxSimultaneousLights", void 0);
         return LavaMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], LavaMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], LavaMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LavaMaterial.prototype, "noiseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LavaMaterial.prototype, "fogColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LavaMaterial.prototype, "speed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LavaMaterial.prototype, "movingSpeed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LavaMaterial.prototype, "lowFrequencySpeed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LavaMaterial.prototype, "fogDensity", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LavaMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], LavaMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], LavaMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], LavaMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], LavaMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.LavaMaterial = LavaMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 220 - 220
dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js

@@ -1284,228 +1284,228 @@ var BABYLON;
         LegacyPBRMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new LegacyPBRMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        LegacyPBRMaterial._scaledAlbedo = new BABYLON.Color3();
+        LegacyPBRMaterial._scaledReflectivity = new BABYLON.Color3();
+        LegacyPBRMaterial._scaledEmissive = new BABYLON.Color3();
+        LegacyPBRMaterial._scaledReflection = new BABYLON.Color3();
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "directIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "emissiveIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "environmentIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "specularIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "disableBumpMap", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedShadowIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedShadeIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "cameraExposure", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "cameraContrast", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "cameraColorGradingTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColorCurves()
+        ], LegacyPBRMaterial.prototype, "cameraColorCurves", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LegacyPBRMaterial.prototype, "overloadedAmbient", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedAmbientIntensity", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LegacyPBRMaterial.prototype, "overloadedAlbedo", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedAlbedoIntensity", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LegacyPBRMaterial.prototype, "overloadedReflectivity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedReflectivityIntensity", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LegacyPBRMaterial.prototype, "overloadedEmissive", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedEmissiveIntensity", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], LegacyPBRMaterial.prototype, "overloadedReflection", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedReflectionIntensity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedMicroSurface", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "overloadedMicroSurfaceIntensity", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "albedoTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "ambientTexture", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "ambientTextureStrength", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "opacityTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "reflectionTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "emissiveTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "reflectivityTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "metallicTexture", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "metallic", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "roughness", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "microSurfaceTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "bumpTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "lightmapTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], LegacyPBRMaterial.prototype, "refractionTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("ambient")
+        ], LegacyPBRMaterial.prototype, "ambientColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("albedo")
+        ], LegacyPBRMaterial.prototype, "albedoColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("reflectivity")
+        ], LegacyPBRMaterial.prototype, "reflectivityColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("reflection")
+        ], LegacyPBRMaterial.prototype, "reflectionColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("emissive")
+        ], LegacyPBRMaterial.prototype, "emissiveColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "microSurface", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "indexOfRefraction", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "invertRefractionY", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters()
+        ], LegacyPBRMaterial.prototype, "opacityFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serializeAsFresnelParameters()
+        ], LegacyPBRMaterial.prototype, "emissiveFresnelParameters", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "linkRefractionWithTransparency", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "linkEmissiveWithAlbedo", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useLightmapAsShadowmap", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useEmissiveAsIllumination", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useAlphaFromAlbedoTexture", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useSpecularOverAlpha", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useMicroSurfaceFromReflectivityMapAlpha", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useRoughnessFromMetallicTextureAlpha", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useRoughnessFromMetallicTextureGreen", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useMetallnessFromMetallicTextureBlue", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useAmbientOcclusionFromMetallicTextureRed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useAmbientInGrayScale", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useAutoMicroSurfaceFromReflectivityMap", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useScalarInLinearSpace", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "usePhysicalLightFalloff", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useRadianceOverAlpha", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useParallax", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useParallaxOcclusion", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "parallaxScaleBias", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "invertNormalMapX", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "invertNormalMapY", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "twoSidedLighting", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], LegacyPBRMaterial.prototype, "useLogarithmicDepth", null);
         return LegacyPBRMaterial;
     }(BABYLON.Material));
-    LegacyPBRMaterial._scaledAlbedo = new BABYLON.Color3();
-    LegacyPBRMaterial._scaledReflectivity = new BABYLON.Color3();
-    LegacyPBRMaterial._scaledEmissive = new BABYLON.Color3();
-    LegacyPBRMaterial._scaledReflection = new BABYLON.Color3();
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "directIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "emissiveIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "environmentIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "specularIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "disableBumpMap", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedShadowIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedShadeIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "cameraExposure", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "cameraContrast", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "cameraColorGradingTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColorCurves()
-    ], LegacyPBRMaterial.prototype, "cameraColorCurves", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LegacyPBRMaterial.prototype, "overloadedAmbient", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedAmbientIntensity", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LegacyPBRMaterial.prototype, "overloadedAlbedo", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedAlbedoIntensity", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LegacyPBRMaterial.prototype, "overloadedReflectivity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedReflectivityIntensity", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LegacyPBRMaterial.prototype, "overloadedEmissive", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedEmissiveIntensity", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], LegacyPBRMaterial.prototype, "overloadedReflection", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedReflectionIntensity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedMicroSurface", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "overloadedMicroSurfaceIntensity", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "albedoTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "ambientTexture", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "ambientTextureStrength", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "opacityTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "reflectionTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "emissiveTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "reflectivityTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "metallicTexture", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "metallic", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "roughness", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "microSurfaceTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "bumpTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "lightmapTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], LegacyPBRMaterial.prototype, "refractionTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("ambient")
-    ], LegacyPBRMaterial.prototype, "ambientColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("albedo")
-    ], LegacyPBRMaterial.prototype, "albedoColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("reflectivity")
-    ], LegacyPBRMaterial.prototype, "reflectivityColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("reflection")
-    ], LegacyPBRMaterial.prototype, "reflectionColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("emissive")
-    ], LegacyPBRMaterial.prototype, "emissiveColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "microSurface", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "indexOfRefraction", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "invertRefractionY", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters()
-    ], LegacyPBRMaterial.prototype, "opacityFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serializeAsFresnelParameters()
-    ], LegacyPBRMaterial.prototype, "emissiveFresnelParameters", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "linkRefractionWithTransparency", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "linkEmissiveWithAlbedo", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useLightmapAsShadowmap", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useEmissiveAsIllumination", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useAlphaFromAlbedoTexture", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useSpecularOverAlpha", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useMicroSurfaceFromReflectivityMapAlpha", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useRoughnessFromMetallicTextureAlpha", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useRoughnessFromMetallicTextureGreen", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useMetallnessFromMetallicTextureBlue", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useAmbientOcclusionFromMetallicTextureRed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useAmbientInGrayScale", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useAutoMicroSurfaceFromReflectivityMap", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useScalarInLinearSpace", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "usePhysicalLightFalloff", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useRadianceOverAlpha", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useParallax", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useParallaxOcclusion", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "parallaxScaleBias", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "invertNormalMapX", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "invertNormalMapY", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "twoSidedLighting", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], LegacyPBRMaterial.prototype, "useLogarithmicDepth", null);
     BABYLON.LegacyPBRMaterial = LegacyPBRMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.min.js


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

@@ -285,29 +285,29 @@ var BABYLON;
         NormalMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new NormalMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], NormalMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], NormalMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], NormalMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], NormalMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], NormalMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], NormalMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], NormalMaterial.prototype, "maxSimultaneousLights", void 0);
         return NormalMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], NormalMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], NormalMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], NormalMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], NormalMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], NormalMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], NormalMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], NormalMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.NormalMaterial = NormalMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


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

@@ -206,11 +206,11 @@ var BABYLON;
         ShadowOnlyMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new ShadowOnlyMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serialize()
+        ], ShadowOnlyMaterial.prototype, "_worldViewProjectionMatrix", void 0);
         return ShadowOnlyMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serialize()
-    ], ShadowOnlyMaterial.prototype, "_worldViewProjectionMatrix", void 0);
     BABYLON.ShadowOnlyMaterial = ShadowOnlyMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


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

@@ -252,29 +252,29 @@ var BABYLON;
         SimpleMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new SimpleMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture")
+        ], SimpleMaterial.prototype, "_diffuseTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], SimpleMaterial.prototype, "diffuseTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3("diffuseColor")
+        ], SimpleMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], SimpleMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], SimpleMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], SimpleMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0);
         return SimpleMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture")
-    ], SimpleMaterial.prototype, "_diffuseTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], SimpleMaterial.prototype, "diffuseTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3("diffuseColor")
-    ], SimpleMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], SimpleMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], SimpleMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], SimpleMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.SimpleMaterial = SimpleMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


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

@@ -185,38 +185,38 @@ var BABYLON;
         SkyMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new SkyMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "luminance", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "turbidity", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "rayleigh", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "mieCoefficient", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "mieDirectionalG", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "distance", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "inclination", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "azimuth", void 0);
+        __decorate([
+            BABYLON.serializeAsVector3()
+        ], SkyMaterial.prototype, "sunPosition", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], SkyMaterial.prototype, "useSunPosition", void 0);
         return SkyMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "luminance", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "turbidity", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "rayleigh", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "mieCoefficient", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "mieDirectionalG", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "distance", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "inclination", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "azimuth", void 0);
-    __decorate([
-        BABYLON.serializeAsVector3()
-    ], SkyMaterial.prototype, "sunPosition", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], SkyMaterial.prototype, "useSunPosition", void 0);
     BABYLON.SkyMaterial = SkyMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


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

@@ -324,71 +324,71 @@ var BABYLON;
         TerrainMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new TerrainMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture("mixTexture")
+        ], TerrainMaterial.prototype, "_mixTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "mixTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture1")
+        ], TerrainMaterial.prototype, "_diffuseTexture1", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "diffuseTexture1", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture2")
+        ], TerrainMaterial.prototype, "_diffuseTexture2", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "diffuseTexture2", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexture3")
+        ], TerrainMaterial.prototype, "_diffuseTexture3", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "diffuseTexture3", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("bumpTexture1")
+        ], TerrainMaterial.prototype, "_bumpTexture1", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "bumpTexture1", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("bumpTexture2")
+        ], TerrainMaterial.prototype, "_bumpTexture2", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "bumpTexture2", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("bumpTexture3")
+        ], TerrainMaterial.prototype, "_bumpTexture3", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TerrainMaterial.prototype, "bumpTexture3", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], TerrainMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], TerrainMaterial.prototype, "specularColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], TerrainMaterial.prototype, "specularPower", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], TerrainMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], TerrainMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], TerrainMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0);
         return TerrainMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("mixTexture")
-    ], TerrainMaterial.prototype, "_mixTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "mixTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture1")
-    ], TerrainMaterial.prototype, "_diffuseTexture1", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "diffuseTexture1", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture2")
-    ], TerrainMaterial.prototype, "_diffuseTexture2", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "diffuseTexture2", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexture3")
-    ], TerrainMaterial.prototype, "_diffuseTexture3", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "diffuseTexture3", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("bumpTexture1")
-    ], TerrainMaterial.prototype, "_bumpTexture1", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "bumpTexture1", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("bumpTexture2")
-    ], TerrainMaterial.prototype, "_bumpTexture2", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "bumpTexture2", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("bumpTexture3")
-    ], TerrainMaterial.prototype, "_bumpTexture3", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TerrainMaterial.prototype, "bumpTexture3", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], TerrainMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], TerrainMaterial.prototype, "specularColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], TerrainMaterial.prototype, "specularPower", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], TerrainMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], TerrainMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], TerrainMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.TerrainMaterial = TerrainMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


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

@@ -319,71 +319,71 @@ var BABYLON;
         TriPlanarMaterial.Parse = function (source, scene, rootUrl) {
             return BABYLON.SerializationHelper.Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl);
         };
+        __decorate([
+            BABYLON.serializeAsTexture()
+        ], TriPlanarMaterial.prototype, "mixTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTextureX")
+        ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTexturY")
+        ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("diffuseTextureZ")
+        ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("normalTextureX")
+        ], TriPlanarMaterial.prototype, "_normalTextureX", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("normalTextureY")
+        ], TriPlanarMaterial.prototype, "_normalTextureY", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
+        __decorate([
+            BABYLON.serializeAsTexture("normalTextureZ")
+        ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], TriPlanarMaterial.prototype, "tileSize", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], TriPlanarMaterial.prototype, "specularColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], TriPlanarMaterial.prototype, "specularPower", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], TriPlanarMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], TriPlanarMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
         return TriPlanarMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture()
-    ], TriPlanarMaterial.prototype, "mixTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTextureX")
-    ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTexturY")
-    ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("diffuseTextureZ")
-    ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("normalTextureX")
-    ], TriPlanarMaterial.prototype, "_normalTextureX", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("normalTextureY")
-    ], TriPlanarMaterial.prototype, "_normalTextureY", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
-    __decorate([
-        BABYLON.serializeAsTexture("normalTextureZ")
-    ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], TriPlanarMaterial.prototype, "tileSize", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], TriPlanarMaterial.prototype, "specularColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], TriPlanarMaterial.prototype, "specularPower", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], TriPlanarMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], TriPlanarMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
     BABYLON.TriPlanarMaterial = TriPlanarMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


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

@@ -516,86 +516,86 @@ var BABYLON;
             var mesh = BABYLON.Mesh.CreateGround(name, 512, 512, 32, scene, false);
             return mesh;
         };
+        __decorate([
+            BABYLON.serializeAsTexture("bumpTexture")
+        ], WaterMaterial.prototype, "_bumpTexture", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
+        ], WaterMaterial.prototype, "bumpTexture", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], WaterMaterial.prototype, "diffuseColor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], WaterMaterial.prototype, "specularColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "specularPower", void 0);
+        __decorate([
+            BABYLON.serialize("disableLighting")
+        ], WaterMaterial.prototype, "_disableLighting", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], WaterMaterial.prototype, "disableLighting", void 0);
+        __decorate([
+            BABYLON.serialize("maxSimultaneousLights")
+        ], WaterMaterial.prototype, "_maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
+        ], WaterMaterial.prototype, "maxSimultaneousLights", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "windForce", void 0);
+        __decorate([
+            BABYLON.serializeAsVector2()
+        ], WaterMaterial.prototype, "windDirection", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "waveHeight", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "bumpHeight", void 0);
+        __decorate([
+            BABYLON.serialize("bumpSuperimpose")
+        ], WaterMaterial.prototype, "_bumpSuperimpose", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
+        ], WaterMaterial.prototype, "bumpSuperimpose", void 0);
+        __decorate([
+            BABYLON.serialize("fresnelSeparate")
+        ], WaterMaterial.prototype, "_fresnelSeparate", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
+        ], WaterMaterial.prototype, "fresnelSeparate", void 0);
+        __decorate([
+            BABYLON.serialize("bumpAffectsReflection")
+        ], WaterMaterial.prototype, "_bumpAffectsReflection", void 0);
+        __decorate([
+            BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
+        ], WaterMaterial.prototype, "bumpAffectsReflection", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], WaterMaterial.prototype, "waterColor", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "colorBlendFactor", void 0);
+        __decorate([
+            BABYLON.serializeAsColor3()
+        ], WaterMaterial.prototype, "waterColor2", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "colorBlendFactor2", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "waveLength", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "waveSpeed", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], WaterMaterial.prototype, "useLogarithmicDepth", null);
         return WaterMaterial;
     }(BABYLON.PushMaterial));
-    __decorate([
-        BABYLON.serializeAsTexture("bumpTexture")
-    ], WaterMaterial.prototype, "_bumpTexture", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsTexturesDirty")
-    ], WaterMaterial.prototype, "bumpTexture", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], WaterMaterial.prototype, "diffuseColor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], WaterMaterial.prototype, "specularColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "specularPower", void 0);
-    __decorate([
-        BABYLON.serialize("disableLighting")
-    ], WaterMaterial.prototype, "_disableLighting", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], WaterMaterial.prototype, "disableLighting", void 0);
-    __decorate([
-        BABYLON.serialize("maxSimultaneousLights")
-    ], WaterMaterial.prototype, "_maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsLightsDirty")
-    ], WaterMaterial.prototype, "maxSimultaneousLights", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "windForce", void 0);
-    __decorate([
-        BABYLON.serializeAsVector2()
-    ], WaterMaterial.prototype, "windDirection", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "waveHeight", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "bumpHeight", void 0);
-    __decorate([
-        BABYLON.serialize("bumpSuperimpose")
-    ], WaterMaterial.prototype, "_bumpSuperimpose", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
-    ], WaterMaterial.prototype, "bumpSuperimpose", void 0);
-    __decorate([
-        BABYLON.serialize("fresnelSeparate")
-    ], WaterMaterial.prototype, "_fresnelSeparate", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
-    ], WaterMaterial.prototype, "fresnelSeparate", void 0);
-    __decorate([
-        BABYLON.serialize("bumpAffectsReflection")
-    ], WaterMaterial.prototype, "_bumpAffectsReflection", void 0);
-    __decorate([
-        BABYLON.expandToProperty("_markAllSubMeshesAsMiscDirty")
-    ], WaterMaterial.prototype, "bumpAffectsReflection", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], WaterMaterial.prototype, "waterColor", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "colorBlendFactor", void 0);
-    __decorate([
-        BABYLON.serializeAsColor3()
-    ], WaterMaterial.prototype, "waterColor2", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "colorBlendFactor2", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "waveLength", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "waveSpeed", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], WaterMaterial.prototype, "useLogarithmicDepth", null);
     BABYLON.WaterMaterial = WaterMaterial;
 })(BABYLON || (BABYLON = {}));
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 917 - 917
dist/preview release/materialsLibrary/babylonjs.materials.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 8 - 8
dist/preview release/materialsLibrary/babylonjs.materials.min.js


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

@@ -145,14 +145,14 @@ var BABYLON;
             var texture = BABYLON.SerializationHelper.Parse(function () { return new AsciiArtFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
             return texture;
         };
+        __decorate([
+            BABYLON.serialize("font")
+        ], AsciiArtFontTexture.prototype, "_font", void 0);
+        __decorate([
+            BABYLON.serialize("text")
+        ], AsciiArtFontTexture.prototype, "_text", void 0);
         return AsciiArtFontTexture;
     }(BABYLON.BaseTexture));
-    __decorate([
-        BABYLON.serialize("font")
-    ], AsciiArtFontTexture.prototype, "_font", void 0);
-    __decorate([
-        BABYLON.serialize("text")
-    ], AsciiArtFontTexture.prototype, "_text", void 0);
     BABYLON.AsciiArtFontTexture = AsciiArtFontTexture;
     /**
      * AsciiArtPostProcess helps rendering everithing in Ascii Art.

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


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

@@ -145,14 +145,14 @@ var BABYLON;
             var texture = BABYLON.SerializationHelper.Parse(function () { return new DigitalRainFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
             return texture;
         };
+        __decorate([
+            BABYLON.serialize("font")
+        ], DigitalRainFontTexture.prototype, "_font", void 0);
+        __decorate([
+            BABYLON.serialize("text")
+        ], DigitalRainFontTexture.prototype, "_text", void 0);
         return DigitalRainFontTexture;
     }(BABYLON.BaseTexture));
-    __decorate([
-        BABYLON.serialize("font")
-    ], DigitalRainFontTexture.prototype, "_font", void 0);
-    __decorate([
-        BABYLON.serialize("text")
-    ], DigitalRainFontTexture.prototype, "_text", void 0);
     BABYLON.DigitalRainFontTexture = DigitalRainFontTexture;
     /**
      * DigitalRainPostProcess helps rendering everithing in digital rain.

+ 0 - 0
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.