Bladeren bron

Fix type definition
Fix submesh bounding

David Catuhe 7 jaren geleden
bovenliggende
commit
257de4f0e2
100 gewijzigde bestanden met toevoegingen van 10053 en 15007 verwijderingen
  1. 0 0
      Playground/textures/ColorGrading.3DL
  2. 0 0
      Playground/textures/colorGrade.png
  3. 0 0
      Playground/textures/environment.hdr
  4. 0 0
      Playground/textures/fire/diffuse.png
  5. 0 0
      Playground/textures/fire/distortion.png
  6. 0 0
      Playground/textures/fire/opacity.png
  7. 0 0
      Playground/textures/lava/cloud.png
  8. 0 0
      Playground/textures/lava/lavatile.jpg
  9. BIN
      assets/meshes/0.jpg
  10. 0 1
      assets/meshes/Cat.babylon
  11. BIN
      assets/meshes/Dude/0.jpg
  12. BIN
      assets/meshes/Dude/1.jpg
  13. BIN
      assets/meshes/Dude/2.jpg
  14. BIN
      assets/meshes/Dude/3.jpg
  15. 0 1
      assets/meshes/Dude/dude.babylon
  16. 0 1
      assets/meshes/Rabbit.babylon
  17. 0 1
      assets/meshes/Rabbit.babylon.manifest
  18. BIN
      assets/meshes/Tree/Tree.tga
  19. 0 5
      assets/meshes/Tree/tree.babylon
  20. 0 5
      assets/meshes/skull.babylon
  21. 0 95
      assets/refs/dat.gui.min.js
  22. BIN
      assets/textures/16testSpecularHDR.dds
  23. BIN
      assets/textures/Brdf.dds
  24. BIN
      assets/textures/DefaultEnvironmentMap.dds
  25. BIN
      assets/textures/Ground.jpg
  26. 0 4916
      assets/textures/LateSunset.3dl
  27. BIN
      assets/textures/SpecularHDR.dds
  28. BIN
      assets/textures/albedo.png
  29. BIN
      assets/textures/amiga.jpg
  30. BIN
      assets/textures/babylonjs.mp4
  31. BIN
      assets/textures/babylonjs.webm
  32. BIN
      assets/textures/environment.dds
  33. BIN
      assets/textures/floor.png
  34. BIN
      assets/textures/floor_bump.PNG
  35. BIN
      assets/textures/grass.dds
  36. BIN
      assets/textures/grass.jpg
  37. BIN
      assets/textures/grass.png
  38. BIN
      assets/textures/grassn.png
  39. BIN
      assets/textures/hdr/room.hdr
  40. BIN
      assets/textures/heightMap.png
  41. BIN
      assets/textures/leopard_fur.JPG
  42. BIN
      assets/textures/misc.jpg
  43. BIN
      assets/textures/mixMap.png
  44. BIN
      assets/textures/player.png
  45. BIN
      assets/textures/reflectivity.png
  46. BIN
      assets/textures/rock.png
  47. BIN
      assets/textures/rockn.png
  48. BIN
      assets/textures/room.hdr
  49. BIN
      assets/textures/skybox/TropicalSunnyDay_nx.jpg
  50. BIN
      assets/textures/skybox/TropicalSunnyDay_ny.jpg
  51. BIN
      assets/textures/skybox/TropicalSunnyDay_nz.jpg
  52. BIN
      assets/textures/skybox/TropicalSunnyDay_px.jpg
  53. BIN
      assets/textures/skybox/TropicalSunnyDay_py.jpg
  54. BIN
      assets/textures/skybox/TropicalSunnyDay_pz.jpg
  55. BIN
      assets/textures/skybox/snow_nx.jpg
  56. BIN
      assets/textures/skybox/snow_ny.jpg
  57. BIN
      assets/textures/skybox/snow_nz.jpg
  58. BIN
      assets/textures/skybox/snow_px.jpg
  59. BIN
      assets/textures/skybox/snow_py.jpg
  60. BIN
      assets/textures/skybox/snow_pz.jpg
  61. BIN
      assets/textures/sparkle2.jpg
  62. BIN
      assets/textures/speckles.jpg
  63. BIN
      assets/textures/sun.png
  64. BIN
      assets/textures/test.png
  65. BIN
      assets/textures/testSpecularHDR.dds
  66. BIN
      assets/textures/tree.png
  67. BIN
      assets/textures/waterbump.png
  68. 991 990
      dist/preview release/babylon.d.ts
  69. 13 13
      dist/preview release/babylon.js
  70. 51 16
      dist/preview release/babylon.max.js
  71. 991 990
      dist/preview release/babylon.module.d.ts
  72. 13 13
      dist/preview release/babylon.worker.js
  73. 3936 3935
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  74. 13 13
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  75. 51 16
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  76. 3936 3935
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts
  77. 7 7
      dist/preview release/inspector/babylon.inspector.d.ts
  78. 2 2
      inspector/src/Inspector.ts
  79. 1 1
      inspector/src/adapters/MeshAdapter.ts
  80. 2 2
      inspector/src/details/PropertyLine.ts
  81. 1 1
      inspector/src/gui/Tooltip.ts
  82. 2 2
      inspector/src/helpers/Helpers.ts
  83. 2 2
      inspector/src/tabs/PropertyTab.ts
  84. 1 1
      inspector/src/tabs/TabBar.ts
  85. 2 2
      inspector/src/tools/LabelTool.ts
  86. 0 0
      inspector/test/explosion.wav
  87. 8 8
      inspector/test/index.js
  88. 0 0
      inspector/test/jump.wav
  89. 1 1
      localDev/index.html
  90. 6 6
      materialsLibrary/index.html
  91. 1 1
      materialsLibrary/test/addCell.js
  92. 0 1
      materialsLibrary/test/addbackground.js
  93. 3 3
      materialsLibrary/test/addfire.js
  94. 2 2
      materialsLibrary/test/addfur.js
  95. 2 2
      materialsLibrary/test/addlava.js
  96. 4 6
      materialsLibrary/test/addpbr.js
  97. 2 2
      materialsLibrary/test/addpbrmetallicroughness.js
  98. 2 2
      materialsLibrary/test/addpbrspecularglossiness.js
  99. 7 7
      materialsLibrary/test/addterrain.js
  100. 0 0
      materialsLibrary/test/addtriplanar.js

assets/textures/ColorGrading.3DL → Playground/textures/ColorGrading.3DL


assets/textures/colorGrade.png → Playground/textures/colorGrade.png


assets/textures/hdr/environment.hdr → Playground/textures/environment.hdr


