refine code

This commit is contained in:
yinkaile
2018-03-21 18:35:25 +08:00
parent d718101b3e
commit 54fe7164de
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ let RenderTexture = cc.Class({
this.width = Math.floor(width || cc.visibleRect.width);
this.height = Math.floor(height || cc.visibleRect.height);
let opts = Texture2D._getSharedOptions();
let opts = {};
opts.format = this._format;
opts.width = width;
opts.height = height;
+1 -3
View File
@@ -239,9 +239,7 @@ var Texture2D = cc.Class({
WrapMode: WrapMode,
Filter: Filter,
// predefined most common extnames
extnames: ['.png', '.jpg', '.jpeg', '.bmp', '.webp'],
_getSharedOptions: _getSharedOptions
extnames: ['.png', '.jpg', '.jpeg', '.bmp', '.webp']
},
ctor () {