瀏覽代碼

Merge branch 'master' into viewr-0.1

Raanan Weber 7 年之前
父節點
當前提交
795ff9508e
共有 100 個文件被更改,包括 23164 次插入24868 次删除
  1. 2 0
      Playground/zipContent/index.html
  2. 0 6
      Tools/ConvertToBinary/App.config
  3. 0 67
      Tools/ConvertToBinary/ConvertToBinary.csproj
  4. 0 447
      Tools/ConvertToBinary/Program.cs
  5. 0 36
      Tools/ConvertToBinary/Properties/AssemblyInfo.cs
  6. 1 22
      Tools/Gulp/config.json
  7. 0 9
      Tools/Gulp/gulpfile.js
  8. 0 1
      Tools/Gulp/package.json
  9. 0 6
      Tools/MakeIncremental/App.config
  10. 0 105
      Tools/MakeIncremental/MakeIncremental.csproj
  11. 0 282
      Tools/MakeIncremental/Program.cs
  12. 0 36
      Tools/MakeIncremental/Properties/AssemblyInfo.cs
  13. 二進制
      assets/meshes/controllers/microsoft/045E-065D/left.glb
  14. 二進制
      assets/meshes/controllers/microsoft/045E-065D/right.glb
  15. 966 1170
      dist/preview release/babylon.d.ts
  16. 44 44
      dist/preview release/babylon.js
  17. 1833 1712
      dist/preview release/babylon.max.js
  18. 966 1170
      dist/preview release/babylon.module.d.ts
  19. 46 46
      dist/preview release/babylon.worker.js
  20. 8452 8657
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  21. 47 47
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  22. 1610 1627
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  23. 8452 8657
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts
  24. 27 27
      dist/preview release/gui/babylon.gui.js
  25. 3 3
      dist/preview release/gui/babylon.gui.min.js
  26. 1 1
      dist/preview release/gui/package.json
  27. 263 264
      dist/preview release/inspector/babylon.inspector.bundle.js
  28. 0 3
      dist/preview release/inspector/babylon.inspector.d.ts
  29. 55 64
      dist/preview release/inspector/babylon.inspector.js
  30. 3 4
      dist/preview release/inspector/babylon.inspector.min.js
  31. 9 9
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  32. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  33. 13 12
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  34. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  35. 20 19
      dist/preview release/loaders/babylon.glTFFileLoader.js
  36. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  37. 2 2
      dist/preview release/loaders/babylon.objFileLoader.js
  38. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  39. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.js
  40. 23 22
      dist/preview release/loaders/babylonjs.loaders.js
  41. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  42. 1 1
      dist/preview release/loaders/package.json
  43. 2 2
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  44. 7 7
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  46. 2 2
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  47. 2 2
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  48. 2 2
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  49. 2 2
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  50. 2 2
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  51. 2 2
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js
  52. 2 2
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  53. 2 2
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  54. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  55. 2 2
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  56. 2 2
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  57. 2 2
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  58. 2 2
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  59. 2 2
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  60. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  61. 35 35
      dist/preview release/materialsLibrary/babylonjs.materials.js
  62. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  63. 1 1
      dist/preview release/materialsLibrary/package.json
  64. 2 2
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  65. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  66. 2 2
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  67. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  68. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  69. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  70. 1 1
      dist/preview release/postProcessesLibrary/package.json
  71. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js
  72. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js
  73. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js
  74. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js
  75. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js
  76. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.js
  77. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js
  78. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js
  79. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js
  80. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js
  81. 10 10
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js
  82. 1 1
      dist/preview release/proceduralTexturesLibrary/package.json
  83. 1 1
      dist/preview release/serializers/babylon.objSerializer.js
  84. 1 1
      dist/preview release/serializers/babylonjs.serializers.js
  85. 2 1
      dist/preview release/what's new.md
  86. 0 3
      inspector/src/properties.ts
  87. 1 8
      inspector/src/tabs/TextureTab.ts
  88. 4 0
      loaders/src/glTF/1.0/babylon.glTFLoader.ts
  89. 6 2
      loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
  90. 77 74
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  91. 18 16
      loaders/src/glTF/babylon.glTFFileLoader.ts
  92. 1 1
      package.json
  93. 3 3
      src/Actions/babylon.action.ts
  94. 22 20
      src/Actions/babylon.actionManager.ts
  95. 8 5
      src/Animations/babylon.animatable.ts
  96. 41 20
      src/Animations/babylon.animation.ts
  97. 1 1
      src/Animations/babylon.runtimeAnimation.ts
  98. 9 7
      src/Audio/babylon.analyser.ts
  99. 8 5
      src/Audio/babylon.audioEngine.ts
  100. 0 0
      src/Audio/babylon.sound.ts

+ 2 - 0
Playground/zipContent/index.html

@@ -6,9 +6,11 @@
         <title>Babylon.js sample code</title>
         <!-- Babylon.js -->
         <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script>
+        <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script>
         <script src="https://preview.babylonjs.com/cannon.js"></script>
         <script src="https://preview.babylonjs.com/oimo.js"></script>
         <script src="https://preview.babylonjs.com/babylon.js"></script>