assets/textures/fire/diffuse.png → Playground/textures/fire/diffuse.png


assets/textures/fire/distortion.png → Playground/textures/fire/distortion.png


assets/textures/fire/opacity.png → Playground/textures/fire/opacity.png


assets/textures/lava/cloud.png → Playground/textures/lava/cloud.png


assets/textures/lava/lavatile.jpg → Playground/textures/lava/lavatile.jpg


BIN
assets/meshes/0.jpg


File diff suppressed because it is too large
+ 0 - 1
assets/meshes/Cat.babylon


BIN
assets/meshes/Dude/0.jpg


BIN
assets/meshes/Dude/1.jpg


BIN
assets/meshes/Dude/2.jpg


BIN
assets/meshes/Dude/3.jpg


File diff suppressed because it is too large
+ 0 - 1
assets/meshes/Dude/dude.babylon


File diff suppressed because it is too large
+ 0 - 1
assets/meshes/Rabbit.babylon


+ 0 - 1
assets/meshes/Rabbit.babylon.manifest

@@ -1 +0,0 @@
-{"version" : 1,    "enableSceneOffline" : true,    "enableTexturesOffline" : true}

BIN
assets/meshes/Tree/Tree.tga


File diff suppressed because it is too large
+ 0 - 5
assets/meshes/Tree/tree.babylon


File diff suppressed because it is too large
+ 0 - 5
assets/meshes/skull.babylon


File diff suppressed because it is too large
+ 0 - 95
assets/refs/dat.gui.min.js


BIN
assets/textures/16testSpecularHDR.dds


BIN
assets/textures/Brdf.dds


BIN
assets/textures/DefaultEnvironmentMap.dds


BIN
assets/textures/Ground.jpg


File diff suppressed because it is too large
+ 0 - 4916
assets/textures/LateSunset.3dl


BIN
assets/textures/SpecularHDR.dds


BIN
assets/textures/albedo.png


BIN
assets/textures/amiga.jpg


BIN
assets/textures/babylonjs.mp4


BIN
assets/textures/babylonjs.webm


BIN
assets/textures/environment.dds


BIN
assets/textures/floor.png


BIN
assets/textures/floor_bump.PNG


BIN
assets/textures/grass.dds


BIN
assets/textures/grass.jpg


BIN
assets/textures/grass.png


BIN
assets/textures/grassn.png


BIN
assets/textures/hdr/room.hdr


BIN
assets/textures/heightMap.png


BIN
assets/textures/leopard_fur.JPG


BIN
assets/textures/misc.jpg


BIN
assets/textures/mixMap.png


BIN
assets/textures/player.png


BIN
assets/textures/reflectivity.png


BIN
assets/textures/rock.png


BIN
assets/textures/rockn.png


BIN
assets/textures/room.hdr


BIN
assets/textures/skybox/TropicalSunnyDay_nx.jpg


BIN
assets/textures/skybox/TropicalSunnyDay_ny.jpg


BIN
assets/textures/skybox/TropicalSunnyDay_nz.jpg


BIN
assets/textures/skybox/TropicalSunnyDay_px.jpg


BIN
assets/textures/skybox/TropicalSunnyDay_py.jpg


BIN
assets/textures/skybox/TropicalSunnyDay_pz.jpg


BIN
assets/textures/skybox/snow_nx.jpg


BIN
assets/textures/skybox/snow_ny.jpg


BIN
assets/textures/skybox/snow_nz.jpg


BIN
assets/textures/skybox/snow_px.jpg


BIN
assets/textures/skybox/snow_py.jpg


BIN
assets/textures/skybox/snow_pz.jpg


BIN
assets/textures/sparkle2.jpg


BIN
assets/textures/speckles.jpg


BIN
assets/textures/sun.png


BIN
assets/textures/test.png


BIN
assets/textures/testSpecularHDR.dds


BIN
assets/textures/tree.png


BIN
assets/textures/waterbump.png


File diff suppressed because it is too large
+ 991 - 990
dist/preview release/babylon.d.ts


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


+ 51 - 16
dist/preview release/babylon.max.js

