|
@@ -18349,6 +18349,13 @@ var BABYLON;
|
|
|
this._engine.setFloat3(this.getUniform(uniformName), x, y, z);
|
|
|
return this;
|
|
|
};
|
|
|
+ Effect.prototype.setVector4 = function (uniformName, vector4) {
|
|
|
+ if (this._valueCache[uniformName] && this._valueCache[uniformName][0] === vector4.x && this._valueCache[uniformName][1] === vector4.y && this._valueCache[uniformName][2] === vector4.z && this._valueCache[uniformName][3] === vector4.w)
|
|
|
+ return this;
|
|
|
+ this._cacheFloat4(uniformName, vector4.x, vector4.y, vector4.z, vector4.w);
|
|
|
+ this._engine.setFloat4(this.getUniform(uniformName), vector4.x, vector4.y, vector4.z, vector4.w);
|
|
|
+ return this;
|
|
|
+ };
|
|
|
Effect.prototype.setFloat4 = function (uniformName, x, y, z, w) {
|
|
|
if (this._valueCache[uniformName] && this._valueCache[uniformName][0] === x && this._valueCache[uniformName][1] === y && this._valueCache[uniformName][2] === z && this._valueCache[uniformName][3] === w)
|
|
|
return this;
|
|
@@ -19393,7 +19400,7 @@ var BABYLON;
|
|
|
try {
|
|
|
if (!plugin.importMesh(meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons)) {
|
|
|
if (onerror) {
|
|
|
- onerror(scene, 'unable to load the scene');
|
|
|
+ onerror(scene, 'Unable to import meshes from ' + rootUrl + sceneFilename);
|
|
|
}
|
|
|
scene._removePendingData(loadingToken);
|
|
|
return;
|
|
@@ -19401,7 +19408,7 @@ var BABYLON;
|
|
|
}
|
|
|
catch (e) {
|
|
|
if (onerror) {
|
|
|
- onerror(scene, e);
|
|
|
+ onerror(scene, 'Unable to import meshes from ' + rootUrl + sceneFilename + ' (Exception: ' + e + ')');
|
|
|
}
|
|
|
scene._removePendingData(loadingToken);
|
|
|
return;
|
|
@@ -25706,6 +25713,7 @@ var BABYLON;
|
|
|
this._colors4 = new Array();
|
|
|
this._vectors2 = new Array();
|
|
|
this._vectors3 = new Array();
|
|
|
+ this._vectors4 = new Array();
|
|
|
this._matrices = new Array();
|
|
|
this._cachedWorldViewMatrix = new BABYLON.Matrix();
|
|
|
this._shaderPath = shaderPath;
|
|
@@ -25764,6 +25772,11 @@ var BABYLON;
|
|
|
this._vectors3[name] = value;
|
|
|
return this;
|
|
|
};
|
|
|
+ ShaderMaterial.prototype.setVector4 = function (name, value) {
|
|
|
+ this._checkUniform(name);
|
|
|
+ this._vectors4[name] = value;
|
|
|
+ return this;
|
|
|
+ };
|
|
|
ShaderMaterial.prototype.setMatrix = function (name, value) {
|
|
|
this._checkUniform(name);
|
|
|
this._matrices[name] = value;
|
|
@@ -25865,6 +25878,10 @@ var BABYLON;
|
|
|
for (name in this._vectors3) {
|
|
|
this._effect.setVector3(name, this._vectors3[name]);
|
|
|
}
|
|
|
+ // Vector4
|
|
|
+ for (name in this._vectors4) {
|
|
|
+ this._effect.setVector4(name, this._vectors4[name]);
|
|
|
+ }
|
|
|
// Matrix
|
|
|
for (name in this._matrices) {
|
|
|
this._effect.setMatrix(name, this._matrices[name]);
|