+        
         <style>
             html, body {
                 overflow: hidden;

+ 0 - 6
Tools/ConvertToBinary/App.config

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-    </startup>
-</configuration>

+ 0 - 67
Tools/ConvertToBinary/ConvertToBinary.csproj

@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{6A8A02E3-324F-4807-8AF9-AAD3CAF86376}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>ConvertToBinary</RootNamespace>
-    <AssemblyName>ConvertToBinary</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <SccProjectName>SAK</SccProjectName>
-    <SccLocalPath>SAK</SccLocalPath>
-    <SccAuxPath>SAK</SccAuxPath>
-    <SccProvider>SAK</SccProvider>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 447
Tools/ConvertToBinary/Program.cs

@@ -1,447 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Web;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System.Collections.Generic;
-using System.Net;
-
-namespace ConvertToBinary
-{
-    public enum DataType { Int32, Float };
-
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            if (args.Length < 1)
-            {
-                DisplayUsage();
-                return;
-            }
-
-            // Parsing arguments
-            string srcFilename = "";
-            string dstPath = "";
-
-            foreach (var arg in args)
-            {
-                var order = arg.Substring(0, 3);
-
-                switch (order)
-                {
-                    case "/i:":
-                        srcFilename = arg.Substring(3);
-                        break;
-                    case "/o:":
-                        dstPath = arg.Substring(3);
-                        break;
-                    default:
-                        DisplayUsage();
-                        return;
-                }
-            }
-
-            if (string.IsNullOrEmpty(srcFilename) || string.IsNullOrEmpty(dstPath))
-            {
-                DisplayUsage();
-                return;
-            }
-
-            ProcessSourceFile(srcFilename, dstPath);
-        }
-
-        static void ProcessSourceFile(string srcFilename, string dstPath)
-        {
-            try
-            {
-                if (!Directory.Exists(dstPath))
-                    Directory.CreateDirectory(dstPath);
-
-                string srcPath = Path.GetDirectoryName(srcFilename);
-                string dstFilename = Path.Combine(dstPath, Path.GetFileNameWithoutExtension(srcFilename) + ".binary.babylon");
-
-                dynamic scene;
-
-                // Loading
-                Console.ForegroundColor = ConsoleColor.Green;
-                Console.WriteLine("Loading " + srcFilename);
-                Console.WriteLine();
-                Console.ResetColor();
-
-                using (var streamReader = new StreamReader(srcFilename))
-                {
-                    using (var reader = new JsonTextReader(streamReader))
-                    {
-                        scene = JObject.Load(reader);
-                    }
-                }
-
-                // Marking scene
-                string objName = scene.name;
-
-                if(string.IsNullOrEmpty(objName))
-                    objName = Path.GetFileNameWithoutExtension(srcFilename);
-
-                int atDot = objName.IndexOf(".incremental");
-                if(atDot > 0)
-                    objName = objName.Substring(0, atDot);
-
-                scene["autoClear"] = true;
-                scene["useDelayedTextureLoading"] = true;
-
-                var doNotDelayLoadingForGeometries = new List<string>();
-
-                // Parsing meshes
-                bool isMesh = true;
-                var meshes = (JArray)scene.meshes;
-                foreach (dynamic mesh in meshes)
-                {
-                    if (mesh.checkCollisions.Value) // Do not delay load collisions object
-                    {
-                        if (mesh.geometryId != null)
-                            doNotDelayLoadingForGeometries.Add(mesh.geometryId.Value);
-                        continue;
-                    }
-
-                    isMesh = true;
-
-                    Extract(srcPath, dstPath, objName, mesh, isMesh);
-                }
-
-
-                // Parsing vertexData
-                var geometries = scene.geometries;
-                if (geometries != null)
-                {
-                    var vertexData = (JArray)geometries.vertexData;
-                    foreach (dynamic geometry in vertexData)
-                    {
-                        var id = geometry.id.Value;
-
-                        if (doNotDelayLoadingForGeometries.Any(g => g == id))
-                            continue;
-
-                        isMesh = false;
-
-                        Extract(srcPath, dstPath, objName, geometry, isMesh);
-                    }
-                }
-
-                // Saving
-                Console.ForegroundColor = ConsoleColor.Green;
-                Console.WriteLine("Saving " + dstFilename);
-                string json = scene.ToString(Formatting.Indented);
-
-                using (var writer = new StreamWriter(WebUtility.UrlDecode(dstFilename)))
-                {
-                    writer.Write(json);
-                }
-
-                Console.WriteLine();
-                Console.ResetColor();
-            }
-            catch (Exception ex)
-            {
-                Console.ForegroundColor = ConsoleColor.Red;
-                Console.WriteLine("Fatal error encountered:");
-                Console.WriteLine(ex.Message);
-                Console.ResetColor();
-            }
-        }
-
-        
-        static void Extract(string srcPath, string dstPath, string objName, dynamic meshObj, bool isMesh)
-        {
-            try
-            {
-                string dstFilename = meshObj.delayLoadingFile;
-                string dstExt = (isMesh ? ".babylonbinarymeshdata" : ".babylonbinarygeometrydata");
-                
-                if(!string.IsNullOrEmpty(dstFilename))
-                {
-                    string filename = WebUtility.UrlDecode(Path.Combine(srcPath, (string)meshObj.delayLoadingFile));
-
-                    using (var streamReader = new StreamReader(filename))
-                    {
-                        using (var reader = new JsonTextReader(streamReader))
-                        {
-                            var meshData = JObject.Load(reader);
-                            meshObj.positions = meshData["positions"];
-                            meshObj.normals = meshData["normals"];
-                            meshObj.indices = meshData["indices"];
-                            meshObj.uvs = meshData["uvs"];
-                            meshObj.uvs2 = meshData["uvs2"];
-                            meshObj.colors = meshData["colors"];
-                            meshObj.matricesIndices = meshData["matricesIndices"];
-                            meshObj.matricesWeights = meshData["matricesWeights"];
-                            meshObj.subMeshes = meshData["subMeshes"];
-                        }
-                    }
-                }
-
-                if (meshObj.positions == null || meshObj.normals == null || meshObj.indices == null)
-                    return;
-
-                Console.WriteLine("Extracting " + (isMesh ? meshObj.name : meshObj.id));
-
-                ComputeBoundingBox(meshObj);
-
-                string meshName = meshObj.name.ToString();
-                meshName = meshName.Trim();
-                if (meshName.Length > 40)
-                    meshName = meshName.Substring(0, 40);
-
-                if (isMesh && !string.IsNullOrEmpty(meshName))
-                    dstFilename = objName + "." + meshName + "." + meshObj.id.ToString() + dstExt;
-                else
-                    dstFilename = objName + meshObj.id.ToString() + dstExt;
-
-                dstFilename = dstFilename.Replace("+", "_").Replace(" ", "_").Replace("/", "_").Replace("\\", "_");
-
-                meshObj.delayLoadingFile = WebUtility.UrlEncode(dstFilename);
-                Console.WriteLine("Creating delayLoadingFile: " + meshObj.delayLoadingFile);
-
-
-                var binaryInfo = new JObject();
-
-                using (var stream = File.Open(WebUtility.UrlDecode(Path.Combine(dstPath, dstFilename)), FileMode.Create))
-                {
-                    BinaryWriter writer = new BinaryWriter(stream);
-
-                    if (meshObj.positions != null && meshObj.positions.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.positions.Count;
-                        attrData["stride"] = 3;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["positionsAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.positions.Count; x++)
-                            writer.Write((float)meshObj.positions[x]);
-
-                        meshObj.positions = null;
-                    }
-
-
-                    if (meshObj.colors != null && meshObj.colors.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.colors.Count;
-                        attrData["stride"] = 3;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["colorsAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.colors.Count; x++)
-                            writer.Write((float)meshObj.colors[x]);
-
-                        meshObj["hasColors"] = true;
-                        meshObj.colors = null;
-                    }
-
-
-                    if (meshObj.normals != null && meshObj.normals.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.normals.Count;
-                        attrData["stride"] = 3;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["normalsAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.normals.Count; x++)
-                            writer.Write((float)meshObj.normals[x]);
-
-                        meshObj.normals = null;
-                    }
-
-
-                    if (meshObj.uvs != null && meshObj.uvs.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.uvs.Count;
-                        attrData["stride"] = 2;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["uvsAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.uvs.Count; x++)
-                            writer.Write((float)meshObj.uvs[x]);
-
-                        meshObj["hasUVs"] = true;
-                        meshObj.uvs = null;
-                    }
-
-
-                    if (meshObj.uvs2 != null && meshObj.uvs2.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.uvs2.Count;
-                        attrData["stride"] = 2;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["uvs2AttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.uvs2.Count; x++)
-                            writer.Write((float)meshObj.uvs2[x]);
-
-                        meshObj["hasUVs2"] = true;
-                        meshObj.uvs2 = null;
-                    }
-
-
-                    if (meshObj.indices != null && meshObj.indices.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.indices.Count;
-                        attrData["stride"] = 1;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Int32;
-
-                        binaryInfo["indicesAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.indices.Count; x++)
-                            writer.Write((int)meshObj.indices[x]);
-
-                        meshObj.indices = null;
-                    }
-
-
-                    if (meshObj.matricesIndices != null && meshObj.matricesIndices.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.matricesIndices.Count;
-                        attrData["stride"] = 1;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Int32;
-
-                        binaryInfo["matricesIndicesAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.matricesIndices.Count; x++)
-                            writer.Write((int)meshObj.matricesIndices[x]);
-
-                        meshObj["hasMatricesIndices"] = true;
-                        meshObj.matricesIndices = null;
-                    }
-
-
-                    if (meshObj.matricesWeights != null && meshObj.matricesWeights.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.matricesWeights.Count;
-                        attrData["stride"] = 2;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Float;
-
-                        binaryInfo["matricesWeightsAttrDesc"] = attrData;
-
-                        for (int x = 0; x < meshObj.matricesWeights.Count; x++)
-                            writer.Write((float)meshObj.matricesWeights[x]);
-
-                        meshObj["hasMatricesWeights"] = true;
-                        meshObj.matricesWeights = null;
-                    }
-
-
-                    if (isMesh && meshObj.subMeshes != null && meshObj.subMeshes.Count > 0)
-                    {
-                        var attrData = new JObject();
-                        attrData["count"] = meshObj.subMeshes.Count;
-                        attrData["stride"] = 5;
-                        attrData["offset"] = stream.Length;
-                        attrData["dataType"] = (int)DataType.Int32;
-
-                        binaryInfo["subMeshesAttrDesc"] = attrData;
-
-                        int[] smData = new int[5];
-
-                        for (int x = 0; x < meshObj.subMeshes.Count; x++)
-                        {
-                            smData[0] = meshObj.subMeshes[x].materialIndex;
-                            smData[1] = meshObj.subMeshes[x].verticesStart;
-                            smData[2] = meshObj.subMeshes[x].verticesCount;
-                            smData[3] = meshObj.subMeshes[x].indexStart;
-                            smData[4] = meshObj.subMeshes[x].indexCount;
-
-                            for (int y = 0; y < smData.Length; y++)
-                                writer.Write((int)smData[y]);
-                        }
-
-                        meshObj.subMeshes = null;
-                    }
-                }
-
-                meshObj["_binaryInfo"] = binaryInfo;
-            }
-            catch (Exception ex)
-            {
-                Console.ForegroundColor = ConsoleColor.Red;
-                Console.WriteLine();
-                Console.WriteLine(ex.Message);
-                Console.ForegroundColor = ConsoleColor.DarkCyan;
-                Console.WriteLine(ex);
-                Console.ResetColor();
-            }
-        }
-        
-        
-        static void ComputeBoundingBox(dynamic meshOrGeometry)
-        {
-            // Compute bounding boxes
-            var positions = ((JArray)meshOrGeometry.positions).Select(v => v.Value<float>()).ToArray();
-            var minimum = new[] { float.MaxValue, float.MaxValue, float.MaxValue };
-            var maximum = new[] { float.MinValue, float.MinValue, float.MinValue };
-
-            for (var index = 0; index < positions.Length; index += 3)
-            {
-                var x = positions[index];
-                var y = positions[index + 1];
-                var z = positions[index + 2];
-
-                if (x < minimum[0])
-                {
-                    minimum[0] = x;
-                }
-                if (x > maximum[0])
-                {
-                    maximum[0] = x;
-                }
-
-                if (y < minimum[1])
-                {
-                    minimum[1] = y;
-                }
-                if (y > maximum[1])
-                {
-                    maximum[1] = y;
-                }
-
-                if (z < minimum[2])
-                {
-                    minimum[2] = z;
-                }
-                if (z > maximum[2])
-                {
-                    maximum[2] = z;
-                }
-            }
-
-            meshOrGeometry["boundingBoxMinimum"] = new JArray(minimum);
-            meshOrGeometry["boundingBoxMaximum"] = new JArray(maximum);
-        }
-
-
-        static void DisplayUsage()
-        {
-            Console.WriteLine("ConvertToBinary usage: ConvertToBinary.exe /i:\"sourceFilename\" /o:\"dstinationFolder\"");
-        }
-    }
-}

+ 0 - 36
Tools/ConvertToBinary/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ConvertToBinary")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConvertToBinary")]
-[assembly: AssemblyCopyright("Copyright ©  2014")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("4e8c456c-1bd6-43fb-b67b-0dfbee0c468d")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 1 - 22
Tools/Gulp/config.json

@@ -67,8 +67,6 @@
             "optimizations",
             "highlights",
             "assetsManager",
-            "mapTexture",
-            "dynamicFloatArray",
             "serialization",
             "probes",
             "layer",
@@ -143,8 +141,6 @@
             "optimizations",
             "highlights",
             "assetsManager",
-            "mapTexture",
-            "dynamicFloatArray",
             "serialization",
             "probes",
             "layer",
@@ -160,6 +156,7 @@
     "workloads": {
         "core": {
             "files": [
+                "../../src/babylon.types.js",
                 "../../src/Events/babylon.keyboardEvents.js",
                 "../../src/Events/babylon.pointerEvents.js",
                 "../../src/Math/babylon.math.js",
@@ -923,7 +920,6 @@
                 "additionalMeshes",
                 "standardMaterial",
                 "stringDictionary",
-                "dynamicFloatArray",
                 "actions"
             ],
             "shaders": [
@@ -1029,23 +1025,6 @@
                 "core"
             ]
         },
-        "mapTexture": {
-            "files": [
-                "../../src/Materials/Textures/babylon.mapTexture.js",
-                "../../src/Tools/babylon.rectPackingMap.js"
-            ],
-            "dependUpon": [
-                "core"
-            ]
-        },
-        "dynamicFloatArray": {
-            "files": [
-                "../../src/Tools/babylon.dynamicFloatArray.js"
-            ],
-            "dependUpon": [
-                "core"
-            ]
-        },
         "serialization": {
             "files": [
                 "../../src/Tools/babylon.sceneSerializer.js"

+ 0 - 9
Tools/Gulp/gulpfile.js

@@ -21,8 +21,6 @@ var path = require('path');
 var sass = require('gulp-sass');
 var webpack = require('webpack-stream');
 
-var zip = require('gulp-zip');
-
 var config = require("./config.json");
 
 var del = require('del');
@@ -518,13 +516,6 @@ gulp.task('webserver', function () {
 gulp.task('run', ['watch', 'webserver'], function () {
 });
 
-
-gulp.task("zip-blender", function () {
-    return gulp.src('../../Exporters/Blender/src/**')
-        .pipe(zip('Blender2Babylon-5.4.zip'))
-        .pipe(gulp.dest('../../Exporters/Blender'));
-});
-
 gulp.task('clean-JS-MAP', function () {
     return del([
         '../../src/**/*.js.map', '../../src/**/*.js'

+ 0 - 1
Tools/Gulp/package.json

@@ -32,7 +32,6 @@
     "style-loader": "^0.13.1",
     "exports-loader": "^0.6.3",
     "imports-loader": "^0.7.0",
-    "gulp-zip": "~3.2.0",
     "del": "2.2.2"
   },
   "scripts": {

+ 0 - 6
Tools/MakeIncremental/App.config

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-    </startup>
-</configuration>

+ 0 - 105
Tools/MakeIncremental/MakeIncremental.csproj

@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{E0855FC6-7205-4621-A975-7A8F2886B738}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>MakeIncremental</RootNamespace>
-    <AssemblyName>MakeIncremental</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <SccProjectName>SAK</SccProjectName>
-    <SccLocalPath>SAK</SccLocalPath>
-    <SccAuxPath>SAK</SccAuxPath>
-    <SccProvider>SAK</SccProvider>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x64\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>bin\x64\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x86\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>bin\x86\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 282
Tools/MakeIncremental/Program.cs

@@ -1,282 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Web;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System.Collections.Generic;
-
-namespace MakeIncremental
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            if (args.Length < 1)
-            {
-                DisplayUsage();
-                return;
-            }
-
-            // Parsing arguments
-            string input = "";
-            foreach (var arg in args)
-            {
-                var order = arg.Substring(0, 3);
-
-                switch (order)
-                {
-                    case "/i:":
-                        input = arg.Substring(3);
-                        break;
-                    default:
-                        DisplayUsage();
-                        return;
-                }
-            }
-
-            if (string.IsNullOrEmpty(input))
-            {
-                DisplayUsage();
-                return;
-            }
-
-            ProcessSourceFile(input);
-        }
-
-        static void Extract(dynamic meshOrGeometry, string outputDir, string rootFilename, bool mesh = true)
-        {
-            Console.WriteLine("Extracting " + (mesh ? meshOrGeometry.name : meshOrGeometry.id));
-
-            if (meshOrGeometry.positions != null && meshOrGeometry.normals != null && meshOrGeometry.indices != null)
-            {
-                meshOrGeometry.delayLoadingFile = CreateDelayLoadingFile(meshOrGeometry, outputDir, rootFilename, mesh);
-                Console.WriteLine("Delay loading file: " + meshOrGeometry.delayLoadingFile);
-
-                // Compute bounding boxes
-                var positions = ((JArray)meshOrGeometry.positions).Select(v => v.Value<float>()).ToArray();
-                var minimum = new[] { float.MaxValue, float.MaxValue, float.MaxValue };
-                var maximum = new[] { float.MinValue, float.MinValue, float.MinValue };
-
-                for (var index = 0; index < positions.Length; index += 3)
-                {
-                    var x = positions[index];
-                    var y = positions[index + 1];
-                    var z = positions[index + 2];
-
-                    if (x < minimum[0])
-                    {
-                        minimum[0] = x;
-                    }
-                    if (x > maximum[0])
-                    {
-                        maximum[0] = x;
-                    }
-
-                    if (y < minimum[1])
-                    {
-                        minimum[1] = y;
-                    }
-                    if (y > maximum[1])
-                    {
-                        maximum[1] = y;
-                    }
-
-                    if (z < minimum[2])
-                    {
-                        minimum[2] = z;
-                    }
-                    if (z > maximum[2])
-                    {
-                        maximum[2] = z;
-                    }
-                }
-
-                meshOrGeometry["boundingBoxMinimum"] = new JArray(minimum);
-                meshOrGeometry["boundingBoxMaximum"] = new JArray(maximum);
-
-                // Erasing infos
-                meshOrGeometry.positions = null;
-                meshOrGeometry.normals = null;
-                meshOrGeometry.indices = null;
-
-                if (meshOrGeometry.uvs != null)
-                {
-                    meshOrGeometry["hasUVs"] = true;
-                    meshOrGeometry.uvs = null;
-                }
-
-                if (meshOrGeometry.uvs2 != null)
-                {
-                    meshOrGeometry["hasUVs2"] = true;
-                    meshOrGeometry.uvs2 = null;
-                }
-
-                if (meshOrGeometry.colors != null)
-                {
-                    meshOrGeometry["hasColors"] = true;
-                    meshOrGeometry.colors = null;
-                }
-
-                if (meshOrGeometry.matricesIndices != null)
-                {
-                    meshOrGeometry["hasMatricesIndices"] = true;
-                    meshOrGeometry.matricesIndices = null;
-                }
-
-                if (meshOrGeometry.matricesWeights != null)
-                {
-                    meshOrGeometry["hasMatricesWeights"] = true;
-                    meshOrGeometry.matricesWeights = null;
-                }
-
-                if (mesh && meshOrGeometry.subMeshes != null)
-                {
-                    meshOrGeometry.subMeshes = null;
-                }
-            }
-        }
-
-        static string CreateDelayLoadingFile(dynamic meshOrGeometry, string outputDir, string rootFilename, bool mesh = true)
-        {
-            string encodedName;
-            if(mesh)
-                encodedName = meshOrGeometry.name.ToString();
-            else
-                encodedName = meshOrGeometry.id.ToString();
-
-            encodedName = encodedName.Replace("+", "_").Replace(" ", "_");
-            var outputPath = Path.Combine(outputDir, rootFilename + "." + encodedName + (mesh ? ".babylonmeshdata" : ".babylongeometrydata"));
-
-            var result = new JObject();
-            result["positions"] = meshOrGeometry.positions;
-            result["indices"] = meshOrGeometry.indices;
-            result["normals"] = meshOrGeometry.normals;
-
-            if (meshOrGeometry.uvs != null)
-            {
-                result["uvs"] = meshOrGeometry.uvs;
-            }
-
-            if (meshOrGeometry.uvs2 != null)
-            {
-                result["uvs2"] = meshOrGeometry.uvs2;
-            }
-
-            if (meshOrGeometry.colors != null)
-            {
-                result["colors"] = meshOrGeometry.colors;
-            }
-
-            if (meshOrGeometry.matricesIndices != null)
-            {
-                result["matricesIndices"] = meshOrGeometry.matricesIndices;
-            }
-
-            if (meshOrGeometry.matricesWeights != null)
-            {
-                result["matricesWeights"] = meshOrGeometry.matricesWeights;
-            }
-
-            if (mesh && meshOrGeometry.subMeshes != null)
-            {
-                result["subMeshes"] = meshOrGeometry.subMeshes;
-            }
-
-            string json = result.ToString(Formatting.None);
-
-            using (var writer = new StreamWriter(outputPath))
-            {
-                writer.Write(json);
-            }
-
-            return HttpUtility.UrlEncode(Path.GetFileName(outputPath));
-        }
-
-        static void ProcessSourceFile(string input)
-        {
-            try
-            {
-                dynamic scene;
-                var outputDir = Path.GetDirectoryName(input);
-                var rootFilename = Path.GetFileNameWithoutExtension(input);
-
-                // Loading
-                Console.ForegroundColor = ConsoleColor.Green;
-                Console.WriteLine("Loading " + input);
-                Console.WriteLine();
-                Console.ResetColor();
-                using (var streamReader = new StreamReader(input))
-                {
-                    using (var reader = new JsonTextReader(streamReader))
-                    {
-                        scene = JObject.Load(reader);
-                    }
-                }
-
-                // Marking scene
-                scene["autoClear"] = true;
-                scene["useDelayedTextureLoading"] = true;
-
-                var doNotDelayLoadingForGeometries = new List<string>();
-
-                // Parsing meshes
-                var meshes = (JArray)scene.meshes;
-                foreach (dynamic mesh in meshes)
-                {
-                    if (mesh.checkCollisions.Value) // Do not delay load collisions object
-                    {
-                        if (mesh.geometryId != null)
-                            doNotDelayLoadingForGeometries.Add(mesh.geometryId.Value);
-                        continue;
-                    }
-
-                    Extract(mesh, outputDir, rootFilename);
-                }
-
-                // Parsing vertexData
-                var geometries = scene.geometries;
-                if (geometries != null)
-                {
-                    var vertexData = (JArray)geometries.vertexData;
-                    foreach (dynamic geometry in vertexData)
-                    {
-                        var id = geometry.id.Value;
-
-                        if (doNotDelayLoadingForGeometries.Any(g => g == id))
-                            continue;
-
-                        Extract(geometry, outputDir, rootFilename, false);
-                    }
-                }
-
-                // Saving
-                var outputPath = Path.Combine(outputDir, rootFilename + ".incremental.babylon");
-                Console.ForegroundColor = ConsoleColor.Green;
-                Console.WriteLine("Saving " + outputPath);
-                string json = scene.ToString(Formatting.None);
-
-                using (var writer = new StreamWriter(outputPath))
-                {
-                    writer.Write(json);
-                }
-
-                Console.WriteLine();
-                Console.ResetColor();
-
-            }
-            catch (Exception ex)
-            {
-                Console.ForegroundColor = ConsoleColor.Red;
-                Console.WriteLine("Fatal error encountered:");
-                Console.WriteLine(ex.Message);
-                Console.ResetColor();
-            }
-        }
-
-        static void DisplayUsage()
-        {
-            Console.WriteLine("MakeIncremental usage: MakeIncremental.exe /i:\"source file\" [/textures]");
-        }
-    }
-}

+ 0 - 36
Tools/MakeIncremental/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MakeIncremental")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MakeIncremental")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("863a000d-e69f-4e3b-a150-1e75094c9024")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

二進制
assets/meshes/controllers/microsoft/045E-065D/left.glb


二進制
assets/meshes/controllers/microsoft/045E-065D/right.glb


文件差異過大導致無法顯示
+ 966 - 1170
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 44 - 44
dist/preview release/babylon.js


文件差異過大導致無法顯示
+ 1833 - 1712
dist/preview release/babylon.max.js


文件差異過大導致無法顯示
+ 966 - 1170
dist/preview release/babylon.module.d.ts


文件差異過大導致無法顯示
+ 46 - 46
dist/preview release/babylon.worker.js


文件差異過大導致無法顯示
+ 8452 - 8657
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差異過大導致無法顯示
+ 47 - 47
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


文件差異過大導致無法顯示
+ 1610 - 1627
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js


文件差異過大導致無法顯示
+ 8452 - 8657
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


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

@@ -22,7 +22,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var AdvancedDynamicTexture = /** @class */ (function (_super) {
+        var AdvancedDynamicTexture = (function (_super) {
             __extends(AdvancedDynamicTexture, _super);
             function AdvancedDynamicTexture(name, width, height, scene, generateMipMaps, samplingMode) {
                 if (width === void 0) { width = 0; }
@@ -430,7 +430,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Measure = /** @class */ (function () {
+        var Measure = (function () {
             function Measure(left, top, width, height) {
                 this.left = left;
                 this.top = top;
@@ -475,7 +475,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Vector2WithInfo = /** @class */ (function (_super) {
+        var Vector2WithInfo = (function (_super) {
             __extends(Vector2WithInfo, _super);
             function Vector2WithInfo(source, buttonIndex) {
                 if (buttonIndex === void 0) { buttonIndex = 0; }
@@ -486,7 +486,7 @@ var BABYLON;
             return Vector2WithInfo;
         }(BABYLON.Vector2));
         GUI.Vector2WithInfo = Vector2WithInfo;
-        var Matrix2D = /** @class */ (function () {
+        var Matrix2D = (function () {
             function Matrix2D(m00, m01, m10, m11, m20, m21) {
                 this.m = new Float32Array(6);
                 this.fromValues(m00, m01, m10, m11, m20, m21);
@@ -607,7 +607,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var ValueAndUnit = /** @class */ (function () {
+        var ValueAndUnit = (function () {
             function ValueAndUnit(value, unit, negativeValueAllowed) {
                 if (unit === void 0) { unit = ValueAndUnit.UNITMODE_PIXEL; }
                 if (negativeValueAllowed === void 0) { negativeValueAllowed = true; }
@@ -725,7 +725,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Control = /** @class */ (function () {
+        var Control = (function () {
             // Functions
             function Control(name) {
                 this.name = name;
@@ -1771,7 +1771,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Container = /** @class */ (function (_super) {
+        var Container = (function (_super) {
             __extends(Container, _super);
             function Container(name) {
                 var _this = _super.call(this, name) || this;
@@ -1950,7 +1950,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var StackPanel = /** @class */ (function (_super) {
+        var StackPanel = (function (_super) {
             __extends(StackPanel, _super);
             function StackPanel(name) {
                 var _this = _super.call(this, name) || this;
@@ -2092,7 +2092,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Rectangle = /** @class */ (function (_super) {
+        var Rectangle = (function (_super) {
             __extends(Rectangle, _super);
             function Rectangle(name) {
                 var _this = _super.call(this, name) || this;
@@ -2208,7 +2208,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Ellipse = /** @class */ (function (_super) {
+        var Ellipse = (function (_super) {
             __extends(Ellipse, _super);
             function Ellipse(name) {
                 var _this = _super.call(this, name) || this;
@@ -2274,7 +2274,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Line = /** @class */ (function (_super) {
+        var Line = (function (_super) {
             __extends(Line, _super);
             function Line(name) {
                 var _this = _super.call(this, name) || this;
@@ -2474,7 +2474,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Slider = /** @class */ (function (_super) {
+        var Slider = (function (_super) {
             __extends(Slider, _super);
             function Slider(name) {
                 var _this = _super.call(this, name) || this;
@@ -2684,7 +2684,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Checkbox = /** @class */ (function (_super) {
+        var Checkbox = (function (_super) {
             __extends(Checkbox, _super);
             function Checkbox(name) {
                 var _this = _super.call(this, name) || this;
@@ -2800,7 +2800,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var RadioButton = /** @class */ (function (_super) {
+        var RadioButton = (function (_super) {
             __extends(RadioButton, _super);
             function RadioButton(name) {
                 var _this = _super.call(this, name) || this;
@@ -2937,7 +2937,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var TextBlock = /** @class */ (function (_super) {
+        var TextBlock = (function (_super) {
             __extends(TextBlock, _super);
             function TextBlock(name, text) {
                 if (text === void 0) { text = ""; }
@@ -3146,7 +3146,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Image = /** @class */ (function (_super) {
+        var Image = (function (_super) {
             __extends(Image, _super);
             function Image(name, url) {
                 var _this = _super.call(this, name) || this;
@@ -3388,7 +3388,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var Button = /** @class */ (function (_super) {
+        var Button = (function (_super) {
             __extends(Button, _super);
             function Button(name) {
                 var _this = _super.call(this, name) || this;
@@ -3517,7 +3517,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var ColorPicker = /** @class */ (function (_super) {
+        var ColorPicker = (function (_super) {
             __extends(ColorPicker, _super);
             function ColorPicker(name) {
                 var _this = _super.call(this, name) || this;
@@ -3863,7 +3863,7 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var InputText = /** @class */ (function (_super) {
+        var InputText = (function (_super) {
             __extends(InputText, _super);
             function InputText(name, text) {
                 if (text === void 0) { text = ""; }
@@ -4112,12 +4112,12 @@ var BABYLON;
                         return;
                 }
                 // Printable characters
-                if ((keyCode === -1) || // Direct access
-                    (keyCode === 32) || // Space
-                    (keyCode > 47 && keyCode < 58) || // Numbers
-                    (keyCode > 64 && keyCode < 91) || // Letters
-                    (keyCode > 185 && keyCode < 193) || // Special characters
-                    (keyCode > 218 && keyCode < 223) || // Special characters
+                if ((keyCode === -1) ||
+                    (keyCode === 32) ||
+                    (keyCode > 47 && keyCode < 58) ||
+                    (keyCode > 64 && keyCode < 91) ||
+                    (keyCode > 185 && keyCode < 193) ||
+                    (keyCode > 218 && keyCode < 223) ||
                     (keyCode > 95 && keyCode < 112)) {
                     if (this._cursorOffset === 0) {
                         this.text += key;
@@ -4276,13 +4276,13 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var KeyPropertySet = /** @class */ (function () {
+        var KeyPropertySet = (function () {
             function KeyPropertySet() {
             }
             return KeyPropertySet;
         }());
         GUI.KeyPropertySet = KeyPropertySet;
-        var VirtualKeyboard = /** @class */ (function (_super) {
+        var VirtualKeyboard = (function (_super) {
             __extends(VirtualKeyboard, _super);
             function VirtualKeyboard() {
                 var _this = _super !== null && _super.apply(this, arguments) || this;

文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.1.0-alpha3.4",
+    "version": "3.1.0-alpha3.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

文件差異過大導致無法顯示
+ 263 - 264
dist/preview release/inspector/babylon.inspector.bundle.js


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

@@ -139,9 +139,6 @@ declare module INSPECTOR {
             properties: string[];
             format: (tex: BABYLON.Texture) => string;
         };
-        'MapTexture': {
-            type: typeof BABYLON.MapTexture;
-        };
         'RenderTargetTexture': {
             type: typeof BABYLON.RenderTargetTexture;
         };

+ 55 - 64
dist/preview release/inspector/babylon.inspector.js

@@ -1,6 +1,6 @@
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Inspector = /** @class */ (function () {
+    var Inspector = (function () {
         /** The inspector is created with the given engine.
          * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
          * If the parameter 'popup' is true, the inspector is created in another popup.
@@ -406,9 +406,6 @@ var INSPECTOR;
             ],
             format: function (tex) { return tex.name; }
         },
-        'MapTexture': {
-            type: BABYLON.MapTexture
-        },
         'RenderTargetTexture': {
             type: BABYLON.RenderTargetTexture
         },
@@ -783,7 +780,7 @@ var INSPECTOR;
      * Represents a html div element.
      * The div is built when an instance of BasicElement is created.
      */
-    var BasicElement = /** @class */ (function () {
+    var BasicElement = (function () {
         function BasicElement() {
             this._div = INSPECTOR.Helpers.CreateDiv();
         }
@@ -810,7 +807,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Adapter = /** @class */ (function () {
+    var Adapter = (function () {
         function Adapter(obj) {
             this._obj = obj;
         }
@@ -865,7 +862,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var CameraAdapter = /** @class */ (function (_super) {
+    var CameraAdapter = (function (_super) {
         __extends(CameraAdapter, _super);
         function CameraAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -914,7 +911,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PhysicsImpostorAdapter = /** @class */ (function (_super) {
+    var PhysicsImpostorAdapter = (function (_super) {
         __extends(PhysicsImpostorAdapter, _super);
         function PhysicsImpostorAdapter(obj, viewer) {
             var _this = _super.call(this, obj) || this;
@@ -975,7 +972,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var GUIAdapter = /** @class */ (function (_super) {
+    var GUIAdapter = (function (_super) {
         __extends(GUIAdapter, _super);
         function GUIAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1026,7 +1023,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var SoundAdapter = /** @class */ (function (_super) {
+    var SoundAdapter = (function (_super) {
         __extends(SoundAdapter, _super);
         function SoundAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1082,7 +1079,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var TextureAdapter = /** @class */ (function (_super) {
+    var TextureAdapter = (function (_super) {
         __extends(TextureAdapter, _super);
         function TextureAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1128,7 +1125,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var LightAdapter = /** @class */ (function (_super) {
+    var LightAdapter = (function (_super) {
         __extends(LightAdapter, _super);
         function LightAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1179,7 +1176,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var MaterialAdapter = /** @class */ (function (_super) {
+    var MaterialAdapter = (function (_super) {
         __extends(MaterialAdapter, _super);
         function MaterialAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1223,7 +1220,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var MeshAdapter = /** @class */ (function (_super) {
+    var MeshAdapter = (function (_super) {
         __extends(MeshAdapter, _super);
         function MeshAdapter(obj) {
             return _super.call(this, obj) || this;
@@ -1313,7 +1310,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var DetailPanel = /** @class */ (function (_super) {
+    var DetailPanel = (function (_super) {
         __extends(DetailPanel, _super);
         function DetailPanel(dr) {
             var _this = _super.call(this) || this;
@@ -1461,7 +1458,7 @@ var INSPECTOR;
     /**
      * A property is a link between a data (string) and an object.
      */
-    var Property = /** @class */ (function () {
+    var Property = (function () {
         function Property(prop, obj) {
             this._property = prop;
             this._obj = obj;
@@ -1509,7 +1506,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PropertyFormatter = /** @class */ (function () {
+    var PropertyFormatter = (function () {
         function PropertyFormatter() {
         }
         /**
@@ -1536,7 +1533,7 @@ var INSPECTOR;
      * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
      *
      */
-    var PropertyLine = /** @class */ (function () {
+    var PropertyLine = (function () {
         function PropertyLine(prop, parent, level) {
             if (level === void 0) { level = 0; }
             // If the type is complex, this property will have child to update
@@ -1975,7 +1972,7 @@ var INSPECTOR;
     /**
     * Display a very small div corresponding to the given color
     */
-    var ColorElement = /** @class */ (function (_super) {
+    var ColorElement = (function (_super) {
         __extends(ColorElement, _super);
         // The color as hexadecimal string
         function ColorElement(color) {
@@ -2025,7 +2022,7 @@ var INSPECTOR;
      * Represents a html div element.
      * The div is built when an instance of BasicElement is created.
      */
-    var ColorPickerElement = /** @class */ (function (_super) {
+    var ColorPickerElement = (function (_super) {
         __extends(ColorPickerElement, _super);
         function ColorPickerElement(color, propertyLine) {
             var _this = _super.call(this) || this;
@@ -2095,7 +2092,7 @@ var INSPECTOR;
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * cube texture in a cube
     */
-    var CubeTextureElement = /** @class */ (function (_super) {
+    var CubeTextureElement = (function (_super) {
         __extends(CubeTextureElement, _super);
         /** The texture given as a parameter should be cube. */
         function CubeTextureElement(tex) {
@@ -2210,7 +2207,7 @@ var INSPECTOR;
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * cube texture in a cube
     */
-    var HDRCubeTextureElement = /** @class */ (function (_super) {
+    var HDRCubeTextureElement = (function (_super) {
         __extends(HDRCubeTextureElement, _super);
         /** The texture given as a parameter should be cube. */
         function HDRCubeTextureElement(tex) {
@@ -2254,7 +2251,7 @@ var INSPECTOR;
      * A search bar can be used to filter elements in the tree panel.
      * At each keypress on the input, the treepanel will be filtered.
      */
-    var SearchBar = /** @class */ (function (_super) {
+    var SearchBar = (function (_super) {
         __extends(SearchBar, _super);
         function SearchBar(tab) {
             var _this = _super.call(this) || this;
@@ -2300,7 +2297,7 @@ var INSPECTOR;
     /**
     * Display a very small div corresponding to the given texture. On mouse over, display the full image
     */
-    var TextureElement = /** @class */ (function (_super) {
+    var TextureElement = (function (_super) {
         __extends(TextureElement, _super);
         function TextureElement(tex) {
             var _this = _super.call(this) || this;
@@ -2336,7 +2333,7 @@ var INSPECTOR;
     /**
      * Creates a tooltip for the parent of the given html element
      */
-    var Tooltip = /** @class */ (function () {
+    var Tooltip = (function () {
         function Tooltip(elem, tip, attachTo) {
             var _this = this;
             this._elem = elem;
@@ -2357,7 +2354,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Helpers = /** @class */ (function () {
+    var Helpers = (function () {
         function Helpers() {
         }
         /**
@@ -2544,7 +2541,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Scheduler = /** @class */ (function () {
+    var Scheduler = (function () {
         function Scheduler() {
             /** Is this scheduler in pause ? */
             this.pause = false;
@@ -2597,7 +2594,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Tab = /** @class */ (function (_super) {
+    var Tab = (function (_super) {
         __extends(Tab, _super);
         function Tab(tabbar, name) {
             var _this = _super.call(this) || this;
@@ -2676,7 +2673,7 @@ var INSPECTOR;
      * in which properties will be displayed.
      * Both panels are separated by a resize bar
      */
-    var PropertyTab = /** @class */ (function (_super) {
+    var PropertyTab = (function (_super) {
         __extends(PropertyTab, _super);
         function PropertyTab(tabbar, name, insp) {
             var _this = _super.call(this, tabbar, name) || this;
@@ -2820,7 +2817,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var CameraTab = /** @class */ (function (_super) {
+    var CameraTab = (function (_super) {
         __extends(CameraTab, _super);
         function CameraTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Camera', inspector) || this;
@@ -2853,7 +2850,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var GUITab = /** @class */ (function (_super) {
+    var GUITab = (function (_super) {
         __extends(GUITab, _super);
         function GUITab(tabbar, inspector) {
             return _super.call(this, tabbar, 'GUI', inspector) || this;
@@ -2908,7 +2905,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PhysicsTab = /** @class */ (function (_super) {
+    var PhysicsTab = (function (_super) {
         __extends(PhysicsTab, _super);
         function PhysicsTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Physics', inspector) || this;
@@ -2948,7 +2945,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var SoundTab = /** @class */ (function (_super) {
+    var SoundTab = (function (_super) {
         __extends(SoundTab, _super);
         function SoundTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Audio', inspector) || this;
@@ -2985,7 +2982,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var TextureTab = /** @class */ (function (_super) {
+    var TextureTab = (function (_super) {
         __extends(TextureTab, _super);
         function TextureTab(tabbar, inspector) {
             var _this = _super.call(this, tabbar, 'Textures') || this;
@@ -3054,13 +3051,7 @@ var INSPECTOR;
             for (var i = 0; i < 5; i++) {
                 imgs.push(INSPECTOR.Helpers.CreateElement('img', 'texture-image', this._imagePanel));
             }
-            if (texture instanceof BABYLON.MapTexture) {
-                // instance of Map texture
-                texture.bindTextureForPosSize(new BABYLON.Vector2(0, 0), new BABYLON.Size(texture.getSize().width, texture.getSize().height), false);
-                BABYLON.Tools.DumpFramebuffer(texture.getSize().width, texture.getSize().height, this._inspector.scene.getEngine(), function (data) { return img.src = data; });
-                texture.unbindTexture();
-            }
-            else if (texture instanceof BABYLON.RenderTargetTexture) {
+            if (texture instanceof BABYLON.RenderTargetTexture) {
                 // RenderTarget textures
                 var scene = this._inspector.scene;
                 var engine_1 = scene.getEngine();
@@ -3160,7 +3151,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var LightTab = /** @class */ (function (_super) {
+    var LightTab = (function (_super) {
         __extends(LightTab, _super);
         function LightTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Light', inspector) || this;
@@ -3193,7 +3184,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var MaterialTab = /** @class */ (function (_super) {
+    var MaterialTab = (function (_super) {
         __extends(MaterialTab, _super);
         function MaterialTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Material', inspector) || this;
@@ -3227,7 +3218,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var MeshTab = /** @class */ (function (_super) {
+    var MeshTab = (function (_super) {
         __extends(MeshTab, _super);
         function MeshTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Mesh', inspector) || this;
@@ -3299,7 +3290,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var SceneTab = /** @class */ (function (_super) {
+    var SceneTab = (function (_super) {
         __extends(SceneTab, _super);
         function SceneTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Scene') || this;
@@ -3486,7 +3477,7 @@ var INSPECTOR;
      * - hook all console.log call and display them in this panel (and in the browser console as well)
      * - display all Babylon logs (called with Tools.Log...)
      */
-    var ConsoleTab = /** @class */ (function (_super) {
+    var ConsoleTab = (function (_super) {
         __extends(ConsoleTab, _super);
         function ConsoleTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Console') || this;
@@ -3620,7 +3611,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var StatsTab = /** @class */ (function (_super) {
+    var StatsTab = (function (_super) {
         __extends(StatsTab, _super);
         function StatsTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Stats') || this;
@@ -3909,7 +3900,7 @@ var INSPECTOR;
      * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
      * The default active tab is the first one of the list.
      */
-    var TabBar = /** @class */ (function (_super) {
+    var TabBar = (function (_super) {
         __extends(TabBar, _super);
         function TabBar(inspector, initialTab) {
             var _this = _super.call(this) || this;
@@ -4103,7 +4094,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var AbstractTool = /** @class */ (function () {
+    var AbstractTool = (function () {
         function AbstractTool(icon, parent, inspector, tooltip) {
             var _this = this;
             this._inspector = inspector;
@@ -4150,7 +4141,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PauseScheduleTool = /** @class */ (function (_super) {
+    var PauseScheduleTool = (function (_super) {
         __extends(PauseScheduleTool, _super);
         function PauseScheduleTool(parent, inspector) {
             var _this = _super.call(this, 'fa-pause', parent, inspector, 'Pause the automatic update of properties') || this;
@@ -4186,7 +4177,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PickTool = /** @class */ (function (_super) {
+    var PickTool = (function (_super) {
         __extends(PickTool, _super);
         function PickTool(parent, inspector) {
             var _this = _super.call(this, 'fa-mouse-pointer', parent, inspector, 'Select a mesh in the scene') || this;
@@ -4247,7 +4238,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var PopupTool = /** @class */ (function (_super) {
+    var PopupTool = (function (_super) {
         __extends(PopupTool, _super);
         function PopupTool(parent, inspector) {
             return _super.call(this, 'fa-external-link', parent, inspector, 'Open the inspector in a popup') || this;
@@ -4273,7 +4264,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var RefreshTool = /** @class */ (function (_super) {
+    var RefreshTool = (function (_super) {
         __extends(RefreshTool, _super);
         function RefreshTool(parent, inspector) {
             return _super.call(this, 'fa-refresh', parent, inspector, 'Refresh the current tab') || this;
@@ -4299,7 +4290,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var LabelTool = /** @class */ (function (_super) {
+    var LabelTool = (function (_super) {
         __extends(LabelTool, _super);
         function LabelTool(parent, inspector) {
             var _this = _super.call(this, 'fa-tags', parent, inspector, 'Display mesh names on the canvas') || this;
@@ -4416,7 +4407,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Toolbar = /** @class */ (function (_super) {
+    var Toolbar = (function (_super) {
         __extends(Toolbar, _super);
         function Toolbar(inspector) {
             var _this = _super.call(this) || this;
@@ -4482,7 +4473,7 @@ var INSPECTOR;
     /**
      * Removes the inspector panel
      */
-    var DisposeTool = /** @class */ (function (_super) {
+    var DisposeTool = (function (_super) {
         __extends(DisposeTool, _super);
         function DisposeTool(parent, inspector) {
             return _super.call(this, 'fa-times', parent, inspector, 'Close the inspector panel') || this;
@@ -4508,7 +4499,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var TreeItem = /** @class */ (function (_super) {
+    var TreeItem = (function (_super) {
         __extends(TreeItem, _super);
         function TreeItem(tab, obj) {
             var _this = _super.call(this) || this;
@@ -4665,7 +4656,7 @@ var INSPECTOR;
 
 var INSPECTOR;
 (function (INSPECTOR) {
-    var AbstractTreeTool = /** @class */ (function () {
+    var AbstractTreeTool = (function () {
         function AbstractTreeTool() {
             /** Is the tool enabled ? */
             this._on = false;
@@ -4710,7 +4701,7 @@ var INSPECTOR;
     /**
      * Checkbox to display/hide the primitive
      */
-    var BoundingBox = /** @class */ (function (_super) {
+    var BoundingBox = (function (_super) {
         __extends(BoundingBox, _super);
         function BoundingBox(obj) {
             var _this = _super.call(this) || this;
@@ -4757,7 +4748,7 @@ var INSPECTOR;
     /**
      *
      */
-    var CameraPOV = /** @class */ (function (_super) {
+    var CameraPOV = (function (_super) {
         __extends(CameraPOV, _super);
         function CameraPOV(camera) {
             var _this = _super.call(this) || this;
@@ -4801,7 +4792,7 @@ var INSPECTOR;
     /**
      *
      */
-    var SoundInteractions = /** @class */ (function (_super) {
+    var SoundInteractions = (function (_super) {
         __extends(SoundInteractions, _super);
         function SoundInteractions(playSound) {
             var _this = _super.call(this) || this;
@@ -4849,7 +4840,7 @@ var INSPECTOR;
     /**
      * Checkbox to display/hide the primitive
      */
-    var Checkbox = /** @class */ (function (_super) {
+    var Checkbox = (function (_super) {
         __extends(Checkbox, _super);
         function Checkbox(obj) {
             var _this = _super.call(this) || this;
@@ -4899,7 +4890,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var DebugArea = /** @class */ (function (_super) {
+    var DebugArea = (function (_super) {
         __extends(DebugArea, _super);
         function DebugArea(obj) {
             var _this = _super.call(this) || this;
@@ -4939,7 +4930,7 @@ var INSPECTOR;
     /**
      * Checkbox to display/hide the primitive
      */
-    var Info = /** @class */ (function (_super) {
+    var Info = (function (_super) {
         __extends(Info, _super);
         function Info(obj) {
             var _this = _super.call(this) || this;

文件差異過大導致無法顯示
+ 3 - 4
dist/preview release/inspector/babylon.inspector.min.js


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

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
@@ -364,7 +364,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -1292,7 +1292,7 @@ var BABYLON;
         /**
         * Implementation of the base glTF spec
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -1587,7 +1587,7 @@ var BABYLON;
         /**
         * glTF V1 Loader
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1771,7 +1771,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -2021,7 +2021,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF1;
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
                 this._name = name;
             }
@@ -2175,7 +2175,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -2252,7 +2252,7 @@ var BABYLON;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;

文件差異過大導致無法顯示
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 13 - 12
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
@@ -309,7 +309,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._callback = onComplete;
@@ -324,7 +324,7 @@ var BABYLON;
             };
             return GLTFLoaderTracker;
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._disposed = false;
@@ -633,19 +633,20 @@ var BABYLON;
                             if (!material) {
                                 throw new Error(context + ": Failed to find material " + primitive.material);
                             }
+                            var capturedIndex = index;
                             _this._loadMaterial("#/materials/" + material.index, material, function (babylonMaterial, isNew) {
                                 if (isNew && _this._parent.onMaterialLoaded) {
                                     _this._parent.onMaterialLoaded(babylonMaterial);
                                 }
                                 if (_this._parent.onBeforeMaterialReadyAsync) {
                                     _this._addLoaderPendingData(material);
-                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[index] != null, function () {
-                                        subMaterials[index] = babylonMaterial;
+                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[capturedIndex] != null, function () {
+                                        subMaterials[capturedIndex] = babylonMaterial;
                                         _this._removeLoaderPendingData(material);
                                     });
                                 }
                                 else {
-                                    subMaterials[index] = babylonMaterial;
+                                    subMaterials[capturedIndex] = babylonMaterial;
                                 }
                             });
                         }
@@ -771,7 +772,7 @@ var BABYLON;
                         var vertexData = new BABYLON.VertexData();
                         for (var _i = 0, _a = mesh.primitives; _i < _a.length; _i++) {
                             var primitive = _a[_i];
-                            vertexData.merge(primitive.targetsVertexData[index]);
+                            vertexData.merge(primitive.targetsVertexData[index], { tangentLength: 3 });
                         }
                         var target = morphTargetManager.getTarget(index);
                         target.setNormals(vertexData.normals);
@@ -1540,7 +1541,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -1638,7 +1639,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
                 this.enabled = true;
             }
@@ -1714,7 +1715,7 @@ var BABYLON;
         var Extensions;
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -1830,7 +1831,7 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;

文件差異過大導致無法顯示
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 20 - 19
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
@@ -364,7 +364,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -1292,7 +1292,7 @@ var BABYLON;
         /**
         * Implementation of the base glTF spec
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -1587,7 +1587,7 @@ var BABYLON;
         /**
         * glTF V1 Loader
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1771,7 +1771,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -2021,7 +2021,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF1;
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
                 this._name = name;
             }
@@ -2175,7 +2175,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -2252,7 +2252,7 @@ var BABYLON;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;
@@ -2415,7 +2415,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._callback = onComplete;
@@ -2430,7 +2430,7 @@ var BABYLON;
             };
             return GLTFLoaderTracker;
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._disposed = false;
@@ -2739,19 +2739,20 @@ var BABYLON;
                             if (!material) {
                                 throw new Error(context + ": Failed to find material " + primitive.material);
                             }
+                            var capturedIndex = index;
                             _this._loadMaterial("#/materials/" + material.index, material, function (babylonMaterial, isNew) {
                                 if (isNew && _this._parent.onMaterialLoaded) {
                                     _this._parent.onMaterialLoaded(babylonMaterial);
                                 }
                                 if (_this._parent.onBeforeMaterialReadyAsync) {
                                     _this._addLoaderPendingData(material);
-                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[index] != null, function () {
-                                        subMaterials[index] = babylonMaterial;
+                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[capturedIndex] != null, function () {
+                                        subMaterials[capturedIndex] = babylonMaterial;
                                         _this._removeLoaderPendingData(material);
                                     });
                                 }
                                 else {
-                                    subMaterials[index] = babylonMaterial;
+                                    subMaterials[capturedIndex] = babylonMaterial;
                                 }
                             });
                         }
@@ -2877,7 +2878,7 @@ var BABYLON;
                         var vertexData = new BABYLON.VertexData();
                         for (var _i = 0, _a = mesh.primitives; _i < _a.length; _i++) {
                             var primitive = _a[_i];
-                            vertexData.merge(primitive.targetsVertexData[index]);
+                            vertexData.merge(primitive.targetsVertexData[index], { tangentLength: 3 });
                         }
                         var target = morphTargetManager.getTarget(index);
                         target.setNormals(vertexData.normals);
@@ -3646,7 +3647,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -3744,7 +3745,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
                 this.enabled = true;
             }
@@ -3820,7 +3821,7 @@ var BABYLON;
         var Extensions;
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -3936,7 +3937,7 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;

文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


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

@@ -4,7 +4,7 @@ var BABYLON;
     /**
      * Class reading and parsing the MTL file bundled with the obj file.
      */
-    var MTLFileLoader = /** @class */ (function () {
+    var MTLFileLoader = (function () {
         function MTLFileLoader() {
             // All material loaded from the mtl will be set here
             this.materials = [];
@@ -203,7 +203,7 @@ var BABYLON;
         return MTLFileLoader;
     }());
     BABYLON.MTLFileLoader = MTLFileLoader;
-    var OBJFileLoader = /** @class */ (function () {
+    var OBJFileLoader = (function () {
         function OBJFileLoader() {
             this.name = "obj";
             this.extensions = ".obj";

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


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

@@ -1,7 +1,7 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
-    var STLFileLoader = /** @class */ (function () {
+    var STLFileLoader = (function () {
         function STLFileLoader() {
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;

+ 23 - 22
dist/preview release/loaders/babylonjs.loaders.js

@@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
         
 var BABYLON;
 (function (BABYLON) {
-    var STLFileLoader = /** @class */ (function () {
+    var STLFileLoader = (function () {
         function STLFileLoader() {
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;
@@ -187,7 +187,7 @@ var BABYLON;
     /**
      * Class reading and parsing the MTL file bundled with the obj file.
      */
-    var MTLFileLoader = /** @class */ (function () {
+    var MTLFileLoader = (function () {
         function MTLFileLoader() {
             // All material loaded from the mtl will be set here
             this.materials = [];
@@ -386,7 +386,7 @@ var BABYLON;
         return MTLFileLoader;
     }());
     BABYLON.MTLFileLoader = MTLFileLoader;
-    var OBJFileLoader = /** @class */ (function () {
+    var OBJFileLoader = (function () {
         function OBJFileLoader() {
             this.name = "obj";
             this.extensions = ".obj";
@@ -982,7 +982,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -1189,7 +1189,7 @@ var BABYLON;
         return GLTFFileLoader;
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
@@ -1335,7 +1335,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -2263,7 +2263,7 @@ var BABYLON;
         /**
         * Implementation of the base glTF spec
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -2558,7 +2558,7 @@ var BABYLON;
         /**
         * glTF V1 Loader
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             }
             GLTFLoader.RegisterExtension = function (extension) {
@@ -2742,7 +2742,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -2992,7 +2992,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF1;
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
                 this._name = name;
             }
@@ -3137,7 +3137,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -3205,7 +3205,7 @@ var BABYLON;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;
@@ -3368,7 +3368,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._callback = onComplete;
@@ -3383,7 +3383,7 @@ var BABYLON;
             };
             return GLTFLoaderTracker;
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._disposed = false;
@@ -3692,19 +3692,20 @@ var BABYLON;
                             if (!material) {
                                 throw new Error(context + ": Failed to find material " + primitive.material);
                             }
+                            var capturedIndex = index;
                             _this._loadMaterial("#/materials/" + material.index, material, function (babylonMaterial, isNew) {
                                 if (isNew && _this._parent.onMaterialLoaded) {
                                     _this._parent.onMaterialLoaded(babylonMaterial);
                                 }
                                 if (_this._parent.onBeforeMaterialReadyAsync) {
                                     _this._addLoaderPendingData(material);
-                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[index] != null, function () {
-                                        subMaterials[index] = babylonMaterial;
+                                    _this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[capturedIndex] != null, function () {
+                                        subMaterials[capturedIndex] = babylonMaterial;
                                         _this._removeLoaderPendingData(material);
                                     });
                                 }
                                 else {
-                                    subMaterials[index] = babylonMaterial;
+                                    subMaterials[capturedIndex] = babylonMaterial;
                                 }
                             });
                         }
@@ -3830,7 +3831,7 @@ var BABYLON;
                         var vertexData = new BABYLON.VertexData();
                         for (var _i = 0, _a = mesh.primitives; _i < _a.length; _i++) {
                             var primitive = _a[_i];
-                            vertexData.merge(primitive.targetsVertexData[index]);
+                            vertexData.merge(primitive.targetsVertexData[index], { tangentLength: 3 });
                         }
                         var target = morphTargetManager.getTarget(index);
                         target.setNormals(vertexData.normals);
@@ -4599,7 +4600,7 @@ var BABYLON;
         /**
         * Utils functions for GLTF
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             }
             /**
@@ -4697,7 +4698,7 @@ var BABYLON;
 (function (BABYLON) {
     var GLTF2;
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
                 this.enabled = true;
             }
@@ -4764,7 +4765,7 @@ var BABYLON;
         var Extensions;
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -4871,7 +4872,7 @@ var BABYLON;
     (function (GLTF2) {
         var Extensions;
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;

文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.1.0-alpha3.4",
+    "version": "3.1.0-alpha3.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var CellMaterialDefines = /** @class */ (function (_super) {
+    var CellMaterialDefines = (function (_super) {
         __extends(CellMaterialDefines, _super);
         function CellMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -43,7 +43,7 @@ var BABYLON;
         }
         return CellMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var CellMaterial = /** @class */ (function (_super) {
+    var CellMaterial = (function (_super) {
         __extends(CellMaterial, _super);
         function CellMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -18,7 +18,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 var BABYLON;
 (function (BABYLON) {
     // old version of standard material updated every 3 months
-    var StandardMaterialDefines_OldVer = /** @class */ (function (_super) {
+    var StandardMaterialDefines_OldVer = (function (_super) {
         __extends(StandardMaterialDefines_OldVer, _super);
         function StandardMaterialDefines_OldVer() {
             var _this = _super.call(this) || this;
@@ -111,7 +111,7 @@ var BABYLON;
         return StandardMaterialDefines_OldVer;
     }(BABYLON.MaterialDefines));
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
-    var StandardMaterial_OldVer = /** @class */ (function (_super) {
+    var StandardMaterial_OldVer = (function (_super) {
         __extends(StandardMaterial_OldVer, _super);
         function StandardMaterial_OldVer(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -1382,19 +1382,19 @@ var BABYLON;
         return StandardMaterial_OldVer;
     }(BABYLON.PushMaterial));
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
-    var CustomShaderStructure = /** @class */ (function () {
+    var CustomShaderStructure = (function () {
         function CustomShaderStructure() {
         }
         return CustomShaderStructure;
     }());
     BABYLON.CustomShaderStructure = CustomShaderStructure;
-    var ShaderSpecialParts = /** @class */ (function () {
+    var ShaderSpecialParts = (function () {
         function ShaderSpecialParts() {
         }
         return ShaderSpecialParts;
     }());
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
-    var ShaderForVer3_0 = /** @class */ (function (_super) {
+    var ShaderForVer3_0 = (function (_super) {
         __extends(ShaderForVer3_0, _super);
         function ShaderForVer3_0() {
             var _this = _super.call(this) || this;
@@ -1895,14 +1895,14 @@ vColor=color;\n\
         return ShaderForVer3_0;
     }(CustomShaderStructure));
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
-    var StandardShaderVersions = /** @class */ (function () {
+    var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         }
         StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
-    var CustomMaterial = /** @class */ (function (_super) {
+    var CustomMaterial = (function (_super) {
         __extends(CustomMaterial, _super);
         function CustomMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var FireMaterialDefines = /** @class */ (function (_super) {
+    var FireMaterialDefines = (function (_super) {
         __extends(FireMaterialDefines, _super);
         function FireMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -38,7 +38,7 @@ var BABYLON;
         }
         return FireMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var FireMaterial = /** @class */ (function (_super) {
+    var FireMaterial = (function (_super) {
         __extends(FireMaterial, _super);
         function FireMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var FurMaterialDefines = /** @class */ (function (_super) {
+    var FurMaterialDefines = (function (_super) {
         __extends(FurMaterialDefines, _super);
         function FurMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -42,7 +42,7 @@ var BABYLON;
         }
         return FurMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var FurMaterial = /** @class */ (function (_super) {
+    var FurMaterial = (function (_super) {
         __extends(FurMaterial, _super);
         function FurMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var GradientMaterialDefines = /** @class */ (function (_super) {
+    var GradientMaterialDefines = (function (_super) {
         __extends(GradientMaterialDefines, _super);
         function GradientMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         return GradientMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var GradientMaterial = /** @class */ (function (_super) {
+    var GradientMaterial = (function (_super) {
         __extends(GradientMaterial, _super);
         function GradientMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var GridMaterialDefines = /** @class */ (function (_super) {
+    var GridMaterialDefines = (function (_super) {
         __extends(GridMaterialDefines, _super);
         function GridMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -33,7 +33,7 @@ var BABYLON;
      * The grid materials allows you to wrap any shape with a grid.
      * Colors are customizable.
      */
-    var GridMaterial = /** @class */ (function (_super) {
+    var GridMaterial = (function (_super) {
         __extends(GridMaterial, _super);
         /**
          * constructor

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var LavaMaterialDefines = /** @class */ (function (_super) {
+    var LavaMaterialDefines = (function (_super) {
         __extends(LavaMaterialDefines, _super);
         function LavaMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         return LavaMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var LavaMaterial = /** @class */ (function (_super) {
+    var LavaMaterial = (function (_super) {
         __extends(LavaMaterial, _super);
         function LavaMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var LegacyPBRMaterialDefines = /** @class */ (function (_super) {
+    var LegacyPBRMaterialDefines = (function (_super) {
         __extends(LegacyPBRMaterialDefines, _super);
         function LegacyPBRMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -110,7 +110,7 @@ var BABYLON;
      * For more information, please refer to the documentation :
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      */
-    var LegacyPBRMaterial = /** @class */ (function (_super) {
+    var LegacyPBRMaterial = (function (_super) {
         __extends(LegacyPBRMaterial, _super);
         /**
          * Instantiates a new PBRMaterial instance.

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var NormalMaterialDefines = /** @class */ (function (_super) {
+    var NormalMaterialDefines = (function (_super) {
         __extends(NormalMaterialDefines, _super);
         function NormalMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         return NormalMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var NormalMaterial = /** @class */ (function (_super) {
+    var NormalMaterial = (function (_super) {
         __extends(NormalMaterial, _super);
         function NormalMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var ShadowOnlyMaterialDefines = /** @class */ (function (_super) {
+    var ShadowOnlyMaterialDefines = (function (_super) {
         __extends(ShadowOnlyMaterialDefines, _super);
         function ShadowOnlyMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -27,7 +27,7 @@ var BABYLON;
         }
         return ShadowOnlyMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var ShadowOnlyMaterial = /** @class */ (function (_super) {
+    var ShadowOnlyMaterial = (function (_super) {
         __extends(ShadowOnlyMaterial, _super);
         function ShadowOnlyMaterial(name, scene) {
             return _super.call(this, name, scene) || this;

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var SimpleMaterialDefines = /** @class */ (function (_super) {
+    var SimpleMaterialDefines = (function (_super) {
         __extends(SimpleMaterialDefines, _super);
         function SimpleMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -40,7 +40,7 @@ var BABYLON;
         }
         return SimpleMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var SimpleMaterial = /** @class */ (function (_super) {
+    var SimpleMaterial = (function (_super) {
         __extends(SimpleMaterial, _super);
         function SimpleMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var SkyMaterialDefines = /** @class */ (function (_super) {
+    var SkyMaterialDefines = (function (_super) {
         __extends(SkyMaterialDefines, _super);
         function SkyMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -31,7 +31,7 @@ var BABYLON;
         }
         return SkyMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var SkyMaterial = /** @class */ (function (_super) {
+    var SkyMaterial = (function (_super) {
         __extends(SkyMaterial, _super);
         function SkyMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var TerrainMaterialDefines = /** @class */ (function (_super) {
+    var TerrainMaterialDefines = (function (_super) {
         __extends(TerrainMaterialDefines, _super);
         function TerrainMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -42,7 +42,7 @@ var BABYLON;
         }
         return TerrainMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var TerrainMaterial = /** @class */ (function (_super) {
+    var TerrainMaterial = (function (_super) {
         __extends(TerrainMaterial, _super);
         function TerrainMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var TriPlanarMaterialDefines = /** @class */ (function (_super) {
+    var TriPlanarMaterialDefines = (function (_super) {
         __extends(TriPlanarMaterialDefines, _super);
         function TriPlanarMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -44,7 +44,7 @@ var BABYLON;
         }
         return TriPlanarMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var TriPlanarMaterial = /** @class */ (function (_super) {
+    var TriPlanarMaterial = (function (_super) {
         __extends(TriPlanarMaterial, _super);
         function TriPlanarMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 var BABYLON;
 (function (BABYLON) {
-    var WaterMaterialDefines = /** @class */ (function (_super) {
+    var WaterMaterialDefines = (function (_super) {
         __extends(WaterMaterialDefines, _super);
         function WaterMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -46,7 +46,7 @@ var BABYLON;
         }
         return WaterMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var WaterMaterial = /** @class */ (function (_super) {
+    var WaterMaterial = (function (_super) {
         __extends(WaterMaterial, _super);
         /**
         * Constructor

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


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

@@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () {
 
 var BABYLON;
 (function (BABYLON) {
-    var ShadowOnlyMaterialDefines = /** @class */ (function (_super) {
+    var ShadowOnlyMaterialDefines = (function (_super) {
         __extends(ShadowOnlyMaterialDefines, _super);
         function ShadowOnlyMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -36,7 +36,7 @@ var BABYLON;
         }
         return ShadowOnlyMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var ShadowOnlyMaterial = /** @class */ (function (_super) {
+    var ShadowOnlyMaterial = (function (_super) {
         __extends(ShadowOnlyMaterial, _super);
         function ShadowOnlyMaterial(name, scene) {
             return _super.call(this, name, scene) || this;
@@ -221,7 +221,7 @@ BABYLON.Effect.ShadersStore['shadowOnlyPixelShader'] = "precision highp float;\n
 
 var BABYLON;
 (function (BABYLON) {
-    var GradientMaterialDefines = /** @class */ (function (_super) {
+    var GradientMaterialDefines = (function (_super) {
         __extends(GradientMaterialDefines, _super);
         function GradientMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -277,7 +277,7 @@ var BABYLON;
         }
         return GradientMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var GradientMaterial = /** @class */ (function (_super) {
+    var GradientMaterial = (function (_super) {
         __extends(GradientMaterial, _super);
         function GradientMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -496,7 +496,7 @@ BABYLON.Effect.ShadersStore['gradientPixelShader'] = "precision highp float;\n\n
 
 var BABYLON;
 (function (BABYLON) {
-    var NormalMaterialDefines = /** @class */ (function (_super) {
+    var NormalMaterialDefines = (function (_super) {
         __extends(NormalMaterialDefines, _super);
         function NormalMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -552,7 +552,7 @@ var BABYLON;
         }
         return NormalMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var NormalMaterial = /** @class */ (function (_super) {
+    var NormalMaterial = (function (_super) {
         __extends(NormalMaterial, _super);
         function NormalMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -798,7 +798,7 @@ BABYLON.Effect.ShadersStore['normalPixelShader'] = "precision highp float;\n\nun
 
 var BABYLON;
 (function (BABYLON) {
-    var LavaMaterialDefines = /** @class */ (function (_super) {
+    var LavaMaterialDefines = (function (_super) {
         __extends(LavaMaterialDefines, _super);
         function LavaMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -854,7 +854,7 @@ var BABYLON;
         }
         return LavaMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var LavaMaterial = /** @class */ (function (_super) {
+    var LavaMaterial = (function (_super) {
         __extends(LavaMaterial, _super);
         function LavaMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -1146,7 +1146,7 @@ BABYLON.Effect.ShadersStore['lavaPixelShader'] = "precision highp float;\n\nunif
 
 var BABYLON;
 (function (BABYLON) {
-    var SimpleMaterialDefines = /** @class */ (function (_super) {
+    var SimpleMaterialDefines = (function (_super) {
         __extends(SimpleMaterialDefines, _super);
         function SimpleMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -1169,7 +1169,7 @@ var BABYLON;
         }
         return SimpleMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var SimpleMaterial = /** @class */ (function (_super) {
+    var SimpleMaterial = (function (_super) {
         __extends(SimpleMaterial, _super);
         function SimpleMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -1415,7 +1415,7 @@ BABYLON.Effect.ShadersStore['simplePixelShader'] = "precision highp float;\n\nun
 
 var BABYLON;
 (function (BABYLON) {
-    var WaterMaterialDefines = /** @class */ (function (_super) {
+    var WaterMaterialDefines = (function (_super) {
         __extends(WaterMaterialDefines, _super);
         function WaterMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -1444,7 +1444,7 @@ var BABYLON;
         }
         return WaterMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var WaterMaterial = /** @class */ (function (_super) {
+    var WaterMaterial = (function (_super) {
         __extends(WaterMaterial, _super);
         /**
         * Constructor
@@ -2007,7 +2007,7 @@ BABYLON.Effect.ShadersStore['waterPixelShader'] = "#ifdef LOGARITHMICDEPTH\n#ext
 
 var BABYLON;
 (function (BABYLON) {
-    var FireMaterialDefines = /** @class */ (function (_super) {
+    var FireMaterialDefines = (function (_super) {
         __extends(FireMaterialDefines, _super);
         function FireMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -2028,7 +2028,7 @@ var BABYLON;
         }
         return FireMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var FireMaterial = /** @class */ (function (_super) {
+    var FireMaterial = (function (_super) {
         __extends(FireMaterial, _super);
         function FireMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -2322,7 +2322,7 @@ BABYLON.Effect.ShadersStore['firePixelShader'] = "precision highp float;\n\nunif
 
 var BABYLON;
 (function (BABYLON) {
-    var FurMaterialDefines = /** @class */ (function (_super) {
+    var FurMaterialDefines = (function (_super) {
         __extends(FurMaterialDefines, _super);
         function FurMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -2347,7 +2347,7 @@ var BABYLON;
         }
         return FurMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var FurMaterial = /** @class */ (function (_super) {
+    var FurMaterial = (function (_super) {
         __extends(FurMaterial, _super);
         function FurMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -2778,7 +2778,7 @@ BABYLON.Effect.ShadersStore['furPixelShader'] = "precision highp float;\n\nunifo
 
 var BABYLON;
 (function (BABYLON) {
-    var TerrainMaterialDefines = /** @class */ (function (_super) {
+    var TerrainMaterialDefines = (function (_super) {
         __extends(TerrainMaterialDefines, _super);
         function TerrainMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -2803,7 +2803,7 @@ var BABYLON;
         }
         return TerrainMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var TerrainMaterial = /** @class */ (function (_super) {
+    var TerrainMaterial = (function (_super) {
         __extends(TerrainMaterial, _super);
         function TerrainMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -3162,7 +3162,7 @@ BABYLON.Effect.ShadersStore['terrainPixelShader'] = "precision highp float;\n\nu
 
 var BABYLON;
 (function (BABYLON) {
-    var TriPlanarMaterialDefines = /** @class */ (function (_super) {
+    var TriPlanarMaterialDefines = (function (_super) {
         __extends(TriPlanarMaterialDefines, _super);
         function TriPlanarMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -3189,7 +3189,7 @@ var BABYLON;
         }
         return TriPlanarMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var TriPlanarMaterial = /** @class */ (function (_super) {
+    var TriPlanarMaterial = (function (_super) {
         __extends(TriPlanarMaterial, _super);
         function TriPlanarMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -3541,7 +3541,7 @@ BABYLON.Effect.ShadersStore['triplanarPixelShader'] = "precision highp float;\n\
 
 var BABYLON;
 (function (BABYLON) {
-    var SkyMaterialDefines = /** @class */ (function (_super) {
+    var SkyMaterialDefines = (function (_super) {
         __extends(SkyMaterialDefines, _super);
         function SkyMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -3555,7 +3555,7 @@ var BABYLON;
         }
         return SkyMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var SkyMaterial = /** @class */ (function (_super) {
+    var SkyMaterial = (function (_super) {
         __extends(SkyMaterial, _super);
         function SkyMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -3753,7 +3753,7 @@ BABYLON.Effect.ShadersStore['skyPixelShader'] = "precision highp float;\n\nvaryi
 
 var BABYLON;
 (function (BABYLON) {
-    var GridMaterialDefines = /** @class */ (function (_super) {
+    var GridMaterialDefines = (function (_super) {
         __extends(GridMaterialDefines, _super);
         function GridMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -3769,7 +3769,7 @@ var BABYLON;
      * The grid materials allows you to wrap any shape with a grid.
      * Colors are customizable.
      */
-    var GridMaterial = /** @class */ (function (_super) {
+    var GridMaterial = (function (_super) {
         __extends(GridMaterial, _super);
         /**
          * constructor
@@ -3947,7 +3947,7 @@ BABYLON.Effect.ShadersStore['gridPixelShader'] = "#extension GL_OES_standard_der
 var BABYLON;
 (function (BABYLON) {
     // old version of standard material updated every 3 months
-    var StandardMaterialDefines_OldVer = /** @class */ (function (_super) {
+    var StandardMaterialDefines_OldVer = (function (_super) {
         __extends(StandardMaterialDefines_OldVer, _super);
         function StandardMaterialDefines_OldVer() {
             var _this = _super.call(this) || this;
@@ -4040,7 +4040,7 @@ var BABYLON;
         return StandardMaterialDefines_OldVer;
     }(BABYLON.MaterialDefines));
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
-    var StandardMaterial_OldVer = /** @class */ (function (_super) {
+    var StandardMaterial_OldVer = (function (_super) {
         __extends(StandardMaterial_OldVer, _super);
         function StandardMaterial_OldVer(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -5311,19 +5311,19 @@ var BABYLON;
         return StandardMaterial_OldVer;
     }(BABYLON.PushMaterial));
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
-    var CustomShaderStructure = /** @class */ (function () {
+    var CustomShaderStructure = (function () {
         function CustomShaderStructure() {
         }
         return CustomShaderStructure;
     }());
     BABYLON.CustomShaderStructure = CustomShaderStructure;
-    var ShaderSpecialParts = /** @class */ (function () {
+    var ShaderSpecialParts = (function () {
         function ShaderSpecialParts() {
         }
         return ShaderSpecialParts;
     }());
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
-    var ShaderForVer3_0 = /** @class */ (function (_super) {
+    var ShaderForVer3_0 = (function (_super) {
         __extends(ShaderForVer3_0, _super);
         function ShaderForVer3_0() {
             var _this = _super.call(this) || this;
@@ -5824,14 +5824,14 @@ vColor=color;\n\
         return ShaderForVer3_0;
     }(CustomShaderStructure));
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
-    var StandardShaderVersions = /** @class */ (function () {
+    var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         }
         StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
-    var CustomMaterial = /** @class */ (function (_super) {
+    var CustomMaterial = (function (_super) {
         __extends(CustomMaterial, _super);
         function CustomMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -5991,7 +5991,7 @@ vColor=color;\n\
 
 var BABYLON;
 (function (BABYLON) {
-    var CellMaterialDefines = /** @class */ (function (_super) {
+    var CellMaterialDefines = (function (_super) {
         __extends(CellMaterialDefines, _super);
         function CellMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -6017,7 +6017,7 @@ var BABYLON;
         }
         return CellMaterialDefines;
     }(BABYLON.MaterialDefines));
-    var CellMaterial = /** @class */ (function (_super) {
+    var CellMaterial = (function (_super) {
         __extends(CellMaterial, _super);
         function CellMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
@@ -6269,7 +6269,7 @@ BABYLON.Effect.ShadersStore['cellPixelShader'] = "precision highp float;\n\nunif
 
 var BABYLON;
 (function (BABYLON) {
-    var LegacyPBRMaterialDefines = /** @class */ (function (_super) {
+    var LegacyPBRMaterialDefines = (function (_super) {
         __extends(LegacyPBRMaterialDefines, _super);
         function LegacyPBRMaterialDefines() {
             var _this = _super.call(this) || this;
@@ -6362,7 +6362,7 @@ var BABYLON;
      * For more information, please refer to the documentation :
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      */
-    var LegacyPBRMaterial = /** @class */ (function (_super) {
+    var LegacyPBRMaterial = (function (_super) {
         __extends(LegacyPBRMaterial, _super);
         /**
          * Instantiates a new PBRMaterial instance.

文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.min.js


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.1.0-alpha3.4",
+    "version": "3.1.0-alpha3.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -23,7 +23,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      */
-    var AsciiArtFontTexture = /** @class */ (function (_super) {
+    var AsciiArtFontTexture = (function (_super) {
         __extends(AsciiArtFontTexture, _super);
         /**
          * Create a new instance of the Ascii Art FontTexture class
@@ -160,7 +160,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      */
-    var AsciiArtPostProcess = /** @class */ (function (_super) {
+    var AsciiArtPostProcess = (function (_super) {
         __extends(AsciiArtPostProcess, _super);
         /**
          * Instantiates a new Ascii Art Post Process.

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


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

@@ -23,7 +23,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      */
-    var DigitalRainFontTexture = /** @class */ (function (_super) {
+    var DigitalRainFontTexture = (function (_super) {
         __extends(DigitalRainFontTexture, _super);
         /**
          * Create a new instance of the Digital Rain FontTexture class
@@ -160,7 +160,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      */
-    var DigitalRainPostProcess = /** @class */ (function (_super) {
+    var DigitalRainPostProcess = (function (_super) {
         __extends(DigitalRainPostProcess, _super);
         /**
          * Instantiates a new Digital Rain Post Process.

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


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

@@ -27,7 +27,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      */
-    var AsciiArtFontTexture = /** @class */ (function (_super) {
+    var AsciiArtFontTexture = (function (_super) {
         __extends(AsciiArtFontTexture, _super);
         /**
          * Create a new instance of the Ascii Art FontTexture class
@@ -164,7 +164,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      */
-    var AsciiArtPostProcess = /** @class */ (function (_super) {
+    var AsciiArtPostProcess = (function (_super) {
         __extends(AsciiArtPostProcess, _super);
         /**
          * Instantiates a new Ascii Art Post Process.
@@ -231,7 +231,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      */
-    var DigitalRainFontTexture = /** @class */ (function (_super) {
+    var DigitalRainFontTexture = (function (_super) {
         __extends(DigitalRainFontTexture, _super);
         /**
          * Create a new instance of the Digital Rain FontTexture class
@@ -368,7 +368,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      */
-    var DigitalRainPostProcess = /** @class */ (function (_super) {
+    var DigitalRainPostProcess = (function (_super) {
         __extends(DigitalRainPostProcess, _super);
         /**
          * Instantiates a new Digital Rain Post Process.

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.1.0-alpha3.4",
+    "version": "3.1.0-alpha3.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var BrickProceduralTexture = /** @class */ (function (_super) {
+    var BrickProceduralTexture = (function (_super) {
         __extends(BrickProceduralTexture, _super);
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var CloudProceduralTexture = /** @class */ (function (_super) {
+    var CloudProceduralTexture = (function (_super) {
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var FireProceduralTexture = /** @class */ (function (_super) {
+    var FireProceduralTexture = (function (_super) {
         __extends(FireProceduralTexture, _super);
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var GrassProceduralTexture = /** @class */ (function (_super) {
+    var GrassProceduralTexture = (function (_super) {
         __extends(GrassProceduralTexture, _super);
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var MarbleProceduralTexture = /** @class */ (function (_super) {
+    var MarbleProceduralTexture = (function (_super) {
         __extends(MarbleProceduralTexture, _super);
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var NormalMapProceduralTexture = /** @class */ (function (_super) {
+    var NormalMapProceduralTexture = (function (_super) {
         __extends(NormalMapProceduralTexture, _super);
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
+    var PerlinNoiseProceduralTexture = (function (_super) {
         __extends(PerlinNoiseProceduralTexture, _super);
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var RoadProceduralTexture = /** @class */ (function (_super) {
+    var RoadProceduralTexture = (function (_super) {
         __extends(RoadProceduralTexture, _super);
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var StarfieldProceduralTexture = /** @class */ (function (_super) {
+    var StarfieldProceduralTexture = (function (_super) {
         __extends(StarfieldProceduralTexture, _super);
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var BABYLON;
 (function (BABYLON) {
-    var WoodProceduralTexture = /** @class */ (function (_super) {
+    var WoodProceduralTexture = (function (_super) {
         __extends(WoodProceduralTexture, _super);
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () {
 
 var BABYLON;
 (function (BABYLON) {
-    var WoodProceduralTexture = /** @class */ (function (_super) {
+    var WoodProceduralTexture = (function (_super) {
         __extends(WoodProceduralTexture, _super);
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -68,7 +68,7 @@ BABYLON.Effect.ShadersStore['woodProceduralTexturePixelShader'] = "precision hig
 
 var BABYLON;
 (function (BABYLON) {
-    var FireProceduralTexture = /** @class */ (function (_super) {
+    var FireProceduralTexture = (function (_super) {
         __extends(FireProceduralTexture, _super);
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -211,7 +211,7 @@ BABYLON.Effect.ShadersStore['fireProceduralTexturePixelShader'] = "precision hig
 
 var BABYLON;
 (function (BABYLON) {
-    var CloudProceduralTexture = /** @class */ (function (_super) {
+    var CloudProceduralTexture = (function (_super) {
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -259,7 +259,7 @@ BABYLON.Effect.ShadersStore['cloudProceduralTexturePixelShader'] = "precision hi
 
 var BABYLON;
 (function (BABYLON) {
-    var GrassProceduralTexture = /** @class */ (function (_super) {
+    var GrassProceduralTexture = (function (_super) {
         __extends(GrassProceduralTexture, _super);
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -313,7 +313,7 @@ BABYLON.Effect.ShadersStore['grassProceduralTexturePixelShader'] = "precision hi
 
 var BABYLON;
 (function (BABYLON) {
-    var RoadProceduralTexture = /** @class */ (function (_super) {
+    var RoadProceduralTexture = (function (_super) {
         __extends(RoadProceduralTexture, _super);
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -348,7 +348,7 @@ BABYLON.Effect.ShadersStore['roadProceduralTexturePixelShader'] = "precision hig
 
 var BABYLON;
 (function (BABYLON) {
-    var BrickProceduralTexture = /** @class */ (function (_super) {
+    var BrickProceduralTexture = (function (_super) {
         __extends(BrickProceduralTexture, _super);
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -422,7 +422,7 @@ BABYLON.Effect.ShadersStore['brickProceduralTexturePixelShader'] = "precision hi
 
 var BABYLON;
 (function (BABYLON) {
-    var MarbleProceduralTexture = /** @class */ (function (_super) {
+    var MarbleProceduralTexture = (function (_super) {
         __extends(MarbleProceduralTexture, _super);
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -496,7 +496,7 @@ BABYLON.Effect.ShadersStore['marbleProceduralTexturePixelShader'] = "precision h
 
 var BABYLON;
 (function (BABYLON) {
-    var StarfieldProceduralTexture = /** @class */ (function (_super) {
+    var StarfieldProceduralTexture = (function (_super) {
         __extends(StarfieldProceduralTexture, _super);
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -661,7 +661,7 @@ BABYLON.Effect.ShadersStore['starfieldProceduralTexturePixelShader'] = "precisio
 
 var BABYLON;
 (function (BABYLON) {
-    var NormalMapProceduralTexture = /** @class */ (function (_super) {
+    var NormalMapProceduralTexture = (function (_super) {
         __extends(NormalMapProceduralTexture, _super);
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -704,7 +704,7 @@ BABYLON.Effect.ShadersStore['normalMapProceduralTexturePixelShader'] = "precisio
 
 var BABYLON;
 (function (BABYLON) {
-    var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
+    var PerlinNoiseProceduralTexture = (function (_super) {
         __extends(PerlinNoiseProceduralTexture, _super);
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.1.0-alpha3.4",
+    "version": "3.1.0-alpha3.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/serializers/babylon.objSerializer.js

@@ -1,7 +1,7 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 (function (BABYLON) {
-    var OBJExport = /** @class */ (function () {
+    var OBJExport = (function () {
         function OBJExport() {
         }
         //Exports the geometrys of a Mesh array in .OBJ file format (text)

+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.js

@@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
         
 var BABYLON;
 (function (BABYLON) {
-    var OBJExport = /** @class */ (function () {
+    var OBJExport = (function () {
         function OBJExport() {
         }
         //Exports the geometrys of a Mesh array in .OBJ file format (text)

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

@@ -16,7 +16,7 @@
 - Added support for `material.separateCullingPass`. [Doc here](http://doc.babylonjs.com/tutorials/transparency_and_how_meshes_are_rendered#things-to-do-and-not-to-do) ([sebavan](https://github.com/sebavan))
 - Added support for Windows Motion Controllers ([Lewis Weaver](https://github.com/leweaver))
 - Added support for Particle animation in ParticleSystem. [Doc here](http://doc.babylonjs.com/tutorials/particles#particle-animation) ([Ibraheem Osama](https://github.com/IbraheemOsama))
-- More robust TypeScript code with *noImplicitAny*, *noImplicitThis* and *noImplicitReturns* compiler options ([deltakosh](https://github.com/deltakosh))
+- More robust TypeScript code with *strictNullChecks*, *noImplicitAny*, *noImplicitThis* and *noImplicitReturns* compiler options ([deltakosh](https://github.com/deltakosh))
 - Introduced `NullEngine` which can be used to use Babylon.js in headless mode. [Doc here](http://doc.babylonjs.com/generals/nullengine) ([deltakosh](https://github.com/deltakosh)) 
 
 ## Updates
@@ -43,3 +43,4 @@
 
 ## Breaking changes
 - `Gamepads` was removed in favor of `scene.gamepadManager`
+- `DynamicFloatArray`, `MapTexture` and `RectPakingMap` were removed because there were not used anymore

+ 0 - 3
inspector/src/properties.ts

@@ -75,9 +75,6 @@ module INSPECTOR {
             ],
             format: (tex: BABYLON.Texture) => { return tex.name }
         },
-        'MapTexture': {
-            type: BABYLON.MapTexture
-        },
         'RenderTargetTexture': {
             type: BABYLON.RenderTargetTexture
         },

+ 1 - 8
inspector/src/tabs/TextureTab.ts

@@ -85,14 +85,7 @@ module INSPECTOR {
                 imgs.push(Helpers.CreateElement('img', 'texture-image', this._imagePanel) as HTMLImageElement);
             }
             
-            if (texture instanceof BABYLON.MapTexture) {
-                // instance of Map texture
-                texture.bindTextureForPosSize(new BABYLON.Vector2(0, 0), new BABYLON.Size(texture.getSize().width, texture.getSize().height), false);
-                BABYLON.Tools.DumpFramebuffer(texture.getSize().width, texture.getSize().height, this._inspector.scene.getEngine(), (data) => img.src = data);
-                texture.unbindTexture();
-
-            }
-            else if (texture instanceof BABYLON.RenderTargetTexture) {
+            if (texture instanceof BABYLON.RenderTargetTexture) {
                 // RenderTarget textures
                 let scene = this._inspector.scene;
                 let engine = scene.getEngine();

+ 4 - 0
loaders/src/glTF/1.0/babylon.glTFLoader.ts

@@ -1512,6 +1512,10 @@ module BABYLON.GLTF1 {
             GLTFLoader.Extensions[extension.name] = extension;
         }
 
+        public dispose(): void {
+            // do nothing
+        }
+
         public 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): boolean {
             scene.useRightHandedSystem = true;
 

+ 6 - 2
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -59,7 +59,9 @@ module BABYLON.GLTF2.Extensions {
                 }
 
                 setTimeout(() => {
-                    this._loadNodeLOD(loader, context, nodes, index - 1, onComplete);
+                    loader._tryCatchOnError(() => {
+                        this._loadNodeLOD(loader, context, nodes, index - 1, onComplete);
+                    });
                 }, MSFTLOD.MinimalLODDelay);
             });
         }
@@ -91,7 +93,9 @@ module BABYLON.GLTF2.Extensions {
                 loader._executeWhenRenderReady(() => {
                     BaseTexture.WhenAllReady(babylonMaterial.getActiveTextures(), () => {
                         setTimeout(() => {
-                            this._loadMaterialLOD(loader, context, materials, index - 1, assign, onComplete);
+                            loader._tryCatchOnError(() => {
+                                this._loadMaterialLOD(loader, context, materials, index - 1, assign, onComplete);
+                            });
                         }, MSFTLOD.MinimalLODDelay);
                     });
                 });

+ 77 - 74
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -33,10 +33,11 @@ module BABYLON.GLTF2 {
         readonly BYTES_PER_ELEMENT: number;
     }
 
-    export class GLTFLoader implements IGLTFLoader, IDisposable {
+    export class GLTFLoader implements IGLTFLoader {
         public _gltf: IGLTF;
         public _babylonScene: Scene;
 
+        private _disposed = false;
         private _parent: GLTFFileLoader;
         private _rootUrl: string;
         private _defaultMaterial: PBRMaterial;
@@ -45,7 +46,7 @@ module BABYLON.GLTF2 {
         private _progressCallback: (event: ProgressEvent) => void;
         private _errorCallback: (message: string) => void;
         private _renderReady = false;
-        private _disposed = false;
+        private _requests = new Array<XMLHttpRequest>();
 
         private _renderReadyObservable = new Observable<GLTFLoader>();
 
@@ -82,25 +83,35 @@ module BABYLON.GLTF2 {
 
             this._disposed = true;
 
+            // Abort requests created during load
+            for (let request of this._requests) {
+                request.abort();
+            }
+
             // Revoke object urls created during load
             if (this._gltf.textures) {
-                this._gltf.textures.forEach(texture => {
+                for (let texture of this._gltf.textures) {
                     if (texture.url) {
                         URL.revokeObjectURL(texture.url);
                     }
-                });
+                }
             }
 
             this._gltf = undefined;
             this._babylonScene = undefined;
+            this._parent = undefined;
             this._rootUrl = undefined;
             this._defaultMaterial = undefined;
+            this._rootNode = undefined;
             this._successCallback = undefined;
+            this._progressCallback = undefined;
             this._errorCallback = undefined;
             this._renderReady = false;
-            this._renderReadyObservable.clear();
+            this._requests = undefined;
+            this._renderReadyObservable = undefined;
             this._renderPendingCount = 0;
             this._loaderPendingCount = 0;
+            this._loaderTrackers = undefined;
         }
 
         public 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 {
@@ -181,10 +192,6 @@ module BABYLON.GLTF2 {
             this._startAnimations();
             this._successCallback();
             this._renderReadyObservable.notifyObservers(this);
-
-            if (this._parent.onReady) {
-                this._parent.onReady();
-            }
         }
 
         private _onComplete(): void {
@@ -380,7 +387,8 @@ module BABYLON.GLTF2 {
         private _loadMesh(context: string, node: IGLTFNode, mesh: IGLTFMesh): void {
             node.babylonMesh.name = node.babylonMesh.name || mesh.name;
 
-            if (!mesh.primitives || mesh.primitives.length === 0) {
+            var primitives = mesh.primitives;
+            if (!primitives || primitives.length === 0) {
                 throw new Error(context + ": Primitives are missing");
             }
 
@@ -389,8 +397,6 @@ module BABYLON.GLTF2 {
             this._loadAllVertexDataAsync(context, mesh, () => {
                 this._loadMorphTargets(context, node, mesh);
 
-                var primitives = mesh.primitives;
-
                 var vertexData = new VertexData();
                 for (var primitive of primitives) {
                     vertexData.merge(primitive.vertexData);
@@ -412,40 +418,42 @@ module BABYLON.GLTF2 {
                     verticesStart += verticesCount;
                     indicesStart += indicesCount;
                 };
+            });
 
-                var multiMaterial = new MultiMaterial(node.babylonMesh.name, this._babylonScene);
-                node.babylonMesh.material = multiMaterial;
-                var subMaterials = multiMaterial.subMaterials;
-                for (var index = 0; index < primitives.length; index++) {
-                    var primitive = primitives[index];
+            var multiMaterial = new MultiMaterial(node.babylonMesh.name, this._babylonScene);
+            node.babylonMesh.material = multiMaterial;
+            var subMaterials = multiMaterial.subMaterials;
+            for (let index = 0; index < primitives.length; index++) {
+                var primitive = primitives[index];
 
-                    if (primitive.material == null) {
-                        subMaterials[index] = this._getDefaultMaterial();
+                if (primitive.material == null) {
+                    subMaterials[index] = this._getDefaultMaterial();
+                }
+                else {
+                    var material = GLTFUtils.GetArrayItem(this._gltf.materials, primitive.material);
+                    if (!material) {
+                        throw new Error(context + ": Failed to find material " + primitive.material);
                     }
-                    else {
-                        var material = GLTFUtils.GetArrayItem(this._gltf.materials, primitive.material);
-                        if (!material) {
-                            throw new Error(context + ": Failed to find material " + primitive.material);
-                        }
 
-                        this._loadMaterial("#/materials/" + material.index, material, (babylonMaterial, isNew) => {
-                            if (isNew && this._parent.onMaterialLoaded) {
-                                this._parent.onMaterialLoaded(babylonMaterial);
-                            }
+                    this._loadMaterial("#/materials/" + material.index, material, (babylonMaterial, isNew) => {
+                        if (isNew && this._parent.onMaterialLoaded) {
+                            this._parent.onMaterialLoaded(babylonMaterial);
+                        }
 
-                            if (this._parent.onBeforeMaterialReadyAsync) {
-                                this._addLoaderPendingData(material);
-                                this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[index] != null, () => {
+                        if (this._parent.onBeforeMaterialReadyAsync) {
+                            this._addLoaderPendingData(material);
+                            this._parent.onBeforeMaterialReadyAsync(babylonMaterial, node.babylonMesh, subMaterials[index] != null, () => {
+                                this._tryCatchOnError(() => {
                                     subMaterials[index] = babylonMaterial;
                                     this._removeLoaderPendingData(material);
                                 });
-                            } else {
-                                subMaterials[index] = babylonMaterial;
-                            }
-                        });
-                    }
-                };
-            });
+                            });
+                        } else {
+                            subMaterials[index] = babylonMaterial;
+                        }
+                    });
+                }
+            };
         }
 
         private _loadAllVertexDataAsync(context: string, mesh: IGLTFMesh, onSuccess: () => void): void {
@@ -568,7 +576,7 @@ module BABYLON.GLTF2 {
                 for (var index = 0; index < numTargets; index++) {
                     var vertexData = new VertexData();
                     for (var primitive of mesh.primitives) {
-                        vertexData.merge(primitive.targetsVertexData[index]);
+                        vertexData.merge(primitive.targetsVertexData[index], { tangentLength: 3 });
                     }
 
                     var target = morphTargetManager.getTarget(index);
@@ -976,9 +984,6 @@ module BABYLON.GLTF2 {
                     this._removePendingData(buffer);
                 }
                 else {
-                    if (!GLTFUtils.ValidateUri(buffer.uri)) {
-                        throw new Error(context + ": Uri '" + buffer.uri + "' is invalid");
-                    }
 
                     buffer.loadedObservable = new Observable<IGLTFBuffer>();
                     buffer.loadedObservable.add(buffer => {
@@ -986,20 +991,10 @@ module BABYLON.GLTF2 {
                         this._removePendingData(buffer);
                     });
 
-                    Tools.LoadFile(this._rootUrl + buffer.uri, data => {
-                        this._tryCatchOnError(() => {
-                            buffer.loadedData = new Uint8Array(data);
-                            buffer.loadedObservable.notifyObservers(buffer);
-                            buffer.loadedObservable = null;
-                        });
-                    }, event => {
-                        this._tryCatchOnError(() => {
-                            this._onProgress(event);
-                        });
-                    }, this._babylonScene.database, true, request => {
-                        this._tryCatchOnError(() => {
-                            throw new Error(context + ": Failed to load '" + buffer.uri + "'" + (request ? ": " + request.status + " " + request.statusText : ""));
-                        });
+                    this._loadUri(context, buffer.uri, data => {
+                        buffer.loadedData = data;
+                        buffer.loadedObservable.notifyObservers(buffer);
+                        buffer.loadedObservable = null;
                     });
                 }
             }
@@ -1390,27 +1385,11 @@ module BABYLON.GLTF2 {
 
         private _loadImage(context: string, image: IGLTFImage, onSuccess: (data: ArrayBufferView) => void): void {
             if (image.uri) {
-                if (!GLTFUtils.ValidateUri(image.uri)) {
-                    throw new Error(context + ": Uri '" + image.uri + "' is invalid");
-                }
-
                 if (GLTFUtils.IsBase64(image.uri)) {
                     onSuccess(new Uint8Array(GLTFUtils.DecodeBase64(image.uri)));
                 }
                 else {
-                    Tools.LoadFile(this._rootUrl + image.uri, data => {
-                        this._tryCatchOnError(() => {
-                            onSuccess(data);
-                        });
-                    }, event => {
-                        this._tryCatchOnError(() => {
-                            this._onProgress(event);
-                        });
-                    }, this._babylonScene.database, true, request => {
-                        this._tryCatchOnError(() => {
-                            throw new Error(context + ": Failed to load '" + image.uri + "'" + (request ? ": " + request.status + " " + request.statusText : ""));
-                        });
-                    });
+                    this._loadUri(context, image.uri, onSuccess);
                 }
             }
             else {
@@ -1423,7 +1402,31 @@ module BABYLON.GLTF2 {
             }
         }
 
-        public _tryCatchOnError(handler: () => void) {
+        public _loadUri(context: string, uri: string, onSuccess: (data: ArrayBufferView) => void): void {
+            if (!GLTFUtils.ValidateUri(uri)) {
+                throw new Error(context + ": Uri '" + uri + "' is invalid");
+            }
+
+            let request = Tools.LoadFile(this._rootUrl + uri, data => {
+                this._tryCatchOnError(() => {
+                    onSuccess(new Uint8Array(data));
+                });
+            }, event => {
+                this._tryCatchOnError(() => {
+                    this._onProgress(event);
+                });
+            }, this._babylonScene.database, true, request => {
+                this._tryCatchOnError(() => {
+                    throw new Error(context + ": Failed to load '" + uri + "'" + (request ? ": " + request.status + " " + request.statusText : ""));
+                });
+            });
+
+            if (request) {
+                this._requests.push(request);
+            }
+        }
+
+        public _tryCatchOnError(handler: () => void): void {
             try {
                 handler();
             }

+ 18 - 16
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -18,12 +18,12 @@ module BABYLON {
         bin: ArrayBufferView;
     }
 
-    export interface IGLTFLoader {
+    export interface IGLTFLoader extends IDisposable {
         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;
     }
 
-    export class GLTFFileLoader implements ISceneLoaderPluginAsync {
+    export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync {
         public static CreateGLTFLoaderV1: (parent: GLTFFileLoader) => IGLTFLoader;
         public static CreateGLTFLoaderV2: (parent: GLTFFileLoader) => IGLTFLoader;
 
@@ -45,19 +45,14 @@ module BABYLON {
         public onBeforeMaterialReadyAsync: (material: Material, targetMesh: AbstractMesh, isLOD: boolean, callback: () => void) => void;
 
         /**
-         * Raised when the visible components (geometry, materials, textures, etc.) are first ready to be rendered.
-         * For assets with LODs, raised when the first LOD is complete.
-         * For assets without LODs, raised when the model is complete just before onComplete.
-         */
-        public onReady: () => void;
-
-        /**
          * Raised when the asset is completely loaded, just before the loader is disposed.
          * For assets with LODs, raised when all of the LODs are complete.
-         * For assets without LODs, raised when the model is complete just after onReady.
+         * For assets without LODs, raised when the model is complete just after onSuccess.
          */
         public onComplete: () => void;
 
+        private _loader: IGLTFLoader;
+
         public name = "gltf";
 
         public extensions: ISceneLoaderPluginExtensions = {
@@ -65,6 +60,13 @@ module BABYLON {
             ".glb": { isBinary: true }
         };
 
+        public dispose(): void {
+            if (this._loader) {
+                this._loader.dispose();
+                this._loader = null;
+            }
+        }
+
         public importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void {
             var loaderData = GLTFFileLoader._parse(data, onError);
             if (!loaderData) {
@@ -75,12 +77,12 @@ module BABYLON {
                 this.onParsed(loaderData);
             }
 
-            var loader = this._getLoader(loaderData, onError);
-            if (!loader) {
+            this._loader = this._getLoader(loaderData, onError);
+            if (!this._loader) {
                 return;
             }
 
-            loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onSuccess, onProgress, onError);
+            this._loader.importMeshAsync(meshesNames, scene, loaderData, rootUrl, onSuccess, onProgress, onError);
         }
 
         public loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void {
@@ -93,12 +95,12 @@ module BABYLON {
                 this.onParsed(loaderData);
             }
 
-            var loader = this._getLoader(loaderData, onError);
-            if (!loader) {
+            this._loader = this._getLoader(loaderData, onError);
+            if (!this._loader) {
                 return;
             }
 
-            return loader.loadAsync(scene, loaderData, rootUrl, onSuccess, onProgress, onError);
+            return this._loader.loadAsync(scene, loaderData, rootUrl, onSuccess, onProgress, onError);
         }
 
         public canDirectLoad(data: string): boolean {

+ 1 - 1
package.json

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

+ 3 - 3
src/Actions/babylon.action.ts

@@ -5,7 +5,7 @@
 
         private _nextActiveAction: Action;
         private _child: Action;
-        private _condition: Condition;
+        private _condition?: Condition;
         private _triggerParameter: any;
 
         public onBeforeExecuteObservable = new Observable<Action>();
@@ -31,7 +31,7 @@
             return this._triggerParameter;
         }
 
-        public _executeCurrent(evt: ActionEvent): void {
+        public _executeCurrent(evt?: ActionEvent): void {
             if (this._nextActiveAction._condition) {
                 var condition = this._nextActiveAction._condition;
                 var currentRenderId = this._actionManager.getScene().getRenderId();
@@ -59,7 +59,7 @@
             this.skipToNextActiveAction();
         }
 
-        public execute(evt: ActionEvent): void {
+        public execute(evt?: ActionEvent): void {
 
         }
 

+ 22 - 20
src/Actions/babylon.actionManager.ts

@@ -11,7 +11,7 @@
          * @param meshUnderPointer The mesh that is currently pointed at (can be null)
          * @param sourceEvent the original (browser) event that triggered the ActionEvent
          */
-        constructor(public source: any, public pointerX: number, public pointerY: number, public meshUnderPointer: AbstractMesh, public sourceEvent?: any, public additionalData?: any) {
+        constructor(public source: any, public pointerX: number, public pointerY: number, public meshUnderPointer: Nullable<AbstractMesh>, public sourceEvent?: any, public additionalData?: any) {
 
         }
 
@@ -295,7 +295,7 @@
          * @param {BABYLON.Action} action - the action to be registered
          * @return {BABYLON.Action} the action amended (prepared) after registration
          */
-        public registerAction(action: Action): Action {
+        public registerAction(action: Action): Nullable<Action> {
             if (action.trigger === ActionManager.OnEveryFrameTrigger) {
                 if (this.getScene().actionManager !== this) {
                     Tools.Warn("OnEveryFrameTrigger can only be used with scene.actionManager");
@@ -323,27 +323,29 @@
          * @param {number} trigger - the trigger to process
          * @param evt {BABYLON.ActionEvent} the event details to be processed
          */
-        public processTrigger(trigger: number, evt: ActionEvent): void {
+        public processTrigger(trigger: number, evt?: ActionEvent): void {
             for (var index = 0; index < this.actions.length; index++) {
                 var action = this.actions[index];
 
                 if (action.trigger === trigger) {
-                    if (trigger === ActionManager.OnKeyUpTrigger
-                        || trigger === ActionManager.OnKeyDownTrigger) {
-                        var parameter = action.getTriggerParameter();
+                    if (evt) {
+                        if (trigger === ActionManager.OnKeyUpTrigger
+                            || trigger === ActionManager.OnKeyDownTrigger) {
+                            var parameter = action.getTriggerParameter();
 
-                        if (parameter && parameter !== evt.sourceEvent.keyCode) {
-                            if (!parameter.toLowerCase) {
-                                continue;
-                            }
-                            var lowerCase = parameter.toLowerCase();
-
-                            if (lowerCase !== evt.sourceEvent.key) {
-                                var unicode = evt.sourceEvent.charCode ? evt.sourceEvent.charCode : evt.sourceEvent.keyCode;
-                                var actualkey = String.fromCharCode(unicode).toLowerCase();
-                                if (actualkey !== lowerCase) {
+                            if (parameter && parameter !== evt.sourceEvent.keyCode) {
+                                if (!parameter.toLowerCase) {
                                     continue;
                                 }
+                                var lowerCase = parameter.toLowerCase();
+
+                                if (lowerCase !== evt.sourceEvent.key) {
+                                    var unicode = evt.sourceEvent.charCode ? evt.sourceEvent.charCode : evt.sourceEvent.keyCode;
+                                    var actualkey = String.fromCharCode(unicode).toLowerCase();
+                                    if (actualkey !== lowerCase) {
+                                        continue;
+                                    }
+                                }
                             }
                         }
                     }
@@ -413,7 +415,7 @@
             return root;
         }
 
-        public static Parse(parsedActions: any, object: AbstractMesh, scene: Scene) {
+        public static Parse(parsedActions: any, object: Nullable<AbstractMesh>, scene: Scene) {
             var actionManager = new BABYLON.ActionManager(scene);
             if (object === null)
                 scene.actionManager = actionManager;
@@ -427,7 +429,7 @@
                 return newInstance;
             };
 
-            var parseParameter = (name: string, value: string, target: any, propertyPath: string): any => {
+            var parseParameter = (name: string, value: string, target: any, propertyPath: Nullable<string>): any => {
                 if (propertyPath === null) {
                     // String, boolean or float
                     var floatValue = parseFloat(value);
@@ -474,13 +476,13 @@
             };
 
             // traverse graph per trigger
-            var traverse = (parsedAction: any, trigger: any, condition: Condition, action: Action, combineArray: Array<Action> = null) => {
+            var traverse = (parsedAction: any, trigger: any, condition: Nullable<Condition>, action: Nullable<Action>, combineArray: Nullable<Array<Action>> = null) => {
                 if (parsedAction.detached)
                     return;
 
                 var parameters = new Array<any>();
                 var target: any = null;
-                var propertyPath: string = null;
+                var propertyPath: Nullable<string> = null;
                 var combine = parsedAction.combine && parsedAction.combine.length > 0;
 
                 // Parameters

+ 8 - 5
src/Animations/babylon.animatable.ts

@@ -1,7 +1,7 @@
 module BABYLON {
     export class Animatable {
-        private _localDelayOffset: number = null;
-        private _pausedDelay: number = null;
+        private _localDelayOffset: Nullable<number> = null;
+        private _pausedDelay: Nullable<number> = null;
         private _runtimeAnimations = new Array<RuntimeAnimation>();
         private _paused = false;
         private _scene: Scene;
@@ -22,7 +22,7 @@
             this._speedRatio = value;
         }
 
-        constructor(scene: Scene, public target: any, public fromFrame: number = 0, public toFrame: number = 100, public loopAnimation: boolean = false, speedRatio: number = 1.0, public onAnimationEnd?: () => void, animations?: any) {
+        constructor(scene: Scene, public target: any, public fromFrame: number = 0, public toFrame: number = 100, public loopAnimation: boolean = false, speedRatio: number = 1.0, public onAnimationEnd?: Nullable<() => void>, animations?: any) {
             if (animations) {
                 this.appendAnimations(target, animations);
             }
@@ -45,7 +45,7 @@
             }
         }
 
-        public getAnimationByTargetProperty(property: string): Animation {
+        public getAnimationByTargetProperty(property: string): Nullable<Animation> {
             var runtimeAnimations = this._runtimeAnimations;
 
             for (var index = 0; index < runtimeAnimations.length; index++) {
@@ -57,7 +57,7 @@
             return null;
         }
 
-        public getRuntimeAnimationByTargetProperty(property: string): RuntimeAnimation {
+        public getRuntimeAnimationByTargetProperty(property: string): Nullable<RuntimeAnimation> {
             var runtimeAnimations = this._runtimeAnimations;
 
             for (var index = 0; index < runtimeAnimations.length; index++) {
@@ -105,6 +105,9 @@
                 var currentFrame = runtimeAnimations[0].currentFrame;
                 var adjustTime = frame - currentFrame;
                 var delay = adjustTime * 1000 / fps;
+                if (this._localDelayOffset === null) {
+                    this._localDelayOffset = 0;
+                }
                 this._localDelayOffset -= delay;
             }
 

+ 41 - 20
src/Animations/babylon.animation.ts

@@ -96,10 +96,10 @@
 
         public blendingSpeed = 0.01;
 
-        private _ranges: { [name: string]: AnimationRange; } = {};
+        private _ranges: { [name: string]: Nullable<AnimationRange> } = {};
 
         static _PrepareAnimation(name: string, targetProperty: string, framePerSecond: number, totalFrame: number,
-            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction): Animation {
+            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction): Nullable<Animation> {
             var dataType = undefined;
 
             if (!isNaN(parseFloat(from)) && isFinite(from)) {
@@ -153,19 +153,27 @@
 
         public static CreateAndStartAnimation(name: string, node: Node, targetProperty: string,
             framePerSecond: number, totalFrame: number,
-            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void) {
+            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Nullable<Animatable> {
 
             var animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
 
+            if (!animation) {
+                return null;
+            }
+
             return node.getScene().beginDirectAnimation(node, [animation], 0, totalFrame, (animation.loopMode === 1), 1.0, onAnimationEnd);
         }
 
         public static CreateMergeAndStartAnimation(name: string, node: Node, targetProperty: string,
             framePerSecond: number, totalFrame: number,
-            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void) {
+            from: any, to: any, loopMode?: number, easingFunction?: EasingFunction, onAnimationEnd?: () => void): Nullable<Animatable> {
 
             var animation = Animation._PrepareAnimation(name, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction);
 
+            if (!animation) {
+                return null;
+            }
+
             node.animations.push(animation);
 
             return node.getScene().beginAnimation(node, 0, totalFrame, (animation.loopMode === 1), 1.0, onAnimationEnd);
@@ -182,7 +190,7 @@
 		 * @param duration The duration of the animation, in milliseconds
 		 * @param onAnimationEnd Call back trigger at the end of the animation.
 		 */
-		public static TransitionTo(property: string, targetValue: any, host: any, scene: Scene, frameRate: number, transition: Animation, duration: number,	onAnimationEnd: () => void = null): Animatable {
+		public static TransitionTo(property: string, targetValue: any, host: any, scene: Scene, frameRate: number, transition: Animation, duration: number,	onAnimationEnd: Nullable<() => void> = null): Nullable<Animatable> {
 
 			if (duration <= 0) {
 				host[property] = targetValue;
@@ -293,23 +301,27 @@
         }
 
         public deleteRange(name: string, deleteFrames = true): void {
-            if (this._ranges[name]) {
-                if (deleteFrames) {
-                    var from = this._ranges[name].from;
-                    var to = this._ranges[name].to;
- 
-                    // this loop MUST go high to low for multiple splices to work
-                    for (var key = this._keys.length - 1; key >= 0; key--) {
-                        if (this._keys[key].frame >= from && this._keys[key].frame <= to) {
-                            this._keys.splice(key, 1);
-                        }
+            let range = this._ranges[name];
+            if (!range) {
+                return;
+
+            }
+            if (deleteFrames) {
+                var from = range.from;
+                var to = range.to;
+
+                // this loop MUST go high to low for multiple splices to work
+                for (var key = this._keys.length - 1; key >= 0; key--) {
+                    if (this._keys[key].frame >= from && this._keys[key].frame <= to) {
+                        this._keys.splice(key, 1);
                     }
                 }
-                this._ranges[name] = undefined; // said much faster than 'delete this._range[name]' 
             }
+            this._ranges[name] = null; // said much faster than 'delete this._range[name]' 
+        
         }
 
-        public getRange(name: string): AnimationRange {
+        public getRange(name: string): Nullable<AnimationRange> {
             return this._ranges[name];
         }
 
@@ -394,7 +406,11 @@
             if (this._ranges) {
                 clone._ranges = {};
                 for (var name in this._ranges) {
-                    clone._ranges[name] = this._ranges[name].clone();
+                    let range = this._ranges[name];
+                    if (!range) {
+                        continue;
+                    }
+                    clone._ranges[name] = range.clone();
                 }
             }
 
@@ -442,10 +458,15 @@
 
             serializationObject.ranges = [];
             for (var name in this._ranges) {
+                let source  =this._ranges[name];
+
+                if (!source) {
+                    continue;
+                }
                 var range: any = {};
                 range.name = name;
-                range.from = this._ranges[name].from;
-                range.to = this._ranges[name].to;
+                range.from = source.from;
+                range.to = source.to;
                 serializationObject.ranges.push(range);
             }
 

+ 1 - 1
src/Animations/babylon.runtimeAnimation.ts

@@ -50,7 +50,7 @@
             return value;
         }      
         
-        private _interpolate(currentFrame: number, repeatCount: number, loopMode: number, offsetValue?: any, highLimitValue?: any) {
+        private _interpolate(currentFrame: number, repeatCount: number, loopMode?: number, offsetValue?: any, highLimitValue?: any) {
             if (loopMode === Animation.ANIMATIONLOOPMODE_CONSTANT && repeatCount > 0) {
                 return highLimitValue.clone ? highLimitValue.clone() : highLimitValue;
             }

+ 9 - 7
src/Audio/babylon.analyser.ts

@@ -10,16 +10,16 @@ module BABYLON {
         private _byteTime: Uint8Array;
         private _floatFreqs: Float32Array;
         private _webAudioAnalyser: AnalyserNode;
-        private _debugCanvas: HTMLCanvasElement;
-        private _debugCanvasContext: CanvasRenderingContext2D;
+        private _debugCanvas: Nullable< HTMLCanvasElement>;
+        private _debugCanvasContext: Nullable<CanvasRenderingContext2D>;
         private _scene: Scene;
-        private _registerFunc: () => void
+        private _registerFunc: Nullable<() => void>;
         private _audioEngine: AudioEngine;
 
         constructor(scene: Scene) {
             this._scene = scene;
             this._audioEngine = Engine.audioEngine;
-            if (this._audioEngine.canUseWebAudio) {
+            if (this._audioEngine.canUseWebAudio && this._audioEngine.audioContext) {
                 this._webAudioAnalyser = this._audioEngine.audioContext.createAnalyser();
                 this._webAudioAnalyser.minDecibels = -140;
                 this._webAudioAnalyser.maxDecibels = 0;
@@ -81,7 +81,7 @@ module BABYLON {
                     };
                     this._scene.registerBeforeRender(this._registerFunc);
                 }
-                if (this._registerFunc) {
+                if (this._registerFunc && this._debugCanvasContext) {
                     var workingArray = this.getByteFrequencyData();
 
                     this._debugCanvasContext.fillStyle = 'rgb(0, 0, 0)';
@@ -104,8 +104,10 @@ module BABYLON {
 
         public stopDebugCanvas() {
             if (this._debugCanvas) {
-                this._scene.unregisterBeforeRender(this._registerFunc);
-                this._registerFunc = null;
+                if (this._registerFunc) {
+                    this._scene.unregisterBeforeRender(this._registerFunc);
+                    this._registerFunc = null;
+                }
                 document.body.removeChild(this._debugCanvas);
                 this._debugCanvas = null;
                 this._debugCanvasContext = null;

+ 8 - 5
src/Audio/babylon.audioEngine.ts

@@ -1,11 +1,11 @@
 module BABYLON {
     export class AudioEngine {
-        private _audioContext: AudioContext = null;
+        private _audioContext: Nullable<AudioContext> = null;
         private _audioContextInitialized = false;
         public canUseWebAudio: boolean = false;
         public masterGain: GainNode;
 
-        private _connectedAnalyser: Analyser;
+        private _connectedAnalyser: Nullable<Analyser>;
         public WarnedWebAudioUnsupported: boolean = false;
         public unlocked: boolean = false;
         public onAudioUnlocked: () => any;
@@ -13,7 +13,7 @@
         public isMP3supported: boolean = false;
         public isOGGsupported: boolean = false;
 
-        public get audioContext(): AudioContext {
+        public get audioContext(): Nullable<AudioContext> {
             if (!this._audioContextInitialized) {
                 this._initializeAudioContext();
             }
@@ -56,6 +56,9 @@
 
         private _unlockiOSaudio() {
             var unlockaudio = () => {
+                if (!this.audioContext) {
+                    return;
+                }
                 var buffer = this.audioContext.createBuffer(1, 1, 22050);
                 var source = this.audioContext.createBufferSource();
                 source.buffer = buffer;
@@ -95,7 +98,7 @@
 
         public dispose() {
             if (this.canUseWebAudio && this._audioContextInitialized) {
-                if (this._connectedAnalyser) {
+                if (this._connectedAnalyser && this._audioContext) {
                     this._connectedAnalyser.stopDebugCanvas();
                     this._connectedAnalyser.dispose();
                     this.masterGain.disconnect();
@@ -126,7 +129,7 @@
             if (this._connectedAnalyser) {
                 this._connectedAnalyser.stopDebugCanvas();
             }
-            if (this.canUseWebAudio && this._audioContextInitialized) {
+            if (this.canUseWebAudio && this._audioContextInitialized && this._audioContext) {
                 this._connectedAnalyser = analyser;
                 this.masterGain.disconnect();
                 this._connectedAnalyser.connectAudioNodes(this.masterGain, this._audioContext.destination);

+ 0 - 0
src/Audio/babylon.sound.ts


部分文件因文件數量過多而無法顯示