@@ -13725,7 +13725,7 @@ var BABYLON;
             this._renderId = renderId;
         };
         /**
-         * Returns the last update of the World matrix
+         * Returns the latest update of the World matrix
          * Returns a Matrix.
          */
         AbstractMesh.prototype.getWorldMatrix = function () {
@@ -13739,7 +13739,7 @@ var BABYLON;
         };
         Object.defineProperty(AbstractMesh.prototype, "worldMatrixFromCache", {
             /**
-             * Returns directly the last state of the mesh World matrix.
+             * Returns directly the latest state of the mesh World matrix.
              * A Matrix is returned.
              */
             get: function () {
@@ -25536,6 +25536,7 @@ var BABYLON;
             var boundingInfo = this.getBoundingInfo();
             if (!boundingInfo) {
                 this.refreshBoundingInfo();
+                boundingInfo = this.getBoundingInfo();
             }
             boundingInfo.update(world);
             return this;
@@ -65819,8 +65820,9 @@ var BABYLON;
             this._deltaPosition = BABYLON.Vector3.Zero();
             this._isDisposed = false;
             //temp variables for parent rotation calculations
-            this._mats = [new BABYLON.Matrix(), new BABYLON.Matrix()];
+            //private _mats: Array<Matrix> = [new Matrix(), new Matrix()];
             this._tmpQuat = new BABYLON.Quaternion();
+            this._tmpQuat2 = new BABYLON.Quaternion();
             /**
              * this function is executed by the physics engine.
              */
@@ -65830,10 +65832,9 @@ var BABYLON;
                 }
                 _this.object.translate(_this._deltaPosition, -1);
                 _this._deltaRotationConjugated && _this.object.rotationQuaternion && _this.object.rotationQuaternion.multiplyToRef(_this._deltaRotationConjugated, _this.object.rotationQuaternion);
-                if (_this.object.parent) {
-                    _this.object.computeWorldMatrix(false).getRotationMatrixToRef(_this._mats[0]);
-                    BABYLON.Quaternion.FromRotationMatrixToRef(_this._mats[0], _this._tmpQuat);
-                    _this._tmpQuat.normalize();
+                if (_this.object.parent && _this.object.rotationQuaternion) {
+                    _this.getParentsRotation();
+                    _this._tmpQuat.multiplyToRef(_this.object.rotationQuaternion, _this._tmpQuat);
                 }
                 else {
                     _this._tmpQuat.copyFrom(_this.object.rotationQuaternion || new BABYLON.Quaternion());
@@ -65855,10 +65856,8 @@ var BABYLON;
                 _this._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(_this);
                 // object has now its world rotation. needs to be converted to local.
                 if (_this.object.parent && _this.object.rotationQuaternion) {
-                    _this.object.parent.computeWorldMatrix(false).getRotationMatrixToRef(_this._mats[0]);
-                    BABYLON.Quaternion.FromRotationMatrixToRef(_this._mats[0], _this._tmpQuat);
+                    _this.getParentsRotation();
                     _this._tmpQuat.conjugateInPlace();
-                    _this._tmpQuat.normalize();
                     _this._tmpQuat.multiplyToRef(_this.object.rotationQuaternion, _this.object.rotationQuaternion);
                 }
                 // take the position set and make it the absolute position of this object.
@@ -66186,6 +66185,21 @@ var BABYLON;
                 BABYLON.Tools.Warn("Function to remove was not found");
             }
         };
+        PhysicsImpostor.prototype.getParentsRotation = function () {
+            var parent = this.object.parent;
+            this._tmpQuat.copyFromFloats(0, 0, 0, 1);
+            while (parent) {
+                if (parent.rotationQuaternion) {
+                    this._tmpQuat2.copyFrom(parent.rotationQuaternion);
+                }
+                else {
+                    BABYLON.Quaternion.RotationYawPitchRollToRef(parent.rotation.y, parent.rotation.x, parent.rotation.z, this._tmpQuat2);
+                }
+                this._tmpQuat.multiplyToRef(this._tmpQuat2, this._tmpQuat);
+                parent = parent.parent;
+            }
+            return this._tmpQuat;
+        };
         /**
          * Apply a force
          */
@@ -66799,7 +66813,8 @@ var BABYLON;
                     var oldQuaternion = object.rotationQuaternion && object.rotationQuaternion.clone();
                     object.position.copyFromFloats(0, 0, 0);
                     object.rotation && object.rotation.copyFromFloats(0, 0, 0);
-                    object.rotationQuaternion && object.rotationQuaternion.copyFromFloats(0, 0, 0, 1);
+                    object.rotationQuaternion && object.rotationQuaternion.copyFrom(impostor.getParentsRotation());
+                    object.rotationQuaternion && object.parent && object.rotationQuaternion.conjugateInPlace();
                     var transform = object.computeWorldMatrix(true);
                     // convert rawVerts to object space
                     var temp = new Array();
@@ -66815,7 +66830,19 @@ var BABYLON;
                     oldQuaternion && object.rotationQuaternion && object.rotationQuaternion.copyFrom(oldQuaternion);
                     break;
                 case BABYLON.PhysicsImpostor.HeightmapImpostor:
+                    var oldPosition2 = object.position.clone();
+                    var oldRotation2 = object.rotation && object.rotation.clone();
+                    var oldQuaternion2 = object.rotationQuaternion && object.rotationQuaternion.clone();
+                    object.position.copyFromFloats(0, 0, 0);
+                    object.rotation && object.rotation.copyFromFloats(0, 0, 0);
+                    object.rotationQuaternion && object.rotationQuaternion.copyFrom(impostor.getParentsRotation());
+                    object.rotationQuaternion && object.parent && object.rotationQuaternion.conjugateInPlace();
+                    object.rotationQuaternion && object.rotationQuaternion.multiplyInPlace(this._minus90X);
                     returnValue = this._createHeightmap(object);
+                    object.position.copyFrom(oldPosition2);
+                    oldRotation2 && object.rotation && object.rotation.copyFrom(oldRotation2);
+                    oldQuaternion2 && object.rotationQuaternion && object.rotationQuaternion.copyFrom(oldQuaternion2);
+                    object.computeWorldMatrix(true);
                     break;
                 case BABYLON.PhysicsImpostor.ParticleImpostor:
                     returnValue = new this.BJSCANNON.Particle();
@@ -66825,18 +66852,26 @@ var BABYLON;
         };
         CannonJSPlugin.prototype._createHeightmap = function (object, pointDepth) {
             var pos = (object.getVerticesData(BABYLON.VertexBuffer.PositionKind));
+            var transform = object.computeWorldMatrix(true);
+            // convert rawVerts to object space
+            var temp = new Array();
+            var index;
+            for (index = 0; index < pos.length; index += 3) {
+                BABYLON.Vector3.TransformCoordinates(BABYLON.Vector3.FromArray(pos, index), transform).toArray(temp, index);
+            }
+            pos = temp;
             var matrix = new Array();
             //For now pointDepth will not be used and will be automatically calculated.
             //Future reference - try and find the best place to add a reference to the pointDepth variable.
             var arraySize = pointDepth || ~~(Math.sqrt(pos.length / 3) - 1);
             var boundingInfo = (object.getBoundingInfo());
-            var dim = Math.min(boundingInfo.boundingBox.extendSizeWorld.x, boundingInfo.boundingBox.extendSizeWorld.z);
-            var minY = boundingInfo.boundingBox.extendSizeWorld.y;
+            var dim = Math.min(boundingInfo.boundingBox.extendSizeWorld.x, boundingInfo.boundingBox.extendSizeWorld.y);
+            var minY = boundingInfo.boundingBox.extendSizeWorld.z;
             var elementSize = dim * 2 / arraySize;
             for (var i = 0; i < pos.length; i = i + 3) {
                 var x = Math.round((pos[i + 0]) / elementSize + arraySize / 2);
-                var z = Math.round(((pos[i + 2]) / elementSize - arraySize / 2) * -1);
-                var y = pos[i + 1] + minY;
+                var z = Math.round(((pos[i + 1]) / elementSize - arraySize / 2) * -1);
+                var y = -pos[i + 2] + minY;
                 if (!matrix[x]) {
                     matrix[x] = [];
                 }
@@ -67811,7 +67846,7 @@ var BABYLON;
                     isRGB: (header[off_pfFlags] & DDPF_RGB) === DDPF_RGB,
                     isLuminance: (header[off_pfFlags] & DDPF_LUMINANCE) === DDPF_LUMINANCE,
                     isCube: (header[off_caps2] & DDSCAPS2_CUBEMAP) === DDSCAPS2_CUBEMAP,
-                    isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || FOURCC_DXT1 === FOURCC_DXT5),
+                    isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || fourCC === FOURCC_DXT5),
                     dxgiFormat: dxgiFormat,
                     textureType: textureType
                 };

File diff suppressed because it is too large
+ 991 - 990
dist/preview release/babylon.module.d.ts


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


File diff suppressed because it is too large
+ 3936 - 3935
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


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


