瀏覽代碼

Replace data: by nothing when serializing a texture base on a base64 string

Julien Moreau-Mathis 8 年之前
父節點
當前提交
6aadf82b57
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Materials/Textures/babylon.texture.ts

+ 1 - 0
src/Materials/Textures/babylon.texture.ts

@@ -308,6 +308,7 @@
             
             if (typeof this._buffer === "string" && this._buffer.substr(0, 5) === "data:") {
                 serializationObject.base64String = this._buffer;
+                serializationObject.name = serializationObject.name.replace("data:", "");
             }
 
             return serializationObject;