|
@@ -12974,7 +12974,7 @@ var BABYLON;
|
|
|
* Returns the current version of the framework
|
|
|
*/
|
|
|
get: function () {
|
|
|
- return "4.0.0-alpha.12";
|
|
|
+ return "4.0.0-alpha.14";
|
|
|
},
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
@@ -41687,7 +41687,15 @@ var BABYLON;
|
|
|
this.setIndices(indices, null, true);
|
|
|
}
|
|
|
else {
|
|
|
+ var needToUpdateSubMeshes = indices.length !== this._indices.length;
|
|
|
+ this._indices = indices;
|
|
|
this._engine.updateDynamicIndexBuffer(this._indexBuffer, indices, offset);
|
|
|
+ if (needToUpdateSubMeshes) {
|
|
|
+ for (var _i = 0, _a = this._meshes; _i < _a.length; _i++) {
|
|
|
+ var mesh = _a[_i];
|
|
|
+ mesh._createGlobalSubMesh(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
/**
|
|
@@ -41711,10 +41719,9 @@ var BABYLON;
|
|
|
if (totalVertices != undefined) { // including null and undefined
|
|
|
this._totalVertices = totalVertices;
|
|
|
}
|
|
|
- var meshes = this._meshes;
|
|
|
- var numOfMeshes = meshes.length;
|
|
|
- for (var index = 0; index < numOfMeshes; index++) {
|
|
|
- meshes[index]._createGlobalSubMesh(true);
|
|
|
+ for (var _i = 0, _a = this._meshes; _i < _a.length; _i++) {
|
|
|
+ var mesh = _a[_i];
|
|
|
+ mesh._createGlobalSubMesh(true);
|
|
|
}
|
|
|
this.notifyUpdate();
|
|
|
};
|
|
@@ -42020,17 +42027,19 @@ var BABYLON;
|
|
|
for (kind in this._vertexBuffers) {
|
|
|
// using slice() to make a copy of the array and not just reference it
|
|
|
var data = this.getVerticesData(kind);
|
|
|
- if (data instanceof Float32Array) {
|
|
|
- vertexData.set(new Float32Array(data), kind);
|
|
|
- }
|
|
|
- else {
|
|
|
- vertexData.set(data.slice(0), kind);
|
|
|
- }
|
|
|
- if (!stopChecking) {
|
|
|
- var vb = this.getVertexBuffer(kind);
|
|
|
- if (vb) {
|
|
|
- updatable = vb.isUpdatable();
|
|
|
- stopChecking = !updatable;
|
|
|
+ if (data) {
|
|
|
+ if (data instanceof Float32Array) {
|
|
|
+ vertexData.set(new Float32Array(data), kind);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ vertexData.set(data.slice(0), kind);
|
|
|
+ }
|
|
|
+ if (!stopChecking) {
|
|
|
+ var vb = this.getVertexBuffer(kind);
|
|
|
+ if (vb) {
|
|
|
+ updatable = vb.isUpdatable();
|
|
|
+ stopChecking = !updatable;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|