mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
refine code
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user