+ 51 - 16
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -13725,7 +13725,7 @@ var BABYLON;
             this._renderId = renderId;
         };
         /**
-         * Returns the last update of the World matrix
+         * Returns the latest update of the World matrix
          * Returns a Matrix.
          */
         AbstractMesh.prototype.getWorldMatrix = function () {
@@ -13739,7 +13739,7 @@ var BABYLON;
         };
         Object.defineProperty(AbstractMesh.prototype, "worldMatrixFromCache", {
             /**
-             * Returns directly the last state of the mesh World matrix.
+             * Returns directly the latest state of the mesh World matrix.
              * A Matrix is returned.
              */
             get: function () {
@@ -25536,6 +25536,7 @@ var BABYLON;
             var boundingInfo = this.getBoundingInfo();
             if (!boundingInfo) {
                 this.refreshBoundingInfo();
+                boundingInfo = this.getBoundingInfo();
             }
             boundingInfo.update(world);
             return this;
@@ -65665,8 +65666,9 @@ var BABYLON;
             this._deltaPosition = BABYLON.Vector3.Zero();
             this._isDisposed = false;
             //temp variables for parent rotation calculations
-            this._mats = [new BABYLON.Matrix(), new BABYLON.Matrix()];
+            //private _mats: Array<Matrix> = [new Matrix(), new Matrix()];
             this._tmpQuat = new BABYLON.Quaternion();
+            this._tmpQuat2 = new BABYLON.Quaternion();
             /**
              * this function is executed by the physics engine.
              */
@@ -65676,10 +65678,9 @@ var BABYLON;
                 }
                 _this.object.translate(_this._deltaPosition, -1);
                 _this._deltaRotationConjugated && _this.object.rotationQuaternion && _this.object.rotationQuaternion.multiplyToRef(_this._deltaRotationConjugated, _this.object.rotationQuaternion);
-                if (_this.object.parent) {
-                    _this.object.computeWorldMatrix(false).getRotationMatrixToRef(_this._mats[0]);
-                    BABYLON.Quaternion.FromRotationMatrixToRef(_this._mats[0], _this._tmpQuat);
-                    _this._tmpQuat.normalize();
+                if (_this.object.parent && _this.object.rotationQuaternion) {
+                    _this.getParentsRotation();
+                    _this._tmpQuat.multiplyToRef(_this.object.rotationQuaternion, _this._tmpQuat);
                 }
                 else {
                     _this._tmpQuat.copyFrom(_this.object.rotationQuaternion || new BABYLON.Quaternion());
@@ -65701,10 +65702,8 @@ var BABYLON;
                 _this._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(_this);
                 // object has now its world rotation. needs to be converted to local.
                 if (_this.object.parent && _this.object.rotationQuaternion) {
-                    _this.object.parent.computeWorldMatrix(false).getRotationMatrixToRef(_this._mats[0]);
-                    BABYLON.Quaternion.FromRotationMatrixToRef(_this._mats[0], _this._tmpQuat);
+                    _this.getParentsRotation();
                     _this._tmpQuat.conjugateInPlace();
-                    _this._tmpQuat.normalize();
                     _this._tmpQuat.multiplyToRef(_this.object.rotationQuaternion, _this.object.rotationQuaternion);
                 }
                 // take the position set and make it the absolute position of this object.
@@ -66032,6 +66031,21 @@ var BABYLON;
                 BABYLON.Tools.Warn("Function to remove was not found");
             }
         };
+        PhysicsImpostor.prototype.getParentsRotation = function () {
+            var parent = this.object.parent;
+            this._tmpQuat.copyFromFloats(0, 0, 0, 1);
+            while (parent) {
+                if (parent.rotationQuaternion) {
+                    this._tmpQuat2.copyFrom(parent.rotationQuaternion);
+                }
+                else {
+                    BABYLON.Quaternion.RotationYawPitchRollToRef(parent.rotation.y, parent.rotation.x, parent.rotation.z, this._tmpQuat2);
+                }
+                this._tmpQuat.multiplyToRef(this._tmpQuat2, this._tmpQuat);
+                parent = parent.parent;
+            }
+            return this._tmpQuat;
+        };
         /**
          * Apply a force
          */
@@ -66645,7 +66659,8 @@ var BABYLON;
                     var oldQuaternion = object.rotationQuaternion && object.rotationQuaternion.clone();
                     object.position.copyFromFloats(0, 0, 0);
                     object.rotation && object.rotation.copyFromFloats(0, 0, 0);
-                    object.rotationQuaternion && object.rotationQuaternion.copyFromFloats(0, 0, 0, 1);
+                    object.rotationQuaternion && object.rotationQuaternion.copyFrom(impostor.getParentsRotation());
+                    object.rotationQuaternion && object.parent && object.rotationQuaternion.conjugateInPlace();
                     var transform = object.computeWorldMatrix(true);
                     // convert rawVerts to object space
                     var temp = new Array();
@@ -66661,7 +66676,19 @@ var BABYLON;
                     oldQuaternion && object.rotationQuaternion && object.rotationQuaternion.copyFrom(oldQuaternion);
                     break;
                 case BABYLON.PhysicsImpostor.HeightmapImpostor:
+                    var oldPosition2 = object.position.clone();
+                    var oldRotation2 = object.rotation && object.rotation.clone();
+                    var oldQuaternion2 = object.rotationQuaternion && object.rotationQuaternion.clone();
+                    object.position.copyFromFloats(0, 0, 0);
+                    object.rotation && object.rotation.copyFromFloats(0, 0, 0);
+                    object.rotationQuaternion && object.rotationQuaternion.copyFrom(impostor.getParentsRotation());
+                    object.rotationQuaternion && object.parent && object.rotationQuaternion.conjugateInPlace();
+                    object.rotationQuaternion && object.rotationQuaternion.multiplyInPlace(this._minus90X);
                     returnValue = this._createHeightmap(object);
+                    object.position.copyFrom(oldPosition2);
+                    oldRotation2 && object.rotation && object.rotation.copyFrom(oldRotation2);
+                    oldQuaternion2 && object.rotationQuaternion && object.rotationQuaternion.copyFrom(oldQuaternion2);
+                    object.computeWorldMatrix(true);
                     break;
                 case BABYLON.PhysicsImpostor.ParticleImpostor:
                     returnValue = new this.BJSCANNON.Particle();
@@ -66671,18 +66698,26 @@ var BABYLON;
         };
         CannonJSPlugin.prototype._createHeightmap = function (object, pointDepth) {
             var pos = (object.getVerticesData(BABYLON.VertexBuffer.PositionKind));
+            var transform = object.computeWorldMatrix(true);
+            // convert rawVerts to object space
+            var temp = new Array();
+            var index;
+            for (index = 0; index < pos.length; index += 3) {
+                BABYLON.Vector3.TransformCoordinates(BABYLON.Vector3.FromArray(pos, index), transform).toArray(temp, index);
+            }
+            pos = temp;
             var matrix = new Array();
             //For now pointDepth will not be used and will be automatically calculated.
             //Future reference - try and find the best place to add a reference to the pointDepth variable.
             var arraySize = pointDepth || ~~(Math.sqrt(pos.length / 3) - 1);
             var boundingInfo = (object.getBoundingInfo());
-            var dim = Math.min(boundingInfo.boundingBox.extendSizeWorld.x, boundingInfo.boundingBox.extendSizeWorld.z);
-            var minY = boundingInfo.boundingBox.extendSizeWorld.y;
+            var dim = Math.min(boundingInfo.boundingBox.extendSizeWorld.x, boundingInfo.boundingBox.extendSizeWorld.y);
+            var minY = boundingInfo.boundingBox.extendSizeWorld.z;
             var elementSize = dim * 2 / arraySize;
             for (var i = 0; i < pos.length; i = i + 3) {
                 var x = Math.round((pos[i + 0]) / elementSize + arraySize / 2);
-                var z = Math.round(((pos[i + 2]) / elementSize - arraySize / 2) * -1);
-                var y = pos[i + 1] + minY;
+                var z = Math.round(((pos[i + 1]) / elementSize - arraySize / 2) * -1);
+                var y = -pos[i + 2] + minY;
                 if (!matrix[x]) {
                     matrix[x] = [];
                 }
@@ -67657,7 +67692,7 @@ var BABYLON;
                     isRGB: (header[off_pfFlags] & DDPF_RGB) === DDPF_RGB,
                     isLuminance: (header[off_pfFlags] & DDPF_LUMINANCE) === DDPF_LUMINANCE,
                     isCube: (header[off_caps2] & DDSCAPS2_CUBEMAP) === DDSCAPS2_CUBEMAP,
-                    isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || FOURCC_DXT1 === FOURCC_DXT5),
+                    isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || fourCC === FOURCC_DXT5),
                     dxgiFormat: dxgiFormat,
                     textureType: textureType
                 };

