|
@@ -4422,7 +4422,7 @@ var BABYLON;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
try {
|
|
try {
|
|
- var textureName = url.substring(5);
|
|
|
|
|
|
+ var textureName = url.substring(5).toLowerCase();
|
|
var blobURL;
|
|
var blobURL;
|
|
try {
|
|
try {
|
|
blobURL = URL.createObjectURL(BABYLON.FilesInput.FilesTextures[textureName], { oneTimeOnly: true });
|
|
blobURL = URL.createObjectURL(BABYLON.FilesInput.FilesTextures[textureName], { oneTimeOnly: true });
|
|
@@ -10314,8 +10314,10 @@ var BABYLON;
|
|
var light = scene.getLightByID(parsedShadowGenerator.lightId);
|
|
var light = scene.getLightByID(parsedShadowGenerator.lightId);
|
|
var shadowGenerator = new ShadowGenerator(parsedShadowGenerator.mapSize, light);
|
|
var shadowGenerator = new ShadowGenerator(parsedShadowGenerator.mapSize, light);
|
|
for (var meshIndex = 0; meshIndex < parsedShadowGenerator.renderList.length; meshIndex++) {
|
|
for (var meshIndex = 0; meshIndex < parsedShadowGenerator.renderList.length; meshIndex++) {
|
|
- var mesh = scene.getMeshByID(parsedShadowGenerator.renderList[meshIndex]);
|
|
|
|
- shadowGenerator.getShadowMap().renderList.push(mesh);
|
|
|
|
|
|
+ var meshes = scene.getMeshesByID(parsedShadowGenerator.renderList[meshIndex]);
|
|
|
|
+ meshes.forEach(function (mesh) {
|
|
|
|
+ shadowGenerator.getShadowMap().renderList.push(mesh);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
if (parsedShadowGenerator.usePoissonSampling) {
|
|
if (parsedShadowGenerator.usePoissonSampling) {
|
|
shadowGenerator.usePoissonSampling = true;
|
|
shadowGenerator.usePoissonSampling = true;
|
|
@@ -15403,6 +15405,11 @@ var BABYLON;
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
};
|
|
};
|
|
|
|
+ Scene.prototype.getMeshesByID = function (id) {
|
|
|
|
+ return this.meshes.filter(function (m) {
|
|
|
|
+ return m.id === id;
|
|
|
|
+ });
|
|
|
|
+ };
|
|
/**
|
|
/**
|
|
* Get a mesh with its auto-generated unique id
|
|
* Get a mesh with its auto-generated unique id
|
|
* @param {number} uniqueId - the unique id to search for
|
|
* @param {number} uniqueId - the unique id to search for
|
|
@@ -16100,7 +16107,9 @@ var BABYLON;
|
|
// Debug layer
|
|
// Debug layer
|
|
this.debugLayer.hide();
|
|
this.debugLayer.hide();
|
|
// Events
|
|
// Events
|
|
- this.onDisposeObservable.notifyObservers(this);
|
|
|
|
|
|
+ if (this.onDispose) {
|
|
|
|
+ this.onDispose();
|
|
|
|
+ }
|
|
this.onBeforeRenderObservable.clear();
|
|
this.onBeforeRenderObservable.clear();
|
|
this.onAfterRenderObservable.clear();
|
|
this.onAfterRenderObservable.clear();
|
|
this.detachControl();
|
|
this.detachControl();
|
|
@@ -18241,6 +18250,7 @@ var BABYLON;
|
|
* - setPivotMatrix
|
|
* - setPivotMatrix
|
|
* - scaling
|
|
* - scaling
|
|
* tuto : http://doc.babylonjs.com/tutorials/How_to_use_Instances
|
|
* tuto : http://doc.babylonjs.com/tutorials/How_to_use_Instances
|
|
|
|
+ * Warning : this method is not supported for `Line` mesh and `LineSystem`
|
|
*/
|
|
*/
|
|
Mesh.prototype.createInstance = function (name) {
|
|
Mesh.prototype.createInstance = function (name) {
|
|
return new BABYLON.InstancedMesh(name, this);
|
|
return new BABYLON.InstancedMesh(name, this);
|