File diff suppressed because it is too large
+ 3936 - 3935
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 7 - 7
dist/preview release/inspector/babylon.inspector.d.ts

@@ -22,7 +22,7 @@ declare module INSPECTOR {
          * 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.
          */
-        constructor(scene: BABYLON.Scene, popup?: boolean, initialTab?: number, parentElement?: Nullable<HTMLElement>, newColors?: {
+        constructor(scene: BABYLON.Scene, popup?: boolean, initialTab?: number, parentElement?: BABYLON.Nullable<HTMLElement>, newColors?: {
             backgroundColor?: string;
             backgroundColorLighter?: string;
             backgroundColorLighter2?: string;
@@ -519,7 +519,7 @@ declare module INSPECTOR {
         private _prevY;
         /**Save value while slider is on */
         private _preValue;
-        constructor(prop: Property, parent?: Nullable<PropertyLine>, level?: number);
+        constructor(prop: Property, parent?: BABYLON.Nullable<PropertyLine>, level?: number);
         /**
          * Init the input element and al its handler :
          * - a click in the window remove the input and restore the old property value
@@ -709,7 +709,7 @@ declare module INSPECTOR {
         private _elem;
         /** The tooltip div */
         private _infoDiv;
-        constructor(elem: HTMLElement, tip: string, attachTo?: Nullable<HTMLElement>);
+        constructor(elem: HTMLElement, tip: string, attachTo?: BABYLON.Nullable<HTMLElement>);
     }
 }
 
@@ -745,12 +745,12 @@ declare module INSPECTOR {
         /**
          * Useful function used to create a div
          */
-        static CreateDiv(className?: Nullable<string>, parent?: HTMLElement): HTMLElement;
+        static CreateDiv(className?: BABYLON.Nullable<string>, parent?: HTMLElement): HTMLElement;
         /**
          * Useful function used to create a input
          */
         static CreateInput(className?: string, parent?: HTMLElement): HTMLInputElement;
-        static CreateElement(element: string, className?: Nullable<string>, parent?: HTMLElement): HTMLElement;
+        static CreateElement(element: string, className?: BABYLON.Nullable<string>, parent?: HTMLElement): HTMLElement;
         /**
          * Removes all children of the given div.
          */
@@ -846,7 +846,7 @@ declare module INSPECTOR {
         /** Set the given item as active in the tree */
         activateNode(item: TreeItem): void;
         /** Returns the treeitem corersponding to the given obj, null if not found */
-        getItemFor(_obj: any): Nullable<TreeItem>;
+        getItemFor(_obj: any): BABYLON.Nullable<TreeItem>;
         filter(filter: string): void;
         /** Builds the tree panel */
         protected abstract _getTree(): Array<TreeItem>;
@@ -1030,7 +1030,7 @@ declare module INSPECTOR {
          */
         switchMeshTab(mesh?: BABYLON.AbstractMesh): void;
         /** Returns the active tab */
-        getActiveTab(): Nullable<Tab>;
+        getActiveTab(): BABYLON.Nullable<Tab>;
         getActiveTabIndex(): number;
         readonly inspector: Inspector;
         /**

+ 2 - 2
inspector/src/Inspector.ts

@@ -22,13 +22,13 @@ module INSPECTOR {
 
         private _initialTab: number;
 
-        private _parentElement: Nullable<HTMLElement>;
+        private _parentElement: BABYLON.Nullable<HTMLElement>;
 
         /** 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.
          */
-        constructor(scene: BABYLON.Scene, popup?: boolean, initialTab: number = 0, parentElement: Nullable<HTMLElement> = null, newColors?: {
+        constructor(scene: BABYLON.Scene, popup?: boolean, initialTab: number = 0, parentElement: BABYLON.Nullable<HTMLElement> = null, newColors?: {
             backgroundColor?: string,
             backgroundColorLighter?: string,
             backgroundColorLighter2?: string,

+ 1 - 1
inspector/src/adapters/MeshAdapter.ts

@@ -5,7 +5,7 @@ module INSPECTOR {
         implements IToolVisible, IToolDebug, IToolBoundingBox, IToolInfo {
 
         /** Keep track of the axis of the actual object */
-        private _axesViewer: Nullable<BABYLON.Debug.AxesViewer>;
+        private _axesViewer: BABYLON.Nullable<BABYLON.Debug.AxesViewer>;
 
         constructor(obj: BABYLON.AbstractMesh) {
             super(obj);

+ 2 - 2
inspector/src/details/PropertyLine.ts

@@ -45,7 +45,7 @@ module INSPECTOR {
         /** The list of viewer element displayed at the end of the line (color, texture...) */
         private _elements: Array<BasicElement> = [];
         /** The property parent of this one. Used to update the value of this property and to retrieve the correct object */
-        private _parent: Nullable<PropertyLine>;
+        private _parent: BABYLON.Nullable<PropertyLine>;
         /** The input element to display if this property is 'simple' in order to update it */
         private _input: HTMLInputElement;
         /** Display input handler (stored to be removed afterwards) */
@@ -67,7 +67,7 @@ module INSPECTOR {
         /**Save value while slider is on */
         private _preValue: number;
 
-        constructor(prop: Property, parent: Nullable<PropertyLine> = null, level: number = 0) {
+        constructor(prop: Property, parent: BABYLON.Nullable<PropertyLine> = null, level: number = 0) {
             this._property = prop;
             this._level = level;
             this._parent = parent;

+ 1 - 1
inspector/src/gui/Tooltip.ts

@@ -11,7 +11,7 @@ module INSPECTOR {
         /** The tooltip div */
         private _infoDiv : HTMLDivElement;
         
-        constructor(elem: HTMLElement, tip:string, attachTo: Nullable<HTMLElement> = null) {
+        constructor(elem: HTMLElement, tip:string, attachTo: BABYLON.Nullable<HTMLElement> = null) {
             
             this._elem = elem;
             if (!attachTo) {

+ 2 - 2
inspector/src/helpers/Helpers.ts

@@ -100,7 +100,7 @@ module INSPECTOR {
         /**
          * Useful function used to create a div
          */
-        public static CreateDiv(className: Nullable<string> = null, parent?: HTMLElement): HTMLElement {
+        public static CreateDiv(className: BABYLON.Nullable<string> = null, parent?: HTMLElement): HTMLElement {
             return Helpers.CreateElement('div', className, parent);
         }
 
@@ -111,7 +111,7 @@ module INSPECTOR {
             return <HTMLInputElement>Helpers.CreateElement('input', className, parent);
         }
 
-        public static CreateElement(element: string, className: Nullable<string> = null, parent?: HTMLElement): HTMLElement {
+        public static CreateElement(element: string, className: BABYLON.Nullable<string> = null, parent?: HTMLElement): HTMLElement {
             let elem = Inspector.DOCUMENT.createElement(element);
 
             if (className) {

+ 2 - 2
inspector/src/tabs/PropertyTab.ts

@@ -106,11 +106,11 @@ module INSPECTOR {
         }
 
         /** Returns the treeitem corersponding to the given obj, null if not found */
-        public getItemFor(_obj: any): Nullable<TreeItem> {
+        public getItemFor(_obj: any): BABYLON.Nullable<TreeItem> {
             let obj = _obj as BABYLON.AbstractMesh;
 
             // Search recursively
-            let searchObjectInTree = (object: any, treeItem: TreeItem): Nullable<TreeItem> => {
+            let searchObjectInTree = (object: any, treeItem: TreeItem): BABYLON.Nullable<TreeItem> => {
                 if (treeItem.correspondsTo(object)) {
                     return treeItem;
                 }

+ 1 - 1
inspector/src/tabs/TabBar.ts

@@ -141,7 +141,7 @@ module INSPECTOR {
         }
 
         /** Returns the active tab */
-        public getActiveTab(): Nullable<Tab> {
+        public getActiveTab(): BABYLON.Nullable<Tab> {
             for (let tab of this._tabs) {
                 if (tab.isActive()) {
                     return tab;

+ 2 - 2
inspector/src/tools/LabelTool.ts

@@ -4,9 +4,9 @@ module INSPECTOR {
 
         /** True if label are displayed, false otherwise */
         private _isDisplayed: boolean = false;
-        private _advancedTexture: Nullable<BABYLON.GUI.AdvancedDynamicTexture> = null;
+        private _advancedTexture: BABYLON.Nullable<BABYLON.GUI.AdvancedDynamicTexture> = null;
         private _labelInitialized: boolean = false;
-        private _scene: Nullable<BABYLON.Scene> = null;
+        private _scene: BABYLON.Nullable<BABYLON.Scene> = null;
         private _guiLoaded: boolean = false;
 
         constructor(parent: HTMLElement, inspector: Inspector) {

assets/sounds/explosion.wav → inspector/test/explosion.wav


+ 8 - 8
inspector/test/index.js

@@ -57,8 +57,8 @@ var Test = (function () {
         */
 
         //Sounds
-        var jump = new BABYLON.Sound("Jump", "/assets/sounds/jump.wav", scene);
-        var explosion = new BABYLON.Sound("Explosion", "/assets/sounds/explosion.wav", scene);
+        var jump = new BABYLON.Sound("Jump", "test/jump.wav", scene);
+        var explosion = new BABYLON.Sound("Explosion", "test/explosion.wav", scene);
         jump.setVolume(0.1);
         window.addEventListener("keydown", function (evt) {
             if (evt.keyCode === 32) {
@@ -70,7 +70,7 @@ var Test = (function () {
         var skybox = BABYLON.Mesh.CreateBox("skyBox", 500.0, scene);
         var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
         skyboxMaterial.backFaceCulling = false;
-        skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/assets/textures/skybox/TropicalSunnyDay", scene);
+        skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/playground/textures/TropicalSunnyDay", scene);
         skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
         skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
         skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
@@ -172,28 +172,28 @@ var Test = (function () {
 
         //Creation of a material with an image texture
         var materialSphere3 = new BABYLON.StandardMaterial("texture3", scene);
-        materialSphere3.diffuseTexture = new BABYLON.Texture("/assets/textures/amiga.jpg", scene);
+        materialSphere3.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 
         //Creation of a material with translated texture
         var materialSphere4 = new BABYLON.StandardMaterial("texture4", scene);
-        materialSphere4.diffuseTexture = new BABYLON.Texture("/assets/textures/floor.png", scene);
+        materialSphere4.diffuseTexture = new BABYLON.Texture("/playground/textures/floor.png", scene);
         materialSphere4.diffuseTexture.vOffset = 0.1;//Vertical offset of 10%
         materialSphere4.diffuseTexture.uOffset = 0.4;//Horizontal offset of 40%
 
         //Creation of a material with an alpha texture
         var materialSphere5 = new BABYLON.StandardMaterial("texture5", scene);
-        materialSphere5.diffuseTexture = new BABYLON.Texture("/assets/textures/rock.png", scene);
+        materialSphere5.diffuseTexture = new BABYLON.Texture("/playground/textures/rock.png", scene);
         materialSphere5.diffuseTexture.hasAlpha = true;//Has an alpha
 
         //Creation of a material and show all the faces
         var materialSphere6 = new BABYLON.StandardMaterial("texture6", scene);
-        materialSphere6.diffuseTexture = new BABYLON.Texture("/assets/textures/grass.png", scene);
+        materialSphere6.diffuseTexture = new BABYLON.Texture("/playground/textures/grass.png", scene);
         materialSphere6.diffuseTexture.hasAlpha = true;//Have an alpha
         materialSphere6.backFaceCulling = false;//Show all the faces of the element
 
         //Creation of a repeated textured material
         var materialPlane = new BABYLON.StandardMaterial("texturePlane", scene);
-        materialPlane.diffuseTexture = new BABYLON.Texture("/assets/textures/mixMap.png", scene);
+        materialPlane.diffuseTexture = new BABYLON.Texture("/playground/textures/mixMap.png", scene);
         materialPlane.diffuseTexture.uScale = 5.0;
         materialPlane.diffuseTexture.vScale = 5.0;
         materialPlane.backFaceCulling = false;

assets/sounds/jump.wav → inspector/test/jump.wav


+ 1 - 1
localDev/index.html

@@ -6,7 +6,7 @@
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
 	<script src="https://preview.babylonjs.com/cannon.js"></script>
 	<script src="https://preview.babylonjs.com/Oimo.js"></script>
-	<script src="../assets/refs/dat.gui.min.js"></script>
+	<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
 	<script src="../tools/DevLoader/BabylonLoader.js"></script>
 	<script src="src/webgl-debug.js"></script>
 

+ 6 - 6
materialsLibrary/index.html

@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>Shaders Library</title>
-	<script src="../assets/refs/dat.gui.min.js"></script>
+	<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
 	<script src="../Tools/DevLoader/BabylonLoader.js"></script>
 
 	<style>
@@ -93,14 +93,14 @@
 			var knot = BABYLON.Mesh.CreateTorusKnot("knot", 10, 3, 128, 64, 2, 3, scene);
 			knot.setEnabled(false);
 			
-			var heightMap = BABYLON.Mesh.CreateGroundFromHeightMap("heightMap", "../assets/textures/heightMap.png", 100, 100, 100, 0, 10, scene, false);
+			var heightMap = BABYLON.Mesh.CreateGroundFromHeightMap("heightMap", "/playground/textures/heightMap.png", 100, 100, 100, 0, 10, scene, false);
 			heightMap.setEnabled(false);
 			
 			// Skybox
 			var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
 			var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
 			skyboxMaterial.backFaceCulling = false;
-			skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../assets/textures/skybox/TropicalSunnyDay", scene);
+			skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/playground/textures/TropicalSunnyDay", scene);
 			skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
 			skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
 			skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
@@ -112,7 +112,7 @@
 
 			// Rabbit
 			var rabbit;
-			BABYLON.SceneLoader.ImportMesh("Rabbit", "../assets/meshes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
+			BABYLON.SceneLoader.ImportMesh("Rabbit", "/playground/scenes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
 				rabbit = newMeshes[1];
 				rabbit.setEnabled(false);
 				rabbit.scaling = new BABYLON.Vector3(0.3, 0.3, 0.3);
@@ -171,14 +171,14 @@
 				
 				// Create shaders
 				var std = new BABYLON.StandardMaterial("std", scene);
-				std.diffuseTexture = new BABYLON.Texture("../assets/textures/amiga.jpg", scene);
+				std.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 				std.diffuseTexture.uScale = 5;
 				std.diffuseTexture.vScale = 5;
 
                 var lava = prepareLava();
 
 				var simple = new BABYLON.SimpleMaterial("simple", scene);
-				simple.diffuseTexture = new BABYLON.Texture("../assets/textures/amiga.jpg", scene);
+				simple.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 				simple.diffuseTexture.uScale = 5;
 				simple.diffuseTexture.vScale = 5;
 

+ 1 - 1
materialsLibrary/test/addCell.js

@@ -1,6 +1,6 @@
 window.prepareCell = function() {
     var cell = new BABYLON.CellMaterial("cell", scene);
-	cell.diffuseTexture = new BABYLON.Texture("../assets/textures//amiga.jpg", scene);
+	cell.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 	cell.diffuseTexture.uScale = cell.diffuseTexture.vScale = 3;
 	cell.computeHighLevel = true;
 

+ 0 - 1
materialsLibrary/test/addbackground.js

@@ -1,6 +1,5 @@
 window.prepareBackgroundMaterial = function() {
 	var backSky = new BABYLON.BackgroundMaterial("backSky", scene);
-	//var hdrTexture = new BABYLON.HDRCubeTexture("../assets/textures/hdr/environment.hdr", scene, 512);
 	var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/playground/textures/environment.dds", scene);
 	hdrTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE
 	backSky.reflectionTexture = hdrTexture;

+ 3 - 3
materialsLibrary/test/addfire.js

@@ -1,8 +1,8 @@
 window.prepareFire = function() {
     var fire = new BABYLON.FireMaterial("fire", scene);
-    fire.diffuseTexture = new BABYLON.Texture("../assets/textures/fire/diffuse.png", scene);
-    fire.distortionTexture = new BABYLON.Texture("../assets/textures/fire/distortion.png", scene);
-    fire.opacityTexture = new BABYLON.Texture("../assets/textures/fire/opacity.png", scene);
+    fire.diffuseTexture = new BABYLON.Texture("/playground/textures/fire/diffuse.png", scene);
+    fire.distortionTexture = new BABYLON.Texture("/playground/textures/fire/distortion.png", scene);
+    fire.opacityTexture = new BABYLON.Texture("/playground/textures/fire/opacity.png", scene);
     
     registerRangeUI("fire", "speed", 0, 20, function(value) {
 		fire.speed = value;

+ 2 - 2
materialsLibrary/test/addfur.js

@@ -2,8 +2,8 @@ window.prepareFur = function() {
 	var shells = 30;
 	var meshes = [];
 	
-	var diffuseTexture = new BABYLON.Texture("../assets/textures/leopard_fur.JPG", scene);
-	var heightTexture = new BABYLON.Texture("../assets/textures/speckles.jpg", scene);
+	var diffuseTexture = new BABYLON.Texture("/playground/textures/leopard_fur.JPG", scene);
+	var heightTexture = new BABYLON.Texture("/playground/textures/speckles.jpg", scene);
 	var furTexture = BABYLON.FurMaterial.GenerateTexture("furTexture", scene);
 	
 	var fur = new BABYLON.FurMaterial("fur", scene);

+ 2 - 2
materialsLibrary/test/addlava.js

@@ -1,9 +1,9 @@
 window.prepareLava = function() {
     var lava = new BABYLON.LavaMaterial("lava", scene);
-    lava.diffuseTexture = new BABYLON.Texture("../assets/textures/lava/lavatile.jpg", scene);
+    lava.diffuseTexture = new BABYLON.Texture("/playground/textures/lava/lavatile.jpg", scene);
     lava.diffuseTexture.uScale = 0.5;
     lava.diffuseTexture.vScale = 0.5;
-    lava.noiseTexture = new BABYLON.Texture("../assets/textures/lava/cloud.png", scene);
+    lava.noiseTexture = new BABYLON.Texture("/playground/textures/lava/cloud.png", scene);
     lava.fogColor = BABYLON.Color3.Black();
     lava.speed = 2.5;
 

+ 4 - 6
materialsLibrary/test/addpbr.js

@@ -1,14 +1,13 @@
 window.preparePBR = function() {
 	var pbr = new BABYLON.PBRMaterial("pbr", scene);
 
-	pbr.albedoTexture = new BABYLON.Texture("../assets/textures/amiga.jpg", scene);
+	pbr.albedoTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 	pbr.albedoTexture.uScale = 5;
 	pbr.albedoTexture.vScale = 5;
     
-    var hdrTexture = new BABYLON.HDRCubeTexture("../assets/textures/hdr/environment.hdr", scene, 512);
+    var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
 
-    //var colorGradingTexture = new BABYLON.ColorGradingTexture("../assets/textures/ColorGrading.3DL", scene);
-    
+   
     // Uncomment for PMREM Generation
     // var hdrTexture = new BABYLON.HDRCubeTexture("textures/hdr/environment.hdr", scene, 128, false, true, false, true);
     pbr.reflectionTexture = hdrTexture;
@@ -16,8 +15,7 @@ window.preparePBR = function() {
     pbr.linkRefractionWithTransparency = true;
     pbr.indexOfRefraction = 0.52;
 
-	// var colorGrading = new BABYLON.ColorGradingTexture("../assets/textures/lateSunset.3DL", scene);
-	var colorGrading = new BABYLON.Texture("../assets/textures/colorGrade.png", scene, true);
+	var colorGrading = new BABYLON.Texture("/playground/textures/colorGrade.png", scene, true);
 	pbr.cameraColorGradingTexture = colorGrading;
 	pbr.colorGradingEnabled = true;
 

+ 2 - 2
materialsLibrary/test/addpbrmetallicroughness.js

@@ -1,14 +1,14 @@
 window.preparePBRMetallicRoughness = function() {
 	var pbr = new BABYLON.PBRMetallicRoughnessMaterial("pbrmetallicroughness", scene);
 
-	pbr.baseTexture = new BABYLON.Texture("../assets/textures/amiga.jpg", scene);
+	pbr.baseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 	pbr.baseTexture.uScale = 5;
 	pbr.baseTexture.vScale = 5;
 	pbr.metallic = 0.5;
 	pbr.roughness = 0.1;
 
     // Uncomment for PMREM Generation
-    var hdrTexture = new BABYLON.HDRCubeTexture("../assets/textures/hdr/environment.hdr", scene, 512);
+    var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
     // var hdrTexture = new BABYLON.HDRCubeTexture("textures/hdr/environment.hdr", scene, 128, false, true, false, true);
 
     // Skybox

+ 2 - 2
materialsLibrary/test/addpbrspecularglossiness.js

@@ -1,14 +1,14 @@
 window.preparePBRSpecularGlossiness = function() {
 	var pbr = new BABYLON.PBRSpecularGlossinessMaterial("pbrspecularglossiness", scene);
 
-	pbr.diffuseTexture = new BABYLON.Texture("../assets/textures/amiga.jpg", scene);
+	pbr.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
 	pbr.diffuseTexture.uScale = 5;
 	pbr.diffuseTexture.vScale = 5;
 	pbr.specularColor = new BABYLON.Color3(0.3, 0.3, 0.3);
 	pbr.glossiness = 0.9;
 
     // Uncomment for PMREM Generation
-    var hdrTexture = new BABYLON.HDRCubeTexture("../assets/textures/hdr/environment.hdr", scene, 512);
+    var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
     // var hdrTexture = new BABYLON.HDRCubeTexture("textures/hdr/environment.hdr", scene, 128, false, true, false, true);
 
     // Skybox

+ 7 - 7
materialsLibrary/test/addterrain.js

@@ -2,14 +2,14 @@ window.prepareTerrain = function() {
     var terrain = new BABYLON.TerrainMaterial("terrain", scene);
     terrain.specularColor = new BABYLON.Color3(0.5, 0.5, 0.5);
     terrain.specularPower = 64;
-    terrain.mixTexture = new BABYLON.Texture("../assets/textures/mixMap.png", scene);
-    terrain.diffuseTexture1 = new BABYLON.Texture("../assets/textures/floor.png", scene);
-    terrain.diffuseTexture2 = new BABYLON.Texture("../assets/textures/rock.png", scene);
-    terrain.diffuseTexture3 = new BABYLON.Texture("../assets/textures/grass.png", scene);
+    terrain.mixTexture = new BABYLON.Texture("/playground/textures/mixMap.png", scene);
+    terrain.diffuseTexture1 = new BABYLON.Texture("/playground/textures/floor.png", scene);
+    terrain.diffuseTexture2 = new BABYLON.Texture("/playground/textures/rock.png", scene);
+    terrain.diffuseTexture3 = new BABYLON.Texture("/playground/textures/grass.png", scene);
     
-    terrain.bumpTexture1 = new BABYLON.Texture("../assets/textures/floor_bump.PNG", scene);
-    terrain.bumpTexture2 = new BABYLON.Texture("../assets/textures/rockn.png", scene);
-    terrain.bumpTexture3 = new BABYLON.Texture("../assets/textures/grassn.png", scene);
+    terrain.bumpTexture1 = new BABYLON.Texture("/playground/textures/floor_bump.PNG", scene);
+    terrain.bumpTexture2 = new BABYLON.Texture("/playground/textures/rockn.png", scene);
+    terrain.bumpTexture3 = new BABYLON.Texture("/playground/textures/grassn.png", scene);
     
     terrain.diffuseTexture1.uScale = terrain.diffuseTexture1.vScale = 10;
     terrain.diffuseTexture2.uScale = terrain.diffuseTexture2.vScale = 10;

+ 0 - 0
materialsLibrary/test/addtriplanar.js


Some files were not shown because too many files changed in this diff